You are on page 1of 17

Velocity boundaries in the lattice Boltzmann method

Jonas Latt and Bastien Chopard


University of Geneva,
Geneva, Switzerland

Orestis Malaspinas, Michel Deville, and Andreas Michler


Ecole Polytechnique Federale de Lausanne,
Lausanne, Switzerland
(Dated: October 25, 2013)
Various ways of implementing boundary conditions for the numerical solution of the Navier-
Stokes equations by a lattice Boltzmann method are discussed. Five commonly adopted approaches
are reviewed, analyzed and compared, including local and non-local methods. The discussion is
restricted to velocity Dirichlet boundary conditions, and to straight on-lattice boundaries that are
aligned with the main lattice directions. The boundary conditions are first inspected analytically
by applying systematically the results of a multi-scale analysis to boundary nodes. This procedure
makes it possible to compare boundary conditions on an equal footing, although they were originally
derived from very different principles. It is concluded that all five boundary conditions exhibit
second-order accuracy, consistent with the accuracy of the lattice Boltzmann method. The five
methods are then compared numerically for accuracy and stability through benchmarks of two-
dimensional and three-dimensional flows. None of the methods is found to be systematically superior
to the others. Instead, the choice of a best boundary condition depends on the flow geometry, and
on the desired trade-off between accuracy and stability. From the findings of the benchmarks, the
boundary conditions can be classified into two major groups. The first group comprehends boundary
conditions that preserve the information streaming from the bulk into boundary nodes and complete
the missing information through closure relations. Boundary conditions in this group are found to be
exceptionally accurate at low Reynolds number. Boundary conditions of the second group replace all
variables on boundary nodes by new values. They exhibit generally much better numerical stability
and are therefore dedicated for use in high Reynolds number flows, even in weakly turbulent regimes.

PACS numbers: 47.11.-j, 05.20.Dd

I. INTRODUCTION along boundaries of the numerical domain. For concep-


tual simplicity, only straight boundaries are considered
The lattice Boltzmann (LB) method has established that traverse the nodes of the numerical grid, and which
itself as a a tool with growing acceptance for the numer- are aligned with the main directions of the grid.
ical simulation of fluid flows. It has proven to be at the Lattice Boltzmann models do not directly simulate the
same time simple to implement and economical with the evolution of the flow velocity. Instead, they calculate the
use of numerical resources. However, in spite of several dynamics of particle populations which stem from a mi-
important breakthroughs in the past decades, many as- croscopic description of the fluid. Although the macro-
pects of the method have been analyzed only recently. A scopic pressure and velocity fields are easily calculated
variety of radically different approaches is consequently from the particle populations, the reverse procedure is
found in the literature, and a general consensus on spe- more contrived. Thus, implementing a velocity condi-
cific implementation issues is often lacking. Even such a tion on straight boundaries boils down to finding a way
common topic as the implementation of boundary con- to translate from macroscopic flow variables to particle
ditions is not treated in a unified manner. This state of populations. This problem has been approached by au-
affairs raises numerous difficulties, from the choice of an thors from different viewpoints, some of them based on
appropriate boundary condition to the evaluation of the the kinetic theory of gases, and some of them on a hy-
numerical error. A selection of commonly used boundary drodynamic description of fluids.
conditions is therefore reviewed under a common light Although the numerical scheme of the LB method is
and compared in the present paper. The review concen- derived from microscopic physics, it is able to recover ac-
trates on the implementation of Dirichlet velocity bound- curate solutions of the macroscopic Navier-Stokes equa-
ary conditions, which prescribe a given velocity profile tions. This can be shown through a multi-scale analysis,
the results of which are reproduced in Section II B. The
same analysis is however not always conducted in the lit-
Currently at Mathematics Department, Tufts University (USA). erature for boundary conditions, and only little is known
Bastien.Chopard@cui.unige.ch about their hydrodynamic limit. In the present article,
Currently at Institute of Aerodynamics and Flow Technology, the boundary conditions are therefore inspected analyti-
German Aerospace Center, Braunschweig (Germany). cally and verified for consistency with a multi-scale anal-
2

y
as moments of the particle populations. The particle
density stands for the moment of order 0, and the fluid
momentum u for the moment of order 1:
q1
X
= fi and (1)
c1 c8 c7
i=0
q1
X
c2 c6 u = ci f i . (2)
x i=0

The moments of order 2 and 3 yield the tensors and


c3 c4 c5 R, which, as it is shown in Section II B, are related to
the hydrodynamic flow variables:
FIG. 1. Lattice vectors for D2Q9. An additional vector with q1
zero components c0 = (0, 0) is defined, which denotes a rest
X
= c i ci f i and (3)
particle population.
i=0
q1
X
R= c i ci c i f i . (4)
i=0
ysis of the LB method.
The article starts with an overview of the widely used These equations use a tensor notation without explicit
lattice Boltzmann BGK (LBGK) method [1], and then space indexes. In a d-dimensional space, Eq. (3) de-
introduces five different boundary conditions that are notes for example d2 scalar equations,Pwhich in full in-
found in the literature. Some well-known properties of q1
dex notation are written as = i=0 ci ci fi , for
the LB method are repeated to make this presentation ac- , = 1 d.
cessible even to an audience less familiar with this model. These vectors and tensors, as well as all other expres-
A set of two-dimensional (2D) and three-dimensional sions in this article, are written in a system of lattice
(3D) benchmarks is finally described, which challenge the units. In this system, the time interval between two iter-
LBGK method with each of these boundary conditions as ation steps and the lateral or horizontal spacing between
a numerical solver for the incompressible NavierStokes two grid nodes are unity. The speed of sound cs in in-
equations. compressible fluids is a constant depending on the lattice.
Aiming at a succinct comparison between different An important corollary of this is that the Mach number
boundary conditions, the review purposely avoids to ad- Ma = U/cs of a fluid is proportional to a characteristic
dress advanced topics, such as the implementation of off- fluid velocity U , expressed in lattice units. LB models
lattice boundaries, or the treatment of complex fluids. In can be used in a low Mach-number regime to simulate
particular, fluid compressibility effects are not analyzed incompressible flows. In that case, the pressure p of the
in the benchmark section, although the LBGK method fluid is related to the particle density through the equa-
is able to simulate weakly compressible isothermal flows. tion of state for an ideal gas:
Terms related to fluid compressibility are however ac-
counted for in the theoretical discussion of the boundary p = c2s . (5)
conditions.
A LB iteration takes the system from a discrete time
step t to t + 1 and consists of two steps. The collision
II. THEORETICAL BACKGROUND step evaluates first a collision operator on each lattice
node, and takes the particle populations fi to their post-
A. The LBGK method
collision value fi . This operator is local to each node:

fi (r, t) = i (f0 (r, t), f1 (r, t), fq1 (r, t)). (6)
Lattice Boltzmann simulations are executed on a reg-
ular grid. The state of the system consists of q variables The collision is followed by a streaming step, which takes
fi , i = 0 q 1 on each grid node, called particle pop- the post-collision variables to a neighbor node deter-
ulations. The topology of a lattice is defined by q lattice mined by the corresponding lattice vector:
vectors ci , i = 0 q 1. Thus, a node attributed to
the space location r finds its neighbors at the location fi (r + ci , t + 1) = fi (r, t). (7)
r + ci . Figure 1 displays these vectors for the D2Q9 lat-
tice, a common candidate for the implementation of 2D LB models possess exact mass and momentum conserva-
simulations [2, 3]. tion laws which are not subject to numerical approxima-
The hydrodynamic variables on each node are defined tion. This is expressed by the fact that the pre-collision
3

populations fi and their post-collision counterparts fi in Eqs. (1) and (2) obey the NavierStokes equation for
yield the same mass and momentum. Thus, a weakly compressible fluid. Only the results of this
X analysis are shown here, and the reader is referred to
i = 0 and (8) Refs. [1, 3] for more details. In this analysis, the LB
i dynamics is developed into a truncated Taylor series in
X
ci i = 0. (9) space and time, up to second order accuracy. Further-
i more, to separate physical phenomena happening at dif-
ferent scales, the particle populations are expanded into a
The common LBGK model [1] approximates the colli-
power-law
P series with respect to a small parameter 1:
sion operator as a relaxation of the particle populations
fi = k=0 k fik . The two first terms, of order O(0 ) and
to a local equilibrium distribution fieq , which depends
order O(1 ), are sufficient to recover asymptotically the
only on the value of and u:
dynamics of the NavierStokes equation. Thus, the ap-
i = (fi fieq (, u)). (10) proximation
(0) (1)
The parameter determines the inverse time scale of the fi = fi + fi + O(2 ) (15)
relaxation process. The local equilibrium depends only
on the macroscopic variables and u. It can be viewed is made. The same approximation is applied to develop
as a truncated expansion of the Maxwell-Boltzmann dis- the time derivative over two scales:
tribution and is written as
  t = t1 + 2 t2 + O(3 ). (16)
