Introduction to Lattice-Boltzmann Method

60  Download (0)

Full text
(1)

Introduction to

Introduction to

the Lattice Boltzmann Methods:

the Lattice Boltzmann Methods:

From Theory to Practice

From Theory to Practice

Wanho Choi

(2)

Graphics & Media Lab. at Seoul National Univ.

A Recent Result using LBM

(3)

History of LBM

History of LBM

Cellular Automata

Lattice Gas Automata

Lattice Boltzmann Methods

(4)

Graphics & Media Lab. at Seoul National Univ.

Weak Definitions for the Cellular Automata

Weak Definitions for the Cellular Automata

Regular arrangements of single cells of the same kindFinite number of discrete states per each cell.

Simultaneous (synchronous) update for cell states  Deterministic and uniform update rules

(5)

What is the Lattice Boltzmann Methods?

What is the Lattice Boltzmann Methods?

Relatively new simulation technique

Particle based formulation to simulate fluid flowsHowever, mesoscopic model rather than microscopic

– Microscopic model

– Mesoscopic kinetic equations

※ Microscopic model: molecular dynamics (MD), etc.

※ Macroscopic model: finite [difference|element|volume] method (FDM, FEM, FVM), etc.

 It considers particle distributions rather than individual particles.

(6)

Graphics & Media Lab. at Seoul National Univ.

Comparisons

Comparisons

Pros.

– Straightforward implementation

– Complex boundary treatment

– Easy to parallelize (fully explicit)

Cons.

– Weakly compressible

– Diffusive motions

(7)

Parallelism

Parallelism

 Nine PS3 connected via a Gigabit Ethernet switch

 Fedora Core 6

(8)

Graphics & Media Lab. at Seoul National Univ.

Particle Distribution Function

Particle Distribution Function

)

,

,

(

t

(9)

Particle Distribution Function

Particle Distribution Function

f: Particle distribution function in phase space (x,

ξ

)

)

,

,

(

t

(10)

Graphics & Media Lab. at Seoul National Univ.

Particle Distribution Function

Particle Distribution Function

f: Particle distribution function in phase space (x,

ξ

)

 The probability of finding a particle(=molecule) traveling with velocity

ξ

at position x & time t.

)

,

,

(

t

(11)

Particle Distribution Function

Particle Distribution Function

f: Particle distribution function in phase space (x,

ξ

)

 The probability of finding a particle(=molecule) traveling with velocity

ξ

at position x & time t.

 The amount of particles traveling with a velocity

ξ

at position x & time t.

)

,

,

(

t

(12)

Graphics & Media Lab. at Seoul National Univ.

Particle Distribution Function

Particle Distribution Function

f: Particle distribution function in phase space (x,

ξ

)

 The probability of finding a particle(=molecule) traveling with velocity

ξ

at position x & time t.

 The amount of particles traveling with a velocity

ξ

at position x & time t.

)

,

,

(

t

f

x

ξ

1

e

5

e

1

e

2

e

6

e

3

e

8

e

7

e

e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8

(13)

Particle Distribution Function

Particle Distribution Function

f: Particle distribution function in phase space (x,

ξ

)

 The probability of finding a particle(=molecule) traveling with velocity

ξ

at position x & time t.

 The amount of particles traveling with a velocity

ξ

at position x & time t.

 Macroscopic properties:

)

,

,

(

t

f

x

ξ

1

e

5

e

1

e

2

e

6

e

3

e

8

e

7

e

e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8

(14)

Graphics & Media Lab. at Seoul National Univ.

Particle Distribution Function

Particle Distribution Function

f: Particle distribution function in phase space (x,

ξ

)

 The probability of finding a particle(=molecule) traveling with velocity

ξ

at position x & time t.

 The amount of particles traveling with a velocity

ξ

at position x & time t.

 Macroscopic properties: – Density:

)

,

,

(

t

f

x

ξ

x ξ ξ x,t) f ( , ,t)d (  1

e

5

e

1

e

2

e

6

e

3

e

8

e

7

e

e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8

(15)

Particle Distribution Function

Particle Distribution Function

f: Particle distribution function in phase space (x,

ξ

)

 The probability of finding a particle(=molecule) traveling with velocity

ξ

at position x & time t.

 The amount of particles traveling with a velocity

ξ

at position x & time t.

 Macroscopic properties: – Density: – Velocity:

)

,

,

