20
Lattice Boltzmann method (This is done by Yu yongke on Jan 2002 in a seminar on particle methods at the institute of Sci- entific Computing at Buaunschweig University of technology, Germany. The seminar’s web - page is at: http://www.tu-bs.de/institute/Wir/akeese/seminarWS01/index.html ) 1.Introduction ................................................................................................................................ 2 2. Lattice gas ................................................................................................................................. 2 2.1. Lattice gas algorithm.......................................................................................................... 3 2.1.1. Advection ................................................................................................................... 3 2.1.2. Bounce back ............................................................................................................... 3 2.2. Summary of Lattice Gas Automata .................................................................................... 3 3. Lattice Boltzmann Method........................................................................................................ 4 3.1.The basic steps of LBM ...................................................................................................... 4 3.2. Main ingredients of LBM................................................................................................... 4 3.3. The Boltzmann equation: ................................................................................................... 4 3.4. Lattice Boltzmann equation ............................................................................................... 6 3.5. D2Q9 Model ...................................................................................................................... 7 3.6. Equilibrium distribution ..................................................................................................... 7 3.7. Algorithm of LBM ............................................................................................................. 9 4. LBM-Boundary condition ....................................................................................................... 10 4.1. Test of the boundary definition ........................................................................................ 11 5. Stability of lattice Boltzmann models ..................................................................................... 14 5.1. Nonlinear stability of uniform flows ................................................................................ 14 5.2. Linear stability analysis.................................................................................................... 14 5.3. Summary of stability of LBM .......................................................................................... 16 6. LBM—examples ..................................................................................................................... 17 6.1.Examples1: LGCA. Vs. LBM ........................................................................................... 17 6.2. Example 2: spectral. Vs. LBM ......................................................................................... 17 6.3. Examples 3:coupled fluid [4] ........................................................................................... 18 7. Example program of LBM ...................................................................................................... 19 References ................................................................................................................................... 20 1

Lattice Boltzmann method. Lattice Boltzmann Method The basic idea of LBM is to use distribution functions instead of single particles. Hence the par-ticle density N is not boolean,

Embed Size (px)

Citation preview

Lattice Boltzmann method (This is done by Yu yongke on Jan 2002 in a seminar on particle methods at the institute of Sci-entific Computing at Buaunschweig University of technology, Germany. The seminar’s web -page is at: http://www.tu-bs.de/institute/Wir/akeese/seminarWS01/index.html)

1.Introduction................................................................................................................................ 2 2. Lattice gas ................................................................................................................................. 2

2.1. Lattice gas algorithm.......................................................................................................... 3 2.1.1. Advection ................................................................................................................... 3 2.1.2. Bounce back ............................................................................................................... 3

2.2. Summary of Lattice Gas Automata.................................................................................... 3 3. Lattice Boltzmann Method........................................................................................................ 4

3.1.The basic steps of LBM ...................................................................................................... 4 3.2. Main ingredients of LBM................................................................................................... 4 3.3. The Boltzmann equation: ................................................................................................... 4 3.4. Lattice Boltzmann equation ............................................................................................... 6 3.5. D2Q9 Model ...................................................................................................................... 7 3.6. Equilibrium distribution ..................................................................................................... 7 3.7. Algorithm of LBM ............................................................................................................. 9

4. LBM-Boundary condition....................................................................................................... 10 4.1. Test of the boundary definition ........................................................................................ 11

5. Stability of lattice Boltzmann models ..................................................................................... 14 5.1. Nonlinear stability of uniform flows................................................................................ 14 5.2. Linear stability analysis.................................................................................................... 14 5.3. Summary of stability of LBM .......................................................................................... 16

6. LBM—examples ..................................................................................................................... 17 6.1.Examples1: LGCA. Vs. LBM........................................................................................... 17 6.2. Example 2: spectral. Vs. LBM......................................................................................... 17 6.3. Examples 3:coupled fluid [4] ........................................................................................... 18

7. Example program of LBM ...................................................................................................... 19 References ................................................................................................................................... 20

1

1.Introduction Because the Navier-stokes equations describe the behaviours of fluid, solving the Navier-stokes equation directly can simulate fluid flow. But this is not the only method that can be used to simulate fluid flow. From the viewpoint of statistical physics, we can also consider the fluid as composed of parti-cles, which leads to particle methods. Lattice gas (LG) and Lattice Boltzmann method are two of them. Actually, the Lattice Boltzmann method also solves the Navier-stokes equation, but indirectly.

2. Lattice gas Since LBM builds up on LG, we talk about LG first. LG comes from the microscopic view of continuum mechanics. In the macroscopic view, we can study the pressure, density, viscosity and velocity of the fluid flow. But in the microscopic view, particles move in different speeds and different directions. The total effect of these particles is the pressure and temperature, which can be measured in the macroscopic view. Hence, by simulating the movement of every parti-cle, we can also simulate the macroscopic behaviours fluid.

Fig.2.1. The total effect of the microscopic movement of particles is the pressure and temperature, which can be measured in the macroscopic view. [3]

In a real gas, we have numerous speeds and directions; by changing the real gas to lattice gas, we just have limited speed and directions.

Fig. 2.2.From the real gas to lattice gas, which just has limited speed and directions. [3]

2

In LG, the particles can only jump to the next neighbour nodes in each time step. The neighbour they can jump to is decided by the direction of the speed. In this process they can collide with other particles, and exchange their momentum.

2.1. Lattice gas algorithm In LG, we have three steps: advection, collision, and bounce back. In the following, ni(x,t) represents the density of the particle of one lattice at position x and time t that will move in di-rection i. ni(x,t) has boolean value, 1 is presence, and 0 is absence. Ci is the speed of the parti-

cles that move in direction i. For hexagon we have 6 directions, hence i=1,2,…,6. is the op-eration describing the collision of particles.

2.1.1. Advection Advection states that the current density plus the density of incoming particles will be trans-ferred to the next place in the next time step. Advection formula is as follow: (Here is for FHP model, which is in deference to Frisch, Hasslacher, and Pomeau)

ni(x+ci,t+1)=ni(x,t)+ ∆ i[n(x,t)]

ci =( cos pi/3, sin pi/3), i=1,2,…,6. For hexagonal Lattice

For the FHP model, the collision operator is defined by ∆ )2(i for 2 particles and by for 3

particles. ∆ )3(

i

ii

iiiiiiiiiiiii

iiiiiiiiiiiii

iii

nn

nnnnnnnnnnnn

nnnnnnnnnnnn

−=

−=

−=

+=

++++++++++

++++++++++

∆∆

∆∆∆

1 where

5314242531)3(

5421353241)2(

)3()2(

2.1.2. Bounce back Bounce back is for boundary conditions.

2.2. Summary of Lattice Gas Automata Advantages: 1.It is simple and efficient to make complex structures by “marker and cell” technologies, where

cells are used to compose the whole area, and where some cells are marked as non-wet area, thus complex geometries can be represented.

2.Because every particle communicates with its neighbours, it is easy to parallelize lattice gas automata.

3.The state of the system can be stored efficiently by representing particles by “bits” (Boolean). Disadvantages: 1.Because only boolean variables are used, long averaging time is needed.; we can use averag-

ing of the particles (real number) to instead. 2.Macroscopic parameters are difficult to control. For example the pressure depends explicitly

on the velocity when using Fermi-Dirac equilibrium distribution in hexagonal lattice:

p (ρ, u2) = ρ/2[1-(3-ρ)/(6- ρ) u2].

For Boltzmman method with BGK approximation p=c2 * ρ/3. We can get rid of all those disad-vantages by using Lattice Boltzmman Method (LBM).

3

3. Lattice Boltzmann Method The basic idea of LBM is to use distribution functions instead of single particles. Hence the par-ticle density N is not boolean, but a real number. This idea is based on the Boltzmman-equation.

3.1.The basic steps of LBM Overview of the LBM algorithm is given here, details will be discussed later. 1.Calculate local equilibrium distribution Fi(0) ,with given initial density ρ(x, t) and momen-

tum j(x, t), and then set Fi= Fi(0). 2.Propagate it to the next neighbor (except for the distribution of ‘rest particles’ with

c0=0). 3.Calculate the new density ρ(x, t) and momentum j(x, t). 4.Calculate the new local equilibrium distributions, and then go to step 2

3.2. Main ingredients of LBM LBM has four main ingredients, which are summarized here and will be explained in more de-tail later. 1.Boltzmann equation

),( ffQfmKfvf vxt =∂+∂+∂

2.The lattice D2Q9 (multi-speed model) 3.The equilibrium distributions: Maxwell distribution function

−−

= 2

2/3

)(2

exp2

),,( uvTk

mTk

mntvxfBB

M

π

4.The kinetic equation: BGK approximation:

J (f)=w[fM(x, v)-f (x, v)]

3.3. The Boltzmann equation: The following discussion is based on [1](P139-141). The motion of a fluid can be described on various levels. The most basic description by the Hamilton equations for a set of classical particles or the analogous quantum mechanical formu-lation prohibits itself because of the huge number of particles. 1cm3 of air , for example, at 0oC and a pressure of one atmosphere contains 2.69.1019 molecules. It is impossible to simulate a microstate of such a system on computer. This fact is already taken into account by the next higher level of description for a system with N particles by distribution functions fN(q1, p1,…, qn, pn, t), which encompasses all statistical information of all dynamical processes (qi and pi are the generalized coordinate and momentum of particle i). fN(q1,p1,…,qn,pn,t)dq1dp1…dqndpn is the Probability to find a particle in the inter-val([q1, q1+dq1], [p1, p1+dp1]). While the other particles are in infinitesimal intervals around (q2, p2)…(qN , pN). Thus fN contains especially the various correlations between particles. fN obeys the Liouville equation Where HN is the Hamiltonian of the system.

03

1

=

∂∂

∂∂

−∂∂

∂∂

−∂

∂ ∑=

N

j j

N

j

N

j

N

j

NN

qf

pH

pf

qH

tf

4

By integration over part of the phase space one defines the reduce densities

∫ ++= NNssNNNs

sss dpdqdpdqtpqpqfVtpqpqF ...),,,...,(:),,,...,( 111111

where Vs is a normalization factor. It has been shown that a coupled system of differential equa-tions for the Fs(1≤s≤N) is equivalent to the Liouville equation. This system is called BBGKY after Bogoljubov, Born, Green, Kirkwood and Yvon who derived these equations. The BBGKY hierarchy has to be truncated at some point to calculate approximate solutions. The Boltzmann equation has been derived as a result of a systematic approximation starting from the BBGKY system. It can be derived by applying the following approximations: 1. Only two-particle collisions are considered. 2. The velocities of the two colliding particles are uncorrelated before collision. This assump-

tion is often called the molecular chaos hypothesis. 3. External forces do not influence the local collision dynamics. Boltzmann equation is an integro-differential equation for the single particle distribution func-tion f(x,v,t)

)]()()'(´)([)(),(