eq 1 1
fi (, u) = ti 1 + 2 ci u + 4 Qi : uu . (11)
cs 2cs Space derivatives are analyzed at a single scale:
The scalar product between two vectors is denoted by a = 1 + O(2 ). (17)
single dot (), and the contraction between two tensors by
a colon (:). The tensors Qi are defined as Qi = ci ci c2s I The parameter is used in analytical developments to
for i = 0 q 1, where I is the identity. The scalars ti formally separate time scales, but it is skipped in the
are lattice weights that account for the varying lengths remaining of this article to enhance readability. The
of the lattice vectors ci . Thus, a lattice is fully defined asymptotic and scale separated form of the mass and
by means of the lattice vectors ci , the lattice weights momentum conservation laws in Eqs. (9) and (8) can be
ti , and the speed of sound c2s . The benchmarks in this written as follows:
paper make use of the 2D lattice D2Q9 and the 3D
lattice D3Q19. On the D2Q19 lattice, with the order- t + (u) = 0 and (18a)
ing of indexes used in Fig. 1, the lattice weights are
t0 = 4/9, ti = 1/9 for i {2, 4, 6, 8} and ti = 1/36 t (u)+
for i {1, 3, 5, 7}. The speed of sound on this lattice is  
defined as c2s = 1/3. The lattice-specific constants for the (0) (1) 1 (0) (0)
+ + t + R = 0,
D3Q19 lattice can be found for example in Refs. [2, 3]. 2
A remarkable property of the equilibrium distribution (18b)
is that it has the same momenta as the particle popula-
tions for the conserved variables and u: where the operator denotes a divergence on the last
index of the involved tensors. The tensors (0) , (1) ,
q1
and R(0) are velocity moments equivalent to those de-
fieq
X
= and (12) fined by Eqs. (3) and (4), but evaluated on the com-
i=0 (0) (1)
ponents fi and fi of the particle populations. The
q1
nature of the physics described by the momentum equa-
ci fieq .
X
u = (13) tion, Eq. (18b), depends on the form of these tensors. In
i=0 (0)
the case of the LBGK model, the component fi of the
Through the multi-scale analysis in the next section, particle populations is equal to the equilibrium distribu-
this parameter can be formally related to the kinematic tion:
shear viscosity of the fluid:
(0)
  fi = fieq (, u). (19)
2 1 1
= cs . (14)
2 Assuming a low Mach-number regime, Eqs. (18a) and
(18b) are then equivalent to the NavierStokes equations
for a weakly compressible fluid with fixed bulk viscosity.
B. Multi-scale analysis Given that the series development of the dynamics was
taken up to second order, the LB method is argued to be
Through a multi-scale analysis of the LBGK model, second-order accurate in space and time for the numerical
it can be shown that the macroscopic variables defined simulation of weakly compressible fluids.
4

It is interesting to point out that the terms of order


O(0 ) in Eq. (18b) yield the Euler equation, and that the
viscous contributions to the dynamics are determined by
the O(1 ) tensor (1) . During the implementation of a
boundary condition, it is not only central that bound-
ary nodes implement an appropriate value of and u,
which determines the form of the equilibrium distribu-
tion, and thus the O(0 ) Euler components of the dynam-
ics. As has been pointed out previously among others in
Ref. [4], it is also crucial that the first-order tensor (1) is
implemented correctly to ensure a proper representation
of fluid viscosity. The multi-scale analysis is helpful to
understand the relation between the O(1 ) terms compo- FIG. 2. Boundary node on the top row of a grid. The hatched
region, located outside the grid, does not participate in the
nents of LB models and the macroscopic variables. For
(1) simulation. Particle populations on the boundary node are
the LBGK model, the value of fi reads represented by their lattice vectors; dashed vectors stand for
(1) ti  unknown populations.
fi = 2 Qi : u ci : uu
cs
1 
+ 2 (ci )(Qi : uu) . (20)
2cs These two equations are used as a reference in the bench-
It contains a dominating term proportional to u and two marks of Section V, to verify the quality of the boundary
terms scaling as the square of u which are less important conditions.
at low Mach numbers. They cancel for symmetry reasons
during the evaluation of the tensor (1) :
III. IMPLEMENTATION OF BOUNDARY
2c2s CONDITIONS
(1) = S, (21)

where S is the strain rate tensor: Prior to the collision step, some particle populations
1 T
 are unknown on boundary nodes, as they are lacking cor-
S= u + (u) . (22) responding neighbors. This is illustrated in Fig. (2) for
2
an upper boundary on a D2Q9 lattice. The particle pop-
As terms with non-linear velocity components do not con- ulations on the boundary node are represented schemati-
(1)
tribute to (1) , it is reasonable to approximate fi by cally by a lattice vector pointing into the direction along
its linear term only: which they were propagated during the previous stream-
(1) ti ing step. Three particle populations, indicated by dashed
fi Qi : u. (23) vectors, are unknown. The role of a boundary condition
c2s
is to find a substitution for the three missing popula-
(1)
Indeed, both values of fi in Eq. (20) and Eq. (23) yield tions, and potentially also for the remaining six, in a way
the same stress tensor. They are therefore equivalent which is consistent with the dynamics of the model and
in view of their effect on fluid flow, as the asymptotic which leads to the desired macroscopic behavior on the
dynamics in Eq. (9) only depends on (1) , and not on domain boundary. When only the unknown populations
(1)
the details of the first-order particle populations fi . are substituted, the action of a boundary condition can
In summary, the particle populations can be split into be viewed as the effect of a fictitious fluid portion located
two main components which fully determine the hydro- outside the numerical grid. This fluid portion streams the
dynamic behavior of the model. The term of order O(0 ) results from an imaginary LB operation into the bound-
yields the equilibrium distribution, which depends on the ary node and attributes a value to the unknown particle
macroscopic variables and u via Eq. (11). The term of populations. In other types of boundary conditions, the
order O(1 ) depends additionally on the velocity gradi- vision of a fictitious LB dynamics is abandoned, and all
ents. For the implementation of a boundary condition it particle populations are replaced on the boundary node.
is therefore necessary to possess knowledge of both the Once the substitutions have been made, all boundary
macroscopic variables and their gradients. conditions described in this paper execute a conventional
By introducing the results of the multi-scale expansion LBGK collision and streaming step. Boundary nodes
into Eqs. (18a) and (18b), and by taking the limit of implement therefore the same dynamics as bulk nodes,
small Mach-number, the NavierStokes equations for an and they are also analyzed in the same theoretical terms.
incompressible fluid are recovered: In particular, the results from the multi-scale analysis
displayed in Section II B also apply to boundary nodes.
u = 0, (24) Thus, particle populations on boundaries can be split
t u + (u )u = p + 2 u. into an equilibrium component fieq and an off-equilibrium
5