(

t

f

x

ξ

x ξ ξ x,t) f ( , ,t)d ( 

  ξ x ξ ξ x x u f t d t t ( , , ) ) , ( 1 ) , ( 

e

1 5

e

1

e

2

e

6

e

3

e

8

e

7

e

e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8

(16)

Graphics & Media Lab. at Seoul National Univ.

LBM Models

LBM Models

Lattice is composed of many cells on Cartesian grid.

DdQq

d: the number of dimension

(17)

Boltzmann Equation

Boltzmann Equation

It approximates the fluid by a dilute gas of particles.

In a dilute gas, molecules move freely as particles most of time except for

two-body collisions.

Such a dilute gas can be described by the Boltzmann Equation.

(18)

Graphics & Media Lab. at Seoul National Univ.

Boltzmann Equation

Boltzmann Equation

It approximates the fluid by a dilute gas of particles.

In a dilute gas, molecules move freely as particles most of time except for

two-body collisions.

Such a dilute gas can be described by the Boltzmann Equation.

(Ludwig Boltzmann, 1872)

)

( f

f

f

t

f

ξ

F

x

ξ

(19)

Boltzmann Equation

Boltzmann Equation

It approximates the fluid by a dilute gas of particles.

In a dilute gas, molecules move freely as particles most of time except for

two-body collisions.

Such a dilute gas can be described by the Boltzmann Equation.

(Ludwig Boltzmann, 1872)

f: particle distribution function

– ξ: microscopic velocity (=particle velocity)

F: external force field

– Ω: collision operator (due to the interaction of molecules)

)

( f

f

f

t

f

ξ

F

x

ξ

(20)

Graphics & Media Lab. at Seoul National Univ.

BGK Collision Model

BGK Collision Model

Recall the Boltzmann equation.

) ( f f f t f           ξ F x ξ

(21)

BGK Collision Model

BGK Collision Model

Recall the Boltzmann equation.

 The collision operator(Ω) is fully non-linear, and hard to be described.

BGK(Bhatnagar-Gross-Krook) approximation ) ( f f f t f           ξ F x ξ

(22)

Graphics & Media Lab. at Seoul National Univ.

BGK Collision Model

BGK Collision Model

Recall the Boltzmann equation.

 The collision operator(Ω) is fully non-linear, and hard to be described.

BGK(Bhatnagar-Gross-Krook) approximation

f

f

f

eq BGK

(

)

) ( f f f t f           ξ F x ξ

(23)

BGK Collision Model

BGK Collision Model

Recall the Boltzmann equation.

 The collision operator(Ω) is fully non-linear, and hard to be described.

BGK(Bhatnagar-Gross-Krook) approximation

feq: equilibrium distribution (Maxwell-Boltzmann distribution)

– It means the difference from the equilibrium during the relaxation time λ.

– Standard model for practical use

– P. L. Bhatnagar, E. P. Gross, and M. Krook. A model for collision processes in gases. Phys. Rev., 94. 511-525, 1954

f

f

f

eq BGK

(

)

) ( f f f t f           ξ F x ξ

(24)

Graphics & Media Lab. at Seoul National Univ. RT m D eq

e

RT

m

f

2 | | 2 2 2 2

2

u ξ 





Maxwell

(25)

D: dimension

m: mass of a particle (We will use the normalized mass, m=1.)R: Boltzmann constant

T: temperature

 ξ: microscopic velocity (particle velocity)

u: macroscopic velocity (mean particle velocity, fluid velocity)  ρ: fluid density RT m D eq

e

RT

m

f

2 | | 2 2 2 2

2

u ξ 





Maxwell

(26)

Graphics & Media Lab. at Seoul National Univ.

D: dimension

m: mass of a particle (We will use the normalized mass, m=1.)R: Boltzmann constant

T: temperature

 ξ: microscopic velocity (particle velocity)

u: macroscopic velocity (mean particle velocity, fluid velocity)  ρ: fluid density

Approximation (Taylor expansion in u up to the 2nd order)

– Assumption: small velocities, and low Mach number

RT m D eq

e

RT

m

f

2 | | 2 2 2 2

2

u ξ 





Maxwell

(27)

D: dimension

m: mass of a particle (We will use the normalized mass, m=1.)R: Boltzmann constant

T: temperature

 ξ: microscopic velocity (particle velocity)

u: macroscopic velocity (mean particle velocity, fluid velocity)  ρ: fluid density

Approximation (Taylor expansion in u up to the 2nd order)

– Assumption: small velocities, and low Mach number

RT m D eq

e

RT

m

f

2 | | 2 2 2 2

2

u ξ 





Maxwell

Maxwell

-

-

Boltzmann Distribution

Boltzmann Distribution

 

 





 

RT

RT

RT

e

RT

f

RT D eq

2

2

1

2

2 2 2 2 2 /

u

u

ξ

u

ξ

ξ ξ

(28)

Graphics & Media Lab. at Seoul National Univ.

Discretization

Discretization

of the Equilibrium Distribution Function

of the Equilibrium Distribution Function

(

)

2

3

)

