ideaz- cellular automata for flow simulation- transport phenomena

4
Cellular Automata as an Alternative for Flow Simulation. Waqar Sarguroh, Nitin Gupta, Falgun Shah  IIT R oorkee  Roork ee, Har idwar, India. [email protected] [email protected]  [email protected]   Abstract -This paper is basically a review of cellular automaton fluids, which are the class of cellular automata used for describing fluids. Cellular automaton fluids are discrete analogues of molecular dynamics in which the particles have discrete velocities and move on the sites of a lattice according to some rule of evolution. An introduction to the LBGK method is given followed by a outline of the computer model construction. Due to the fact that LBGK models a re restricted to low Reynolds numbers only laminar fluid flow is examined here  Keywords- Cellular automata, two-dimensional fluids, cellular automaton fluids. I. I  NTRODUCTION Ce llul ar Aut omata (CA) is an alg or ithmic entit y tha t occupies a position on a grid (or lattice point in space) and interacts with its identical neighbours. A cellular automaton generally examines its own state and the state of some number of its neighbours at any particular time step and then resets its own state for the next time step according to simple rules. Hence the rules and initial and boundary conditions imposed on the group of cell ular automa ta uniq uely determi ne their evolution in time. Cellular Automaton Fluids are models used for simulation of fluid dynamics. They are constituted of a lattice with each vertex ha vi ng a fi ni te numb er of di sc re te st at es. Th e automaton evolves in time in discrete steps and the dynamics is specified by some given rule. If lattice is sufficiently large, rules on mi crosc opi c pa rti cl es ar e ca pab le of modell ing continuum systems of fluids. There are many different forms of models, one of which is the Lattice Boltzmann Model. Benchmarking a model under seve ral well- known and unde rsto od ana lytica l solu tions to  physical situations is the best way to find and understand the accuracy and limitations of any computational model. Laminar Poiseuille flow through a 2D channel allows one to compar e the fluid flow profile through the channel to the analytical solution. This shows the models capability to handle free fluid flow (non-obstructed). Flow through a channel also allows one to compare pressur e solutions to the analytical solutions. In this article, the theory and construction of this model are outlined in detail. Simulations were conducted under the benchmark situations and examined. The results obtained should allow one to assess the suitability of the model for implementation into a simulation . II. BOLTZMANN EQUATION Statistical Mechanics offers a statistical approach in which we represent a system by an ensemble of many copies. The dis tri but ion f (1) (x,p,t ) gi ves the pr ob abili ty of fi nding a  particular molecule with a given position and momen tum; the  positions and momenta of the remain ing N-1 molecules can remain unsp ecifi ed beca use no exper imen t can disti nguis h  between molecules, so the choice of which molecule does not matter. This is the ‘Single particle’ distribution function. f (1) is adequate for describing all gas properties that do not depend on relative positions of molecules (dilute gas with long mean free path). The probable number of molecules with position coordinates in the range x ± d x and momentum coordinates p ± dp is given by f (1) (x,p,t)dxdp. Say we introduce an external force F that is small relative to intermolecular forces. If there ar e no coll isi ons, the n at time t + dt, the new pos itio ns of molecules starting at x are x + (p/m)dt = x + (dx/dt)dt = x + dx and the new momenta are p = p+ Fdt = p + (dp/dt)dt = p + dp. Th us, when the po sitions an d mo me nt a are known at a  particular time t, incrementin g them allows us to determine f(1) at a future time t + dt: f (1)  (x + dx,p + dp,t + dt)dxdp = f (1)  (x,p,t)dxdp (1) There ar e however co llis ion s tha t re sul t in som e pha se  points starting at (x, p) not arrivin g at (x + p/m dt, p+F dt) = (x + dx, p+ dp) and some not starting at (x, p) arriving there too. We set Γ (-) dxdpdt equal to the number of molecules that do not arrive in the expected portion of phase space due to collisions during time dt. Similarly, we set Γ (+) dxdpdt equal to the number of molecules that start somewhere other than ( x, p) and arrive in that portion of phase space due to collisions during time dt. If we start with Eq. (1) and add the changes in f(1) due to these collisions we obtain Using Taylor series expansion  Or  

Upload: mohitladdu

Post on 05-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

7/31/2019 Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

http://slidepdf.com/reader/full/ideaz-cellular-automata-for-flow-simulation-transport-phenomena 1/4

Cellular Automata as an

Alternative for Flow Simulation.Waqar Sarguroh, Nitin Gupta, Falgun Shah

 IIT Roorkee Roorkee, Haridwar, India.

[email protected]

[email protected] 

[email protected] 

 Abstract -This paper is basically a review of cellular automaton

fluids, which are the class of cellular automata used for

describing fluids. Cellular automaton fluids are discrete

analogues of molecular dynamics in which the particles have

discrete velocities and move on the sites of a lattice according to