,/,

),(

11113

11

vfvfvfvfvvdvdffQ

constmmpvqxwhere

ffQfmKfvf vxt

−−ΩΩ=

===

=∂+∂+∂

∫ ∫ σ

Where m is the particle mass, f(x,v,t)d3xd3v is the probability to find a particle in the volume d3x around x and with velocity between v and v+dv Q(f, f) is the collision integral with σ the differential collision cross section for the two particle collision, which transforms the velocities from v,v1(incoming) intov’,v1’(outgoing), k is the body force which will be neglected in the following discussion. It can be shown that the collision integral possesses exactly five elementary collision invariants ψk(v)(k=0,1,2,3,4) in the sense that:

∫ =0)(),( 3vdvffQ kψ

The elementary collision invariants read ψk(v)(k=0,1,2,3,4) ψ0=1, (ψ1 , ψ2, ψ3)=v, ψ4=v2 (proportional to mass, momentum and kinetic energy). It can further shown that positive func-tions f exist which give a vanishing collision integral, Q(f,f)=0.These functions are all of the form f(v)=exp(a+b.v+cv2), the special case is Maxwell distribution.

∫=

−−

=

itymean veloc theis ),,(1

)(2

exp2

),,(

3

22/3

tvxvvfdn

uwhere

uvTk

mTk

mntvxfBB

M

π

This can be proven by Boltzmann’s H-theorem. Boltzmann equation also describes the motion of fluid, just in different point of view. Navier-stokes equation can also be derived from B-equation.

5

In Boltzmann equation, the collision integral Q is too complicated, and one of the approxima-tions is BGK(Bhatnagar,Gross and Kroot 1954) which fulfils two constraints: 1. J(f)(the approximation functions) conserves the collision invariants ψk,, that is:

∫ ==Ψ )4,3,2,1,0(0)( 33 kvxddfJk

2. The collision term expresses the tendency to a Maxwellian distribution (H-theorem). Such that,

J(f)=w[fM(x,v)-f(x,v)],

and it follows:

0]),(),([)( 333333 =Ψ−Ψ=Ψ∫ ∫∫ vxddvxfvxddvxfvxddfJ kM

kk ω

w is called the collision frequency, fM(x,v) the local Maxwellian. The idea behind this replacement is that the detail of two-body interactions does not influence the values of density and velocity very much. The constraint means: at any space point and time instant the Maxwellian fM must have exactly the same density, velocity and temperature of the gas as given by the distribution f(x,v). Since the values will in general vary with space and time fm is called the local Maxwellian

3.4. Lattice Boltzmann equation Boltzmann equation describes the motion of fluid, by approximating the collision we get the Boltzmann-equation with BGK approximation.

( ))(1 eqfffvtf

−−=∇+∂∂

τ

Because the distribution function f depends on space, velocity and time: f(x,v,t), we discrete it in the v-space by introducing a finite set of velocities, vi, and associated distribution functions fi(x,t), then we get the discrete Boltzmann-equation.

( ))(1 eqiiii

i fffvtf

−−=∇+∂∂

τ

By the characteristic length scale, L, the reference speed, U, the reference density, nr, and the time between particle collisions, tc, we get the Non-dimension Boltzmann equation.

riicii nfFtLUttLUvc /,/ˆ, /.ˆ ,ˆ ,/ ===∇=∇= ττ

Discrete the Non-dim equation in time and space, we get the discretized Boltzmann-equation

( ))(

ˆ1ˆ

ˆeq

iiiii ffFc

tF

−−=∇+∂∂

ετ

( ))(

ˆ1

ˆ)ˆˆ,ˆ()ˆˆ,ˆˆ(

ˆ)ˆ,ˆ()ˆˆ,ˆ(

eqii

iiix

ii

FF

tttxFttxxFc

ttxFttxF

−−=

∆∆+−∆+∆+

+∆

−∆+

ετ

By taking a suitable scale between dx and dt,dx/dt=ci, we get the lattice Boltzmann equation

6

( ))(1),(),( eqiiiii FFtxFtttcxF −−=−∆+∆+

τ

We can compare it with the lattice gas equation. The difference is: we use the distribution to instead the single particle, By expansion Boltzmann equation can be derived from Lattice Gas Equation. Until now we have seen the distribution function, the equilibrium function, but they are in gen-eral coordinate space. In LBM, we represent the gas by lattices, we should know how to use these in Lattice model.

3.5. D2Q9 Model

Fig. 3.1 The lattice in the D2Q9 model. [1]

There are different types of lattice for LBM. For D2Q9, the Lattice looks like this, in every Lat-tice there are 9 sets of particles, every set has different velocity.

C: velocities of lattice C0=(0,0), C1,3, C2,4=(±c,0),(0,±c) C5,6,7,8=(±c, ±c)

Τhe mass density, ρ, and the momentum density, j, are defined by sums over the distri-bution functions Fi(x,t)

ρ(x,t)=∑i Fi(x,t) j(x,t)=ρ(x,t)u(x,t)= ∑i ciFi(x,t)

3.6. Equilibrium distribution For vanishing velocities a global equilibrium distribution Wi (“fluid at rest”) is defined. In the vicinity(small Mach numbers)of this resting equilibrium, distribution function can be written as sums of the Wi and small perturbations fi(x,t)

Fi(x,t)=Wi+fi(x,t)

With |fi(x,t)|<< Wi

7

The Wi should be positive to assure positive mass density. They are chosen of Maxwell type in the following sense: The lattice velocity moments u to fourth order over the Wi shall be identical to the respective velocity moments over the Maxwell distribution

]2/[2

)( 22/

0 TKmvExpTK

mvW B

D

BB −

=

πρ

(D dimension, ρ0 mass density, m particle mass, ν particle speed. kB Boltzmann con-stant, T temperature). Thus the odd moments vanish. The odd and even moments read as follow:

)

()(

)(,)(

,0 ,0

2

0

00

βγαδβδαγ

γδαβδβγβαδγβα

αββαβα

γβαα

δδδδ

δδρ

δρρ

++

==

====

==

∑ ∫

∑ ∫∑ ∫

∑∑

i

BBiiiii

B

iBiii

iBi

iiiii

iii

mTKvvvvvdvwccccW

mTKvvvdvwccWvdvwW

cccWcW

Nonnegative solutions of above for the Wi can be found whenever the number of lattice velocities ci is large enough. For the D2Q9 lattice one obtains:

W0/r0=4/9, W1/ r 0=1/9, W2/ r 0=1/36, KBT/m=c2/3

The evolution of the LBM consists of the recurring alternation between transition local equilibrium and propagation of the distribution to neighboring sites according to the lat-tice velocities. The BGK kinetic equation reads:

[ ]),(),(12

),(),()1(),(

2

)0(

tttcxKtxKc

tctxFtxFtttcxF

ii

iiii

∆+∆++∆

+

+−=∆+∆+

ααα

ωω

Where τ is the collision time, ω=∆t/τ is the collision frequency, and K is an applied body force. The local equilibrium distributions Fi

(0)depends only on the local values of mass and momentum density

Fi(0)(x,t)=Fi

(0)(ρ(x,t),j(x,t)) They can be derived by applying the maximum entropy principle under the constraints of mass and momentum conservation. Up to second order in j one obtains

−++= 22)0( ).(

2.),(

0jjc

TKm

TKmjc

TKmjF j

BBj

B

Wi

i

ρρρ ρ

Or more explicitly:

8

tcm

TKp

cu

cuc

cucF

cu

cuc

cucF

jcuF

B

iii

iii

i

−=

=

=

−++=

=

−++=

==

−=

211

3

osityshear visc kinematic and Pressureget wethen equation, stokes-Navierget we, techniquescale-multi theapplyingby

8,7,6,5i 23

2)(931

361

1,2,3,4i 23

2)(931

91

)/(u 0i 231

94

2

2

2

4

2

2)0(

2

2

4

2

2)0(

2

2)0(

ωυ

ρ

ρ

ρ

ρρ

3.7. Algorithm of LBM Now we get all the information necessary to set up the computer code. The algorithm is : 1.For given initial density and momentum calculate the local equilibrium Fi

(0). Then, set Fi= Fi

(0). In this step, different density and momentum values may be used to calculate the equilib-rium distributions, i.e. in the beginning there is a patchwork of local equilibrium that is far from a global equilibrium

−++= 22)0( ).(

2.),(

0jjc

TKm

TKmjc

TKmjF j

BBj

B

Wi

i

ρρρ ρ

2.Then use the kinetic equation to calculate the new distribution, and propagate it to their neighbor by:

[ ]),(),(12

),(),()1(),(

2

)0(

tttcxKtxKc

tctxFtxFtttcxF

ii

iiii

∆+∆++∆

+

+−=∆+∆+

ααα

ωω

3. Calculate the new r(x,t),j(x,t) by:

ρ(x,t)=∑ i Fi(x,t) j(x,t)=ρ(x,t)u(x,t)= ∑i ciFi(x,t) 4. Calculate the new local equilibrium distributions, then go to step 2 . The procedure of propagating is as the following picture.

9

Fig. 3.2 The propagating in model D2Q9

Every lattice has 9 points, every point propagate to different neighbour.

4. LBM-Boundary condition The following discussion is based on [1](P189-193). To a certain degree, achieving self-consistent boundary conditions with a given accu-racy is as important as developing numerical schemes themselves—Chen et al (1996)[1] LGCA and LBM seem to be very attractive because the apparent ease to implement boundary conditions even in complicated geometry like porous media. In general, there are two ways to define a boundary: the boundary curve may include grid nodes, (node boundary, the nodes on the boundary are called boundary nodes) or passes through the midpoints of lines between nodes (link boundary). Node boundaries are appropriate for periodic and inflow boundary conditions. For the no-slip boundary condition, both of them can be used. In the first case, the complete bounce back is used, the detail like this.

In-state: F0, F1, F2, F3, F4, F5, F6, F7, F8

Out-state: F0, F1, F4, F3, F2, F7, F8, F5, F6 In the second case the half-way wall bounceback will be used. There are wet nodes and dry nodes here. Particle distributions are propagated between wet and dry nodes. On the dry nodes, no collision or forcing is performed and the distributions are all bounced back.

10

Fig. 4.1.The method to define a boundary in LBM.[4]

For wet notes, use the formula to propagate

[ ]),(),(

12

),(),()1(),(

2

)0(

tttcxKtxKc

tctxFtxFtttcxF

ii

iiii

∆+∆++∆

+

+−=∆+∆+

ααα

ωω

For dry notes, use complete bounce back. In Half-way bounce back it should be known that the width of the channel is one unit smaller than that with the complete bounce back scheme

),('),( txFtttcxF iii =∆+∆+

4.1. Test of the boundary definition To test the no-slip Boundary condition, a plane poiseuille flow will be used. The plane poiseuille flow in a channel of width 2L where the flow is steady (d/dt=0), in x-direction u=(u,v)=(u(y),0), with constant pressure and without variations in x direction (d/dx=0). The flow is driven by a constant force K=kex. Accordingly the Navier-stokes equation reduces to an ordinary differential equation for u(y):

ν∗(d2u/dy2) +K=0

And the continuity equation du(y)/dx=0 is satisfied. At the channel walls no-slip bound-ary conditions apply, i.e. u(y)=0 when y=L and y=-L. The analytical solution is a pa-rabola.

U(y)=K(L2-y2)/(2υ) In the numerical simulation the velocity is initialised to zero and the mass density to a constant of 1.In order to start the fluid flow a constant force has to be applied at every time step. First the simplest no-slip scheme, namely bounce back will be used. The result of inte-gration over a domain with 20 time 20 nodes is shown together with the analytical solu-tion. The fluid is resting in the beginning and then is slowly accelerated. After t=1200 time steps the mean x-momentum becomes steady. In the first one the channel width is assumed to be 2L=ymax-1=19, the most striking difference is the lower value of the maximum velocity. One can fit a parabola to the numerical data with equal values of the maximum velocity. This is the second fig. The difference is the lower value of other points.

11

By based on a smaller channel width 2L=ymax-2=18, we get the 3 fig. This solution compares very well with the analytical solution except for the two boundary nodes. This means that the boundary is located half-way between the first and second node, and be-tween the last and second to last node. Therefore the wet channel has only a width of 2L=18. The nodes j=1 and j=ymax are auxiliary nodes. The velocity values on the auxil-iary nodes should not be interpreted as flow velocities.

Fig 4.2. No-slip boundary conditions and Poiseuile flow. [1]

In the numerical experiments we take 2L=16,32,64,128 then get the Errors compared to analytical solution.The slope of the curve is close to –2, which indicates hat this scheme is of second order in the spatial discretization.

Fig 4.3. Error of the numerical compared to the analytical solution of the Poisuille flow as a function of spatial resolution. [1]

12

For slip boundary condition, use the reflection of the distribution for the boundary nodes

Fig 4.4. Slip boundary and no-slip boundary. [1]

For testing, use a flow with shear layer. The flow is separated in the middle; the two parts have inverse velocity.

0 , 0yfor 0yfor == <−

>+ yUU Ux

xU

We can get the analytical solution of the Navier-stokes equation with this boundary condition. The implementation of the simple slip scheme works very well. Small deviations between nu-merical and analytical solution are to be expected due to the finite width of the channel in the simulation. Here the width of the channel is also one unit smaller.

Fig 4.5.Shear layer flow in a channel: test of slip boundary conditions. [1]

13

5. Stability of lattice Boltzmann models The following discussion is based on [1](P189-193). LBM schemes do not have an H.theorem and therefore are subject to numerical instability. Linear stability analysis has been performed for various LB modes (d2q7, d2q9, d3q15) and different background flows. The stability does not only depend on the background flow but also on the mass fraction parameters (α,β) of the equilibrium distributions and the grid size (stability decreases with increasing grid size) 5.1. Nonlinear stability of uniform flows For uniform flow, in the sense of Fi(x,t0)=Fi(t0), from kinetic equation of BGK LBM mod-els, we know that it will remain uniform at all later times. Furthermore, mass and mo-mentum density are conserved and retain their initial value, At last we get:

),()()(ˆ.....

)(ˆ)1()1(ˆ

00)0( jFtFtFwith

tFtF

iii

ii

ρ

ω

−=

−=+

So when |1-ω|<1, the evolution is stable. This is the stable range for ω.

Fig 5.1 Stability of BGK models [1]

5.2. Linear stability analysis In reality, a flow is never uniform in the strict sense because some noise is always around, therefore we have to investigate whether small spatially varying perturbations grow or are damped with time. No general methods are known that allow stability analysis of arbitrary non-linear systems. We usually expand the system up to linear terms and investigate the stability of the resulting linear system. The kinetic equation including external body forces Km(x,t) reads

[ ] ),(),(),(),(),( )0( txKtxFtxFtxFtttcxF miiiii ++−=∆+∆+ ω

Here we expand the terms of the kinetic equation basing on time-independent arbitrary distribu-tion function, we get

)1,()()1,(

),()(),()(

)(

++++=++

+=

tcxfcxFtcxF

txfxFtxF

iiibf

iii

ibf

ii

14

Insert this to the kinetic equation, and neglect the time-independent terms, because we are inter-ested only in instabilities with exponential growth. The time -independent terms at most can lead to linear growth. By using Fourier transform we get the function depending on time and frequency, in-stead of time and space. L, W are the nodes in x, y directions. We get:

[ ]

( )( ) ( )[ ][ ]

−+

−++=

=

+−==−−

+

2

2

/2/2

1

.2

...2.

)1( ,,

uucD

ucucccCccBAJ

eeD

JIDAAff

nm

mmnmmnmmmmn

mnWilcLikc

mn

tt

mymx

ω

δ

ωππ

Now the problem is changed to checking the spectral radius of matrix A. For different models we have different coefficients that appear in Jmn.

481 ;

161 ;

241 ,

861

:14,...,7

;61 ;

21 ;

31 ,

6,...,1

;21 ,0 ,0 ,

0153

8,...,5 ;241 ,

81 ,

121 ,

641

4,...,1 ;61 ,

21 ,

31 ,

0 ;32 ,0 ,0 ,

D2Q9

6,...,1 ;61 ,

32 ,

31 ,

61

0 ;1 ,0 ,0 ,FHP(D2Q7)

−===−−

=

=

−====

=

−====

=

=−===−−

=

=−====

=−====

=−===−

=

=−====

mmmm

mmmm

mmmm

mmmm

mmmm

mmmm

mmmm

mmmm

DCBA

m

DCBA

m

DCBA

mQD

mDCBA

mDCBA

mDCBA

mDCBA

mDCBA

αβ

β

α

βα

β

α

αα

Here are the coefficients for various models, the coefficients Am include free parameters α, β witch can be tuned in order to improve stability. The eigenvalues of A have been calculated with a standard routine from Matlab. The maximum eigenvalues for the d2q7 with a choice of parameters are shown here as a function of the relative wave number θx. For certain wave numbers the maximum ei-genvalues become large than unity and therefore the model is linear unstable for this choice of parameters.

15

Fig 5.2.The maximum eigenvalues for the D2Q7(FHP) model with 1.) (u,v)=(0.2,0), α=0.2, θy=0(solid line) and 2.) (u,v)=(0.23,0), α=0.3, θy=0(broken line) are shown as a function of the relative wave number θx . [1]

