Computers in Physics

0 downloads 0 Views 1MB Size Report
Oct 17, 2016 - Lattice Gases Illustrate the Power of Cellular Automata in Physics. Bruce M. ... a powerful tool for the study of hydrodynamics and kinetic theory.
Computers in Physics Lattice Gases Illustrate the Power of Cellular Automata in Physics Bruce M. Boghosian Citation: Computers in Physics 5, 585 (1991); doi: 10.1063/1.4823030 View online: http://dx.doi.org/10.1063/1.4823030 View Table of Contents: http://scitation.aip.org/content/aip/journal/cip/5/6?ver=pdfcov Published by the AIP Publishing Articles you may be interested in Microchannel Flow with Lattice Gas Cellular Automata and Lattice Boltzmann Method AIP Conf. Proc. 1084, 1033 (2008); 10.1063/1.3076434 Physical constraints on magnetic quantum cellular automata Appl. Phys. Lett. 83, 2046 (2003); 10.1063/1.1608492 Period lengths of cellular automata on square lattices with rule 90 J. Math. Phys. 36, 1435 (1995); 10.1063/1.531132 Flow through arrays of cylinders: Lattice gas cellular automata simulations Phys. Fluids 6, 435 (1994); 10.1063/1.868341 Dissipative hydrodynamic interactions via lattice‐gas cellular automata Phys. Fluids A 2, 1921 (1990); 10.1063/1.857667

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 192.30.84.169 On: Mon, 17 Oct 2016 11:25:07

Lattice Gases Illustrate the Power of Cellular Automata in Physics Bruce M. Boghosian

Over the past few years~ lattice-gas simulations have developed into a powerful tool for the study of hydrodynamics and kinetic theory lattice gas is a dynamical system in which particles move about on a lattice in discrete time steps. In much the same way that the Ising model and other similar lattice spin models provide simple examples of equilibrium statistical mechanical systems, lattice gases capture many features of nonequilibrium statistical mechanical systems, such as fluids in motion. Five years ago, a seminal paper by Frisch, Hasslacher and Pomeau I (FHP) marked the beginning of the modern age of lattice-gas research. In that work, it was shown that a lattice gas can be used to solve the equations of two-dimensional incompressible Navier-Stokes flow.? The method has since been extended to treat magnetohydrodynamics," immiscible fluids with a surface tension interface, 4,5 convection," two-phase liquid-gas flow," Burgers' equations," and reaction-diffusion equations." For a summary of relevant recent works, see the proceedings edited by Doolen,lO,l1 by Monaco,'? by Manneville et al.," by Bruce M Boghosian is a Research Physicist at Thinking Machines Corp" Cambridge, MA.

Alves,14 and by Boon and Lebowitz.15 Why should we expect that the average behavior of discrete particles on a lattice will be like that of a fluid? The answer was perhaps put most eloquently by Feynman." "We have noticed in nature that the behavior of a fluid depends very little on the nature of the individual particles in that fluid. For example, the flowof sand is very similar to the flow of water or the flow of a pile of ball bearings. We have therefore taken advantage of this fact to invent a type of imaginary particle that is especially simple for us to simulate. This particle is a perfect ball bearing that can move at a single speed in one of six directions. The flow of these particles on a large enough scale is very similar to the flow of natural fluids." Note that molasses, air, and water all satisfy the Navier-Stokes equations (albeit with very different viscosities), even though the details of their molecular interactions are very different.One property that their molecular interactions do share is conservation of mass and momentum: to some extent, this is what makes a fluid a fluid. Given these microscopic conservation laws, kinetic theory tells

us how to derive the form of the macroscopic hydrodynamic equations obeyed by the conserved quantities of the system. All the machinery of kinetic theory can be applied to lattice gases to perform this analysis. 1,2,17 It is this analysis that shows that the FHP lattice gas does indeed obey the Navier-Stokes equations in the incompressible limit and gives an expression for the viscosity.The theoretical justification for lattice-gas studies will form the basis of a review article that I have prepared for publication in a forthcoming issue of this magazine. This summary will concentrate on examples that illustrate the ease of implementation and the power of the technique.

