SlideShare a Scribd company logo
1 of 104
Download to read offline
Understanding lattice Boltzmann boundary
conditions through moments
Tim Reis
School of Computing and Mathematical Sciences
University of Greenwich
London, UK
OpenLB Spring School
Mannheim 2019
Collaborators: Sam Bennett (formerly Cambridge), Paul Dellar
(Oxford), Andreas Hantsch (ILK Dresden), Rebecca Allen
(SINTEF), Seemaa Mohammed (Plymouth), Dave Graham
(Plymouth), Zainab Bu Sinnah (Plymouth), Ivars Krastins
(Greenwich)
What is this lecture about?
• It is not a lecture about bounce-back
• It is not a lecture about any particular implementation of
boundary conditions
• It is not about deciding which method is universally the best
• We will look at ways to think about boundary conditions
and how to implement them in the LB framework
• Hopefully, this will give us a clear perspective of LB
boundary conditions, allow you to decide their merits and
shortcomings, and hence when they are most appropriate.
• Ideally, provide some inspiration for you to make some
improvements
This is not a lecture on bounce-back. . .
. . . but let’s get this straight:
bounce-back is very useful!!
It is usually the go-to implementation - it is “simple”, second
roder accuarte, and can be adapted to complex geometries
But it is not immune from criticism.
Boundary value problems
Boundary conditions are an essential part of the solution to
partial differential equations
They are of paramount importance in determining the
well-posedness of a given problem
Dirichlet problems
For example, consider Laplace’s equation on a bounded
domain Ω ⊂ R2
2
u =
∂2u
∂x2
+
∂2u
∂y2
= 0
Dirichlet conditions: Given a function F : ∂Ω → R, we require
u(x) = F(x), x ∈ ∂Ω
Neumann problems
For example, consider Laplace’s equation on a bounded
domain Ω ⊂ R2
2
u =
∂2u
∂x2
+
∂2u
∂y2
= 0
Neumann conditions: Given a function F : ∂Ω → R, we
require
∂u(x)
∂n
= F(x), x ∈ ∂Ω,
where n is the outward normal.
Example: Navier–Stokes equations
∂u
∂t
+ u · u = −
1
ρ
P + ν 2
u,
· u = 0
At a rigid wall:
• The normal velocity of the fluid = normal velocity of the wall
(no penetration);
• Also, the tangential velocity of the fluid = tangential velocity
of the wall (no–slip)
That is, we usually say: u = 0 on ∂Ω.
Of course, we might want to apply slip conditions, conditions to
the pressure or stress, or inlet/outlet conditions.
What does this means for LBE?
The lattice Boltzmann equation (LBE) is often used to
numerically solve these equations and must be accompanied
by relevant boundary conditions
But how can we implement boundary conditions accurately at
lattice grid points?
Lattice Boltzmann computations are performed in the
particle basis, fi, but the problems we are trying to solve
usually impose boundary conditions in terms of
macroscopic scalars, vectors, and tensors (i.e the moment
basis (e.g ρ, ρu, etc.)) and their derivatives.
Contents
This lecture will mainly focus on the connection between LB
boundary conditions and LB moments
1. Bounce-back and some perspective
2. Brief overview of some other "particle-based" LB boundary
conditions
3. Moment-based boundary conditions
• The basic idea and plan
• Interpretation of other methods in terms of moments
• Analysis and results, including slip and no-slip flow (if time
permits!)
Perspective
For ease of explanation I will start the discussion with the
algorithm written in its most common form (that is for fi, rather
than fi - see my introductory lecture)
The stream–collide algorithm
The LBE is a “kinetic" algorithm
fi(x + ci, t + 1) = fi(x, t) −
1
τ
fi − f
(eq)
i
that is used to solved macroscopic PDEs.
Usually more interested in the moments of fi than fi
Moments give us the macroscopic (hydrodynamic) quantities of
interest ( i fi, i fici, etc.)
We usually use something like
fi(x + ci, t + 1) = fi(x, t) −
1
τ
fi − f
(eq)
i
to numerically solve
∂fi
∂t
+ ci · fi = −
1
τ
fi − f
(eq)
i
because it approximates
∂u
∂t
+ u · u = −
1
ρ
P + ν 2
u,
· u = 0.
Reminder
We MUST supply boundary conditions for the algorithm:
fi(x + ci, t + 1) = fi(x, t) −
1
τ
fi − f
(eq)
i
These should be consistent with the underlying PDE that we
are solving numerically:
∂fi
∂t
+ ci · fi = −
1
τ
fi − f
(eq)
i
and accurately capture the phenomena described by the
problems we are interested in:
∂u
∂t
+ u · u = −
1
ρ
P + ν 2
u,
· u = 0.
Reminder
Lattice Boltzmann computations are performed in the
particle basis, fi, but the problems we are trying to solve
usually impose boundary conditions in terms of
macroscopic scalars, vectors, and tensors (i.e the moment
basis (e.g ρ, ρu, etc.)) and their derivatives.
Incoming distributions are unknown
fi(x + ci, t + 1) = fi(x, t) −
1
τ
fi − f
(eq)
i
After streaming, the fi at boundary nodes pointing into the flow
domain are unknown
(Before streaming, there is nothing to stream-in to the flow)
On-node bounce-back
Bounce-back reverses the direction of distributions leaving the
domain
f2(xb, t) = f4(xb, t), f5(xb, t) = f7(xb, t), f6(xb, t) = f8(xb, t)
For on-node bounce back, the boundary is located on lattice
sites
Outline algorithm
Using “outgoing" distribution f4 and “incoming" f2 at a south wall
at j = 1 as an example
collide
f4(j = 2) = f4(j = 2) − 1
τ (f4 − f
(eq)
4 )|(j=2)
f2(j = 2) = f2(j = 2) − 1
τ (f2 − f
(eq)
2 )|(j=2)
stream
f4(j = 1) = f4(j = 2)
f2(j = 3) = f2(j = 2)
bounce-back
f2(j = 2) = f4(j = 1)
Note: No collision on wall (at j = 1) but “modified bounce-back"
allows collisions on wall
It takes an entire time step to complete the process
(f2(j = 2, t + 1) = f4(j = 1))
“Half-way" bounce back
Assumes the wall to be located half-way between grid points.
This means the boundary process can be completed in one
time step
f2(x, t + 1) = f4 (x, t), f5(x, t + 1) = f7 (x, t), f6(x, t + 1) = f8 (x, t)
where fi denote post-collisional quantities
Outline algorithm
Using “outgoing" distribution f4 and “incoming" f2 at a south wall
at j = 1 as an example
Collide
f4(j = 2) = f4(j = 2) − 1
τ (f4 − f
(eq)
4 )|(j=2)
f2(j = 2) = f2(j = 2) − 1
τ (f2 − f
(eq)
2 )|(j=2)
bounce-back
f2(j = 1) = f4(j = 2)
stream
f4(j = 1) = f4(j = 2)
f2(j = 2) = f2(j = 1)
Some notes
On-node and half-way bounce back are really different
versions of the same method!
On-node first order accurate for the velocity field while halfway
is second order accurate (pressure is first order) [Junk and
Yang (2003), He et al (1997)]
Lots of extensions to deal with flow in irregular, heterogeneous,
geometries
Halfway bounce back offers accuracy, stability, and geometric
flexibility. It is often considered (certainly by me) to be most
reliable implementation of lattice Boltzmann boundary
conditions for many engineering applications
But . . .
Notes
What if you want to implement something other than no-slip|
And even if you are hoping for no-slip,
These are plots of the solution to Poiseuille flow, analytical and
LB prediction, at Re = 100 (left) and Re = 1.
Viscosity-dependent numerical (unphysical) slip error!
Motivation for alternative ideas
The Bounce–Back method is commonly used and is often very
successful.
However,
• it introduces a “numerical slip error" that in proportional to
the grid spacing1 and the viscosity of the fluid and thus
large for low Reynolds number flows (e.g flows in porous
media) [Ginzbourg and Adler (1994), He et al. (1997)]
• there is not much freedom to impose conditions other than
the no-slip.
Motivation for alternative ideas
Non-equilibrium bounce-back [Zou and He (1997)] can be
unstable and uses an arbitrary closure condition.
Kinetic/Maxwell’s diffusive slip boundary conditions [Ansumali
and Karlin (2002)] are only first order accurate in general and
still vulnerable to the “numerical slip error" [Verhaeghe et al
(2009)].
Note that Maxwell boundary conditions were first applied to
discrete velocity Boltzmann models by [Boadwell (1964)] and
analysed further by [Gatignol (1977)].
Understanding lattice Boltzmann boundary
conditions through moments
A simple example
Imagine we want to solve the 1D advection–diffusion equation
∂φ
∂t
+ u
∂φ
∂x
= D
∂2φ
∂x2
which can be written
∂φ
∂t
+
∂ψ
∂x
= 0
where ψ = uφ − D ∂φ
∂x .
The (macroscopic) quantities of interest are
φ and ψ.
So how many distribution functions do we need? At least two!
The D1Q2 model for diffusion
Consider a 1D LB model with two directions: f1 and f2
The conserved quantity is φ = f1 + f2
and it’s flux (non–conserved) is ψ = f2 − f1
We have two basis: the ”particle" basis
f =
f1
f2
and the "moment" basis
m =
φ
ψ
Moments of the D1Q2 model
f =
f1
f2
, m =
φ
ψ
Since φ = f1 + f2 and ψ = f2 − f1 we can write
m =
φ
ψ
=
1 1
−1 1
f1
f2
= M
f1
f2
.
As we have a linear transformation between f and m, the
transformation matrix M is invertible and thus
f = M−1
m
Macroscopic equation
It can be shown that
fi(x + ci, t + 1) = fi(x, t) −
1
τ
fi − f
(eq)
i
approximates
∂φ
∂t
+ u
∂φ
∂x
= D
∂2φ
∂x2
+ O(τ2
), D ∝ τ
What would the boundary conditions need to be?
Eg: ∂x φ = 0
Conditions on fi or its moments?
Lattice for 2D Navier-Stokes
D2Q9 has 9 independent moments. Six are hydrodynamic
ρ =
i
fi, ρuα =
i
ficiα, Παβ =
i
ficiαβ,
and the other three are pseudo–kinetic
Qxxy =
i
fic2
ix ciy , Qxyy =
i
ficix c2
iy , Rxxyy =
i
fic2
ix c2
iy .
D2Q9 moments
The relationship between f and m is
m = Mf
where f = (f0, f1, . . . , f8)T
and
M =