5.3. Summary of stability of LBM 1.For the D2Q7 model and homogeneous flow the wave number vector K of the most

unstable mode is parallel to the velocity u. 2.For the D2Q9 model and homogeneous flow the wave number |k| of the most unstable

mode is equal to about 2.3. 3.The stability domain as a function of the rest mass parameters α,β of the D2Q9 model

shrinks with increasing lattice size. α=4/9, β =1/9 lie inside one of the stability is-lands.

4.The D2Q7 model is less stable than the D2Q9 model in the sense that instability oc-curs already at smaller flow velocities.

5.The D2Q9 lattice is a projection of the D3Q15, and then their linear stability proper-ties for homogeneous background flows are similar.

6.The stability domain shrinks further when the background flow includes shear.

16

6. LBM—examples

6.1.Examples1: LGCA. Vs. LBM

Flow pass a cylinder: Upper: lattice gas calculation Lower: Boltzmann method Because LGCA use boolean variables, so there is a lot of noise in the result. By using averaging value, there is no noise in the result

Fig 6.1.The comparison of Lattice Boltzmann Method and Lattice Gas Cellar Automata. [2]

6.2. Example 2: spectral. Vs. LBM This is a two dimensional decaying turbulence over a square, with periodic boundary condi-tions, the upper is simulated by the spectral model, which is very efficient over this simple do-main. The lower is simulated by LBM. The initial velocity distribution consists of two shear layers plus some noise over the whole domain. The characteristic velocity and the characteristic length L are defined as above. And we select the viscosity parameter ω to let the Reynolds number be 10000. 512 is the number of grid points in each dimension. These figures show the isocontours of the vorticity of the flow. The dashed lines indicate negative values. The features compare very well which gives confi-dence in both methods. The most surprising is: the LBM is as fast as the spectral model and the LBM keeps its effi-ciency in more complex geometries (porous media, for example) whereas spectral models may not be applicable anymore.