some rule of evolution. An introduction to the LBGK method is

given followed by a outline of the computer model construction.

Due to the fact that LBGK models are restricted to low Reynolds

numbers only laminar fluid flow is examined here

 Keywords- Cellular automata, two-dimensional fluids, cellular

automaton fluids.

I. I NTRODUCTION

Cellular Automata (CA) is an algorithmic entity thatoccupies a position on a grid (or lattice point in space) and

interacts with its identical neighbours. A cellular automaton

generally examines its own state and the state of some number of its neighbours at any particular time step and then resets its

own state for the next time step according to simple rules.Hence the rules and initial and boundary conditions imposed

on the group of cellular automata uniquely determine their evolution in time.

Cellular Automaton Fluids are models used for simulationof fluid dynamics. They are constituted of a lattice with each

vertex having a finite number of discrete states. Theautomaton evolves in time in discrete steps and the dynamics

is specified by some given rule. If lattice is sufficiently large,rules on microscopic particles are capable of modelling

continuum systems of fluids.There are many different forms of models, one of which is

the Lattice Boltzmann Model. Benchmarking a model under several well-known and understood analytical solutions to

 physical situations is the best way to find and understand the

accuracy and limitations of any computational model.Laminar Poiseuille flow through a 2D channel allows one to

compare the fluid flow profile through the channel to theanalytical solution. This shows the models capability to

handle free fluid flow (non-obstructed). Flow through a

channel also allows one to compare pressure solutions to theanalytical solutions. In this article, the theory and construction

of this model are outlined in detail. Simulations wereconducted under the benchmark situations and examined. The

results obtained should allow one to assess the suitability of 

the model for implementation into a simulation. 

II. BOLTZMANN EQUATION

Statistical Mechanics offers a statistical approach in which

we represent a system by an ensemble of many copies. Thedistribution f  (1)(x,p,t) gives the probability of finding a

 particular molecule with a given position and momentum; the positions and momenta of the remaining N-1 molecules can

remain unspecified because no experiment can distinguish

 between molecules, so the choice of which molecule does notmatter. This is the ‘Single particle’ distribution function. f (1) isadequate for describing all gas properties that do not depend

on relative positions of molecules (dilute gas with long meanfree path). The probable number of molecules with position

coordinates in the range x ± dx and momentum coordinates p

± dp is given by f (1)(x,p,t)dxdp. Say we introduce an external

force F that is small relative to intermolecular forces. If there

are no collisions, then at time t + dt, the new positions of molecules starting at x are x + (p/m)dt = x + (dx/dt)dt = x + dx

and the new momenta are p = p+ Fdt = p + (dp/dt)dt = p + dp.

Thus, when the positions and momenta are known at a particular time t, incrementing them allows us to determine

f(1) at a future time t + dt:f (1) (x + dx,p + dp,t + dt)dxdp = f (1) (x,p,t)dxdp (1)There are however collisions that result in some phase

 points starting at (x, p) not arriving at (x + p/m dt, p+F dt) =

(x + dx, p+ dp) and some not starting at (x, p) arriving theretoo. We set Γ(-)dxdpdt equal to the number of molecules that

do not arrive in the expected portion of phase space due tocollisions during time dt. Similarly, we set Γ(+)dxdpdt equal to

the number of molecules that start somewhere other than (x,p) and arrive in that portion of phase space due to collisions

during time dt. If we start with Eq. (1) and add the changes in

f(1) due to these collisions we obtain

Using Taylor series expansion

 Or 

 

Page 2: Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

7/31/2019 Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

http://slidepdf.com/reader/full/ideaz-cellular-automata-for-flow-simulation-transport-phenomena 2/4

III. LATTICE BOLTZMANN MODELS (LBMS)

Lattice Boltzmann models vastly simplify Boltzmann’soriginal conceptual view by reducing the number of possible

 particle spatial positions and microscopic momenta from acontinuum to just a handful and similarly discretizing time

into distinct steps. Particle positions are confined to the nodesof the lattice. Variations in momenta that could have been due

to a continuum of velocity directions and magnitudes andvarying particle mass are reduced (in the simple 2-D model

we focus on here) to 8 directions, 3 magnitudes, and a single particle mass. Figure 21 shows the Cartesian lattice and the

velocities ea where a = 0, 1, …, 8 is a direction index and e0 =0 denotes particles at rest. This model is known as D2Q9 as it

is 2 dimensional and contains 9 velocities. Because particlemass is uniform (1 mass unit or mu in the simplest approach),

these microscopic velocities and momenta are alwayseffectively equivalent. The lattice unit (lu) is the fundamental

measure of length in the LBM models and time steps (ts) arethe time unit.

 Fig. 1 D2Q9 lattice and velocities.

The velocity magnitude of e1 through e4 is 1 lattice unit per time step or 1 lu ts-1, and the velocity magnitude of e5 through