1 1 1 1 1 1 1 1 1
0 1 0 −1 0 1 −1 −1 1
0 0 1 0 −1 1 1 −1 −1
0 1 0 1 0 1 1 1 1
0 0 1 0 1 1 1 1 1
0 0 0 0 0 1 −1 1 −1
0 0 0 0 0 1 1 −1 −1
0 0 0 0 0 1 −1 −1 1
0 0 0 0 0 1 1 1 1














D2Q9 LBE
We know that the D2Q9 LBE approximates the (weakly)
compressible Navier–Stokes equations,
but what boundary conditions should it satisfy?
As an example, consider a solid wall with a no–slip condition
Moments at a wall
We need the fluid to have zero velocity relative to the wall:
ux = uy = 0
Navier-Stokes has zero tangential stress at the wall:
Sxx ∝
∂ux
∂x
= 0, =⇒ Πxx = Π
(eq)
xx =
ρ
3
+ ρu2
x =
ρ
3
Do (should) lattice boundary conditions satisfy these
constraints?
Counting moments
For the D1Q2 lattice we had 2 independent moments
For the D2Q9 lattice we had 9 independent moments
In general, a n–velocity lattice has n moments
Note that we needed enough moments to define the
conservation quantities and their fluxes
Point of view:
If we accept that we use the LBE to solve macroscopic
equations then the moments should also satisfy the boundary
conditions.
Moments at a south wall
m = Mf = M














f0
f1
f2
f3
f4
f5
f6
f7
f8














=














ρ
ρux
ρuy
Πxx
Πyy
Πxy
Qxxy
Qyyx
Rxxyy