(1)
contribution fi according to Eqs. (15) and (19). practically all authors of velocity boundary conditions.
A The actual mass balance is influenced by the com- It is therefore applied throughout in this article, for all
putation of the density on boundaries explained in Sec- boundary conditions and for all benchmark problems in
tion III A The actual mass balance is influenced by the Section V.
computation of the density on boundaries explained in The density of a boundary node can be split into three
Section III An important constraint in determining these components. The first, , is the sum of the unknown
values is given by the conservation laws in Eqs. (8) and particle populations, the second, + , is the sum of the
(9). Exact local mass and momentum conservation are particle populations opposite to the unknown ones, and
pillars of the LB method, as they ensure among others the third, 0 , sums up the particle populations whose
an exceptional numerical stability. It is therefore desir- lattice vector is perpendicular to the boundary normal
able that they are respected on boundary nodes as well. or zero. Let u be the projection of the velocity on the
This is achieved by making sure that mass and momen- boundary normal pointing outside of the numerical grid.
tum, as computed from Eqs. (1) and (2), yield exactly Then, the particle density of the boundary node is
the desired value. In that case, conservation laws are
automatically verified, as it is seen by inserting Eq. (10) = + + + 0 , (25)
into Eqs. (8) and (9), and using the properties of Eqs. and the normal momentum
(12) and (13). The following sections do therefore not
refer to conservation laws, but instead insist on an ac- u = + . (26)
curate implementation of Eqs. (1) and (2), without any
numerical approximation. It should be pointed out for These equations are combined to obtain
clarity that even though these conservation laws guar- 1
antee equal mass in the pre- and post-collision state of = (2 + + 0 ), (27)
a cell, they do not guarantee global mass conservation 1 + u
in the system. It has been pointed out in Ref. [5] that a which is independent of the unknown quantity . On
simulation may gain or loose mass during time evolution, the D2Q9 lattice of Fig. 1, and on a top grid node shown
even with no-slip boundaries. An interpretation of this in Fig. 2, the variables above are defined as follows. The
fact is that the actual mass balance is influenced by the partial densities are = f3 + f4 + f5 , + = f7 + f8 + f1
computation of the density on boundaries explained in and 0 = f2 + f6 + f0 . The normal velocity is given by
Section III A the y-component of the boundary velocity, and Eq. (27)
The first step toward the implementation of a bound- becomes
ary condition is the construction of the equilibrium distri-
1
bution, defined in Eq. (11), from and u. The velocity = (2 (f3 + f4 + f5 ) + f2 + f6 + f0 ). (28)
u is known by definition on velocity boundaries. The 1 + uy
value of the particle density is however missing, and it This method can obviously only be applied to straight
needs to be computed by a method described in the next boundaries. On other types of boundaries, for example
section. on corner nodes, the locally available information on a
cell may be insufficient for the evaluation of the density.
In that case, it is common to extrapolate the density from
A. Evaluation of the density on boundaries neighboring bulk cells. For the benchmarks problems in
Section V, second-order accurate extrapolation is used
With a Dirichlet velocity boundary condition, the to evaluate the pressure in the 4 corners in 2D problems,
incompressible NavierStokes equations always yield a and in the 8 corners and the 12 edges in 3D problems.
unique solution. No additional boundary condition for
the pressure is required. With traditional numerical
solvers for the NavierStokes equations, this fact is obvi- B. Preserving the known particle populations
ous, because the pressure is not treated as an independent
variable. Instead, it is viewed as a functional of the ve- The two boundary conditions BC1 and BC2 intro-
locity field, and may be determined by solving a Poisson duced in Section IV compute values for the unknown par-
equation. ticle populations only, and leave the others untouched.
The lattice Boltzmann approach on the other hand By doing so, they exploit all the information available
uses a quasi-compressible method to solve the Navier from the LB dynamics in the bulk of the simulation. As
Stokes equations. The fluid density , is simulated as it is shown in Section V, they are rewarded by achieving
an independent variable in a regime close to fluid incom- more accurate results in 2D flows, but lose this advantage
pressibility, and related to the pressure through Eq. (5). in 3D problems.
As it is shown in this section, the value of the density can As it is pointed out in the introduction to Section III, it
however be determined on straight walls from the known is important to ensure the equations for the density and
particle populations (indicated by solid arrows in Fig. 2) the velocity, Eqs. (1) and (2), accurately on the bound-
and the value of the velocity. This method is used by ary nodes. It is clear from Section III A that the particle
6

density of a boundary node depends on the known pop-


1
ulations and on the value of uy , but not on the detail of
the unknown populations. Therefore, in situations where
only the unknown particle populations are replaced, the 0.8
value of needs not (and cannot) be enforced explic-
itly. Enforcing the value of the velocity via Eq. (2) on
the other hand yields two (in 2D) respectively three (in 0.6
3D) equations. Additional closure relations are therefore

x
u
required to match the number of unknown particle popu- 0.4
lations, which amount to 3 on the D2Q9 lattice, and to 9
(for D3Q27) or 5 (for D3Q19 and D3Q15) on 3D lattices.
It was argued in Section II B that the hydrodynamic 0.2 Poiseuille profile
limit of the lattice Boltzmann equation is expressed in Equilibrium on boundary
terms of the quantities , u and (1) . To help understand Regularized boundary condition BC3
0
the boundary conditions from a hydrodynamic point of 0 0.2 0.4 0.6 0.8 1
view, it is therefore good to reinterpret the closure rela- yposition in channel
tions suggested by the authors of boundary conditions as
closure relations for the values of the stress tensor (1) . FIG. 3. 2D channel flow, simulated once with an equilibrium
As (1) is symmetric, this introduces a set of 3 equations distribution on boundaries, and once with the Regularized
in 2D, and 6 equations in 3D, which are enforced by Eq. boundary condition BC3. The solid line plots the analytic
(3). Some of the equation for (1) (Eq. (3)) are however Poiseuille profile. Although only 11 data points are used to
resolve the channel width, the result obtained with BC3 is
linearly dependent on those for u (Eq. (2)). In the 2D
(1) visually indistinguishable from the Poiseuille profile. With
example illustrated in Fig. 2, the equation for xy de- equilibrium boundaries on the other hand, the velocity gra-
pends linearly on the equation for ux , and the equation dients are ill represented on boundary nodes, which impairs
(1) the accuracy of the whole simulation.
for yy depends on the one for uy . Generally speak-
ing, an amount of d equations for the tensor components
(1)
n , for = 0 d 1, are linearly dependent on the
equations of u . Here, the index n labels the direction of
As a result, the quality of the simulation is spoiled, not
the boundary normal (in the above example, this is the
only close to boundaries, but in the full simulated do-
y-index). In 2D in particular, the two equations for u
main. The expected second-order accuracy cannot be
and the remaining equation for (1) yield three closure
reached. To illustrate this issue, Figure 3 displays the
relations, in the same amount as when a closure relation
velocity profile obtained for the steady-state solution of
is introduced for each of the missing particle populations.
a 2D channel flow. The no-slip (zero velocity) walls are
implemented once via this equilibrium approach, and
once with the obviously more accurate boundary con-
C. Replacing all particle populations dition BC3. An exact visual match between the exact
analytical solution and the numerical result is obtained
The boundary conditions BC3, BC4 and BC5 de- with the accurate boundary condition. With the equilib-
scribed in Section IV use the known particle populations rium boundary condition on the other hand, the numeri-
only to compute the particle density and, in the case cal values are far from the analytical curve. Although the
of BC3, the stress tensor (1) . After this, they disregard velocity has a correct no-slip value on the boundary, the
all particle populations and replace their value by new velocity gradient starts out erroneously. This confirms
ones, based on the velocity and the computed macro- the theoretical considerations of the previous section, in
scopic variables. As they treat all particle populations in which the O(0 ) components of the particle populations
the same way, they can be formulated generically and are are shown to represent macroscopic variables, and the
easily implemented on various 2D and 3D lattices. Fur- O(1 ) components their gradients.
thermore, they turn out to be more stable than BC1 and
BC2, and can therefore be used at substantially higher
Reynolds numbers. IV. PRESENTATION OF THE REVIEWED
A tempting approach to setting up such velocity BOUNDARY CONDITIONS
boundaries might be to initialize all particle populations,
the known and the unknown ones, to their equilibrium The five boundary conditions listed in Table I are ana-
distribution with the imposed velocity and the density lyzed in this review paper. The table specifies whether a
computed from Eq. (28). It is however clear from the dis- boundary condition replaces all particle populations by
cussion in Section II B that this method is inappropriate, a new value, or only the unknown ones. It also states
as it respects the O(0 ) contributions to the dynamics, whether they are local to a given boundary node, or if
but neglects the hydrodynamically relevant O(1 ) terms. they need to access neighboring nodes in order to execute
7

ever, only the value of the velocity is explicitly enforced.