e8 is 2 lu ts-1. These velocities are exceptionally convenient inthat all of their x- and y-components are either 0 or ±1.

Fig. 2 D2Q9 x,y velocity components.The next step is to incorporate the single-particle

distribution function f. It has only nine discrete ‘bins’ insteadof being a continuous function. The distribution function can

conveniently be thought of as a typical histogram representinga frequency of occurrence. The frequencies can be considered

to be direction-specific fluid densities. Accordingly, the

macroscopic fluid density is

The macroscopic velocity u is an average of themicroscopic velocities ea weighted by the directional densities

fa:

This simple equation allows us to pass from the discretemicroscopic velocities that comprise the LBM back to a

continuum of macroscopic velocities representing the fluid’smotion. ll paragraphs must be indented. All paragraphs must

 be justified, i.e. both left-justified and right-justified.

 A. Streaming and Collisions

Streaming and collision (i.e., relaxation towards localequilibrium) look like this:

where fa(x+eaΔt,t+Δt)=fa(x,t) is the streaming part and

(fa(x,t)-faeq(x,t))/ is the collision termƬ . Collision of the fluid

 particles is considered as a relaxation towards a localequilibrium and the D2Q9 equilibrium distribution function f eq[2] is defined as

where the weights wa are 4/9 for the rest particles (a = 0), 1/9for a = 1, 2, 3, 4, and 1/36 for a = 5, 6, 7, 8, and c is the basic

speed on the lattice (1 lu ts-1 in the simplest implementation). Note that if the macroscopic velocity u = 0, the equilibrium fa

are simply the weights times the fluid density.In streaming, we move the direction-specific densities fa to

the nearest neighbor lattice nodes. The scheme (originally dueto Louis Colonna-Romano) shown in Figure provides a

convenient neighbor address relative to the point from whichthe fs are being streamed. The ip, in, jp, and jn are computed

at the beginning of their respective loops.

Page 3: Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

7/31/2019 Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

http://slidepdf.com/reader/full/ideaz-cellular-automata-for-flow-simulation-transport-phenomena 3/4

 B. Boundary Conditions:We have a great deal of temporal/spatial flexibility in

applying boundary conditions in LBM. In fact, the ability toeasily incorporate complex solid boundaries is one of the most

exciting aspects of these models and has made it possible to

simulate realistic porous media for example.The simplest boundary conditions are ‘periodic’ in that the

system becomes closed by the edges being treated as if theyare attached to opposite edges. Most early papers used these

 boundaries along with bounceback boundaries. In simulatingflow in a slit for example, bounceback boundaries would be

applied at the slit walls and periodic boundaries would beapplied to the ‘open’ ends of the slit. For boundary nodes,

neighboring points are on the opposite boundary.Bounceback boundaries are particularly simple and have

 played a major role in making LBM popular among modelersinterested in simulating fluids in domains characterized by

complex geometries such as those found in porous media.Their beauty lies in that one simply needs to designate a

 particular node as a solid obstacle and no special programming treatment is required. Thus it is trivial to

incorporate images of porous media for example andimmediately compute the flow in them.

As indicated in Figure, we separate solids into two types – 

 boundary solids that lie at the solid-fluid interface and isolated

solids that do not contact fluid. With this division it is possibleto eliminate unnecessary computations at inactive nodes; thiscan be particularly important in the simulation of fluid flow in

fractured media for example, where the fraction of the totaldomain occupied by open space accessible to fluids can be

very small. Here we use the ‘mid-plane’ bounceback schemein which the densities are temporarily stored inside the solids

and re-emerge at the next time step.

IV. BENCHMARKING WITH 2-D POISEUILLE FLOW

The LBGK model was then benchmarked byimplementing a steady fluid flow in a channel with a width of 

2L. No slip boundary conditions are imposed through theintroduction of walls at the top and bottom of the lattice. This

 benchmark provides a way to check the behaviour of the

 pressure and velocity of the fluid flow.

Fig. Analytical parabolic solution vs LB solution (vertical

lines converging to parabola)

Page 4: Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

7/31/2019 Ideaz- Cellular Automata for Flow Simulation- Transport Phenomena

http://slidepdf.com/reader/full/ideaz-cellular-automata-for-flow-simulation-transport-phenomena 4/4

Fig. Differnce between analytical and LB solution.

V. FLOW THROUGH POROUS MEDIUM

The scheme is particularly useful in fluid flow applicationsinvolving complex boundaries where standard methods of 

defining boundary conditions can be tedious. The flow was

modelled on a randomly generated porous medium by LB.

R EFERENCES

[1] Frisch U, Hasslacher B, Pomeau Y 1986 Phys. Rev. Lett. 56: 1505-1508

[2] Shiyi Chen, Gary D. Doolen Annu. Rev. Fluid Mech. 1998 30:329-364.