Navier-stokes in 20 and 3D The lattice gas introduced in the paper by FHp l uses a triangular lattice. The collision rules for one version of this lattice gas are shown in Fig. 1. Note that the collisions conserve both mass and momentum, as is appropriate for the incompressible Navier-Stokesequations. (There is no need for a conserved energy, as the equation of state is irrelevant in the

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 192.30.84.169 On: Mon, 17 Oct 2016 11:25:07 COMPUTERS IN PHYSICS, NOV/DEC 1991 585

In

I ••

Out

/

>-

\

or

>\(

7'

x -I--

or

~

Fig. 1: Collision rules for triangular FlIP lattice conserve both mass and momentum.

incompressible limit.) Only the nontrivial collisions have been shown; for all other incoming situations, the particles simply pass through each other. The reason for the triangular lattice is interesting. Earlier work on lattice gases'" had considered a massand momentum-conserving system on a Cartesian lattice, and had shown that the resultant hydrodynamic equations were anisotropic. It turns out that a triangular lattice is necessary to ensure isotropy in the hydrodynamic limit in two dimensions (2D). Obviously, lattice gases are characterized by microscopic anisotropy, but one does not want this anisotropy to survive the coarse-grain averaging that is done to get the hydrodynamic variables. One would not want, for example, the magnitude of the drag force exerted by a fluid flowing past an obstacle to depend on the angle of orientation of the obstacle with respect to the underlying lattice. One can show that in 2D a triangular lattice will ensure macroscopic isotropy, whereas a Cartesian lattice will not. Note that this is more than just a quantitative distinction. The claim, which by now has been verified by numerous simulations, is that one obtains perfect macroscopic isotropy when one uses the triangular grid. This isotropy issue became important when researchers wanted to

generalize the lattice-gas method to simulate 3D Navier-Stokes flow. To get isotropic hydrodynamic equations in 3D, generalizations of the above argument indicated that a lattice with icosahedral symmetry would have to be used. 17 It is well known, however, that no 3D regular lattice exists with this symmetry, and this fact temporarily stalled progress in the field. The problem was solved" by noting that a regular lattice with the requisite symmetry exists in 4D. It is the so-called face-centered hypercubic (FCHC) lattice, each site of which has 24 neighbors. Its projection to 3D is an irregular lattice that works perfectly. Rivet'? used this model to simulate flow past a flat circular plate in 3D. He was able to simulate the symmetry breaking that occurs in azimuthal angle at Reynolds numbers in the vicinity of 200.

Compmr Implementation The ease of implementing lattice-gas simulations on distributed-memory massively parallel computers has been put forth as an important advantage of the technique. Shortly after the introduction of the FHP lattice gas, for example, researchers were able to simulate it at 7.5 X 108 site updates per second on a Connection Machine'" computer. The usual simulation technique on a massively parallel computer is to associate one processor with a node,

or a small localized group of nodes, on the spatial grid. The processors need to communicate as particles move from site to site. The collision of particles at each timestep is then performed in parallel by all the processors. This algorithm assumes that each processor is capable of determining the outcome of a collision on its own. For the FHP gas this was easy, since there were only at most six particles, represented by six bits, at a site. A collision could thus be thought of as a map from six bits of input state to six bits of output state at each site. This could be implemented by a straightforward succession of simple logical rules. On massively parallel computers capable of parallel array reference (with a different index in each processor), such as the Connection Machine, it is usually faster to implement the collision by simply storing a local lookup table of all possible outgoing states, indexed by all possible incoming states, in each processor. For the FHP lattice gas, such a lookup table would have 26 = 64 entries, each of length six bits. Thus, this table would fit into a mere 48 bytes of memory. This became more of an issue for the 3D FCHC model. On the FCHC lattice, each site has 24 neighboring sites. Thus a lookup table would require 24X2 24/8 or 48 MB of storage. This exceeds the local memory capacity of processors on most distributed-memory computers. Restricting the class of possible collisions by insisting that the outgoing state be an isometric transformation of the incoming state would allow for a simple implementation using logical bit manipulation, but was shown to result in a fluid with unacceptably high values of viscosity, and hence low values of Reynolds number.?" A solution to this problem was given by Rem and Somers2 1,22 who showed how to implement high-Reynolds number collision rules by performing a succession of lookup operations on subsets of bits in the incoming state, using lookup tables small enough to fit on the local memory of the transputer arrays that they used in their work. There is ongoing work in this area, and it is quite possible that yet-more-efficient algorithms will be discovered for distributed-memory machines.

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 192.30.84.169 On: Mon, 17 Oct 2016 11:25:07 586 COMPUTERS IN PHYSICS. NOV/DEC 1991

representations of photographs of actual porous medium samples from the Petroleum Recovery Research Institute in Socorro, New Mexico. They have used these to simulate flow through the samples with a lattice gas and have compared the results to those of actual experiments performed on the samples. They report agreement of the pressure distribution to within the 10% error bars of the experiment. This is a striking experimental verification of the technique for a problem that has resisted any other method of computational solution (see Fig. 2).

Other techniques exist for the implementation of lattice gases on vector computers. One method, known as multispin coding, packs the corresponding bits at each of 64 sites into one word of data. Logical operations involving bits at each site can then be performed simultaneously on 64 different sites by one logical operation on the vector unit. This technique can also be used on massively parallel computers with distributed vector units. For a description of the technique, see Ref. 23.

Other Examples: Flow In Porous Media

Two-Component Immiscible Flow

Rothmarr'" first noted that lattice gases were useful for simulations of flow through porous media. One represents the labyrinthine channels of the porous medium discretely on the lattice-gas grid. Because the channel width is a new scale length in the problem, one must ensure that the mean free path is much smaller than the channel width, which in turn is much smaller than the porous mediurn sample under study. In recent experimental work, Chen et al.25 have obtained digitized

...

A model developed by Rothman and Keller4 has modeled the flow of two incompressible, immiscible NavierStokes fluids with interfacial surface tension. It uses an FHP-like model with particles of two different colors (say, red and blue) corresponding to 'the two components. The number of red particles, the number of blue particles, and the total (uncolored) momentum are all conserved by collisions. This is appropriate since the mass of each of the two components is

!

I

SigmaPlo

Designed by scientists for scientists

Theworld's finest PC software for the production ofpublication-quality scientific charts and graphs...onyour own IBM orcompatible personal computer. /

• Easy-to-use pull-down menu interface • Direct data input from Lotus 1~ and ASCII files • Automatic error-bars, confidence intervals and quality-control lines • Wide range ofspecialized scales and graphs • Outstandingpage layout control • Sophisticated non-linear curve fitting • Full mathematicai transform language • Huge data worksheet • Export graphs into WordPerfect" 5.0, Microsoft Word , Pagemaker",Ventura Publisher'"and others • Extremely high-quality output

Used by over 25,000 scientists

SigmaPlot isthe software ofchoice worldwide for creatinggraphics for scientific papers and poster sessions. PCMagazine says, "JandelScientific has hitthe bullseye with SigmaPlol"And INFOWORLD recently called SigmaPlot "thebest graphics package for the complex technical graphs wanted by most scientists and engineers."

separately conserved, but momentum can be transferred from one component to the other at an interface. In general, there are many possible outcomes for a given collisionthat obey these conservation laws, some differing only by color interchanges. In a manner carefully quantified in Ref. 4, the outcome is chosen so that red (blue) particles are preferentially sent toward predominantly red (blue) neighboring sites. It is this affinityof particles for other particles of the same color that gives the two components cohesion and gives their interface surface tension. In regions of homogeneity (i.e. several mean free paths away from an interface), the model reduces to the standard FHP model, so that the Navier-Stokes equations are satisfied. To demonstrate the existenceof interfacial surface tension, Rothman presented experimental evidence that a homogenized mixture of the two components does indeed separate (see Fig. 3), and that the pressure drop between the interior and the exterior of a circular bubble of radius r is proportional to lIr, as expected. A simpler 20 implementation along

Affordable and fully supported Sigrnal'lot 4.1 iswell within reach ofany research facility. And, like all Jandel products, SigmaPlot comes with a money-back guarantee and the full technical support ofJandel's experts. Call today for a FREE brochure: 1-800-874-1888 (toll-free within the U.S.)or415-924-8640.

andel ,

C lEN T I F i e '~_"'IJw_-

Koch Road P.O. 801996 CorteMaden.CA94925

FAX:41S-924-2850 '1REX:4931m InElJrope: Schimm