17

Fig 6.2. The result at different time steps. Upper is simulated by the spectral model, which is very effi-cient over this simple domain. The lower is simulated by LBM. [1]

Vorticity a=(∇×u) of the flow. Upper: spectral model, lower: LBM model with D2Q9 Two dim decaying turbulence, U= sqrt(u2) =0.04, L=512/2p, Re=UL/n(w)=10000 Boundary condition: periodic.6.3. Examples 3:coupled fluid [4] This is a simulation of an artificial heart valve; this is a problem of coupled fluid-structure. Here is the geometry used in the simulation.

Fig 6.3. Sketch of the simulated geometry [4]

In this special geometry, we need consider the moving boundary condition. Normally when we use no-slip Boundary condition, we set the sum of speed ci and ci’ of the boundary nodes to zero, but here we set it to the speed of the boundary. ccii++ccii’’==uubb uubb==UU++ωω**((rr++ccii//22--RR00)) This is the time-dependent blood speed that enters the tube. We set the outflow condition to p=p0, uy=0 at outlet.

18

Fig 6.4. Transient inflow Boundary condition imposed b

( )xuyu yxxy ∂∂+∂∂= //υρσ

y the heart beat used for the simulation. [4]

This is the Vorticity of the flow at different time

ental results, the

he result: f the flow at:

7,0.622 e order of

Fig 6.5 Visualizations of the flow field via vorticity

7. Example program of LBM The appended file anb.f is an Example program of LBM, it is easy for us to learn how to make

steps. Additionally, we also calculate the magni-tude of shear stress. And find that the magnitude of the shear stresses is of the same order as ob-served in experiments, (and are well below the critical shear stress range to cause necrosis of red blood cells or lethal erythrocyte and throm-bocyte damages). In brief, compare to experimLB method gave reasonable results for the pre-diction of velocity and stress fields. T1.Vorticity ot=0.00889,0.222,0.356,0.462.the shear stresses are of the sammagnitude as observed in experiments The shear stress is calculated as:

magnitude. [4]

program for LBM. Even only read this program one can understand more detail of LBM. This program is taken from [4].

19

References

[1] Bastien Chopard and Michel Droz. Cellular Automata Modelling of Physi-cal Systems. Cambridge University Press, 1998. [2] Dieter A.W. Gladrow. Lattice-Gas Cellular Automata and Lattice Boltz-mann Models. Springer, Berlin, 1998. [3] Jörg Bernsdorf. C&C Research Laboratories, NEC Europe Ltd.Bonn (Sankt Augustin) / Germany e-mail: [email protected] http://www.ccrl-nece.de Introduction to Lattice Gas and Lattice Boltzmann Methods [4] M.Krafczyk,J.Tölke,Erank,M.Schulz. Two dimensional simulation of fluid-structure interaction using lattice-Boltzmann methods. [5] Jörg R. Weimar. Simulation with Cellular Automata. Logos Verlag, Ber-lin, 1997.

20