Professional Documents
Culture Documents
A Lattice Boltzmann Method Applıed To Heat Equation
A Lattice Boltzmann Method Applıed To Heat Equation
CEA-Saclay, France
Dec. 5, 2008
0-0
Outlines:
1 - Introduction
2 - Fluid limit of a simple kinetic system
3 - Two LBM schemes
4 - Links with a finite-difference type scheme
5 - Some properties: convergence and maximum principle
6 - Numerical results
7 - Two strange properties
8 - Conclusion
1
1 - Introduction
The LBM method is said to be :
WHY ?
2
In fact, the LBM scheme is often presented ...
• Point 1) ... as a physical model that is more general than the
EDPs it is supposed to solve. For example:
“It is known that existence-uniqueness-regularity problems are very
hard at the Navier-Stokes level (...). However,
at the lattice Boltzmann level, [there is] no existence, uniqueness
and regularity problems.” In : U. Frisch, Phycica D, 47, p. 231-232, 1991.
Or: “It may appear unusual that (...) in the LBM approach,
the approximation of the flow equation is only shown
after the method is already postulated.”
In : Mishra et al, Journal of Heat and Mass Transfer, 48, p. 3648-3659, 2005.
3
• Point 2) ... as a miraculous numerical method:
Example : “ (...) the Lattice Boltzmann technique may be
regarded as a new [explicit] finite-difference technique for the
Navier-Stokes equation
having the property of unconditionnal stability.” (Mishra et al.).
4
We propose the following approach:
↓ l
↓ links with finite differences ?
↓ ↑
LBM scheme → discretization of
the heat eq. since ε ≪ 1 ?
We can summerize this approach (which is the standard approach in num. anal.) with:
instead of:
LBM scheme as a “physical” model → discretization → continuous EDP
5
2 - Fluid limit of a simple kinetic system
Construction of a simple kinetic system:
We firstly define the “maxwellian” distribution
ρ u(x) ρ u(x)
Mq := 1+ = 1 + (−1)q (vq = (−1)q c)
2 vq 2 c
where u(x) is a given function and c ∈ R+ . It verifies
X 1 ρ
Mq = .
q=1,2 vq ρu
6
Proposition 1 Let fq (t, x) be solution of the kinetic system
1
∂t fq + (−1)q c∂x fq = (Mq − fq ) (q = 1, 2) (1)
ε
h i
f1 +f2 u(x)
where Mq := 2 1 + (−1)q c . Thus, the density ρ := f1 + f2
is solution up to the order ε2 of
2
∂t ρ + ∂x (uρ) = ν∂xx ρ with ν = εc2 (2)
7
When u = 0 :
Corollary 1 Let fq (t, x) be solution of the kinetic system
q 1
∂t fq + (−1) c∂x fq = (Mq − fq ) (q = 1, 2) (3)
ε
with Mq := f1 +f
2 . Thus, the density ρ := f1 + f2 is solution up to
2
the order ε2 of
2
∂t ρ = ν∂xx ρ with ν = εc2 (4)
8
3 - Construction of two LBM schemes
3.1 - Integration of the kinetic system
Proposition 2 Let {fq (t, x)}q=1,2 be solution of
q 1
∂t fq + (−1) c∂x fq = (Mq − fq ) := Qq (f )(t, x) (q = 1, 2)
ε
and let
gq (t, x) := fq (t, x) − ∆t
2 Qq (f )(t, x).
Thus
q ∆t3
gq [t + ∆t, x + (−1) c∆t] = gq (t, x)(1 − η) + Mq (t, x)η + O( ε ) (5)
where
1
η= ε 1.
∆t + 2
9
Proof of the proposition 2:
The solution of the continuous EDP
q 1
∂t fq + (−1) c∂x fq = (Mq − fq ) := Qq (f )(t, x)
ε
is given by
Z ∆t
fq [t + ∆t, x + (−1)q c∆t] = fq (t, x) + Qq (f )[t + s, x + (−1)q cs]ds.
0
A classical numerical integration would give
2
fq [t + ∆t, x + (−1)q c∆t] = fq (t, x) + ∆tQq (f )(t, x) + O( ∆t
ε ).
2
But O( ∆t
ε ) = O(∆t) (since ε = O(∆t): see the sequel ...).
10
But, the relation
∆t
fq [t + ∆t, x + (−1)q c∆t] = fq (t, x) + 2 [Qq (f )(t, x)
q
+ Qq (f )(t + ∆t, x + (−1) c∆t)]
∆t3
+ O( ε )
is equivalent to
q ε ∆t3
gq [t + ∆t, x + (−1) c∆t] = gq (t, x) + ε 1 Qq (g)(t, x) + O( ε )
∆t + 2
∆t
where gq (t, x) := fq (t, x) − 2 Qq (f )(t, x).
Remark: The previous proof is based on an idea that we can find in:
• He et al – A Novel Thermal Model for the LBM in Incompressible Limit – JCP,
146, p. 282-300, 1998.
• Karlin et al – Elements of the Lattice Boltzmann Method I: Linear advection
Equation – Comm. In Comp. Phys., 1(4), p. 616-655, 2006.
11
3.2 - A first LBM scheme
We choose:
c = ∆x , ∆x2
∆t
=⇒ ε = Cd ∆t with ∆t := Cd >0
ε = ν2 ν
c
q ∆t3
gq [t + ∆t, x + (−1) c∆t] = gq (t, x)(1 − η) + Mq (t, x)η + O( )
ε
1
(where η = ε 1 ) a first LBM scheme:
∆t + 2
n+1 n n
g
1,i = g1,i+1 (1 − η) + M1,i+1 η, 1
η = Cd + 21
n+1 n n where
g2,i = g2,i−1 (1 − η) + M2,i−1 η, 1
= .
n+1 n+1 n+1 ν∆t
+ 21
ρi = g1,i + g2,i ∆x2
12
By noting that Mq = g1 +g 2 , we see that the LBM scheme is
2
equivalent to
n+1 n η n η
g = g1,i+1 (1 − ) + g2,i+1 2 ,
1,i 2 η = C 1+ 1
n+1
(1 − η2 ) + g2,i−1 η
n n d
g2,i = g2,i−1 2 , where 1
2
= 1 .
n+1 n+1 n+1 ν∆t
2 +2
ρi = g1,i + g2,i ∆x
13
The “magic” formula: It is possible to writte the previous LBM scheme
with
n+1 n ∆t n ∆t
g1,i = g1,i+1 (1 − εb ) + M1,i+1 εb ,
n+1
g2,i n
= g2,i−1 (1 − ∆tεb ) + M n
2,i−1
∆t
εb ,
n+1 n+1 n+1
ρi = g1,i + g2,i
∆t
∆x 2
where εb is such that ν = εb − 2 ∆t .
To simplify the situation, most of the LBM schemes are written with
∆x = ∆t = 1 and without the function g:
f (t + 1, x − 1) = f (t, x)(1 − 1 ) + M (t, x) 1 ,
1 1 b
ε 1 b
ε
f2 (t + 1, x + 1) = f2 (t, x)(1 − 1 ) + M2 (t, x) 1
b
ε b
ε
1
where ν = εb − 2 c2s with cs := “sound velocity”(= 1 here).
For example: D. Wolf-Gladrow – A Lattice Bolzmann Equation for Diffusion – J.
of Stat. Phys., 79(5,6), p. 1023-1032, 1995.
14
A last remark:
By noting that
∆t
gq (t, x) := fq (t, x) − Qq (f )(t, x),
2
we can rewrite the LBM scheme
g n+1 = g n (1 − η ) + g n 1
1,i 1,i+1
η
2,i+1 2 ,
η = Cd + 21
2
where 1
g n+1 = g n (1 − η ) + g n η
= .
2,i 2,i−1 2 2,i−1 2 ν∆t
∆x2
+ 12
f n+1 =
n
f1,i+1 n
(4Cd −1)+f2,i+1 n
+f2,i−1 (16Cd2 −1)+f1,i−1
n
(4Cd +1)
2,i 16Cd (Cd + 21 )
.
15
3.3 - A second LBM scheme
We choose:
c = | ∆x |, ∆x2
∆t
=⇒ ε = Cd |∆t| with ∆t := −Cd <0
ε = ν2 ν
c
q ∆t3
gq [t + ∆t, x + (−1) c∆t] = gq (t, x)(1 − ηb) + Mq (t, x)b
η + O( )
ε
1
(where ηb = ε 1 ) the second LBM scheme:
∆t + 2
n−1 n n
g
1,i+1 = g1,i (1 − ηb) + M1,i ηb,
n−1 n n 1
g2,i−1 = g2,i (1 − ηb) + M2,i ηb, where ηb = −Cd + 21
.
n n n
ρi = g1,i + g2,i
16
We have the property:
Property 1 The LBM scheme
n−1 n n
g1,i+1 = g1,i (1 − ηb) + M1,i ηb,
n−1 n n
1
g2,i−1 = g2,i (1 − ηb) + M2,i ηb, where ηb = 1
−Cd + 2
n n n
ρi = g1,i + g2,i
17
QUESTIONS:
• LBM = LBM∗ ?
n=0 n=0
• initial conditions g1,i and g2,i ?
• boundary conditions ?
• stability and convergence ?
• probabilistic interpretation (not treated in this talk) ?
18
4 - Links with a finite-difference type scheme
Les us recall the two LBM schemes:
• LBM scheme:
n+1 n η n η
g
1,i = g1,i+1 (1 − 2 ) + g2,i+1 2 , 1
η = Cd + 21
n+1
g2,i n
= g2,i−1 (1 − η2 ) + g1,i−1
n η
2,
where 1
= .
ν∆t
+ 12
ρn+1
i = n+1
g1,i + n+1
g2,i ∆x2
• LBM∗ scheme:
n+1 n η n η
g
1,i = g1,i+1 (1 − 2 ) + g2,i−1 2 , 1
η = Cd + 12
n+1
g2,i n
= g2,i−1 (1 − η2 ) + g1,i+1
n η
2,
where 1
= .
n+1 n+1 n+1 ν∆t
+ 1
ρi = g1,i + g2,i ∆x 2 2
19
Dirichlet boundary conditions
ρ(t, xmin ) = ρxmin and xi = xmin + i∆x (i = 1, . . .).
0
g1,i = (1 − α)ρ0i ,
and with the initial condition 0 (i ∈ {1, . . .})
g2,i = αρ0i
when ρn=1
i in (6) is defined with
ρn=1
i := αρ0i−1 + (1 − α)ρ0i+1 .
20
Remarks:
• We have a similar result for Neumann B.C. when
g n+1 = g n+1 + (g n n
2,i=0 1,i=1 2,i=0 − g1,i=1 )(1 − η),
(n ∈ {0, . . .})
g0 = αρ 0
2,i=0 i=1
n n
and we recover the bounce-back B.C. g2,i=0 = g1,i=1
when α = 1/2.
• This equivalence between a LBM scheme and a finite-difference
scheme was firstly mentioned in:
Ancona M.G. – Fully-Lagrangian and Lattice-Boltzmann Methods for Solving
21
5 - Some properties: convergence and maximum principle
5.1 - Convergence in L∞
2
Proposition 3 For any Cd > 0 (∆t := Cd ∆x
ν ) and any α ∈ R:
i) the LBM∗ schemes with periodic, Neumann or Dirichlet B.C.
and with the initial condition
g 0 = (1 − α)ρ0 ,
1,i i
(i ∈ {1, . . .})
g 0 = αρ0
2,i i
converge in L∞ ;
ii) the Du Fort-Frankel scheme
ρn+1
i − ρn−1
i ν n n+1 n−1 n
= (ρi+1 − ρi − ρi + ρi−1 )
2∆t ∆x2
with periodic, Neumann or Dirichlet B.C. converges in L∞ when
ρn=1
i := αρ0i−1 + (1 − α)ρ0i+1 ;
iii) the convergence order is equal to 2 ⇐⇒ α = 21 .
22
Basic idea of the proof:
unconditional L∞ stability of the LBM∗ scheme [due to convexity]
+ equivalence lemma (i.e. lemma 1)
⇓
unconditional L∞ stability of the Du Fort-Frankel scheme
AND
AND
⇓
unconditional L∞ convergence of the LBM∗ schemes.
23
2
Some comments: Recall that ∆t := Cd ∆x
ν .
ρn=1
i := αρ0i−1 + (1 − α)ρ0i+1 , α ∈ R.
24
5.2 - Maximum principle with periodic and Neumann B.C.
∆x2
Lemma 2 For any Cd ≥ 0 (∆t := Cd ν ), the LBM∗ scheme with
the initial condition
g 0 = (1 − α)ρ0 ,
1,i i
(i ∈ {1, . . .})
g 0 = αρ0
2,i i
Remark: for the periodic B.C. (cf. point i), the result is also valid for the LBM sch.. Nevertheless,
for the Neumann B.C. (cf. point ii), the result has still to be proved for the LBM scheme.
25
Remark:
The Du Fort-Frankel scheme is equivalent to
η η
ρn+1
i = ρni+1 (1 − ) + ρi−1 (1 − ) + ρn−1
n
i (η − 1)
2 2
0 0
(with η := 1
ν∆t + 1 ∈ [0, 2]). Thus, when ρn=1
i := αρi−1 + (1 − α)ρi+1 :
∆x2 2
This proves that: min ρ0j ≤ ρ2i ≤ max ρ0j for any ∆t > 0
j j
26
5.3 - Maximum principle with modified Dirichlet B.C.
In the Dirichlet case
g n+1 = ρ n n 1
2,i=0 xmin − g1,i=1 + η(g1,i=1 − 2 ρxmin ),
(7)
g0 = αρx
2,i=0 min
is verified when 0 ≤ Cd ≤ 12 .
We would like this maximum principle to be unconditionally
satisfied (as for the periodic and Neumann cases),
to be able to treat the case Cd > 21 and cells number = O(1).
→ We have to modify the Dirichlet B.C. (7).
→ We will lose the equivalence LBM / Du Fort-Frankel !!!
27
∆x2
Lemma 3 For any Cd ≥ 0 (∆t := Cd ν ), the LBM∗ scheme with
the modified Dirichlet boundary condition
gn = 1
2,i=0 2 ρxmin ,
(8)
gn = 1 ρx
1,i=N +1 2 max
28
6 - Numerical results
We test the LBM∗ scheme
n+1 n η n η
g
1,i = g1,i+1 (1 − 2 ) + g2,i−1 2,
n+1
g2,i n
= g2,i−1 (1 − η2 ) + g1,i+1
n η
2,
n+1 n+1 n+1
ρi = g1,i + g2,i
where
1 1
η= 1 = ν∆t 1
.
Cd + 2 ∆x2 + 2
29
Test-case 1: Maximum principle with order 2 or (order 1 ?) modified
Dirichlet B.C.
gn 1
2,i=0 = 2 ρxmin ,
and of the (order 1 ?) modified Dirichlet B.C.
gn 1
1,i=N +1 = 2 ρxmax
ρ0i = 1
4 if i 6∈ {5, 6}
3
= 4 if i ∈ {5, 6}.
30
ρn=4
i with order 2 Dirichlet B.C. (Cd = 4)
1.2 0.8
1.1 0.7
1.0
0.6
0.9
0.5
0.8
0.4
0.7
0.3
0.6
0.2
0.5
0.1
0.4
0.3 0.0
0.2 −0.1
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
ρn=4
i with (order 1 ?) modified Dirichlet B.C. (Cd = 4)
1.0 0.8
0.9 0.7
0.8 0.6
0.7 0.5
0.6 0.4
0.5 0.3
0.4 0.2
0.3 0.1
0.2 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
(with t0 = 1).
31
Order 2 Dirichlet B.C.
ρni and ρexact (tn , xi ) (tn = 15)
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
Cd = 2 Cd = 4
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
Cd = 8 Cd = 16
31-1
(Order 1 ?) modified Dirichlet B.C.
ρni and ρexact (tn , xi ) (tn = 15)
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
Cd = 2 Cd = 4
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
Cd = 8 Cd = 16
31-2
Convergence (LBM∗ scheme)
Erreur L2 (∆x) (—) et y = x1 ou 2 (- - -)
pour N ∈ {50, 100, 500} (Cd = 2)
1 1
0.1
0.1
0.01
0.01
0.001
1e-04 0.001
0.01 0.1 1 0.01 0.1 1
adapted when the mesh is rough (cf. porous medium) since the max. principle is
verified (ROBUST code). But, when the mesh is fine, the order 2 is better.
32
Test-case 3: Influence of the first iterate ρn=1
i on the
properties of the Du Fort-Frankel scheme
We impose periodic boundary condition.
We choose cells number = 100 and Cd = 4.
We choose the initial condition
ρ0i = 0 si i 6= 50
= 1 si i = 50
33
Influence of ρn=1
i on the positivity of the DFF scheme
1.0 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.0
−0.2 −0.2
−0.4 −0.4
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
0 0
ρn=1
i = ρi+1 ρn=1
i = ρi−1
(= LBM with α = 0) (= LBM with α = 1)
1.0 1.0
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0.0 0.0
−0.2 −0.2
−0.4 −0.4
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
ρn=1
i = 12 (ρ0i−1 + ρ0i+1 ) ρn=1
i = ρ0i
1
(= LBM with α = 2) (6= LBM)
33-1
7 - Two strange properties
∆x2
(∆t = Cd ν )
• Cd = 0 :
Lemma 4 When Cd = 0 (i.e. ∆t = 0), the LBM∗ scheme
preserves the initial condition in the sense
Cd = 0 =⇒ ∀n ∈ N : ρni = ρn+2
i .
34
Dirichlet B.C. and Cd = 1000
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
tn=10 tn=20
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
tn=30 tn=40
34-1
Neumann B.C. and Cd = 1000
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
tn=10 tn=20
1.0 1.0
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5 0.5
0.4 0.4
0.3 0.3
0.2 0.2
0.1 0.1
0.0 0.0
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
tn=40 tn=80
34-2
We can explain this phenomena:
When Cd → +∞ (i.e. ∆t → +∞), the LBM and LBM∗ is given by
n+1 n
g
1,i = g1,i+1 ,
n+1 n
g2,i = g2,i−1 ,
ρn+1
i
n+1
= g1,i n+1
+ g2,i .
35
More precisely, we can prove that the consistency error E of the
∆t2 2 2
Dufort-Frankel scheme is given by E = −ν ∆x 2 ∂tt ρ + O(∆x ).
2 ∆x
∂tt ρ − c2 ∂xx
2
ρ =0 with c= .
∆t
36
Thus: although the LBM scheme is unconditionally stable,
we do not have to choose a large Cd .
More precisely, the LBM scheme is consistent
under the condition ∆t = C st ∆xα (α > 1).
37
9 - Conclusion
2
• construction of two LBM schemes for ∂t ρ = ν∂xx ρ;
• equivalence with a particular class of Du Fort-Frankel schemes for
periodic, Neumann and Dirichlet B.C.;
• convergence of this particular class of Du Fort-Frankel schemes in
∆x2
L∞ for any ∆t := Cd ν ∈ R+ ;
• maximum principle for any ∆t ∈ R+ with periodic and order 2
Neumann B.C., but not with the order 2 Dirichlet B.C.;
• modification of the order 2 Dirichlet B.C. → LBM scheme with a
order 1 Dirichlet B.C.;
=⇒ maximum principle for any ∆t ∈ R+ for the LBM scheme with
this new order 1 Dirichlet B.C.;
• it is possible to propose a probabilistic interpretation of the LBM
scheme and of the Du Fort-Frankel scheme: could it be a general
tool to analyse LBM schemes for other equations ?
38