TABLE I. The boundary conditions reviewed in this article
In this review article, the value of the stress tensor is
Method Replaces all fi s Local Explicit in 3D therefore evaluated separately for the D2Q9 lattice, as a
BC1 (Inamuro) No Yes No proof of validity. For this, the six known particle popu-
BC2 (Zou/He) No Yes Yes lations are assumed to obey the value predicted by the
BC3 (Regularized) Yes Yes Yes multi-scale analysis in Eq. (23), and thus, to depend on ,
BC4 (Finite Diff.) Yes No Yes u and the gradients of u. Based on this assumption, the
BC5 (Nonlinear FD) Yes No Yes missing particle populations are evaluated from the algo-
rithm of the boundary condition, and the stress tensor
(1) is computed from Eq. (3).
their algorithm. The original papers of boundary con-
ditions most often concentrate on 2D implementations.
Table I specifies whether there exists a straightforward A. Inamuro method (BC1 )
way to extend them to 3D, or if this requires the solution
of an implicit equation. The boundary condition BC1 by T. Inamuro et al.
Boundary condition BC1 is described in an article by uses a reasoning based on the kinetic theory of gases to
T. Inamuro et al. [6] from 1995. Boundary condition find an appropriate value for the missing particle popu-
BC2 was published subsequently in 1997 by Q. Zou and lations. It assumes that the missing populations are at
X. He [7]. Both methods modify only the value of un- a local thermohydrodynamic equilibrium and thus yield
known particle populations, and both are local. While the discrete analog of a Maxwell-Boltzmann distribution.
BC2 extends naturally to any 3D lattice, 3D formula- This distribution is however centered around a fictitious
tions of BC1 are more contrived and require the solu- density and velocity u , both of which are different
tion of an implicit equation at each iteration step of the from the macroscopic fluid variables and u. While is
method. Boundary condition BC3, formulated by J. Latt a free variable, u is assumed to differ from u only by a
and B. Chopard in [3], replaces all particle populations slip velocity s, which is perpendicular to the wall nor-
by a new value. It is local and extends naturally to any mal: u = u + s. These assumptions introduce a set of
3D lattice. Boundary conditions BC4 and BC5 are non- 2 unknowns in 2D, and 3 unknowns in 3D. For an upper
local, as they use finite-difference approximations to eval- boundary in a D2Q9 lattice, they read
uate the velocity gradients in Eqs. (20) and (23). They
gi = fieq ( , ux + sx , uy ) for i = 3, 4, 5, (29)
are based on the work of P. Skordos [8], published in 1993,
and further elaborated by I. Halliday [4] and by Z. Guo where fieq is the equilibrium distribution described by Eq.
and C. Zheng [9]. To be suitable for this review article, (11). As has been emphasized in Section III B, the value
these boundary conditions were formulated as succinct of the velocity u needs to be enforced on the boundary
and straightforward as possible. They fail however to re- via Eq. (2). This system of two equations can be solved
flect in detail all implementation issues or optimization for the two unknowns and sx , with the following result:
ideas raised in these three papers.
uy + f1 + f7 + f8
In the remaining part of this section, the five reviewed = 6 , (30)
boundary conditions are introduced within a common 1 + 3u2y 3uy
framework. A formalism is used in which all particle ux + f1 + f2 f6 f7
populations fi on a boundary node are replaced by alter- sx = ux + 6 . (31)
(1 3uy )
native populations gi resulting from the boundary con-
dition algorithm. If in a boundary condition some of the In these relations, the lattice constants have been re-
original fi s are kept, this is stated explicitly. It is then placed by their numerical value for the D2Q9 lattice. The
assumed that a LBGK collision is applied to the popula- missing populations are now evaluated with the help of
tions gi , followed by a streaming step. Explicit formulas Eq. (29), and the other populations are left unchanged:
are given for the D2Q9 lattice of Fig. 1 and for a top grid g i = fi for i = 0, 1, 2, 6, 7, 8. (32)
node as in Fig. 2. Furthermore, it is explained how the
algorithms can be extended to 3D lattices. In 3D, the slip velocity s has two independent compo-
All presented boundary conditions are shown to re- nents. The unknowns thus amount to 3, which matches
cover the desired hydrodynamic behavior. According to the number of closure relations introduced by Eq. (2).
the discussion in Section II B, this amounts to showing This system of equations is more difficult to solve than
that the expected value for the boundary velocity is ob- in the 2D case, and to our knowledge, no analytic solution
tained from Eq. (2), and that the stress tensor calcu- is presently known. For the 3D benchmarks in Section V,
lated from Eq. (3) is consistent with its hydrodynamic the lattice Boltzmann code solves these equations numer-
value predicted by Eq. (21). These requirements are en- ically on each boundary cell and at every time step with
forced by construction in the boundary conditions BC3, the help of a multivariate Newton-Raphson solver [10].
BC4 and BC5, and are therefore verified for obvious rea- The velocity u is explicitly enforced by this boundary
sons. For the boundary conditions BC1 and BC2 how- condition, but nothing is known a priori about the value
8

of the stress tensor. The method described in the intro- (23). Let the opposite opp(i) of a lattice direction i be
duction of Section IV is now applied to evaluate (1) for defined by the relation copp(i) = ci . Then, Eq. (23)
the D2Q9 lattice, by making use of a computer algebra is symmetric under the operation of taking the opposite
system. The following values are found: direction:
fi
(1) (1)
= fopp(i) . (35)
(1)
xx = (33a)
9(1 3uy )2 ( 2Syy 3uy + 3u2y )
 This relation can be used to copy data from known par-