Three unknowns on the left =⇒ three constraints needed on
the right
Reminder: NSE, DBE, LBE
From the previous lecture we know that the discrete Boltzmann
equation
∂fi
∂t
+ ci · fi = Ωi(f)
has embedded within it the Navier-Stokes equations.
Thus we develop an (indirect) algorithm for the NSE by
discretising the DBE is space and time
From discrete Boltzmann to lattice Boltzmann
Integrating the discrete Boltzmann equation
∂fi
∂t
+ ci · fi = Ωi(f)
along a characteristic for time ∆t gives
fi(x + ci∆t, t + ∆t) − fi(x, t) =
∆t
0
Ωi(x + cis, t + s) ds,
Approximating the integral by the trapezium rule yields
fi(x +ci∆t, t+∆t)−fi(x, t) =
∆t
2
Ωi(x +ci∆t, t+∆t)
+ Ωi(x, t) +O ∆t3
.
This is an implicit system.
Change of Variables
To obtain a second order explicit LBE at time t + ∆t define [He
et al. (1998)]
fi(x, t) = fi(x, t) +
∆t
2τ
fi(x, t) − f
(0)
i (x, t) .
The new algorithm is
fi(x + ci∆t, t + ∆t) − fi(x, t) = −
∆t
τ + ∆t/2
fi(x, t) − f
(0)
i (x, t)
Note: The “standard" LBE algorithm is obtained from the DBE
using an Euler discretisation (first order in time)
Barred moments
fi(x, t) = fi(x, t) +
∆t
2τ
fi(x, t) − f
(0)
i (x, t) .
Note that conserved quantities are obtained easily from fi:
ρ =
i
fi =
i
fi; ρu =
i
fici =
i
fici;
but care must be taken for non-conserved moments, e.g
ΠΠΠ =
i
ficici,
=
i
ficici +
∆t
2τ
i
fi − f
(0)
i cici,
= ΠΠΠ +
∆t
2τ
ΠΠΠ − ΠΠΠ(0)
.
A quick note on forcing
A body force Ri in the discrete Boltzmann equation
∂fi
∂t
+ ci · fi = −
1
τ
fi − f
(0)
i + Ri
should have the following moments:
i
Ri = 0,
i
Rici = FFF,
i
Ricici = FFFu + uFFF,
otherwise we do not obtain the correct viscous stress tensor
from the Chapman-Enskog analysis. An example is
Ri = Wi (3(ci − u) + 9(ci · u)ci) · F.
The PDE
∂fi
∂t
+ ci · fi = −
1
τ
fi − f
(0)
i + Ri
is discretised using the Trapezium rule and the change of
variable
fi(x, t) = fi(x, t) +
∆t
2τ
fi(x, t) − f
(0)
i (x, t) −
∆t
2
Ri.
This yields the LBE
fi(x+ci∆t, t+∆t)−fi(x, t) = −
∆t
τ + ∆t/2
fi − f
(0)
i +
τ∆t
τ + ∆t/2
Ri
Note:
ρu =
i
fici = ρu −
∆t
2
F.
Kinetic–style lattice Boltzmann boundary
conditions
The (on-node) bounce–back method
In general, there are three unknown populations at a boundary.
At a south wall, we don’t know f2, f5, f6.
Bounce–back says
f2 = f4, f5 = f7, f6 = f8
Bounce–back moments
Let’s look at ρux , ρuy and Πxx (ignore force for simplicity)
ρux = ρux =
i
ficix = f1 − f3 + f5 − f6 − f7 + f8
= f1 − f3 + f7 − f8 − f7 + f8
= f1 − f3.
Therefore bounce–back with the BGK model does NOT satisfy
the no–slip condition.
The non–zero momentum ρux = f1 − f3 is NOT physical slip!
The error occurs for diffuse reflection boundary conditions, too.
Bounce–back moments
Let’s look at ρux , ρuy and Πxx .
ρuy = ρuy =
i
ficiy = f2 − f4 + f5 + f6 − f7 + f8
= 0
Therefore the condition uy = 0 IS satisfied.
Πxx =
i
fic2
ix = f1 + f3 + f5 + f6 + f7 + f8,
= f1 + f3 + 2(f7 + f8),
= something strange
(in fact, it does not give the correct stress condition but this
requires further analysis)
Notes on the bounce–back method
It gives a grid–dependent velocity error at the wall (numerical
slip)
This is first order (in ∆x) for an on-node implementation and
second order for “half-way" bounce-back [He et al. (1997)]
The precise location where the velocity is zero is a function of
the relaxation time [Ginzbourg and Adler (1994)]
The error is large for large τ (or small Reynolds numbers)
Can be removed/reduced MRT and TRT [Ginzbourg and Adler
(1994), Verhaeghe et al (2009)]
Bounce-back is simple to implement and stable. Often very
accurate
Zou and He boundary conditions
Sometimes called non–equilibrium bounce–back [Zou and He
(1997)]
The Chapman-Enskog expansion says fi = f
(eq)
i + f
(ne)
i where
f
(ne)
i = −τWi (3cici − I) : u + ( u)T
Zou and He say
f
(ne)
2 = f
(ne)
4 ,
f
(ne)
5 = f
(ne)
7 +
1
2
(f1 − f3),
f
(ne)
6 = f
(ne)
8 −
1
2
(f1 − f3)
Zou and He wall moments
If we look at the hydrodynamic moments at the wall after
applying Zou and He’s method we find that
ρux = ρuy = 0
so the no–slip condition IS satisfied.
However,
Πxx =
i
fic2
ix = f1 + f3 + f5 + f6 + f7 + f8
= 2(f7 + f8),
so the stress condition is NOT satisfied.
Remarks
The Zou and He method is not very intuitive
It does satisfy the no–slip condition
It does not guarantee mass conservation
It is less stable than bounce–back
It’s difficult to extend to 3D
Difficult to deal with corners
What do we do for the “fi" scheme (i.e second order time
implementation)?
Moment–Method for Boundary Conditions
Moment–Method: The basic idea
To try and impose boundary conditions on
momentum and viscous stress only.
Moments at a wall
Let’s once again consider a south boundary
After streaming, we don’t know f2, f5, f6.
(equivalently, f2, f5, f6).
Let’s look at ALL the moments at this wall.
Moments at a south wall
Hydrodynamic moments
ρ =
i
fi = f0 + f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8,
ρux =
i
ficix = f1 − f3 + f5 − f6 − f7 + f8,
ρuy =
i
ficiy = f2 − f4 + f5 + f6 − f7 − f8,
Πxx =
i
fic2
ix = f1 + f3 + f5 + f6 + f7 + f8,
Πyy =
i
fic2
iy = f2 + f4 + f5 + f6 + f7 + f8,
Πxy =
i
ficix ciy = f5 − f6 + f7 − f8
Terms in red are unknown at the boundary after streaming
Moments at a south wall
Non-hydrodynamic (“ghost") moments
Qxxy =
i
fic2
ix ciy = f5 + f6 − f7 − f8,
Qxyy =
i
ficix c2
iy = f5 − f6 − f7 + f8,
Rxxyy =
i
fic2
ix c2
iy = f5 + f6 + f7 + f8.
Terms in red are unknown at the boundary after streaming
Notice the three different combinations of the unknowns
Moment–grouping at a south boundary
THE PLAN:
Formulate the boundary conditions in the moment basis, and
then transform them into into boundary conditions for the
distribution functions [Bennett (2010, thesis)]
Moments Unknowns
ρ, ρuy , Πyy f2 + f5 + f6
ρux , Πxy , Qxyy f5 − f6
Πxx , Qxxy , Rxxyy f5 + f6
We can pick one constraint from each group. A natural choice is
ρuy = 0,
ρux = 0,
Πxx = P =
ρ
3
=⇒
∂u
∂x
= 0.
Second order implementation
ρuy = 0,
ρux = 0,
Πxx = P =
ρ
3
=⇒
∂u
∂x
= 0.
Our conditions are on the (physical) moments of fi
However, our algorithm is for fi where
fi = fi +
∆t
2τ
fi − f
(0)
i −
∆t
2
Ri.
We must convert our conditions on physical moments to
conditions on numerical moments.
Second order implementation
ρuy = 0,
ρux = 0,
Πxx =
ρ
3
and
fi = fi +
∆t
2τ
fi − f
(0)
i −
∆t
2
Ri.
so
ρuy = −
∆t
2
Fx ,
ρux = −
∆t
2
Fx ,
Πxx =
ρ
3
Caution: Care must be taken with the fi → fi transform
Solving for the unknowns
For simplicity, consider the case where Fy = 0.
Noting that
ρ = ρuy + f0 + f1 + f3 + 2(f4 + f7 + f8),
with uy = 0, we solve
0 = f2 − f4 + f5 + f6 − f7 − f8,
−
∆t
2
Fx = f1 − f3 + f5 − f6 + f7 + f8,
ρ
3
= f1 + f3 + f5 + f6 + f7 + f8.
0 = f2 − f4 + f5 + f6 − f7 − f8,
−
∆t
2
Fx = f1 − f3 + f5 − f6 + f7 + f8,
ρ
3
= f1 + f3 + f5 + f6 + f7 + f8.
to obtain
f2 = f1 + f3 + f4 + 2 f7 + f8 −
ρ
3
,
f5 = −f1 − f8 +
ρ
6
−
1
2
Fx ,
f6 = −f3 − f7 +
ρ
6
+
1
2
Fx .
An example: open boundaries
At a west vertical boundary the moment grouping is
Moments Unknowns
ρ, ρux , Πxx f1 + f5 + f8
ρuy , Πxy , Qxxy f5 − f8
Πyy , Qxyy , Rxxyy f5 + f8
If we want this to be an inflow boundary then we can impose
ρ = ρintlet ,
ρuy = 0,
Πyy = ρinlet /3.
Treatment of the corner nodes
How many unknowns do we have at a corner? 5
At a southwest corner, we don’t know f1, f2, f5, f6, f8.
We can impose the inlet and wall boundaries simultaneously
Impose ρ, ρux , ρuy , Πxx , Πxy
A quick comparison
Z+H gives errors at the corners
Difference between exact solution and the LB prediction with
bounce-back on walls and Z-H conditions at inlet/outlet.
Fluctuations down to machine precision with moment-based
conditions [Bennett (2010)].
Moral: Beware of corners!!
Lid-driven cavity
Flow in a square box, no–slip on all walls.
Top boundary moves with velocity Ulid .
Interesting to look at the streamfunction: ux = −∂y ψ, uy = ∂x ψ
Flow characteristics depend on Re = Ulid L/ν.
Moment–based boundary conditions: moving wall
Moments Unknowns
ρ, ρuy , Πyy f4 + f7 + f8
ρux , Πxy , Qxyy f8 − f7
Πxx , Qxxy , Rxxyy f7 + f8
We can pick one constraint from each group. A natural choice is
ρuy = 0,
ρux = Ulid ,
Πxx = Π
(0)
xx =
ρ
3
+ ρU2
lid =⇒
∂u
∂x
= 0.
Lid-driven cavity flow: Re = 7500
Lid-driven cavity flow: the numbers
Primary
Re = 400
Present Λ = 1/4 0.1139 0.5547 0.6055
Ghia (1982) et al. 0.1139 0.5547 0.6055
Sahin and Owens (2003) 0.1139 0.5536 0.6075
Re = 1000
Present Λ = 1/4 0.1189 0.5313 0.5664
Ghia(1982) 0.1179 0.5313 0.5625
Sahin and Owens (2003) 0.1188 0.5335 0.5639
Botella (1998) et al. 0.1189 0.4692 0.5652
Re = 7500
Present Λ = 1/4 0.1226 0.5117 0.5352
Ghia (1982) et al. 0.1200 0.5117 0.5322
Sahin and Owens (2003) 0.1223 0.5134 0.5376
Note: TRT model. Second order convergence of L2 error norm
for global velocity and pressure fields
Convergence Example: Re = 1000
N ||u||2 ||P||2
N=33 0.084382 0.00023177
N=65 0.01754295 0.0000492165
N=129 0.00416137 0.00001268
N=257 0.00083492 0.0000026609
Natural Convection
Flow is driven by density variation
∂u
∂t
+ u · u = − P + Pr 2
u + RaPrg,
∂θ
∂t
+ u · θ = 2
θ,
LBE Implementation
Two DBEs: One for NSE one for scalar transport
Force acting in vertical direction (Fy )
Moment-Method boundary conditions. Example south wall
f2 = f1 + f3 + f4 + 2(f7 + f8) −
ρ
3
−
∆t
2
Fy ,
f5 = −f1 = f8 +
ρ
6
,
f6 = −f3 − f7 +
ρ
6
.
where ρ = ρuy + f0 + f1 + f3 + 2(f4 + f7 + f8)
and by the f0 → fi transform, ρuy = −Fy /2 at the wall (since
uy = 0)
D2Q5 lattice model for scalar transport equation (temperature)
Moment-method also used to impose boundary conditions on θ.
Only one unknown at the walls
θwall = i gi = i gi (heated walls)
∂Nθ = i ciNgi = 0 (other walls)
Streamfunction and Temperature plots
Contours of flow fields for convection in a square cavity. From
left to right, Ra = 1000, Ra = 10000, Ra = 1000000
(Work of Rebecca Allen [PhD (2015), Allen and Reis (2016)])
Nusselt numbers
Nu = x y qx dxdy, where qx is the heat flux
Have looked at other Nu too - same level of accuracy observed.
Ra Study Nu
103 Present 1.1178
de Vahl Davis (1983) 1.118
106
Present 8.8249
Le Quere (1991) 8.8252
de Vahl Davis (1983) 8.800
108
Present 30.23339
Le Quere (1991) 30.225
All fields show second order convergence
(Work of Rebecca Allen [PhD (2015), Allen and Reis (2016)])
Some further remarks and light analysis
Analysis of existing methods
The grouping of moments at a boundary allows us to examine
other methods.
Moments Unknowns
ρ, ρuy , Πyy f2 + f5 + f6
ρux , Πxy , Qxyy f5 − f6
Πxx , Qxxy , Rxxyy f5 + f6
The (on-node) bounce-back condition can be translated into
ρuy = 0, , Qxxy = 0, Qxyy = 0
Moments Unknowns
ρ, ρuy , Πyy f2 + f5 + f6
ρux , Πxy , Qxyy f5 − f6
Πxx , Qxxy , Rxxyy f5 + f6
The Zou and He conditions at a wall can be translated into
ρux = ρuwall, , ρuy = 0, Qxxy = 0.
Note that both impose a condition on the "energy moment" but
NOT on the viscous stress tensor!
Moments Unknowns
ρ, ρuy , Πyy f2 + f5 + f6
ρux , Πxy , Qxyy f5 − f6
Πxx , Qxxy , Rxxyy f5 + f6
The diffuse reflection conditions at a wall can be translated into
ρuy = 0, Qxxy =
1
3
+ u2
wall Πyy −Rxxyy , Qxyy = −Πxy +uwallΠyy
These are difficult to interpret physically. No stress condition.
Large errors.
Analytic solution of the LBE
Recall that for flows satisfying
∂
∂x
=
∂
∂t
= 0, FFF = (ρG, 0)
with walls located at j = 1 and j = n, the LBE velocity field
satisfies
Poiseuille flow
uj+1vj+1 − uj−1vj−1
2
= ν uj+1 + uj−1 − 2uj + G,
This is the second order finite–difference form of the
incompressible Navier–Stokes equations with a constant body
force:
∂(uv)
∂y
= ν
∂2u
∂y2
+ G
Solution of the difference equation
uj+1vj+1 − uj−1vj−1
2
= ν uj+1 + uj−1 − 2uj + G
We can show ρ is constant and vj = 0
The solution to this second order difference equation is
uj =
4Uc
(n − 1)2
(j − 1)(n − j) + Us, j = 1, 2, . . . , n
where Uc = H2G/8ν is the centre-line velocity and H = (n − 1)
is the channel height.
Numerical slip for bounce–back
If we use bounce–back boundary conditions, we find the
numerical slip to be [He et al. (1997)]
Us =
48ν2 − 1
n2
Uc
Notes
This slip error is second order in grid spacing
It is large for very viscous flows
The point where the velocity vanishes only asymptotically
coincides with the midpoint between gridpoints
It can be eliminated using TRT [Ginzbourg and Adler (1994)]
Ideally, we’d like to use TRT/MRT for improving stability and not
fixing errors due to boundary treatments
It is NOT Knudsen slip!!
Us = 0 for Moment-Method
Imposing physical slip boundary conditions via
moments
Flow in a microchannel
No slip Slip flow Transition Molecular
Kn 10−3 10−3 Kn 10−1 10−1 Kn 10 Kn 10
In shear flow the LBE reduces to a linear second–order
recurrence relation =⇒ linear or parabolic profiles at all Kn
But we can capture flow in the bulk from with slip conditions
Maxwell–Navier boundary condition
Wall boundary conditions:
uslip = σKnH∂y u|wall , σ = (2 − σa)/σa.
These can be expressed in terms of moments [Reis and Dellar
(2012)]:
f2 = f1 + f3 + f4 + 2 f7 + f8 − P − ρu2
slip ,
f5 = −f1 − f8 + (P + ρu2
slip + ρuslip)/2,
f6 = −f3 − f7 + (P + ρu2
slip − ρuslip)/2,
and since Πxy |wall =
2τ ¯Πxy |wall
(2τ+∆t) = µ∂y u|wall,
uslip = −
6 −f1 + f3 + 2f7 − 2f8
ρ(2τ + 1 + 6KnH)
.
Flow in a microchannel: asymptotic solution
We consider a viscous fluid in a channel with an aspect ratio
δ = L/H 1.
The relevant dimensionless numbers are
Re =
ρoUoH
µ
, Ma =
Uo
√
γRT
, Kn =
πγ
2
Ma
Re
An expansion in δ yields the leading–order solution
u(x, y) = −
Re
8Ma2
p 1 − 4y2
+ 4σ
Kn
p
v(x, y) =
2Re
8pMa2
1
2
(p2
) 1 −
4
3
y2
+ 4σKnp
P (x) = (6Kn)2
+ (1 + 12Kn)x + θ(θ + 12Kn)(1 − x) − 6Kn
Flow in a microchannel: Kn = 0.1
Convergence
Dipole wall collision with slip
With the following initial conditions, two counter–rotating
vortices are self–propelled to the right (F = 0):
u0 = −
1
2
|ω| (y − y1) exp (−r1/r0)2
+
1
2
|ω| (y − y2) exp (−r2/r0)2
,
v0 =
1
2
|ω| (x − x1) exp (−r1/r0)2
−
1
2
|ω| (x − x2) exp (−r2/r0)2
.
Dipole wall collision with slip
The velocity at the walls is the Navier-slip condition
u|| = sL
∂u||
∂n
From left: t = 0.5, 0.6, 0.7, 1. Re = 2500, sL = 0.002.
Energy and Enstrophy: Re = 1252
(Work of Seemaa Mohammed [PhD thesis (2018)])
[Sutherland et al. (2013)]
Summary
Most lattice Boltzmann models impose boundary conditions on
the populations (fi),
but we are usually only interesting in hydrodynamic variables.
We can impose the same conditions on the LBM and the target
equations via moment constraints.
This gives a very general methodology for imposing a variety of
hydrodynamic boundary conditions at grid points precisely
Summary
Don’t fall into the trap of thinking one method is always “better"
than another!!
Moment-based approach is general, simple, and local
Shown to be very accurate
But is not as stable nor efficient as bounce-back at high Re
numbers
Should be used with MRT/TRT (so should all LBMs?)
Currently lacks geometric flexibility and requires further,
deeper, analysis.
References
S. Bennet, PhD Thesis, University of Cambridge (2010)
T. Reis and P.J. Dellar, Moment-based formulation of
Navier-Maxwell slip boundary conditions for lattice Boltzmann
simulations of rarefied flow in microchannels, Phys. Fluids 24
(2012), 112001
R. Allen and T. Reis, Moment-based conditions for lattice
Boltzmann simulations of natural convection in cavities, Prog.
Comp. Fluid Dyn.: An Int. J 16 (2016), 1-4
R. Allen, PhD Thesis, KAUST (2015)
References
A. Hantsch, T. Reis, and U. Gross, Moment method boundary
conditions for multiphase lattice Boltzmann simulations of
partially-wetted walls, J. Comp. Multiphase Flow 7 (2015), 1-4
A. Hantsch, PhD Thesis, TU Freiberg (2013)
S. Mohammed and T. Reis, Using the lid-driven cavity flow to
validate moment-based boundary conditions for the lattice
Boltzmann equation, Arch. Mech. Eng, 64 (2017), 57-74
S. Mohammed, D. Graham, and T. Reis, Assessing
moment-based boundary conditions for the lattice Boltzmann
equation: A study of dipole-wall collisions, Comput. Fluids 176
(2018) 79-96
References
I. Ginzbourg and P. Adler, Boundary flow condition analysis for
the three-dimensional lattice Boltzmann model, J. Physique II 4
(1994), 191-214
X. He, Q. Zou, and L-S Luo, Analytic solutions and analysis on
non-slip boundary conditions for lattice Boltzmann BGK model
J. Comp. Phys 87 (1997), 115-136
M. Junk and Z. Yang, Analysis of lattice Boltzmann boundary
conditions Proc. Appl. Math. Mech., 3 (2003), 76?79.
F. Verhaeghe, L-S Luo, and B. Blanpain, Lattice Boltzmann
modeling of microchannel flow in slip flow regime, J. Comp.
Phys, 228 (2009), 146-157
Q. Zou and X. He, On pressure and velocity boundary
conditions for lattice Boltzmann BGK model, Phys Fluids (1997)
References
J.E Broadwell, Study of rarefied shear flow by the discrete
velocity method, J. Fluid. Mech, 19 (1964), 401-414
R. Gatignol, Kinetic theory boundary conditions for discrete
velocity gases, Phys. Fluids, 20 (1977)
S. Ansumali and IV Karlin, Kinetic boundary conditions in the
lattice Boltzmann model, Phys. Rev. E, 66 (2002), 026311
T. Reis, Burnett order stress and spatially-dependent boundary
conditions for the lattice Boltzmann method, Comm. Comp.
Phys (2019, in press)
References
I. Krastins, A. Kao, K. Pericleous, and T. Reis, 3D
Moment-based boundary conditions for the lattice Boltzmann
equation, Int. J. Num. Meth Fluids (2019, submitted)
I. Krastins Parallel lattice Boltzmann method for convection in
dendritic solidification , PhD thesis (2018)
Dipole wall collision
With the following initial conditions, two counter–rotating
vortices are self–propelled to the right (F = 0):
u0 = −
1
2
|ω| (y − y1) exp (−r1/r0)2
+
1
2
|ω| (y − y2) exp (−r2/r0)2
,
v0 =
1
2
|ω| (x − x1) exp (−r1/r0)2
−
1
2
|ω| (x − x2) exp (−r2/r0)2
.
Dipole wall collision: Snapshots at Re = 2500
(a) t = 0 (b) t = 0.2 (c) t = 0.3
Work of Seemaa Mohammed [PhD thesis (2018)],
[Mohammed, Graham, TR (2018)]
(a) t = 0.4 (b) t = 0.49 (c) t = 0.617
Work of Seemaa Mohammed [PhD thesis (2018)],
[Mohammed, Graham, TR (2018)]
(a) t = 0.8 (b) t = 0.1 (c) t = 0.1.5
Work of Seemaa Mohammed [PhD thesis (2018)],
[Mohammed, Graham, TR (2018)]
At different Re
From left: Re = 625, 1250, 2500, 5000 at t = 1
Work of Seemaa Mohammed [PhD thesis (2018)],
[Mohammed, Graham, TR (2018)]
Energy and Enstrophy
E(t) =
1
2
1
−1
1
−1
|u2
|dxdy, Ω(t) =
1
2
1
−1
1
−1
|ω2
|dxdy
Work of Seemaa Mohammed [PhD thesis (2018)],
[Mohammed, Graham, TR (2018)]
Energy and Enstrophy: The numbers
current work Clercx and Bruneau
Re t E(t)LB Ω(t)(LB) E(t)FD E(t)SM Ω(t)(FD) Ω(t) (SM)
625
0.25 1.501 472.480 1.502 1.5022 472.7 472.6
0.50 1.013 382.915 1.013 1.0130 380.4 380.6
0.75 0.767 256.511 0.767 0.7673 255.0 255.2
1250
0.25 1.719 614.309 1.721 1.7209 615.0 615.0
0.50 1.312 613.574 1.313 1.3132 611.3 611.9
0.75 1.061 487.081 1.061 1.0613 484.4 484.7
2500
0.25 1.848 727.210 1.851 1.8509 727.8 728.2
0.50 1.540 919.228 1.541 1.5416 916.6 920.5
0.75 1.325 811.549 1.326 1.3262 805.5 808.1
5000
0.25 1.919 823.026 1.923 1.9225 822.8 823.1
0.50 1.690 13334.348 1.692 1.6924 1328 1340
0.75 1.496 1552.926 1.495 1.4980 1659 1517
[Clercx and Bruneau (2006)]
Energy and Enstrophy: Convergence
Work of Seemaa Mohammed [PhD thesis (2018)],
[Mohammed, Graham, TR (2018)]

More Related Content

What's hot

Beta gamma functions
Beta gamma functionsBeta gamma functions
Beta gamma functionsSelvaraj John
 
Derivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 ruleDerivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 ruleHapPy SumOn
 
Routing, Different types of forwarding technique
Routing, Different types of forwarding techniqueRouting, Different types of forwarding technique
Routing, Different types of forwarding techniquerajib_
 
Multiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical MethodsMultiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical MethodsMeenakshisundaram N
 
Sturm liouville problems6
Sturm liouville problems6Sturm liouville problems6
Sturm liouville problems6Nagu Vanamala
 
Gamma beta functions-1
Gamma   beta functions-1Gamma   beta functions-1
Gamma beta functions-1Selvaraj John
 
Fuzzy c means clustering protocol for wireless sensor networks
Fuzzy c means clustering protocol for wireless sensor networksFuzzy c means clustering protocol for wireless sensor networks
Fuzzy c means clustering protocol for wireless sensor networksmourya chandra
 
Numerical method for solving non linear equations
Numerical method for solving non linear equationsNumerical method for solving non linear equations
Numerical method for solving non linear equationsMdHaque78
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)krishnapriya R
 
