Introduction to
Introduction to
the Lattice Boltzmann Methods:
the Lattice Boltzmann Methods:
From Theory to Practice
From Theory to Practice
Wanho Choi
Graphics & Media Lab. at Seoul National Univ.
A Recent Result using LBM
History of LBM
History of LBM
Cellular Automata
Lattice Gas Automata
Lattice Boltzmann Methods
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 kind Finite number of discrete states per each cell.
Simultaneous (synchronous) update for cell states Deterministic and uniform update rules
What is the Lattice Boltzmann Methods?
What is the Lattice Boltzmann Methods?
Relatively new simulation technique
Particle based formulation to simulate fluid flows However, 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.
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
Parallelism
Parallelism
Nine PS3 connected via a Gigabit Ethernet switch
Fedora Core 6
Graphics & Media Lab. at Seoul National Univ.
Particle Distribution Function
Particle Distribution Function
)
,
,
(
t
Particle Distribution Function
Particle Distribution Function
f: Particle distribution function in phase space (x,
ξ
))
,
,
(
t
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
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
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
ξ
1e
5e
1e
2e
6e
3e
8e
7e
e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8Particle 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
ξ
1e
5e
1e
2e
6e
3e
8e
7e
e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8Graphics & 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 ( 1e
5e
1e
2e
6e
3e
8e
7e
e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8Particle 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 5e
1e
2e
6e
3e
8e
7e
e1 e5 e8 e3 e2 e6 e7 e4 f1 f3 f2 f4 f5 f6 f7 f 8Graphics & 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
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.
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
ξ
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
ξ
Graphics & Media Lab. at Seoul National Univ.
BGK Collision Model
BGK Collision Model
Recall the Boltzmann equation.
) ( f f f t f ξ F x ξ
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 ξ
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 ξ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 ξGraphics & Media Lab. at Seoul National Univ. RT m D eq
e
RT
m
f
2 | | 2 2 2 22
u ξ
Maxwell
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 22
u ξ
Maxwell
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 22
u ξ
Maxwell
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 22
u ξ
Maxwell
Maxwell
-
-
Boltzmann Distribution
Boltzmann Distribution
RT
RT
RT
e
RT
f
RT D eq2
2
1
2
2 2 2 2 2 /u
u
ξ
u
ξ
ξ ξ
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
2u
2u
2 2u
u
c
e
c
e
c
w
f
eq i i i i
Discretized
Discretized
Boltzmann Equation
Boltzmann Equation
) ( f f f t f ξ F x ξ : Boltzmann eqn.
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.
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.
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 df f 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
Discretized
Discretized
Boltzmann Equation
Boltzmann Equation
f f f t f eq x ξ x ξ f t f dt df f 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 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 df f 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
ξ
eqx
ξ
x
ξ
LBM Procedure
LBM Procedure
( , , ) ( , , )
1 ) , , ( ) , , ( t f t f t f t f eq t tξ ξ x ξ x ξ x ξ x 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 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
iinx
ioutx
e
i
i eq i in i in i out it
f
t
f
t
f
t
F
f
(
x
,
)
(
x
,
)
1
(
x
,
)
(
x
,
)
Graphics & Media Lab. at Seoul National Univ.
LBM Procedure
LBM Procedure
Graphics & Media Lab. at Seoul National Univ.
Pseudo Code for D3Q19
Boundary Condition
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
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 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( ) ( ) ,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 eGraphics & 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
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 eGraphics & 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 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 · · · ② · · · ③ · · · ①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 ②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 tGraphics & Media Lab. at Seoul National Univ.
Laplace & Poisson Equation Solver
Laplace & Poisson Equation Solver
Laplace & Poisson Equation Solver
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
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 X h X
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 X h X h X t X h X t X then , 0 if
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 X h X h X t X h X t X then , 0 if
( ) ( ) ( )
) , ( u i i ei u i ei u 2 i uu eq i A B C D f i eq i A f ( ,u) Graphics & Media Lab. at Seoul National Univ.
Results
Results
Graphics & Media Lab. at Seoul National Univ.