10Sxx Syy (1 3uy )2 + 6Sxy
2
(1 3uy + 3u2y ) ticle populations to the opposite, unknown ones. It may
(3uy 1) 5Sxx (1 + 6uy 12u2y + 9u3y ) however not be applied blindly to all unknown particle
populations, because this would conflict with Eq. (2) for
1 
+Syy u2x (3 9uy ) + 18ux Sxy ( uy + u2y ) , the velocity. On a D2Q9 lattice for example, there is re-
3 ally only one degree of freedom left on which the bound-
2
(1)
yy = Syy , and (33b) ary condition may have an influence. The choice made in
3 the case of BC2 was to apply Eq. (35) to the unknown
2 particle population whose lattice vector is parallel to the
(1)
xy = Sxy . (33c)
3 boundary normal. Thus, for an upper boundary in a
The tensor components yy and xy yield an exact D2Q9 lattice, the following relation is applied:
match with the value expected from Eq. (21). As has (1) (1)
been pointed out in Section III B, this is a direct corol- g 4 = f8 . (36)
lary of the fact that the equation for the velocity, Eq. (2), (1) (1)
is satisfied. The component xx is the only free parame- The remaining two unknown populations g3 and g5 are
ter on a D2Q9 lattice, and can be viewed as a signature computed by enforcing the values of the velocity through
of how the boundary condition influences the hydrody- Eq. (2). On a D2Q9 lattice, the obtained values are
namics of the fluid. In its present form, Eq. (33a) is not (1) 1 (1)
(1) (1)
very enlightening. It is therefore expanded into a finite g 3 = f7 + (f6 f2 ) and (37)
2
Taylor series, for small values of the components Sxx , Syy (1) (1) 1 (1) (1)
and Sxy . It is assumed that, in the limit of fluid incom- g5 = f1 + (f2 f6 ). (38)
2
pressibility, the Mach number Ma, and thus the velocity
u in lattice units, scales like the small parameter [11]. The value of the unknown particle populations is con-
The components of the strain rate tensor S exhibit there- structed by adding equilibrium and off-equilibrium parts:
fore order O(2 ) scaling. From the above Taylor series, (1)
gi = fieq (, u) + gi for i = 3, 4, 5. (39)
only terms of order O(2 ) are kept, and terms of the form
S S or S u are neglected. This leads to the follow- All other populations are kept as they are:
ing approximation of Eq. (33a):
g i = fi for i = 0, 1, 2, 6, 7, 8. (40)
5
(1)
xx = Sxy + O(3 ). (34) Like the Inamuro method BC1, the Zou/He method
9
BC2 enforces the value of the velocity explicitly, but does
This expression is close to the hydrodynamic tensor value not specify anything about the stress tensor. The values
in Eq. (21), although the factor 5/9 differs from the ex- of (1) can again be computed for the D2Q9 lattice, us-
pected factor 2/3 by 20%. This error has however no ing the procedure described in the introduction of Section
important effect in practice, and the Inamuro method IV. The resulting expressions match exactly the hydro-
is even found to be more accurate than the other ap- dynamic values of (1) claimed in Eq. (21). This con-
proaches in low-Reynolds applications. One may how- firms analytically the validity of the Zou/He boundary
ever point out that as a consequence of Eq. 34, the trace condition for 2D simulations.
of (1) is non-zero with BC1. This is a violation of the This algorithm cannot be used as it stands in 3D. In
continuity equation, because it is deduced form Eqs. (21) that case, Eq. (2) yields three independent equations, but
and (22 that the trace of (1) is proportional to u in the number of unknowns is larger (5 or 9). In that case,
the hydrodynamic limit. the authors of Ref. [7] suggest to proceed as follows. To
begin with, the off-equilibrium bounce-back rule, Eq.
(35), is applied to assign a value to all missing particle
B. Zou/He method (BC2 )
populations. By doing this, the exact value of the com-
ponent u is recovered for the index in direction of
The boundary condition BC2 by Q. Zou and X. He the boundary normal. To keep this relation valid, the
is based on an idea referred to by its authors as apply- sum over the value of the unknown particle populations
ing the bounce-back rule to off-equilibrium parts. This is kept invariant during subsequent operations. The ex-
expression can be understood as a reference to a symme- cess of momentum is then evaluated in the remaining
(1)
try property of the variables fi that follows from Eq. directions:
9

D. Finite-difference velocity gradient method


(BC4 )
fineq ci
X
for 6= . (41)
i In the regularized approach of BC3, the stress tensor
(1) is evaluated on the boundary from information lo-
Finally, the values are redistributed over the unknown cally available on the cell. The boundary condition BC4
particle populations, in order to find an exact match for computes (1) from Eq. (21) instead, by relating it to
Eq. (2): the strain rate tensor S. The components of S are eval-
uated by a second-order accurate finite-difference scheme,
X 1 which accesses the value of the velocity on neighboring
gineq = fineq ci for all unknown fi s, (42)
n grid cells. This idea was first published in 1993 in a pi-
6=
oneering article by Skordos [8], and subsequently reused
by various authors. We particularly point out the ideas
where n is the number of unknown particle populations published in Refs. [4] and [9]. Reference [4] discusses the
for which ci is non-zero. number of degrees of freedom effectively available when
the stress tensor (1) is enforced on the boundary and
proposes different closure schemes that are compatible
C. Regularized method (BC3 ) with the hydrodynamic limit of the model. Ref. [9] shows
that it is sufficient to evaluate some velocity gradient with
first-order accuracy, and that the resulting boundary con-
The method [3] by J. Latt and B. Chopard replaces all dition is second-order accurate anyway.
particle populations on a boundary node. It first eval- The algorithm of BC4 is summarized by the following
uates the value of (1) , based on the knowledge of the equation:
known particle populations. Then, the equations of the
multi-scale analysis in Section II B are reversed to recon- ti
gi = fieq (, u) Qi : S for i = 0 q 1, (45)
struct all particle populations from , u and (1) in a c2s
way consistent with the hydrodynamic limit of the model.
With the use of Eq. (21), and by exploiting the symmetry where the strain rate tensor S is defined as in Eq. (22).
of tensors Qi and of tensor (1) , Eq. (23) is rewritten as The velocity gradients of S that run along directions
follows: parallel to the boundary are evaluated by a symmetric
finite difference scheme. This presumes the knowledge
(1) ti ti of the velocity on nearest-neighbor cells. Velocity gra-
fi 2
Qi : S = 4 Qi : (1) . (43) dients along the boundary normal use non-symmetric fi-
cs 2cs
nite differences, which access the velocity on nearest and
With this relation, the off-equilibrium part of the particle next-to-nearest neighboring cells.
populations can be reconstructed from the tensor (1) . It should be pointed out that, instead of evaluating the
This procedure is called a regularization of the particle symmetric tensor S, one may alternatively compute all
(1)
populations, because it compels the fi to respect ex- components of the non-symmetric tensor u and calcu-
actly (without numerical error) the symmetry properties late the population functions from Eq. (23). These two
of Eq. (21), such as the symmetry explicited in Eq. (35). ways of constructing the boundary condition are alge-
braically equivalent.
The tensor (1) is evaluated as follows. First, all un-
known particle populations are assumed to take the value
obtained by a bounce-back of off-equilibrium parts, E. Nonlinear finite-difference method (BC5 )
as in Eq. (35). Thus, their value is described as fi =
fieq (, u) + fopp(i) fopp(i)
eq
. It was emphasized in Sec-
It is shown by the multi-scale analysis that Eq. (23)
tion IV B that this relation may not be used to define is a valid approximation to Eq. (20), within the hydro-
a boundary condition, because it prohibits an exact im- dynamic scales of the model. It is therefore clear that
plementation of Eq. (2). It it therefore used temporarily boundary conditions BC3 and BC4, which are based on
only, to evaluate the value of (1) by means of Eq. (3). this approximation, yield accuracy of second order, con-
After this, Eq. (43) is used to construct all particle sistent with the overall accuracy of the lattice Boltzmann
populations: scheme. Beyond this asymptotic estimate, the accuracy
may however vary in actual simulations, due to higher-
ti order effects that are not visible in the finite expansion of
gi = fieq (, u) + Qi : (1) for i = 0 q 1. (44)
2c4s Section II B. For this reason, it is sometimes argued that
the full term of Eq. (20) should be implemented on the
It is obvious that not only and u, but also the ten- boundary, to gain accuracy and numerical stability. In
sor (1) are recovered appropriately by this boundary order to test this conjecture numerically, a corresponding
condition. boundary condition BC5 is presented in the following. It
10

uses the same principles as BC4, but also includes the depend only on the dimensionless Reynolds number, de-
non-linear velocity contributions to the particle popula- fined as a function of the kinematic fluid viscosity :
tions. This approach has not been published previously
in the literature, and serves only as a toy model to exper- UL
Re = . (47)
iment with the limits of BC4. It is explicited as follows:
ti  The parameters used for the numerical implementation
gi = fieq (, u) 2 Qi : u ci : uu are described by the number N , which is the number of
cs
grid nodes used to resolve the length L, and the veloc-
1 
+ 2 (ci )(Qi : uu) ity Ulb , representing the velocity U in a system of lat-
2cs tice units. This is a common choice in LB simulations,
for i = 0 q 1. (46) because Ulb is proportional to the Mach number of the
fluid. It can therefore be fine-tuned to make sure the flow
For the implementation of this method, the gradients of is close enough to the limit of incompressibility. For the
the components of the tensor uu need to be evaluated via numerical implementation of the benchmarks, the pre-
a finite difference scheme, additionally to the gradients scribed velocity field for the initial and/or boundary con-
of u. dition needs to be converted from dimensionless variables
to lattice units. This is simply done by multiplying the
dimensionless velocity by Ulb . Finally, the parameters x
V. BENCHMARKS and t , which stand for the size of a grid interval, and
the time lapse of an iteration, are expressed as follows in
This section produces the results of lattice Boltzmann dimensionless variables:
simulations, based on the five reviewed boundary con- 1
ditions. For some of the simulated problems, analytical x = and (48)
N 1
solutions are known for the steady state of the flow. In t = x Ulb .
that case, the simulation is iterated until a steady state is
reached. Then, the numerical result is validated against At a given time step, the numerical error is evalu-
the analytical solution on every grid point, and the mean ated by computing a l2 -norm of the difference between
discrepancy between these two values is used to evalu- the simulated velocities ulb (rk ) on grid nodes located
ate the quality of the implemented boundary condition. at position rk , and the dimensionless analytical solution
Other benchmarks focus on the time evolution of the uanalytic (rk ):
flow. They keep track of the time-evolution of a scalar v
quantity (such as the average energy in Section V C), u P 1
u 1 X ulb (rk ) 2
or the occurrence of a particular event (as the maximum

= t uanalytic (rk )
, (49)
value of the enstrophy in Section V D). Several 2D bench- P Ulb
k=0
marks are presented, implemented on a D2Q9 lattice, and
one 3D benchmark on a D3Q19 lattice. where the sum runs over all P nodes of the numerical
The simulated domains of all presented problems have grid.
a rectangular shape. This raises the issue of how to im- The parameters of the simulation for a varying res-
plement corner nodes and, in 3D, edge nodes that lie on olution N are adapted so as to keep the value of the
the connexion between two plane walls. Although some Reynolds number constant, and to prevent effects of
authors of boundary conditions make suggestions on how fluid compressibility from interfering with the accuracy
to treat these cases, some authors dont. To guaran- of the result. Compressibility errors compr are known
tee an equal treatment, the present article treats cor- to scale like the square Mach-number and are therefore
ners and edges always in the same way, independently of estimated by compr = O(Ulb2 ). This error is required
the boundary condition that is being tested. The finite- to decrease at least as fast as the discretization error
difference algorithm of BC5 was selected to implement x = O(1/L2lb ) = O(1/N 2 ). It follows from Eq. (47)
these special boundary nodes. This approach is straight- that this is achieved by keeping the viscosity lb constant
forward, because the velocity gradients referred to in Eq. when the grid resolution is modified.
(44) can be evaluated on corners and edges just like ev- The benchmark codes can be retrieved from the Inter-
erywhere else. It must furthermore be pointed out that net [12] address. The programs are based on the open
Eq. (28) for the particle density cannot be evaluated on source lattice Boltzmann library OpenLB [13], which is
corners and edges. In those cases, the density is extrapo- publicly available.
lated with second-order accuracy from neighboring cells.
In all benchmark problems, a velocity U and a length
L are selected that are characteristic for the flow. The A. Steady plane channel flow (2D)
dynamics of the flow is then described in a system of di-
mensionless variables, independent of the numerical grid, This 2D stationary flow evolves in a straight channel,
in which U = 1 and L = 1. The equations of motion which extends in x-direction between x = 0 and x = lx .
11

The walls of the channel are parallel to the x-axis, and Reynolds number which can be reached before numerical
defined by the equations y = 0 for the lower wall, and instabilities occur. The most accurate boundary condi-
y = ly for the upper wall. A no-slip condition for the tions, BC1 and BC2 are also the distinctly least stable.
velocity is enforced on these walls. The flow is character- Most stable boundary conditions are those based on a
ized by a constant pressure drop along the channel. This non-local algorithm, BC4 and BC5.
pressure drop can be obtained by using pressure bound-
ary conditions on the inlet and the outlet. An alternative
approach, which is used in this benchmark, is to enforce B. Oscillating plane channel flow (2D)
the velocity profile from the analytical solution of the
flow on the inlet and on the outlet. The velocity is par- This laminar channel flow is also known as Womersley
allel to the walls, and the only non-zero component ux is flow on ground of the analytical solution proposed by
independent of x: ux = ux (y). The height ly of the chan- J. Womersley [14]. It is defined by the same geometry
nel is taken to represent the characteristic length L. The as the steady flow in Section V A. The pressure gradient
maximum value of the velocity, which is measured in the is however not constant, but oscillates in time. Before
middle of the channel, is selected for the characteristic the reference velocity U can be defined, the equations
velocity U . The analytic solution to this flow is given by of the flow are written in an arbitrary system of units,
the parabolic Poiseuille profile, which, in dimensionless other than the dimensionless one. In this system, the
variables, reads amplitude of the oscillations is denoted by A, and the
frequency by :
ux (y) = 4(y y 2 ). (50)
p
The pressure drop amounts to p/x = 8/Re. = A cos(t). (51)
x
The two-dimensional channel flow is for many reasons
an inappropriate benchmark, and it is presented here in a In the low-frequency limit 0, the solution to this
historical spirit, to conform with some authors of bound- flow is defined by a succession of Poiseuille profiles, with
ary conditions that use it as a basic test case for their oscillating amplitude:
algorithm. One shortcoming of this flow as a bench-
mark case is that the components Sxx and Syy of the A
ux (y, t) = (ly y y 2 ) cos(t). (52)
strain rate tensor S vanish in the analytical solution. 2
Boundary conditions that replace only unknown particle The maximum velocity of the flow, reached in the middle
populations (BC1 and BC2 in this article) are there- of the channel at time t = n2/ for any integer value
fore automatically exempt from numerical errors. This n, is found to be
follows from the discussion in Section III B, where the
components xx (on horizontal boundaries) and yy (on A 2
vertical boundaries) of the stress tensor are shown to be umax = L . (53)
8
the only degrees of freedom for which the boundary con-
dition could possibly be wrong. If the corner nodes are This value umax is used to define the reference velocity
implemented in an appropriate way, these two methods U , as it characterizes the flow reasonably well when os-
are shown in Refs. [6] and [7] to solve the 2D channel flow cillations are slow. The reference length L is described
with a precision close to machine accuracy (the best accu- by the channel height ly . As the flow depends on time, it
racy one can expect to obtain, given the limited precision is characterized by two dimensionless parameters, which
of floating point values on a computer), independent of are the Reynolds number Re defined in Eq. (47), and the
the grid resolution. Machine accuracy is however not ex- Womersley number , defined as
hibited in the present benchmark, because we chose to r
implement corner nodes in a generic way that works for L
= . (54)
all boundary conditions and for all types of flows. 2
In this benchmark, the grid resolution is varied from
N = 25 to N = 400, and the Reynolds number is In a system of dimensionless variables described by U
Re = 10. Compressibility effects are controlled by set- and L, the time-dependent solution to this flow is given
ting Ulb = 0.01 at a grid resolution N = 50. Figure 4 (a) by the Womersley profile [14, 15]:
shows that all reviewed boundary conditions lead to the
ux (y, t) =
expected second-order accuracy with respect to grid reso- 
lution. Boundary conditions BC1 and BC2 are distinctly 2 8 cosh 2( + i) y 21
i
Re t
more accurate, because their overall accuracy is only af- Re e 1  ,
i2

fected by the error in corner nodes. It is furthermore cosh 22 ( + i)
observed that the non-linear finite difference scheme of (55)
BC5 is slightly more accurate than the linear approach
of BC4. The numerical stability of boundary conditions where i is the imaginary unit, and Re means that the
is explored in Figure 4 (b) by means of the maximum real part of the formula needs to be evaluated.
12

(a) (b)
5
10
3
Inamuro
10 Zou/He
Regularized

Maximum Reynolds number


4
10 Finite difference
4 Nonlinear FD
10
Error

3
5
10
10
2 Slope
Inamuro 2
6
10 Zou/He 10
Regularized
Finite difference
7
Nonlinear finite difference
1
10 1 2 3
10
10 10 10 50 100 150 200
Grid resolution N Grid resolution N

FIG. 4. (a) Numerical accuracy in a 2D channel flow. (b) Numerical stability in a 2D channel flow. The maximum Reynolds
number which can be reached before numerical instabilities appear is plotted.

The error of the numerical result with respect to the the Laplacian operator with eigenvalue :
analytical solution of Eq. (55) is computed at each time
step by evaluation of Eq. (49) over the whole computa- 2 0 = 0 . (56)
tional domain. The overall error of the simulation is
The time evolution of this flow is characterized by an
defined as an average of over one time period. Only the
exponential decrease of the velocity amplitude:
asymptotic value of , reached after a large number of
iterations, is accounted for. The initial transient regime u(t) = u0 e(tt0 ) for t t0 . (57)
of the fluid, and consequently the choice of the initial
condition, are irrelevant. Among all eigenfunctions of the Laplacian, the following
In this simulation, the Reynolds number is Re = 1, initial stream function 0 was selected for the benchmark
and the lattice velocity is set to Ulb = 0.01 at a reference (expressed in dimensionless variables):
resolution of N = 10. The numerical results are plotted 1
in Fig. 5 (a) for a value of = 2 and on Fig. 5 (b) for 0 (x, y) = cos(2mx) cos(2ny), (58)
a value of = 5. All other parameters are chosen to be 2 m2 + n2
the same as in the steady channel flow. Figure 4 (a) in where x and y are contained in the interval [0, 1] and
Section V A can also be included in this discussion, as it label the two space directions. The velocity field is given
corresponds to the limit = 0 in which the flow does not by
oscillate. It should be pointed out that, as increases,
inertial effects on the flow dominate over viscous effects. 0 cos(2mx) sin(2ny)
ux,0 (x, y) = = (59a)
The velocity profile in the bulk becomes progressively
q
y m2
+1
independent of the boundary condition. As it can be n2
seen from the simulations (see Fig. 5 (b)), the result is and
practically independent of the chosen boundary condition
at a value of = 5. 0 sin(2mx) cos(2ny)
uy,0 (x, y) = = q . (59b)
x n2
+ 1
m 2

It is clear that ku0 (x, y)k 1 for all values of x and y,


C. Periodic array of vortices (2D) which justifies the choice of the reference velocity U . The
decay rate is found by solving the eigenvalue problem
The following benchmark measures the energy dissi- (56):
pation during time evolution of a laminar flow without
= (m2 + n2 ). (60)
external energy input. The initial velocity field consists
of an array of counter-rotating vortices [16]. The flow The initial pressure distribution of the flow is evaluated
is described by its value inside a periodic box of size by solving the Poisson equation 2 p = (u )u:
L L. The flow velocity u0 at any time t0 is derived
from its stream function 0 , which is an eigenfunction of p = (n2 cos(4mx) + m2 cos(4ny)). (61)
13

(a) = 2 (b) = 5

3 3
10 10
Error

Error
4
10 4
10
2 Slope 2 Slope
Inamuro Inamuro
Zou/He Zou/He
Regularized Regularized
5 Finite difference Finite difference
10
Nonlinear finite difference Nonlinear finite difference
1 2 1 2
10 10 10 10
Grid resolution N Grid resolution N

FIG. 5. Numerical accuracy in a slowly (a) and rapidly (b) oscillating 2D channel, with Womersley number .

The dimensionless pressure p is converted as follows to fined within a square box. The box is located in the ge-
the density lb , expressed in lattice units: lb = 1 + ometrical domain [L, L] [L, L] and implements no-
px2 /(c2s t2 ), where the discrete steps x and t are defined slip walls. The initial condition describes two counter-
as in Eq. (48). This benchmark is formulated as an ini- rotating monopoles, one with positive core vorticity at
tial value problem. The initial condition is therefore set the position (x1 , y1 ) and one with negative core vortic-
up with special care, using an approach described in Ref. ity at (x2 , y2 ). This is obtained with an initial velocity
[17] and based on an original suggestion in Ref. [8]. The field u0 = (u0 , v0 ) which reads as follows in dimensionless
particle populations are first initialized at an equilibrium variables:
distribution, based on the desired value of u and p. The
1 2
off-equilibrium parts of the particle populations are then u0 = ke k (y y1 )e(r1 /r0 ) (62a)
instantiated with the help of Eq. (23), with numerically 2
computed velocity gradients. Although the flow is pe- 1 2
+ ke k (y y2 )e(r2 /r0 ) and
riodic in both space directions, non-periodic boundary 2
conditions are used. To obtain this, a sub-domain of the 1 2
v0 = + ke k (x x1 )e(r1 /r0 ) (62b)
full L L domain is selected for the simulation. The ve- 2
locity along the boundaries of this sub-domain is set to 1 2
ke k (x x2 )e(r2 /r0 ) .
the analytical value of Eq. 57 at every time step with the 2
help of the five tested boundary conditions.
Here, p
the distance to the monopole centers is defined as
Figure 6 displays the time-evolution of the average en- ri = (x xi )2 + (y yi )2 . The parameter r0 labels
ergy with different boundary conditions at a resolution the diameter of a monopole and e its core vorticity.
N = 8 and a resolution N = 32. The Reynolds number
The average kinetic energy of this system at a given
is Re = 1, and the reference velocity in lattice units is
time is defined by the expression
set to Ulb = 0.01 at a grid resolution N = 8. In an initial
regime, the energy decay is in all cases exponential, as 1 1
=1
Z Z
2
predicted by Eq. (57). After reaching a critical value of E(t) kuk (x, t)d2 x, (63)
the time t, the curve starts oscillating and deviates from 2 1 1
the theoretical prediction. For the non-local boundary
conditions BC4 and BC5, this deviation occurs earlier and the average enstrophy by
than for the local ones. It is therefore concluded that the 1 1
1
Z Z
non-local boundary conditions are less accurate for this
(t) = 2 (x, t)d2 x, (64)
problem. 2 1 1

where = x v y u is the flow vorticity.


The dipole described by Eqs. (62a) and (62b) develops
D. Dipole-wall collision (2D) a net momentum directed in the positive x-direction and
is self-propelled toward the right wall. The collision be-
This benchmark, based on Refs. [18] and [17], ana- tween the dipole and the no-slip wall is characterized by
lyzes the time evolution of a self-propelled dipole con- a turbulent dynamics where the wall acts as a source of
14

(a) N=8 (b) N=32


0
10
Inamuro Inamuro
6
2
Zou/he 10 Zou/he
10 Regularized Regularized
Finite difference Finite difference
4
10 8

Energy
10
Energy

6
10
10
10
8
10

10 12
10 10
0 0.002 0.004 0.006 0.008 0.01 2 3 4 5 6
Time Time x 10
3

FIG. 6. Time-evolution of the average energy in the 2D periodic array of vortices. The curves for the linear and the non-linear
finite difference methods overlap as far as one can distinguish visually. Therefore, only the linear case is presented. A boundary
condition is considered to be of good quality if the point at which the curve oscillates and departs from an exponential decay
occurs late.

small-scale vortices that originate from detached bound- 3


10
ary layers. This problem is therefore particularly inter-
esting as a test for the ability of boundary conditions to
reproduce the dynamics of boundary layers during colli-
sion. For this purpose, the maximum value of the flow
enstrophy, which is reached during the dipole-wall colli-
sion, is evaluated and retained for a comparison among
Error

boundary conditions. As no analytical result for this 10


4

flow is known, the measured values are compared against


benchmark results obtained with a spectral method in
Ref. [18].
2 Slope
In the benchmark, the initial core vorticity of the Regularized
monopoles is fixed to e = 299.5286, which leads to an Finite difference
initial average kinetic energy of E(0) = 2. Further- Nonlinear finite difference
more, the Reynolds number and the monopole radius 250 500 1000
are set to Re = 625 and r0 = 0.1. The monopoles are Grid resolution N
aligned symmetrically with the box, in such a way that
the dipole-wall collision is frontal and takes place in the FIG. 7. Accuracy on the value of the enstrophy peak in a 2D
middle of a wall. The position of the monopole centers is dipole-wall collision at Re = 625. Boundary conditions BC1
(x1 , y1 ) = (0, 0.1) and (x2 , y2 ) = (0, 0.1). As in Section and BC2 could not be tested, because they are numerically
unstable at this Reynolds number.
V C, the approach of Ref. [17] is used to set up the initial
condition. The initial pressure is evaluated numerically,
by solving the Poisson equation with a successive over-
relaxation (SOR) scheme, using the algorithm described
e.g. in Ref. [19]. The off-equilibrium parts of the particle ity was ruled out by initializing the population functions
populations are then instantiated with the help of Eq. with an equilibrium distribution, and keeping the corner
(23), with numerically computed velocity gradients. nodes at an equilibrium distribution with constant pres-
The boundary conditions BC1 and BC2 could unfor- sure throughout the simulation. Although this approach
tunately not be used for this problem, because they expe- to setting up initial states and boundaries tends to be
rienced numerical instabilities at the required Reynolds exceptionally stable, the simulations with BC1 and BC2
number (the benchmark values in the literature start at were still subject to numerical instabilities.
Re = 625). These instabilities are due to an inherent The numerical results in Fig. 7, for a Reynolds num-
limitation of the boundary conditions, and do not orig- ber Re = 625, indicate that all three boundary conditions
inate from the way the initial condition or the bound- BC3, BC4 and BC5 yield the expected second-order ac-
ary condition in corner nodes are treated. This possibil- curacy. It is striking that the local boundary condition
15

BC3 is the most accurate candidate in this benchmark, as the one shown in Eq. (34), might not be visible in
although it is least accurate in all benchmarks of laminar the benchmark. An unexpected result is that boundary
flows. A possible interpretation is that the finite differ- condition BC2, which in 2D applications achieves results
ence approximation of velocity gradients in BC4 and BC5 very similar to those of BC3, falls in the same category
becomes inaccurate due to small-scale velocity variations. as the non-local boundary conditions BC4 and BC5 in
In that case, the dynamics of boundary layers appears to this 3D case.
be best represented by the local, cell-based approach of
BC3.
VI. DISCUSSION AND CONCLUSION

E. Rectangular steady channel flow (3D)


Five boundary conditions for the lattice Boltzmann
method have been selected and presented in this review
This problem is a 3D generalization of the channel flow article. As it is concluded from applying the results of a
presented in Section V A. This time, the channel extends multi-scale analysis to boundary nodes, all methods are
in z-direction. At every fixed value of z, the cross sec- second-order accurate with respect to the grid resolution.
tion is rectangular, extending from x = 0 to x = L, This implies that their error varies asymptotically at the
and from y = 0 to y = L, where is the aspect ra- same rate. Beyond this asymptotic estimate, the accu-
tio of the cross section. The pressure is independent of racy experienced in numerical simulation differs however
the x- and the y-coordinates, and decreases linearly as a from one boundary condition to another, depending on
function of z. The velocity has a non-zero component in the flow geometry and the grid resolution. A way to
z-direction only, and depends on x and y: uz = uz (x, y). understand these differences might be to take the multi-
As in the 2D case, nonlinear contributions to the Navier scale analysis to a higher order O(2 ) and discuss the
Stokes equation cancel out, and the velocity profile uz is couplings between higher order terms and the hydrody-
described as a solution of the following Poisson equation: namic scales. This technique is for example employed in
2 uz 2 uz p Ref. [21] to understand the asymptotic low Mach-number
2 uz 2
+ 2
= . (65) behavior of a family of lattice Boltzmann models. In-
x y z stead of doing this, this review article produces bench-
As this equation is non-homogeneous, the general solu- mark results for the boundary conditions in many differ-
tion is described as the sum of a particular solution up ent geometries. Those results are intended to serve as a
and a general solution uh to the homogeneous problem reference to help select the most appropriate boundary
2 uz = 0. The particular solution can be taken from condition for a given lattice Boltzmann simulation. It is
the 2D flow in Section V A. In dimensionless variables, emphasized once more that the results are valid only for
it reads straight boundaries which are aligned with the numer-
ical grid. Different conclusions can be expected when
up (x, y) = 4(x x2 ). (66) off-lattice boundaries are implemented.
In 2D simulations and at low Reynolds numbers, the
This settles the choice for the reference velocity U as Inamuro and Zou/He boundary conditions BC1 and BC2
being the maximum velocity reached in a 2D channel. are found to produce the most accurate results. Both
The pressure drop is the same in the 3D as in the 2D of them preserve the known particle populations on a
case: p/z = 8/Re. The complete analytic solution boundary node, a fact which probably explains their ex-
to this 3D channel flow is [20] cellent benchmark performance. They retrieve a large
+  amount of information from the bulk of the fluid, and
2 32 X (1)n manipulate only few particle populations (3 out of 9).
uz (x, y) = 4(x x ) + 3 (67)
n=0 (2n + 1)3 It seems plausible that by doing this, they retain infor-
  mation on higher order terms which are not visible in
cosh (2n + 1) y

the hydrodynamic terms of the multi-scale analysis. The
cos ((2n + 1)x) . Inamuro method is also very accurate in the 3D bench-
cosh (2n + 1) 2

mark, but this performance is not reproduced by the
Figure 8 (a) shows the numerical accuracy at Re = 10. Zou/He condition, which in this case compares to non-
The reference velocity is Ulb = 0.01 at N = 50, and the local boundary conditions. The main deficiency of BC1
aspect ratio is = 1. Numerical stability is explored in and BC2 is that they are numerically unstable at (even
Figure 8 (b) for a varying grid resolution. The numerical moderately) high Reynolds numbers. They could for ex-
results in this 3D benchmark are similar to those of the ample not be used to simulate the turbulent dipole-wall
2D application in Section V A. The boundary condition collision presented in Section V D.
BC1 is again much more accurate than boundary condi- In conclusion, BC1 and BC2 are the boundary con-
tions that replace all particle populations. As in the 2D ditions of choice for the simulation of laminar 2D flows,
case, all but one component of the strain rate tensor van- when high accuracy is important. The Inamuro bound-
ish in this flow, and some potential deficiencies of BC1, ary condition BC1 is also a good candidate for laminar
16

(a) (b)
6
3 10
10 Inamuro
5
Zou/He
10 Regularized

Maximum Reynolds number


Finite difference
4 Nonlinear FD
4
10 10
Error

3
10

5 2 Slope 2
10 10
Inamuro
Zou/He
Regularized 1
10
Finite difference
6
Nonlinear finite difference
0
10 1 2
10
10 10 0 20 40 60 80 100
Grid resolution N Grid resolution N

FIG. 8. (a) Numerical accuracy in a 3D channel flow. (b) Numerical stability in a 3D channel flow. The maximum Reynolds
number which can be reached before numerical instabilities appear is plotted. Boundary conditions based of finite difference
approximations (BC4 and BC5 ) are unconditionally stable at high grid resolution. Numerical values are therefore only reported
in the unstable regime, up to N = 25 for BC4 and up to N = 20 for BC5.

3D flows, although it is not an explicit method, and thus to this, it is slightly more accurate and more stable. The
tends to be complicated to implement. The extension of difference is however so small that it does not seem to
BC2 to 3D flow does not seem to make much sense, as it justify the increased complexity and computational bur-
does not exhibit exceptional accuracy, and is less stable den.
than other approaches.
The Regularized boundary condition BC3 uses a hy-
brid approach, as it is local like BC1 and BC2, but it ACKNOWLEDGMENTS
replaces all particle populations like BC4 and BC5. As
a such, it is less accurate than BC1 and BC2 in lam- We thankfully acknowledge the support of the Swiss
inar flows, but it has the ability to reach much higher National Science Foundation SNF (Awards FN 200020
Reynolds numbers. Furthermore, simulations of a tur- 1007931, PBGe2117144, and FN 200021107921). We
bulent dipole-wall collision show that it reproduces the also thank Andreas Malaspinas for inspiring suggestions.
dynamics of boundary layers more accurately than all
other boundary conditions. Because of its numerical sta-
bility, and because it is easy to implement in 2D and
3D applications, BC3 is a good general-purpose method,
and seems to be the best candidate for high Reynolds
number flows.
The non-local boundary conditions BC4 and BC5,
which use a finite difference scheme to approximate the
off-equilibrium part of particle populations, exhibit the
best numerical stability. In the laminar 3D benchmark,
they are even unconditionally stable on a sufficiently
large grid. Their main disadvantage is the non-locality of
their algorithm. This violates the basic principles of the
LB method, may substantially increase the complexity of
a code, and even be an obstacle to parallelizing the pro-
gram in a straightforward way. On the other hand, the
boundary conditions BC4 and BC5 are very general and
may adapt well to a larger software project. They are for
example not bound to the lattice structure, and can be
extended to the case of off-lattice boundaries, like the one
described in Ref. [9]. Boundary condition BC5 takes into
account non-linear velocity terms in off-equilibrium par-
ticle populations, which are neglected in BC4. Thanks
17

[1] S. Chen and G. D. Doolen, Ann. Rev. Fluid Mech. 30, [12] LB boundary condition benchmarks. http://spc.
329 (1998). unige.ch/lb_boundaries .
[2] S. Succi, The lattice Boltzmann equation for fluid dynam- [13] The OpenLB project. http://www.openlb.org.
ics and beyond (Oxford University Press, 2001). [14] J. R. Womersley, J. Physiol. 127, 553 (1955).
[3] J. Latt, PhD dissertation, University of Geneva, [15] J. A. Cosgrove, J. M. Buick, S. J. Tonge, C. G. Munro,
Geneva, Switzerland (2007), http://www.unige.ch/ C. A. Greated, and D. M. Campbell, J. Phys. A : Math.
cyberdocuments/theses2007/LattJ/meta.html. Gen. 36, 2609 (2003).
[4] I. Halliday, L. A. Hammond, and C. M. Care, J. Phys. [16] O. Walsh, in The Navier-Stokes Equations II The-
A: Math. Gen. 35, L157 (2002). ory and Numerical Methods, edited by J. G. Hey-
[5] A. Dupuis and B. Chopard, Int. J. Mod. Phys. B 17, 103 wood, K. Masuda, R. Rautmann, and S. A. Solonnikov
(2003). (Springer-Verlag, 1991), vol. 1530 of Lecture Notes in
[6] T. Inamuro, M. Yoshina, and F. Ogino, Phys. Fluids 7, Mathematics, pp. 305309.
2928 (1995). [17] J. Latt and B. Chopard, Int. J. Mod. Phys. C 18, 619
[7] Q. Zou and X. He, Phys. Fluids 9, 1592 (1997). (2007).
[8] P. A. Skordos, Phys. Rev. E 48, 4823 (1993). [18] H. J. H. Clercx and C.-H. Bruneau, Computers & Fluids
[9] Z. Guo and C. Zheng, Phys. Fluids 14, 2007 (2002). 35, 245 (2006).
[10] W. Press, S. Teukolsky, W. Vetterling, and B. Flannery, [19] M. Griebel, T. Dornseifer, and T. Neunhoffer, Numerical
Numerical Recipes in C++: The Art of Scientific Com- simulation in fluid dynamics (SIAM, 1998).
puting (Cambridge University Press, 2002). [20] C.-S. Yih, Fluid Mechanics (McGraw-Hill, 1969).
[11] D. H anel, Einfuerung in die kinetische Theorie der [21] P. J. Dellar, J. Comp. Phys. 190, 351 (2003).
Gase und Lattice-Boltzmann-Methoden (Springer Verlag,
2004).

You might also like