Differential geometry three dimensional space
Differential geometry   three dimensional spaceDifferential geometry   three dimensional space
Differential geometry three dimensional spaceSolo Hermelin
 
Socket programming
Socket programmingSocket programming
Socket programmingUjjwal Kumar
 
BOOTP and DHCP.ppt
BOOTP and DHCP.pptBOOTP and DHCP.ppt
BOOTP and DHCP.pptanik301
 

What's hot (20)

Beta gamma functions
Beta gamma functionsBeta gamma functions
Beta gamma functions
 
Derivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 ruleDerivation of Simpson's 1/3 rule
Derivation of Simpson's 1/3 rule
 
Routing, Different types of forwarding technique
Routing, Different types of forwarding techniqueRouting, Different types of forwarding technique
Routing, Different types of forwarding technique
 
Multiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical MethodsMultiple Choice Questions - Numerical Methods
Multiple Choice Questions - Numerical Methods
 
Sturm liouville problems6
Sturm liouville problems6Sturm liouville problems6
Sturm liouville problems6
 
Gamma beta functions-1
Gamma   beta functions-1Gamma   beta functions-1
Gamma beta functions-1
 
Routing Algorithm
Routing AlgorithmRouting Algorithm
Routing Algorithm
 
Fuzzy c means clustering protocol for wireless sensor networks
Fuzzy c means clustering protocol for wireless sensor networksFuzzy c means clustering protocol for wireless sensor networks
Fuzzy c means clustering protocol for wireless sensor networks
 
Numerical method for solving non linear equations
Numerical method for solving non linear equationsNumerical method for solving non linear equations
Numerical method for solving non linear equations
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
 
9702 w16 ms_all
9702 w16 ms_all9702 w16 ms_all
9702 w16 ms_all
 
Differential geometry three dimensional space
Differential geometry   three dimensional spaceDifferential geometry   three dimensional space
Differential geometry three dimensional space
 
05 (1).pptx
05 (1).pptx05 (1).pptx
05 (1).pptx
 
Numerical Computing
Numerical Computing Numerical Computing
Numerical Computing
 
Explaining ip address
Explaining ip addressExplaining ip address
Explaining ip address
 
Jacobi method
Jacobi methodJacobi method
Jacobi method
 
Socket programming
Socket programmingSocket programming
Socket programming
 
9702 s16 ms_all
9702 s16 ms_all9702 s16 ms_all
9702 s16 ms_all
 
MATLAB Programming
MATLAB Programming MATLAB Programming
MATLAB Programming
 
BOOTP and DHCP.ppt
BOOTP and DHCP.pptBOOTP and DHCP.ppt
BOOTP and DHCP.ppt
 

Similar to Understanding Lattice Boltzmann Boundary Conditions Through Moments

The lattice Boltzmann equation: background, boundary conditions, and Burnett-...
The lattice Boltzmann equation: background, boundary conditions, and Burnett-...The lattice Boltzmann equation: background, boundary conditions, and Burnett-...
The lattice Boltzmann equation: background, boundary conditions, and Burnett-...Tim Reis
 
Pinning and facetting in multiphase LBMs
Pinning and facetting in multiphase LBMsPinning and facetting in multiphase LBMs
Pinning and facetting in multiphase LBMsTim Reis
 
The lattice Boltzmann equation: background and boundary conditions
The lattice Boltzmann equation: background and boundary conditionsThe lattice Boltzmann equation: background and boundary conditions
The lattice Boltzmann equation: background and boundary conditionsTim Reis
 
A multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfacesA multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfacesTim Reis
 
What are free particles in quantum mechanics
What are free particles in quantum mechanicsWhat are free particles in quantum mechanics
What are free particles in quantum mechanicsbhaskar chatterjee
 
Workshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reisWorkshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reisTim Reis
 