(

2

9

)

(

3

1

)

,

(

u

2

u

2

u

2 2

u

u

c

e

c

e

c

w

f

eq i i i i

(29)

Discretized

Discretized

Boltzmann Equation

Boltzmann Equation

) ( f f f t f           ξ F x ξ : Boltzmann eqn.

(30)

Graphics & Media Lab. at Seoul National Univ.

Discretized

Discretized

Boltzmann Equation

Boltzmann Equation

f f f f t f eq            ξ F x ξ ) ( f f f t f           ξ F x ξ : Boltzmann eqn.

(31)

Discretized

Discretized

Boltzmann Equation

Boltzmann Equation

f f f t f eq        x ξf f f f t f eq            ξ F x ξ ) ( f f f t f           ξ F x ξ : Boltzmann eqn.

: linearized Boltzmann eqn.

(32)

Graphics & Media Lab. at Seoul National Univ.

Discretized

Discretized

Boltzmann Equation

Boltzmann Equation

f f f t f eq        x ξ              x ξ f t f dt dff f f f t f eq            ξ F x ξ ) ( f f f t f           ξ F x ξ : Boltzmann eqn.

: linearized Boltzmann eqn.

Let’s ignore the external force term is ignored for the derivation.

f f

dt

df eq

(33)

Discretized

Discretized

Boltzmann Equation

Boltzmann Equation

f f f t f eq        x ξ              x ξ f t f dt dff f f f t f eq            ξ F x ξ ) ( f f f t f           ξ F x ξ : Boltzmann eqn.

: linearized Boltzmann eqn.

Let’s ignore the external force term is ignored for the derivation.

f f

dt

df eq

 : ordinary differential equation (ODE) form Assume that δt is small enough and feqis smooth enough.

( ) ( )

 

1 ( ) ( )

) ( ) (t f t f t f t f t f t f t eq eq t          

(34)

Graphics & Media Lab. at Seoul National Univ.

Discretized

Discretized

Boltzmann Equation

Boltzmann Equation

f f f t f eq        x ξ              x ξ f t f dt dff f f f t f eq            ξ F x ξ ) ( f f f t f           ξ F x ξ : Boltzmann eqn.

: linearized Boltzmann eqn.

Let’s ignore the external force term is ignored for the derivation.

f f

dt

df eq

 : ordinary differential equation (ODE) form Assume that δt is small enough and feqis smooth enough.

( ) ( )

 

1 ( ) ( )

) ( ) (t f t f t f t f t f t f t eq eq t          

(

,

,

)

(

,

,

)

1

)

,

,

(

)

,

,

(

t

f

t

f

t

f

t

f

x

t

ξ

ξ

t

x

ξ

eq

x

ξ

x

ξ

(35)

LBM Procedure

LBM Procedure

( , , ) ( , , )

1 ) , , ( ) , , ( t f t f t f t f eq t tξ ξ x ξ x ξ x ξ x       

(36)

Graphics & Media Lab. at Seoul National Univ.

LBM Procedure

LBM Procedure

 Per each discrete direction

– Streaming – Collision

( , , ) ( , , )

1 ) , , ( ) , , ( t f t f t f t f eq t tξ ξ x ξ x ξ x ξ x       

(37)

LBM Procedure

LBM Procedure

 Per each discrete direction

– Streaming – Collision

( , , ) ( , , )

1 ) , , ( ) , , ( t f t f t f t f eq t tξ ξ x ξ x ξ x ξ x       

)

,

(

)

,