Mit2 092 f09_lec07
Mit2 092 f09_lec07Mit2 092 f09_lec07
Mit2 092 f09_lec07Rahman Hakim
 
FDMFVMandFEMNotes.pdf
FDMFVMandFEMNotes.pdfFDMFVMandFEMNotes.pdf
FDMFVMandFEMNotes.pdfHanumanJadhav
 
Numerical_PDE_Paper
Numerical_PDE_PaperNumerical_PDE_Paper
Numerical_PDE_PaperWilliam Ruys
 
Can we estimate a constant?
Can we estimate a constant?Can we estimate a constant?
Can we estimate a constant?Christian Robert
 
Hssc ii introduction of limits
Hssc ii   introduction of limitsHssc ii   introduction of limits
Hssc ii introduction of limitsSadiq Hussain
 
Natalini nse slide_giu2013
Natalini nse slide_giu2013Natalini nse slide_giu2013
Natalini nse slide_giu2013Madd Maths
 
A current perspectives of corrected operator splitting (os) for systems
A current perspectives of corrected operator splitting (os) for systemsA current perspectives of corrected operator splitting (os) for systems
A current perspectives of corrected operator splitting (os) for systemsAlexander Decker
 
1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docx
1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docx1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docx
1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docxpaynetawnya
 
Lecture cochran
Lecture cochranLecture cochran
Lecture cochransabbir11
 

Similar to Understanding Lattice Boltzmann Boundary Conditions Through Moments (20)

The lattice Boltzmann equation: background, boundary conditions, and Burnett-...
The lattice Boltzmann equation: background, boundary conditions, and Burnett-...The lattice Boltzmann equation: background, boundary conditions, and Burnett-...
The lattice Boltzmann equation: background, boundary conditions, and Burnett-...
 
Pinning and facetting in multiphase LBMs
Pinning and facetting in multiphase LBMsPinning and facetting in multiphase LBMs
Pinning and facetting in multiphase LBMs
 
The lattice Boltzmann equation: background and boundary conditions
The lattice Boltzmann equation: background and boundary conditionsThe lattice Boltzmann equation: background and boundary conditions
The lattice Boltzmann equation: background and boundary conditions
 
Laplace transform
Laplace transformLaplace transform
Laplace transform
 
A multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfacesA multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfaces
 
What are free particles in quantum mechanics
What are free particles in quantum mechanicsWhat are free particles in quantum mechanics
What are free particles in quantum mechanics
 
Workshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reisWorkshop presentations l_bworkshop_reis
Workshop presentations l_bworkshop_reis
 
Mit2 092 f09_lec07
Mit2 092 f09_lec07Mit2 092 f09_lec07
Mit2 092 f09_lec07
 
FDMFVMandFEMNotes.pdf
FDMFVMandFEMNotes.pdfFDMFVMandFEMNotes.pdf
FDMFVMandFEMNotes.pdf
 
Ch02
Ch02Ch02
Ch02
 
Ch02
Ch02Ch02
Ch02
 
Numerical_PDE_Paper
Numerical_PDE_PaperNumerical_PDE_Paper
Numerical_PDE_Paper
 
Can we estimate a constant?
Can we estimate a constant?Can we estimate a constant?
Can we estimate a constant?
 
Hssc ii introduction of limits
Hssc ii   introduction of limitsHssc ii   introduction of limits
Hssc ii introduction of limits
 
Natalini nse slide_giu2013
Natalini nse slide_giu2013Natalini nse slide_giu2013
Natalini nse slide_giu2013
 
poster2
poster2poster2
poster2
 
Chemistry Assignment Help
Chemistry Assignment Help Chemistry Assignment Help
Chemistry Assignment Help
 
A current perspectives of corrected operator splitting (os) for systems
A current perspectives of corrected operator splitting (os) for systemsA current perspectives of corrected operator splitting (os) for systems
A current perspectives of corrected operator splitting (os) for systems
 
1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docx
1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docx1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docx
1.1 PRINCIPLE OF LEAST ACTION 640-213 MelatosChapter 1.docx
 
Lecture cochran
Lecture cochranLecture cochran
Lecture cochran
 

Recently uploaded

Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxpradhanghanshyam7136
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptMAESTRELLAMesa2
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptxanandsmhk
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PPRINCE C P
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTSérgio Sacani
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfWadeK3
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfnehabiju2046
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 

Recently uploaded (20)

Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Munirka Delhi 💯Call Us 🔝8264348440🔝
 
Cultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptxCultivation of KODO MILLET . made by Ghanshyam pptx
Cultivation of KODO MILLET . made by Ghanshyam pptx
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
G9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.pptG9 Science Q4- Week 1-2 Projectile Motion.ppt
G9 Science Q4- Week 1-2 Projectile Motion.ppt
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptxUnlocking  the Potential: Deep dive into ocean of Ceramic Magnets.pptx
Unlocking the Potential: Deep dive into ocean of Ceramic Magnets.pptx
 
VIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C PVIRUSES structure and classification ppt by Dr.Prince C P
VIRUSES structure and classification ppt by Dr.Prince C P
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
Disentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOSTDisentangling the origin of chemical differences using GHOST
Disentangling the origin of chemical differences using GHOST
 
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdfNAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
NAVSEA PEO USC - Unmanned & Small Combatants 26Oct23.pdf
 
A relative description on Sonoporation.pdf
A relative description on Sonoporation.pdfA relative description on Sonoporation.pdf
A relative description on Sonoporation.pdf
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Engler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomyEngler and Prantl system of classification in plant taxonomy
Engler and Prantl system of classification in plant taxonomy
 
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Munirka Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 