(

t

f

t

t

f

iin

x

iout

x

e

i

i eq i in i in i out i

t

f

t

f

t

f

t

F

f

(

x

,

)

(

x

,

)

1

(

x

,

)

(

x

,

)

(38)

Graphics & Media Lab. at Seoul National Univ.

LBM Procedure

(39)

LBM Procedure

(40)

Graphics & Media Lab. at Seoul National Univ.

Pseudo Code for D3Q19

(41)

Boundary Condition

(42)

Graphics & Media Lab. at Seoul National Univ.

Derivation of Transport Equations

Derivation of Transport Equations

   , ) ( , ) ( , ) ( , ) ( t t t f t f t f t f i i i eq i i i i i i x x x e x     

(43)

Derivation of Transport Equations

Derivation of Transport Equations

   , ) ( , ) ( , ) ( , ) ( t t t f t f t f t f i i i eq i i i i i i x x x e x     

3 3

2 ) ( , ) ( . . ) ( ) ( 2 1 ) ( ) ( ) , ( t H OT t t t f t f t t f t f f t t t f i i i i i i i i i i i     e  e  x e x e x                              3 3 2 , . . ! 2 1 ) , ( ) , ( expansion by y x T O H y y f x x f y y f x x f y x f y y x x f Taylor                                    

(44)

Graphics & Media Lab. at Seoul National Univ.

Derivation of Transport Equations

Derivation of Transport Equations

   , ) ( , ) ( , ) ( , ) ( t t t f t f t f t f i i i eq i i i i i i x x x e x     

3 3

2 ) ( , ) ( . . ) ( ) ( 2 1 ) ( ) ( ) , ( t H OT t t t f t f t t f t f f t t t f i i i i i i i i i i i     e  e  x e x e x                              3 3 2 , . . ! 2 1 ) , ( ) , ( expansion by y x T O H y y f x x f y y f x x f y x f y y x x f Taylor                                     t f t t f t t t f t f here i i i i i i i                              e e x e x( ) ( ) ,

(45)

Derivation of Transport Equations

Derivation of Transport Equations

   , ) ( , ) ( , ) ( , ) ( t t t f t f t f t f i i i eq i i i i i i x x x e x     

3 3

2 ) ( , ) ( . . ) ( ) ( 2 1 ) ( ) ( ) , ( t H OT t t t f t f t t f t f f t t t f i i i i i i i i i i i     e  e  x e x e x                              3 3 2 , . . ! 2 1 ) , ( ) , ( expansion by y x T O H y y f x x f y y f x x f y x f y y x x f Taylor                                     t f t t f t t t f t f here i i i i i i i                              e e x e x( ) ( ) ,

     i eq i i i i i i f f t t T O H t f t t f t                      2 3 3 2 ) ( , ) ( . . ) ( 2 1 e e e

(46)

Graphics & Media Lab. at Seoul National Univ.

Derivation of Transport Equations

Derivation of Transport Equations

   i eq i i i i i f f t f t t f t                    2 2 ) ( 2 1 e e                                ) , ( ) , ( ) , ( ) , ( ) , ( ; ; ; Thus, . ; expansion Enskog -Chapman by ) 2 ( 2 ) 1 ( ) 0 ( 0 ) ( 0 0 0 1 0 0 1 0 t f t f t f t f t f t where t t t t t t i i i n n i n i x x x x x x x x x       

(47)

Derivation of Transport Equations

Derivation of Transport Equations

                               ) , ( ) , ( ) , ( ) , ( ) , ( ; ; ; Thus, . ; expansion Enskog -Chapman by ) 2 ( 2 ) 1 ( ) 0 ( 0 ) ( 0 0 0 1 0 0 1 0 t f t f t f t f t f t where t t t t t t i i i n n i n i x x x x x x x x x       

         ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( 2 ) 2 ( 2 ) 1 ( ) 0 ( ) 2 ( 2 ) 1 ( ) 0 ( 2 0 1 0 2 0 1 0 t f t f t f t f t f t f t f t t t t i i i eq i i i i i i x x x x x x x e e                                               i eq i i i i i f f t f t t f t                    2 2 ) ( 2 1 e e

(48)

Graphics & Media Lab. at Seoul National Univ.

Derivation of Transport Equations

Derivation of Transport Equations

         ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( 2 ) 2 ( 2 ) 1 ( ) 0 ( ) 2 ( 2 ) 1 ( ) 0 ( 2 0 1 0 2 0 1 0 t f t f t f t f t f t f t f t t t t i i i eq i i i i i i x x x x x x x e e                                           

(49)

Derivation of Transport Equations

Derivation of Transport Equations

         ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( 2 ) 2 ( 2 ) 1 ( ) 0 ( ) 2 ( 2 ) 1 ( ) 0 ( 2 0 1 0 2 0 1 0 t f t f t f t f t f t f t f t t t t i i i eq i i i i i i x x x x x x x e e                                            , of powers different of ts coefficien Collecting       ) 2 ( ) 0 ( 2 0 0 ) 1 ( 0 0 1 ) 0 ( 2 ) 1 ( ) 0 ( 0 0 ) 0 ( 1 ) 0 ( 0 2 1 : : : i i i i i i i i i i eq i i f f t f t t f f f t f f f                                     e e e · · · ② · · · ③ · · · ①

(50)

Graphics & Media Lab. at Seoul National Univ.

Derivation of Transport Equations

Derivation of Transport Equations

         ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( 2 ) 2 ( 2 ) 1 ( ) 0 ( ) 2 ( 2 ) 1 ( ) 0 ( 2 0 1 0 2 0 1 0 t f t f t f t f t f t f t f t t t t i i i eq i i i i i i x x x x x x x e e                                            , of powers different of ts coefficien Collecting       ) 2 ( ) 0 ( 2 0 0 ) 1 ( 0 0 1 ) 0 ( 2 ) 1 ( ) 0 ( 0 0 ) 0 ( 1 ) 0 ( 0 2 1 : : : i i i i i i i i i i eq i i f f t f t t f f f t f f f                                     e e e · · · ① · · · ② · · · ③

              i i i i i i i i i i i i f w f w f w t w ) 1 ( ) 0 ( 0 ) 0 ( 0 directions all over summing and weights g Multiplyin : e

(51)

Derivation of Transport Equations

Derivation of Transport Equations

         ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( ) , ( 2 ) 2 ( 2 ) 1 ( ) 0 ( ) 2 ( 2 ) 1 ( ) 0 ( 2 0 1 0 2 0 1 0 t f t f t f t f t f t f t f t t t t i i i eq i i i i i i x x x x x x x e e                                            , of powers different of ts coefficien Collecting       ) 2 ( ) 0 ( 2 0 0 ) 1 ( 0 0 1 ) 0 ( 2 ) 1 ( ) 0 ( 0 0 ) 0 ( 1 ) 0 ( 0 2 1 : : : i i i i i i i i i i eq i i f f t f t t f f f t f f f                                     e e e

              i i i i i i i i i i i i f w f w f w t w ) 1 ( ) 0 ( 0 ) 0 ( 0 directions all over summing and weights g Multiplyin : e· · · ① · · · ② · · · ③ 1 , 0 0 1 1 s constraint ) ( ) 0 (                              n f w f w i i n i i i i i i e u e   eqn. Continuity : 0 ) ( 0         u t

(52)

Graphics & Media Lab. at Seoul National Univ.

Laplace & Poisson Equation Solver

(53)

Laplace & Poisson Equation Solver

Laplace & Poisson Equation Solver

(54)

Graphics & Media Lab. at Seoul National Univ.

Laplace & Poisson Equation Solver

Laplace & Poisson Equation Solver

Laplace equation:

– The solution of a time-dependent diffusion process:

0  X X t X          0 then , 0 if X t X

(55)

Laplace & Poisson Equation Solver

Laplace & Poisson Equation Solver

Laplace equation:

– The solution of a time-dependent diffusion process:

Poisson equation: 0  X X t X          0 then , 0 if X t XhX

(56)

Graphics & Media Lab. at Seoul National Univ.

Laplace & Poisson Equation Solver

Laplace & Poisson Equation Solver

Laplace equation:

– The solution of a time-dependent diffusion process:

Poisson equation:

– The solution of a time-dependent diffusion process:

0  X X t X          0 then , 0 if X t XhX h      X t X        h X t X then , 0 if 

(57)

Laplace & Poisson Equation Solver

Laplace & Poisson Equation Solver

Laplace equation:

– The solution of a time-dependent diffusion process:

Poisson equation:

– The solution of a time-dependent diffusion process:

0  X X t X          0 then , 0 if X t XhX h      X t X        h X t X then , 0 if 

( ) ( ) ( )

) , ( uii eiui eiu 2  i uu eq i A B C D f     i eq i A f ( ,u) 

(58)

Graphics & Media Lab. at Seoul National Univ.

Results

(59)

Results

(60)

Graphics & Media Lab. at Seoul National Univ.

Results

Figure

Updating...

References

Related subjects :