Understanding Lattice Boltzmann Boundary Conditions Through Moments

  • 1. Understanding lattice Boltzmann boundary conditions through moments Tim Reis School of Computing and Mathematical Sciences University of Greenwich London, UK OpenLB Spring School Mannheim 2019 Collaborators: Sam Bennett (formerly Cambridge), Paul Dellar (Oxford), Andreas Hantsch (ILK Dresden), Rebecca Allen (SINTEF), Seemaa Mohammed (Plymouth), Dave Graham (Plymouth), Zainab Bu Sinnah (Plymouth), Ivars Krastins (Greenwich)
  • 2. What is this lecture about? • It is not a lecture about bounce-back • It is not a lecture about any particular implementation of boundary conditions • It is not about deciding which method is universally the best • We will look at ways to think about boundary conditions and how to implement them in the LB framework • Hopefully, this will give us a clear perspective of LB boundary conditions, allow you to decide their merits and shortcomings, and hence when they are most appropriate. • Ideally, provide some inspiration for you to make some improvements
  • 3. This is not a lecture on bounce-back. . . . . . but let’s get this straight: bounce-back is very useful!! It is usually the go-to implementation - it is “simple”, second roder accuarte, and can be adapted to complex geometries But it is not immune from criticism.
  • 4. Boundary value problems Boundary conditions are an essential part of the solution to partial differential equations They are of paramount importance in determining the well-posedness of a given problem
  • 5. Dirichlet problems For example, consider Laplace’s equation on a bounded domain Ω ⊂ R2 2 u = ∂2u ∂x2 + ∂2u ∂y2 = 0 Dirichlet conditions: Given a function F : ∂Ω → R, we require u(x) = F(x), x ∈ ∂Ω
  • 6. Neumann problems For example, consider Laplace’s equation on a bounded domain Ω ⊂ R2 2 u = ∂2u ∂x2 + ∂2u ∂y2 = 0 Neumann conditions: Given a function F : ∂Ω → R, we require ∂u(x) ∂n = F(x), x ∈ ∂Ω, where n is the outward normal.
  • 7. Example: Navier–Stokes equations ∂u ∂t + u · u = − 1 ρ P + ν 2 u, · u = 0 At a rigid wall: • The normal velocity of the fluid = normal velocity of the wall (no penetration); • Also, the tangential velocity of the fluid = tangential velocity of the wall (no–slip) That is, we usually say: u = 0 on ∂Ω. Of course, we might want to apply slip conditions, conditions to the pressure or stress, or inlet/outlet conditions.
  • 8. What does this means for LBE? The lattice Boltzmann equation (LBE) is often used to numerically solve these equations and must be accompanied by relevant boundary conditions But how can we implement boundary conditions accurately at lattice grid points? Lattice Boltzmann computations are performed in the particle basis, fi, but the problems we are trying to solve usually impose boundary conditions in terms of macroscopic scalars, vectors, and tensors (i.e the moment basis (e.g ρ, ρu, etc.)) and their derivatives.
  • 9. Contents This lecture will mainly focus on the connection between LB boundary conditions and LB moments 1. Bounce-back and some perspective 2. Brief overview of some other "particle-based" LB boundary conditions 3. Moment-based boundary conditions • The basic idea and plan • Interpretation of other methods in terms of moments • Analysis and results, including slip and no-slip flow (if time permits!)
  • 10. Perspective For ease of explanation I will start the discussion with the algorithm written in its most common form (that is for fi, rather than fi - see my introductory lecture)
  • 11. The stream–collide algorithm The LBE is a “kinetic" algorithm fi(x + ci, t + 1) = fi(x, t) − 1 τ fi − f (eq) i that is used to solved macroscopic PDEs. Usually more interested in the moments of fi than fi Moments give us the macroscopic (hydrodynamic) quantities of interest ( i fi, i fici, etc.)
  • 12. We usually use something like fi(x + ci, t + 1) = fi(x, t) − 1 τ fi − f (eq) i to numerically solve ∂fi ∂t + ci · fi = − 1 τ fi − f (eq) i because it approximates ∂u ∂t + u · u = − 1 ρ P + ν 2 u, · u = 0.
  • 13. Reminder We MUST supply boundary conditions for the algorithm: fi(x + ci, t + 1) = fi(x, t) − 1 τ fi − f (eq) i These should be consistent with the underlying PDE that we are solving numerically: ∂fi ∂t + ci · fi = − 1 τ fi − f (eq) i and accurately capture the phenomena described by the problems we are interested in: ∂u ∂t + u · u = − 1 ρ P + ν 2 u, · u = 0.
  • 14. Reminder Lattice Boltzmann computations are performed in the particle basis, fi, but the problems we are trying to solve usually impose boundary conditions in terms of macroscopic scalars, vectors, and tensors (i.e the moment basis (e.g ρ, ρu, etc.)) and their derivatives.
  • 15. Incoming distributions are unknown fi(x + ci, t + 1) = fi(x, t) − 1 τ fi − f (eq) i After streaming, the fi at boundary nodes pointing into the flow domain are unknown (Before streaming, there is nothing to stream-in to the flow)
  • 16. On-node bounce-back Bounce-back reverses the direction of distributions leaving the domain f2(xb, t) = f4(xb, t), f5(xb, t) = f7(xb, t), f6(xb, t) = f8(xb, t) For on-node bounce back, the boundary is located on lattice sites
  • 17. Outline algorithm Using “outgoing" distribution f4 and “incoming" f2 at a south wall at j = 1 as an example collide f4(j = 2) = f4(j = 2) − 1 τ (f4 − f (eq) 4 )|(j=2) f2(j = 2) = f2(j = 2) − 1 τ (f2 − f (eq) 2 )|(j=2) stream f4(j = 1) = f4(j = 2) f2(j = 3) = f2(j = 2) bounce-back f2(j = 2) = f4(j = 1) Note: No collision on wall (at j = 1) but “modified bounce-back" allows collisions on wall It takes an entire time step to complete the process (f2(j = 2, t + 1) = f4(j = 1))
  • 18. “Half-way" bounce back Assumes the wall to be located half-way between grid points. This means the boundary process can be completed in one time step f2(x, t + 1) = f4 (x, t), f5(x, t + 1) = f7 (x, t), f6(x, t + 1) = f8 (x, t) where fi denote post-collisional quantities
  • 19. Outline algorithm Using “outgoing" distribution f4 and “incoming" f2 at a south wall at j = 1 as an example Collide f4(j = 2) = f4(j = 2) − 1 τ (f4 − f (eq) 4 )|(j=2) f2(j = 2) = f2(j = 2) − 1 τ (f2 − f (eq) 2 )|(j=2) bounce-back f2(j = 1) = f4(j = 2) stream f4(j = 1) = f4(j = 2) f2(j = 2) = f2(j = 1)
  • 20. Some notes On-node and half-way bounce back are really different versions of the same method! On-node first order accurate for the velocity field while halfway is second order accurate (pressure is first order) [Junk and Yang (2003), He et al (1997)] Lots of extensions to deal with flow in irregular, heterogeneous, geometries Halfway bounce back offers accuracy, stability, and geometric flexibility. It is often considered (certainly by me) to be most reliable implementation of lattice Boltzmann boundary conditions for many engineering applications But . . .
  • 21. Notes What if you want to implement something other than no-slip| And even if you are hoping for no-slip, These are plots of the solution to Poiseuille flow, analytical and LB prediction, at Re = 100 (left) and Re = 1. Viscosity-dependent numerical (unphysical) slip error!
  • 22. Motivation for alternative ideas The Bounce–Back method is commonly used and is often very successful. However, • it introduces a “numerical slip error" that in proportional to the grid spacing1 and the viscosity of the fluid and thus large for low Reynolds number flows (e.g flows in porous media) [Ginzbourg and Adler (1994), He et al. (1997)] • there is not much freedom to impose conditions other than the no-slip.
  • 23. Motivation for alternative ideas Non-equilibrium bounce-back [Zou and He (1997)] can be unstable and uses an arbitrary closure condition. Kinetic/Maxwell’s diffusive slip boundary conditions [Ansumali and Karlin (2002)] are only first order accurate in general and still vulnerable to the “numerical slip error" [Verhaeghe et al (2009)]. Note that Maxwell boundary conditions were first applied to discrete velocity Boltzmann models by [Boadwell (1964)] and analysed further by [Gatignol (1977)].
  • 24. Understanding lattice Boltzmann boundary conditions through moments
  • 25. A simple example Imagine we want to solve the 1D advection–diffusion equation ∂φ ∂t + u ∂φ ∂x = D ∂2φ ∂x2 which can be written ∂φ ∂t + ∂ψ ∂x = 0 where ψ = uφ − D ∂φ ∂x . The (macroscopic) quantities of interest are φ and ψ. So how many distribution functions do we need? At least two!
  • 26. The D1Q2 model for diffusion Consider a 1D LB model with two directions: f1 and f2 The conserved quantity is φ = f1 + f2 and it’s flux (non–conserved) is ψ = f2 − f1 We have two basis: the ”particle" basis f = f1 f2 and the "moment" basis m = φ ψ
  • 27. Moments of the D1Q2 model f = f1 f2 , m = φ ψ Since φ = f1 + f2 and ψ = f2 − f1 we can write m = φ ψ = 1 1 −1 1 f1 f2 = M f1 f2 . As we have a linear transformation between f and m, the transformation matrix M is invertible and thus f = M−1 m
  • 28. Macroscopic equation It can be shown that fi(x + ci, t + 1) = fi(x, t) − 1 τ fi − f (eq) i approximates ∂φ ∂t + u ∂φ ∂x = D ∂2φ ∂x2 + O(τ2 ), D ∝ τ What would the boundary conditions need to be? Eg: ∂x φ = 0 Conditions on fi or its moments?
  • 29. Lattice for 2D Navier-Stokes D2Q9 has 9 independent moments. Six are hydrodynamic ρ = i fi, ρuα = i ficiα, Παβ = i ficiαβ, and the other three are pseudo–kinetic Qxxy = i fic2 ix ciy , Qxyy = i ficix c2 iy , Rxxyy = i fic2 ix c2 iy .
  • 30. D2Q9 moments The relationship between f and m is m = Mf where f = (f0, f1, . . . , f8)T and M =               1 1 1 1 1 1 1 1 1 0 1 0 −1 0 1 −1 −1 1 0 0 1 0 −1 1 1 −1 −1 0 1 0 1 0 1 1 1 1 0 0 1 0 1 1 1 1 1 0 0 0 0 0 1 −1 1 −1 0 0 0 0 0 1 1 −1 −1 0 0 0 0 0 1 −1 −1 1 0 0 0 0 0 1 1 1 1              
  • 31. D2Q9 LBE We know that the D2Q9 LBE approximates the (weakly) compressible Navier–Stokes equations, but what boundary conditions should it satisfy? As an example, consider a solid wall with a no–slip condition
  • 32. Moments at a wall We need the fluid to have zero velocity relative to the wall: ux = uy = 0 Navier-Stokes has zero tangential stress at the wall: Sxx ∝ ∂ux ∂x = 0, =⇒ Πxx = Π (eq) xx = ρ 3 + ρu2 x = ρ 3 Do (should) lattice boundary conditions satisfy these constraints?
  • 33. Counting moments For the D1Q2 lattice we had 2 independent moments For the D2Q9 lattice we had 9 independent moments In general, a n–velocity lattice has n moments Note that we needed enough moments to define the conservation quantities and their fluxes Point of view: If we accept that we use the LBE to solve macroscopic equations then the moments should also satisfy the boundary conditions.
  • 34. Moments at a south wall m = Mf = M               f0 f1 f2 f3 f4 f5 f6 f7 f8               =               ρ ρux ρuy Πxx Πyy Πxy Qxxy Qyyx Rxxyy               Three unknowns on the left =⇒ three constraints needed on the right
  • 35. Reminder: NSE, DBE, LBE From the previous lecture we know that the discrete Boltzmann equation ∂fi ∂t + ci · fi = Ωi(f) has embedded within it the Navier-Stokes equations. Thus we develop an (indirect) algorithm for the NSE by discretising the DBE is space and time
  • 36. From discrete Boltzmann to lattice Boltzmann Integrating the discrete Boltzmann equation ∂fi ∂t + ci · fi = Ωi(f) along a characteristic for time ∆t gives fi(x + ci∆t, t + ∆t) − fi(x, t) = ∆t 0 Ωi(x + cis, t + s) ds, Approximating the integral by the trapezium rule yields fi(x +ci∆t, t+∆t)−fi(x, t) = ∆t 2 Ωi(x +ci∆t, t+∆t) + Ωi(x, t) +O ∆t3 . This is an implicit system.
  • 37. Change of Variables To obtain a second order explicit LBE at time t + ∆t define [He et al. (1998)] fi(x, t) = fi(x, t) + ∆t 2τ fi(x, t) − f (0) i (x, t) . The new algorithm is fi(x + ci∆t, t + ∆t) − fi(x, t) = − ∆t τ + ∆t/2 fi(x, t) − f (0) i (x, t) Note: The “standard" LBE algorithm is obtained from the DBE using an Euler discretisation (first order in time)
  • 38. Barred moments fi(x, t) = fi(x, t) + ∆t 2τ fi(x, t) − f (0) i (x, t) . Note that conserved quantities are obtained easily from fi: ρ = i fi = i fi; ρu = i fici = i fici; but care must be taken for non-conserved moments, e.g ΠΠΠ = i ficici, = i ficici + ∆t 2τ i fi − f (0) i cici, = ΠΠΠ + ∆t 2τ ΠΠΠ − ΠΠΠ(0) .
  • 39. A quick note on forcing A body force Ri in the discrete Boltzmann equation ∂fi ∂t + ci · fi = − 1 τ fi − f (0) i + Ri should have the following moments: i Ri = 0, i Rici = FFF, i Ricici = FFFu + uFFF, otherwise we do not obtain the correct viscous stress tensor from the Chapman-Enskog analysis. An example is Ri = Wi (3(ci − u) + 9(ci · u)ci) · F.
  • 40. The PDE ∂fi ∂t + ci · fi = − 1 τ fi − f (0) i + Ri is discretised using the Trapezium rule and the change of variable fi(x, t) = fi(x, t) + ∆t 2τ fi(x, t) − f (0) i (x, t) − ∆t 2 Ri. This yields the LBE fi(x+ci∆t, t+∆t)−fi(x, t) = − ∆t τ + ∆t/2 fi − f (0) i + τ∆t τ + ∆t/2 Ri Note: ρu = i fici = ρu − ∆t 2 F.
  • 41. Kinetic–style lattice Boltzmann boundary conditions
  • 42. The (on-node) bounce–back method In general, there are three unknown populations at a boundary. At a south wall, we don’t know f2, f5, f6. Bounce–back says f2 = f4, f5 = f7, f6 = f8
  • 43. Bounce–back moments Let’s look at ρux , ρuy and Πxx (ignore force for simplicity) ρux = ρux = i ficix = f1 − f3 + f5 − f6 − f7 + f8 = f1 − f3 + f7 − f8 − f7 + f8 = f1 − f3. Therefore bounce–back with the BGK model does NOT satisfy the no–slip condition. The non–zero momentum ρux = f1 − f3 is NOT physical slip! The error occurs for diffuse reflection boundary conditions, too.
  • 44. Bounce–back moments Let’s look at ρux , ρuy and Πxx . ρuy = ρuy = i ficiy = f2 − f4 + f5 + f6 − f7 + f8 = 0 Therefore the condition uy = 0 IS satisfied. Πxx = i fic2 ix = f1 + f3 + f5 + f6 + f7 + f8, = f1 + f3 + 2(f7 + f8), = something strange (in fact, it does not give the correct stress condition but this requires further analysis)
  • 45. Notes on the bounce–back method It gives a grid–dependent velocity error at the wall (numerical slip) This is first order (in ∆x) for an on-node implementation and second order for “half-way" bounce-back [He et al. (1997)] The precise location where the velocity is zero is a function of the relaxation time [Ginzbourg and Adler (1994)] The error is large for large τ (or small Reynolds numbers) Can be removed/reduced MRT and TRT [Ginzbourg and Adler (1994), Verhaeghe et al (2009)] Bounce-back is simple to implement and stable. Often very accurate
  • 46. Zou and He boundary conditions Sometimes called non–equilibrium bounce–back [Zou and He (1997)] The Chapman-Enskog expansion says fi = f (eq) i + f (ne) i where f (ne) i = −τWi (3cici − I) : u + ( u)T Zou and He say f (ne) 2 = f (ne) 4 , f (ne) 5 = f (ne) 7 + 1 2 (f1 − f3), f (ne) 6 = f (ne) 8 − 1 2 (f1 − f3)
  • 47. Zou and He wall moments If we look at the hydrodynamic moments at the wall after applying Zou and He’s method we find that ρux = ρuy = 0 so the no–slip condition IS satisfied. However, Πxx = i fic2 ix = f1 + f3 + f5 + f6 + f7 + f8 = 2(f7 + f8), so the stress condition is NOT satisfied.
  • 48. Remarks The Zou and He method is not very intuitive It does satisfy the no–slip condition It does not guarantee mass conservation It is less stable than bounce–back It’s difficult to extend to 3D Difficult to deal with corners What do we do for the “fi" scheme (i.e second order time implementation)?
  • 50. Moment–Method: The basic idea To try and impose boundary conditions on momentum and viscous stress only.
  • 51. Moments at a wall Let’s once again consider a south boundary After streaming, we don’t know f2, f5, f6. (equivalently, f2, f5, f6). Let’s look at ALL the moments at this wall.
  • 52. Moments at a south wall Hydrodynamic moments ρ = i fi = f0 + f1 + f2 + f3 + f4 + f5 + f6 + f7 + f8, ρux = i ficix = f1 − f3 + f5 − f6 − f7 + f8, ρuy = i ficiy = f2 − f4 + f5 + f6 − f7 − f8, Πxx = i fic2 ix = f1 + f3 + f5 + f6 + f7 + f8, Πyy = i fic2 iy = f2 + f4 + f5 + f6 + f7 + f8, Πxy = i ficix ciy = f5 − f6 + f7 − f8 Terms in red are unknown at the boundary after streaming
  • 53. Moments at a south wall Non-hydrodynamic (“ghost") moments Qxxy = i fic2 ix ciy = f5 + f6 − f7 − f8, Qxyy = i ficix c2 iy = f5 − f6 − f7 + f8, Rxxyy = i fic2 ix c2 iy = f5 + f6 + f7 + f8. Terms in red are unknown at the boundary after streaming Notice the three different combinations of the unknowns
  • 54. Moment–grouping at a south boundary THE PLAN: Formulate the boundary conditions in the moment basis, and then transform them into into boundary conditions for the distribution functions [Bennett (2010, thesis)] Moments Unknowns ρ, ρuy , Πyy f2 + f5 + f6 ρux , Πxy , Qxyy f5 − f6 Πxx , Qxxy , Rxxyy f5 + f6 We can pick one constraint from each group. A natural choice is ρuy = 0, ρux = 0, Πxx = P = ρ 3 =⇒ ∂u ∂x = 0.
  • 55. Second order implementation ρuy = 0, ρux = 0, Πxx = P = ρ 3 =⇒ ∂u ∂x = 0. Our conditions are on the (physical) moments of fi However, our algorithm is for fi where fi = fi + ∆t 2τ fi − f (0) i − ∆t 2 Ri. We must convert our conditions on physical moments to conditions on numerical moments.
  • 56. Second order implementation ρuy = 0, ρux = 0, Πxx = ρ 3 and fi = fi + ∆t 2τ fi − f (0) i − ∆t 2 Ri. so ρuy = − ∆t 2 Fx , ρux = − ∆t 2 Fx , Πxx = ρ 3 Caution: Care must be taken with the fi → fi transform
  • 57. Solving for the unknowns For simplicity, consider the case where Fy = 0. Noting that ρ = ρuy + f0 + f1 + f3 + 2(f4 + f7 + f8), with uy = 0, we solve 0 = f2 − f4 + f5 + f6 − f7 − f8, − ∆t 2 Fx = f1 − f3 + f5 − f6 + f7 + f8, ρ 3 = f1 + f3 + f5 + f6 + f7 + f8.
  • 58. 0 = f2 − f4 + f5 + f6 − f7 − f8, − ∆t 2 Fx = f1 − f3 + f5 − f6 + f7 + f8, ρ 3 = f1 + f3 + f5 + f6 + f7 + f8. to obtain f2 = f1 + f3 + f4 + 2 f7 + f8 − ρ 3 , f5 = −f1 − f8 + ρ 6 − 1 2 Fx , f6 = −f3 − f7 + ρ 6 + 1 2 Fx .
  • 59. An example: open boundaries At a west vertical boundary the moment grouping is Moments Unknowns ρ, ρux , Πxx f1 + f5 + f8 ρuy , Πxy , Qxxy f5 − f8 Πyy , Qxyy , Rxxyy f5 + f8 If we want this to be an inflow boundary then we can impose ρ = ρintlet , ρuy = 0, Πyy = ρinlet /3.
  • 60. Treatment of the corner nodes How many unknowns do we have at a corner? 5 At a southwest corner, we don’t know f1, f2, f5, f6, f8. We can impose the inlet and wall boundaries simultaneously Impose ρ, ρux , ρuy , Πxx , Πxy
  • 61. A quick comparison Z+H gives errors at the corners Difference between exact solution and the LB prediction with bounce-back on walls and Z-H conditions at inlet/outlet. Fluctuations down to machine precision with moment-based conditions [Bennett (2010)]. Moral: Beware of corners!!
  • 62. Lid-driven cavity Flow in a square box, no–slip on all walls. Top boundary moves with velocity Ulid . Interesting to look at the streamfunction: ux = −∂y ψ, uy = ∂x ψ Flow characteristics depend on Re = Ulid L/ν.
  • 63. Moment–based boundary conditions: moving wall Moments Unknowns ρ, ρuy , Πyy f4 + f7 + f8 ρux , Πxy , Qxyy f8 − f7 Πxx , Qxxy , Rxxyy f7 + f8 We can pick one constraint from each group. A natural choice is ρuy = 0, ρux = Ulid , Πxx = Π (0) xx = ρ 3 + ρU2 lid =⇒ ∂u ∂x = 0.
  • 65. Lid-driven cavity flow: the numbers Primary Re = 400 Present Λ = 1/4 0.1139 0.5547 0.6055 Ghia (1982) et al. 0.1139 0.5547 0.6055 Sahin and Owens (2003) 0.1139 0.5536 0.6075 Re = 1000 Present Λ = 1/4 0.1189 0.5313 0.5664 Ghia(1982) 0.1179 0.5313 0.5625 Sahin and Owens (2003) 0.1188 0.5335 0.5639 Botella (1998) et al. 0.1189 0.4692 0.5652 Re = 7500 Present Λ = 1/4 0.1226 0.5117 0.5352 Ghia (1982) et al. 0.1200 0.5117 0.5322 Sahin and Owens (2003) 0.1223 0.5134 0.5376 Note: TRT model. Second order convergence of L2 error norm for global velocity and pressure fields
  • 66. Convergence Example: Re = 1000 N ||u||2 ||P||2 N=33 0.084382 0.00023177 N=65 0.01754295 0.0000492165 N=129 0.00416137 0.00001268 N=257 0.00083492 0.0000026609
  • 67. Natural Convection Flow is driven by density variation ∂u ∂t + u · u = − P + Pr 2 u + RaPrg, ∂θ ∂t + u · θ = 2 θ,
  • 68. LBE Implementation Two DBEs: One for NSE one for scalar transport Force acting in vertical direction (Fy ) Moment-Method boundary conditions. Example south wall f2 = f1 + f3 + f4 + 2(f7 + f8) − ρ 3 − ∆t 2 Fy , f5 = −f1 = f8 + ρ 6 , f6 = −f3 − f7 + ρ 6 . where ρ = ρuy + f0 + f1 + f3 + 2(f4 + f7 + f8) and by the f0 → fi transform, ρuy = −Fy /2 at the wall (since uy = 0)
  • 69. D2Q5 lattice model for scalar transport equation (temperature) Moment-method also used to impose boundary conditions on θ. Only one unknown at the walls θwall = i gi = i gi (heated walls) ∂Nθ = i ciNgi = 0 (other walls)
  • 70. Streamfunction and Temperature plots Contours of flow fields for convection in a square cavity. From left to right, Ra = 1000, Ra = 10000, Ra = 1000000 (Work of Rebecca Allen [PhD (2015), Allen and Reis (2016)])
  • 71. Nusselt numbers Nu = x y qx dxdy, where qx is the heat flux Have looked at other Nu too - same level of accuracy observed. Ra Study Nu 103 Present 1.1178 de Vahl Davis (1983) 1.118 106 Present 8.8249 Le Quere (1991) 8.8252 de Vahl Davis (1983) 8.800 108 Present 30.23339 Le Quere (1991) 30.225 All fields show second order convergence (Work of Rebecca Allen [PhD (2015), Allen and Reis (2016)])
  • 72. Some further remarks and light analysis
  • 73. Analysis of existing methods The grouping of moments at a boundary allows us to examine other methods. Moments Unknowns ρ, ρuy , Πyy f2 + f5 + f6 ρux , Πxy , Qxyy f5 − f6 Πxx , Qxxy , Rxxyy f5 + f6 The (on-node) bounce-back condition can be translated into ρuy = 0, , Qxxy = 0, Qxyy = 0
  • 74. Moments Unknowns ρ, ρuy , Πyy f2 + f5 + f6 ρux , Πxy , Qxyy f5 − f6 Πxx , Qxxy , Rxxyy f5 + f6 The Zou and He conditions at a wall can be translated into ρux = ρuwall, , ρuy = 0, Qxxy = 0. Note that both impose a condition on the "energy moment" but NOT on the viscous stress tensor!
  • 75. Moments Unknowns ρ, ρuy , Πyy f2 + f5 + f6 ρux , Πxy , Qxyy f5 − f6 Πxx , Qxxy , Rxxyy f5 + f6 The diffuse reflection conditions at a wall can be translated into ρuy = 0, Qxxy = 1 3 + u2 wall Πyy −Rxxyy , Qxyy = −Πxy +uwallΠyy These are difficult to interpret physically. No stress condition. Large errors.
  • 76. Analytic solution of the LBE Recall that for flows satisfying ∂ ∂x = ∂ ∂t = 0, FFF = (ρG, 0) with walls located at j = 1 and j = n, the LBE velocity field satisfies
  • 77. Poiseuille flow uj+1vj+1 − uj−1vj−1 2 = ν uj+1 + uj−1 − 2uj + G, This is the second order finite–difference form of the incompressible Navier–Stokes equations with a constant body force: ∂(uv) ∂y = ν ∂2u ∂y2 + G
  • 78. Solution of the difference equation uj+1vj+1 − uj−1vj−1 2 = ν uj+1 + uj−1 − 2uj + G We can show ρ is constant and vj = 0 The solution to this second order difference equation is uj = 4Uc (n − 1)2 (j − 1)(n − j) + Us, j = 1, 2, . . . , n where Uc = H2G/8ν is the centre-line velocity and H = (n − 1) is the channel height.
  • 79. Numerical slip for bounce–back If we use bounce–back boundary conditions, we find the numerical slip to be [He et al. (1997)] Us = 48ν2 − 1 n2 Uc
  • 80. Notes This slip error is second order in grid spacing It is large for very viscous flows The point where the velocity vanishes only asymptotically coincides with the midpoint between gridpoints It can be eliminated using TRT [Ginzbourg and Adler (1994)] Ideally, we’d like to use TRT/MRT for improving stability and not fixing errors due to boundary treatments It is NOT Knudsen slip!! Us = 0 for Moment-Method
  • 81. Imposing physical slip boundary conditions via moments
  • 82. Flow in a microchannel No slip Slip flow Transition Molecular Kn 10−3 10−3 Kn 10−1 10−1 Kn 10 Kn 10 In shear flow the LBE reduces to a linear second–order recurrence relation =⇒ linear or parabolic profiles at all Kn But we can capture flow in the bulk from with slip conditions
  • 83. Maxwell–Navier boundary condition Wall boundary conditions: uslip = σKnH∂y u|wall , σ = (2 − σa)/σa. These can be expressed in terms of moments [Reis and Dellar (2012)]: f2 = f1 + f3 + f4 + 2 f7 + f8 − P − ρu2 slip , f5 = −f1 − f8 + (P + ρu2 slip + ρuslip)/2, f6 = −f3 − f7 + (P + ρu2 slip − ρuslip)/2, and since Πxy |wall = 2τ ¯Πxy |wall (2τ+∆t) = µ∂y u|wall, uslip = − 6 −f1 + f3 + 2f7 − 2f8 ρ(2τ + 1 + 6KnH) .
  • 84. Flow in a microchannel: asymptotic solution We consider a viscous fluid in a channel with an aspect ratio δ = L/H 1. The relevant dimensionless numbers are Re = ρoUoH µ , Ma = Uo √ γRT , Kn = πγ 2 Ma Re An expansion in δ yields the leading–order solution u(x, y) = − Re 8Ma2 p 1 − 4y2 + 4σ Kn p v(x, y) = 2Re 8pMa2 1 2 (p2 ) 1 − 4 3 y2 + 4σKnp P (x) = (6Kn)2 + (1 + 12Kn)x + θ(θ + 12Kn)(1 − x) − 6Kn
  • 85. Flow in a microchannel: Kn = 0.1
  • 87. Dipole wall collision with slip With the following initial conditions, two counter–rotating vortices are self–propelled to the right (F = 0): u0 = − 1 2 |ω| (y − y1) exp (−r1/r0)2 + 1 2 |ω| (y − y2) exp (−r2/r0)2 , v0 = 1 2 |ω| (x − x1) exp (−r1/r0)2 − 1 2 |ω| (x − x2) exp (−r2/r0)2 .
  • 88. Dipole wall collision with slip The velocity at the walls is the Navier-slip condition u|| = sL ∂u|| ∂n From left: t = 0.5, 0.6, 0.7, 1. Re = 2500, sL = 0.002.
  • 89. Energy and Enstrophy: Re = 1252 (Work of Seemaa Mohammed [PhD thesis (2018)]) [Sutherland et al. (2013)]
  • 90. Summary Most lattice Boltzmann models impose boundary conditions on the populations (fi), but we are usually only interesting in hydrodynamic variables. We can impose the same conditions on the LBM and the target equations via moment constraints. This gives a very general methodology for imposing a variety of hydrodynamic boundary conditions at grid points precisely
  • 91. Summary Don’t fall into the trap of thinking one method is always “better" than another!! Moment-based approach is general, simple, and local Shown to be very accurate But is not as stable nor efficient as bounce-back at high Re numbers Should be used with MRT/TRT (so should all LBMs?) Currently lacks geometric flexibility and requires further, deeper, analysis.
  • 92. References S. Bennet, PhD Thesis, University of Cambridge (2010) T. Reis and P.J. Dellar, Moment-based formulation of Navier-Maxwell slip boundary conditions for lattice Boltzmann simulations of rarefied flow in microchannels, Phys. Fluids 24 (2012), 112001 R. Allen and T. Reis, Moment-based conditions for lattice Boltzmann simulations of natural convection in cavities, Prog. Comp. Fluid Dyn.: An Int. J 16 (2016), 1-4 R. Allen, PhD Thesis, KAUST (2015)
  • 93. References A. Hantsch, T. Reis, and U. Gross, Moment method boundary conditions for multiphase lattice Boltzmann simulations of partially-wetted walls, J. Comp. Multiphase Flow 7 (2015), 1-4 A. Hantsch, PhD Thesis, TU Freiberg (2013) S. Mohammed and T. Reis, Using the lid-driven cavity flow to validate moment-based boundary conditions for the lattice Boltzmann equation, Arch. Mech. Eng, 64 (2017), 57-74 S. Mohammed, D. Graham, and T. Reis, Assessing moment-based boundary conditions for the lattice Boltzmann equation: A study of dipole-wall collisions, Comput. Fluids 176 (2018) 79-96
  • 94. References I. Ginzbourg and P. Adler, Boundary flow condition analysis for the three-dimensional lattice Boltzmann model, J. Physique II 4 (1994), 191-214 X. He, Q. Zou, and L-S Luo, Analytic solutions and analysis on non-slip boundary conditions for lattice Boltzmann BGK model J. Comp. Phys 87 (1997), 115-136 M. Junk and Z. Yang, Analysis of lattice Boltzmann boundary conditions Proc. Appl. Math. Mech., 3 (2003), 76?79. F. Verhaeghe, L-S Luo, and B. Blanpain, Lattice Boltzmann modeling of microchannel flow in slip flow regime, J. Comp. Phys, 228 (2009), 146-157 Q. Zou and X. He, On pressure and velocity boundary conditions for lattice Boltzmann BGK model, Phys Fluids (1997)
  • 95. References J.E Broadwell, Study of rarefied shear flow by the discrete velocity method, J. Fluid. Mech, 19 (1964), 401-414 R. Gatignol, Kinetic theory boundary conditions for discrete velocity gases, Phys. Fluids, 20 (1977) S. Ansumali and IV Karlin, Kinetic boundary conditions in the lattice Boltzmann model, Phys. Rev. E, 66 (2002), 026311 T. Reis, Burnett order stress and spatially-dependent boundary conditions for the lattice Boltzmann method, Comm. Comp. Phys (2019, in press)
  • 96. References I. Krastins, A. Kao, K. Pericleous, and T. Reis, 3D Moment-based boundary conditions for the lattice Boltzmann equation, Int. J. Num. Meth Fluids (2019, submitted) I. Krastins Parallel lattice Boltzmann method for convection in dendritic solidification , PhD thesis (2018)
  • 97. Dipole wall collision With the following initial conditions, two counter–rotating vortices are self–propelled to the right (F = 0): u0 = − 1 2 |ω| (y − y1) exp (−r1/r0)2 + 1 2 |ω| (y − y2) exp (−r2/r0)2 , v0 = 1 2 |ω| (x − x1) exp (−r1/r0)2 − 1 2 |ω| (x − x2) exp (−r2/r0)2 .
  • 98. Dipole wall collision: Snapshots at Re = 2500 (a) t = 0 (b) t = 0.2 (c) t = 0.3 Work of Seemaa Mohammed [PhD thesis (2018)], [Mohammed, Graham, TR (2018)]
  • 99. (a) t = 0.4 (b) t = 0.49 (c) t = 0.617 Work of Seemaa Mohammed [PhD thesis (2018)], [Mohammed, Graham, TR (2018)]
  • 100. (a) t = 0.8 (b) t = 0.1 (c) t = 0.1.5 Work of Seemaa Mohammed [PhD thesis (2018)], [Mohammed, Graham, TR (2018)]
  • 101. At different Re From left: Re = 625, 1250, 2500, 5000 at t = 1 Work of Seemaa Mohammed [PhD thesis (2018)], [Mohammed, Graham, TR (2018)]
  • 102. Energy and Enstrophy E(t) = 1 2 1 −1 1 −1 |u2 |dxdy, Ω(t) = 1 2 1 −1 1 −1 |ω2 |dxdy Work of Seemaa Mohammed [PhD thesis (2018)], [Mohammed, Graham, TR (2018)]
  • 103. Energy and Enstrophy: The numbers current work Clercx and Bruneau Re t E(t)LB Ω(t)(LB) E(t)FD E(t)SM Ω(t)(FD) Ω(t) (SM) 625 0.25 1.501 472.480 1.502 1.5022 472.7 472.6 0.50 1.013 382.915 1.013 1.0130 380.4 380.6 0.75 0.767 256.511 0.767 0.7673 255.0 255.2 1250 0.25 1.719 614.309 1.721 1.7209 615.0 615.0 0.50 1.312 613.574 1.313 1.3132 611.3 611.9 0.75 1.061 487.081 1.061 1.0613 484.4 484.7 2500 0.25 1.848 727.210 1.851 1.8509 727.8 728.2 0.50 1.540 919.228 1.541 1.5416 916.6 920.5 0.75 1.325 811.549 1.326 1.3262 805.5 808.1 5000 0.25 1.919 823.026 1.923 1.9225 822.8 823.1 0.50 1.690 13334.348 1.692 1.6924 1328 1340 0.75 1.496 1552.926 1.495 1.4980 1659 1517 [Clercx and Bruneau (2006)]
  • 104. Energy and Enstrophy: Convergence Work of Seemaa Mohammed [PhD thesis (2018)], [Mohammed, Graham, TR (2018)]