Anda di halaman 1dari 8

On pressure and velocity boundary conditions for the lattice Boltzmann

BGK model
Qisu Zou
Theoretical Division, Los Alamos National Lab, Los Alamos, New Mexico 87545
and Department of Mathematics, Kansas State University, Manhattan, Kansas 66506
Xiaoyi He
Center for Nonlinear Studies and Theoretical Biology and Biophysics Group, Los Alamos National
Laboratory, Los Alamos, New Mexico 87545
~Received 10 August 1995; accepted 24 February 1997!
Pressure ~density! and velocity boundary conditions are studied for 2-D and 3-D lattice Boltzmann
BGK models ~LBGK! and a new method to specify these conditions is proposed. These conditions
are constructed in consistency with the wall boundary condition, based on the idea of bounceback
of the non-equilibrium distribution. When these conditions are used together with the
incompressible LBGK model @J. Stat. Phys. 81, 35 ~1995!# the simulation results recover the
analytical solution of the plane Poiseuille flow driven by a pressure ~density! difference. The
half-way wall bounceback boundary condition is also used with the pressure ~density! inlet/outlet
conditions proposed in this paper and in Phys. Fluids 8, 2527 ~1996! to study 2-D Poiseuille flow
and 3-D square duct flow. The numerical results are approximately second-order accurate. The
magnitude of the error of the half-way wall bounceback boundary condition is comparable with that
of other published boundary conditions and it has better stability behavior. © 1997 American
Institute of Physics. @S1070-6631~97!03406-5#

I. INTRODUCTION When applied to the modified LBGK model, these boundary


conditions produce results of machine accuracy for 2-D Poi-
The lattice Boltzmann equation ~LBE! method has seuille flow with pressure ~density! or velocity inlet/outlet
achieved great success for simulation of transport phenom- conditions.
ena in recent years. Among different LBE methods, the lat- All the proposed new boundary conditions ~Refs. 2, 5, 6,
tice Boltzmann BGK model is considered more robust.1 For
7! including the boundary conditions in this paper yield im-
example, the 2-D triangular LBGK model with the boundary
proved accuracy compared to the bounceback boundary con-
condition proposed in Ref. 2 generates results of machine
accuracy for plane Poiseuille flow with external forcing to dition. However, they are difficult to implement for general
drive the flow. In practice, however, a flow is often driven by geometries, because there is a need to distinguish distribution
pressure difference, and the pressure gradient in many cases functions according to their orientation to the wall, and, there
cannot be replaced by an external force in LBGK computa- are additional or different treatments at corner nodes. On the
tions. In this situation, boundary conditions such as pre- other hand, the complete bounceback scheme does not dis-
scribed pressure or velocity on flow boundaries ~e.g., inlet tinguish among distribution functions and is very easy to
and outlet in a pipe flow! can be used to drive the flow. implement in a computer code, which is considered one of
In LBE methods, the specification of a pressure differ- the advantages of the LGA or LBE methods. Moreover, the
ence amounts to specification of a density difference. Early bounceback scheme with the wall located half-way between
work3 on pressure ~density! flow boundary conditions as- a flow node and a bounceback node ~it will be called ‘‘half-
signed the equilibrium distribution, computed with the speci- way wall bounceback’’ thereafter! is shown theoretically to
fied density and velocity, to the distribution function. This
produce results of second-order accuracy for the simple
method introduces significant errors. Skordos4 proposed to
flows considered.8,9 In this paper, the half-way wall bounce-
add the first-order approximation of the distribution, given
by the Chapman–Enskog expansion, to the equilibrium dis- back boundary condition and two flow boundary conditions
tribution. The scheme requires the gradient of density and are applied to the 2-D Poiseuille flow and a 3-D square duct
velocities, which can be approximated by a finite-difference flow using the d2q9i and d3q15i lattice Boltzmann models,
formula. Inamuro et al.5 and Maier et al.6 proposed new respectively.
boundary conditions for LBE simulations. In their simulation
of Poiseuille flow with pressure ~density! gradient, the pres-
sure boundary condition was treated differently than their
wall boundary condition. Chen et al.7 also proposed a gen-
eral way to specify boundary conditions, including flow II. GOVERNING EQUATION
boundary conditions. In this paper, we propose a way to
specify pressure or velocity on flow boundaries, based on the The square lattice LBGK model ~d2q9! is expressed as
idea of bounceback of the non-equilibrium distribution. ~Refs. 10–12!:

Phys. Fluids 9 (6), June 1997 1070-6631/97/9(6)/1591/8/$10.00 © 1997 American Institute of Physics 1591

Copyright ©2001. All Rights Reserved.


where the Einstein summation convention is used. S ab
5 21( ] a u b 1 ] b u a ) is the strain-rate tensor. The pressure is
given by p5c 2s r , where c s is the speed of sound with c 2s 5
3, and n 5 @ (2 t 21)/6# d , with n being the kinematic viscos-
1

ity. The form of the error terms and the derivation of these
equations can be found in Refs. 13 and 14.
For the 2-D case, we will take Poiseuille flow as an
example to study the pressure ~density! or velocity inlet/
outlet condition. The analytical solution of Poiseuille flow in
a channel of width 2L is given by

FIG. 1. Schematic plot of velocity directions of the 2-D ~d2q9! model and
projection of the 3-D ~d3q15! model in a channel. In the 3-D model, The
S
u x 5u 0 12
y2
L2
, D u y 50,
]p
]x
52G,
]p
]y
50, ~6!

y-axis is pointing into the paper, so are velocity directions 3, 7, 9, 12, 14 where the pressure gradient G is a constant related to the
~they are in parentheses if shown!, while the velocity directions 4, 8, 10, 11,
13 are pointing out. Velocity directions 3, 4 have a projection at the center
centerline velocity u 0 by
and are not shown in the figure.
G52 rn u 0 /L 2 , ~7!
and the flow density r is a constant. The Reynolds number is
defined as Re 5 u 0 (2L)/ n .
1 Poiseuille flow is an exact solution of the steady-state
f i ~ x1 d ei ,t1 d ! 2 f i ~ x,t ! 52 @ f i ~ x,t ! 2 f ~i eq ! ~ x,t !# ,
t incompressible Navier–Stokes equations with constant den-
sity r 0 :
i50,1, . . . ,8, ~1!
¹•u50, ~8!
where the equation is written in physical units. Both the time
step and the lattice spacing have the value of d in physical
units. f i (x,t) is the density distribution function along the ] b ~ u a u b ! 52 ] a S D
p
r0
1 n] bb u a . ~9!
direction ei at (x,t). The particle speed ei ’s are given by
ei 5(cos(p(i21)/2),sin(p(i21)/2),i51,2,3,4, and The steady-state macroscopic equations of the LBGK model
ei 5 A2(cos(p(i242 21)/2),sin(p(i242 21)/2),i55,6,7,8. Rest are different from the incompressible Navier–Stokes equa-
particles of type 0 with e0 50 are also allowed ~see Fig. 1!. tions, Eqs. ~8! and ~9!, by terms containing the spatial de-
The right hand side represents the collision term and t is the rivative of r . These discrepancies are called compressibility
single relaxation time which controls the rate of approach to error in the LBE model. Thus, when pressure ~density! gra-
equilibrium. The density per node, r , and the macroscopic dient drives the flow, u x in a LBGK simulation increases in
flow velocity, u5(u x ,u y ), are defined in terms of the par- the x-direction, and the velocity profile is no longer para-
ticle distribution function by bolic. For a fixed Mach number (u 0 fixed!, as d →0, the
velocity of the LBGK simulation will not converge to the
8 8
velocity in Eq. ~6! because the compressibility error becomes
(
i50
f i5 r , (
i51
f i ei 5 r u. ~2! dominant. This makes the comparison of u x with the analyti-
cal velocity of Poiseuille flow somehow ambiguous.
The equilibrium distribution functions f (eq)
i (x,t) depend only To make a more accurate study of Poiseuille flow with
on local density and velocity and they can be chosen in the pressure ~density! or velocity flow boundary conditions, we
following form ~the model d2q911!: use the d2q9i incompressible LBGK model proposed in Ref.

F G
15, with the following equilibrium distributions:
9 3
f ~i eq ! 5t i r 113 ~ ei •u! 1 ~ ei •u! 2 2 u•u ,

4 1
2 2

1
F 9 3
f ~i eq ! 5t i r 13ei •v1 ~ ei •v! 2 2 v•v ,
2 2 G 4
t 05 ,
9
t 05 , t i5 , i51:4; t i5 , i55:8. ~3! 1 1
9 9 36
t i5 , i51:4; t i5 , i55:8 ~10!
9 36
A Chapman–Enskog procedure can be applied to Eq. ~1!
to derive the macroscopic equations of the model. They are and
given by the continuity equation @with an error term O( d 2 ) 8 8 8 8
being omitted#
(
i50
f i5 (
i50
f ~i eq ! 5 r , (
i51
f i ei 5 (
i51
f ~i eq ! ei 5v, ~11!
]r
1¹• ~ r u! 50, ~4! where v5( v x , v y ) ~like the momentum in the ordinary
]t
LBGK model! is used to represent the flow velocity. The
and the momentum equation @with terms of O( d 2 ) and macroscopic equations of d2q9i in the steady-state case
O( d u 3 ) being omitted# ~apart from error terms of O( d 2 )]
] t ~ r u a ! 1 ] b ~ r u a u b ! 52 ] a ~ c 2s r ! 1 ] b ~ 2 nr S ab ! , ~5! ¹•v50, ~12!

1592 Phys. Fluids, Vol. 9, No. 6, June 1997 Q. Zou and X. He

Copyright ©2001. All Rights Reserved.


] b ~ v a v b ! 52 ] a ~ c 2s r ! 1 n] bb v a , ~13! O( d 2 ) with respect to the steady-state Navier–Stokes equa-
tion, for some special flows like Poiseuille flow, this error
are exactly the steady-state incompressible Navier–Stokes
disappears with suitable boundary conditions.
equation with constant density r 0 . In this model d2q9i, pres-
The 3-D 15-velocity LBGK model d3q15 is based on the
sure is related to the calculated density by c 2s r 5 p/ r 0
(c 2s 51/3), and n 5 @ (2 t 2 1)/6# d . The quantity p/ r 0 will be LBGK equation, Eq. ~1! with i50,1,... ,14, where
called the effective pressure. Although the macroscopic ei ,i50,1,... ,14 are the column vectors of the following ma-
equations of d2q9i in the steady-state case have an error of trix:

E5 0
0
F 0 1
0
0
21
0
0
0
1
0
21
0

0
0
0
1
0
0
21
1
1
1
21
21
21 21
1
1
21
21
1
21
1

1
21

21
1 21
21
1 21

G
1 ,
1

and ei ,i51,...,6 are classified as type I, ei ,i57,...,14 are 1


classified as type II. The density per node, r , and the mac- r5 @ f 1 f 1 f 12 ~ f 4 1 f 7 1 f 8 !# . ~19!
12u y 0 1 3
roscopic flow velocity, u5(u x ,u y ,u z ), are defined in terms
of the particle distribution function by However, f 2 , f 5 and f 6 remain undetermined. To close
the system, we assume the bounceback rule is still correct for
14 14
the non-equilibrium part of the particle distribution normal
(
i50
f i5 r , (
i51
f i ei 5 r u. ~14!
to the boundary ~in this case, f 2 2 f (eq)
2 5 f 4 2 f 4 ). With
(eq)

f 2 known, f 5 , f 6 can be found, thus


The equilibrium can be chosen as
2
1 1 f 25 f 41 r u y ,
f ~0eq ! 5 r 2 r u•u, 3
8 3
1 1 1
1 1 1 1 f 55 f 72 ~ f 12 f 3 !1 r u x1 r u y , ~20!
f ~i eq ! 5 r 1 r ei •u1 r ~ ei •u! 2 2 r u•u, iPI, 2 2 6
8 3 2 6
1 1 1
1 1 1 1 f 65 f 81 ~ f 12 f 3 !2 r u x1 r u y .
f ~i eq ! 5 r 1 r ei •u1 r ~ ei •u! 2 2 r u•u, 2 2 6
64 24 16 48
The collision step is applied to the boundary nodes also. For
iPII. ~15! non-slip boundaries, this boundary condition is reduced to
that in Ref. 6. A detailed discussion of implementation of
The macroscopic equations of the model is the same as Eqs. boundary conditions on stationary walls in the 3-D case was
~4! and ~5! with c 2s 53/8, and n 5(2 t 21) d /6. The incom- given in Ref. 6.
pressible model d3q15i is constructed from these formulas in Now let us turn to the pressure ~density! flow boundary
a similar way as in d2q9i. condition. Suppose pressure ~density! is to be specified on a
flow boundary ~take the inlet in Fig. 1 as an example! along
the y-direction, and that u y is also specified ~e.g., u y 50 at
III. PRESSURE AND VELOCITY BOUNDARY the inlet in a channel flow!. After streaming,
CONDITIONS FOR THE LBGK MODEL f 2 , f 3 , f 4 , f 6 , f 7 are known, in addition to r 5 r in , u y 50.
We need to determine u x and f 1 , f 5 , f 8 from Eq. ~2! as fol-
In this section a new boundary condition is proposed lows:
based on the idea of bounceback of the non-equilibrium part.
As an example, take the case of a bottom node in Fig. 1. The f 1 1 f 5 1 f 8 5 r in 2 ~ f 0 1 f 2 1 f 3 1 f 4 1 f 6 1 f 7 ! , ~21!
boundary is aligned with the x-direction with f 4 , f 7 , f 8 point- f 1 1 f 5 1 f 8 5 r in u x 1 ~ f 3 1 f 6 1 f 7 ! , ~22!
ing into the wall. After streaming, f 0 , f 1 , f 3 , f 4 , f 7 , f 8 are
known. Suppose that u x ,u y are specified on the wall and we f 5 2 f 8 52 f 2 1 f 4 2 f 6 1 f 7 . ~23!
want to use Eq. ~2! to determine f 2 , f 5 , f 6 and r ~originated Consistency of Eqs. ~21! and ~22! gives
in Ref. 2!, which can be put into the form
@ f 0 1 f 2 1 f 4 12 ~ f 3 1 f 6 1 f 7 !#
f 21 f 51 f 65 r 2~ f 01 f 11 f 31 f 41 f 71 f 8 !, ~16! u x 512 . ~24!
r in
f 52 f 65 r u x2~ f 12 f 32 f 71 f 8 !, ~17! We use the bounceback rule for the non-equilibrium part
of the particle distribution, normal to the inlet, to find
f 21 f 51 f 65 r u y1~ f 41 f 71 f 8 !. ~18!
f 1 2 f (eq)
1 5 f 32 f 3
(eq)
. With f 1 known, f 5 , f 8 are obtained by
Consistency of Eqs. ~16! and ~18! gives the remaining two equations:

Phys. Fluids, Vol. 9, No. 6, June 1997 Q. Zou and X. He 1593

Copyright ©2001. All Rights Reserved.


2 • Given r and the velocity along the boundary, find the
f 1 5 f 3 1 r in u x , velocity normal to the boundary and unknown f i ’s.
3
If a flow boundary is not aligned with lattice directions,
1 1 schemes based on extrapolations like the ones in Refs. 7 and
f 5 5 f 7 2 ~ f 2 2 f 4 ! 1 r in u x , ~25!
2 6 6 could be developed.
The velocity wall boundary condition and flow boundary
1 1 conditions for d2q9i are similar to that of d2q9 presented
f 8 5 f 6 1 ~ f 2 2 f 4 ! 1 r in u x .
2 6 above. The derivation is based on equations ( 8i50 f i 5 r and
The corner node at the inlet needs some special treat- ( 8i51 ei f i 5v and hence some modifications are needed. For
ment. Take the bottom node at the inlet as an example. After the wall boundary condition, Eq. ~19! is replaced by
streaming, f 3 , f 4 , f 7 are known, r is specified, and r 5 v y 1 @ f 0 1 f 1 1 f 3 12 ~ f 4 1 f 7 1 f 8 !# , ~30!
u x 5u y 50. We need to determine f 1 , f 2 , f 5 , f 6 , f 8 . We use
and in Eq. ~20!, r u x , r u y are replaced by v x , v y , respec-
the bounceback rule for the non-equilibrium part of the par-
tively. For the pressure flow boundary condition, Eq. ~24! is
ticle distribution normal to the inlet and the boundary to find
replaced by
f 1 5 f 3 1 ~ f ~1eq ! 2 f ~3eq ! ! 5 f 3 , v x 5 r in 2 @ f 0 1 f 2 1 f 4 12 ~ f 3 1 f 6 1 f 7 !# , ~31!
f 2 5 f 4 1 ~ f ~2eq ! 2 f ~4eq ! ! 5 f 4 . ~26! and in Eq. ~25!, r in u x is replaced by v x .
Using f 1 , f 2 in Eqs. ~22!, ~23!, we find The flow to be studied in the 3-D case is the square duct
flow with the x-direction being the flow direction as shown
1 in Fig. 1.
f 5 5 f 7 , f 6 5 f 8 5 @ r in 2 ~ f 0 1 f 1 1 f 2 1 f 3 1 f 4 1 f 5 1 f 7 !# .
2 The pressure flow boundary condition for the model
~27! d3q15 is applied as follows. Take the case of an inlet node,
A similar procedure can be applied to the top inlet node and as shown in Fig. 1, where the inlet is on the yz plane. After
outlet nodes. streaming, f i ,(i50,2,3,4,5,6,8,10,12,14) are known. Sup-
The specification of velocities u x ,u y at a flow boundary pose that r in ,u y 5u z 50 are specified on the inlet, and we
~take the inlet in Fig. 1 as an example! is actually equivalent need to determine f i ,i51,7,9,11,13 and u x from Eq. ~14!.
to a velocity wall boundary condition and can be handled in Similar to the derivation in d2q9, u x is determined by a con-
the same way as given at the beginning of the section. The sistency condition as
effect of specifying velocity at the inlet is similar to specify- r in u x 5 r in 2 @ f 0 1 f 3 1 f 4 1 f 5 1 f 6 12 ~ f 2 1 f 8 1 f 101 f 12
ing pressure ~density! at the inlet, since both conditions will
generate a density difference in the flow. 1 f 14!# . ~32!
At the intersection of two perpendicular boundaries, The expression of x-momentum gives
such as the inlet bottom ~non-slip boundary!, special treat-
f 1 1 f 7 1 f 9 1 f 111 f 135 r in u x 1 ~ f 2 1 f 8 1 f 101 f 121 f 14! .
ment is needed. After streaming, f 1 , f 2 , f 5 , f 6 , f 8 need to be ~33!
determined. Using bounceback for the normal distributions
gives If we use the bounceback rule for the non-equilibrium part of
the particle distribution f i (i51,7,9,11,13) to set
f 15 f 3 , f 25 f 4 .
f i 5 f i11 1 ~ f ~i eq ! 2 f ~i11
eq !
!, ~34!
Expressions of x,y momenta give
then Eq. ~33! is satisfied, and all f i are defined. In order to
f 5 2 f 6 1 f 8 52 ~ f 1 2 f 3 2 f 7 ! 5 f 7 , get the correct y-,z-momenta, we further fix f 1 ~the bounce-
back of non-equilibrium f i in the normal direction! and
f 5 1 f 6 2 f 8 52 ~ f 2 2 f 4 2 f 7 ! 5 f 7 , ~28! modify f 7 , f 9 , f 11 , f 13 as in Ref. 6:
or 1 1
f i ← f i 1 e iy d y 1 e iz d z , i57,9,11,13. ~35!
f 55 f 7 , 4 4
This modification leaves x-momentum unchanged but adds
1
f 6 5 f 8 5 @ r 2 ~ f 0 1 f 1 1 f 2 1 f 3 1 f 4 1 f 5 1 f 7 !# , ~29! d y , d z to the y-,z-momenta, respectively. A suitable choice
2 of d y and d z then gives the correct y-,z-momenta. Finally,
but there are no more equations available to determine r . In we find
this situation, since r is expected to be constant at the inlet, 2
r at the inlet bottom node can be taken as the r of its neigh- f 1 5 f 2 1 r in u x ,
3
boring flow node, thus the velocity inlet condition is speci-
fied. ~36!
From the discussion given above, we can unify the deri- 1 1
vation of boundary conditions which are aligned with the f i 5 f i11 1 r in u x 2 @ e iy ~ f 3 2 f 4 ! 1e iz ~ f 5 2 f 6 !# ,
12 4
lattice directions in 2-D as the following
• Given u x ,u y , find r and unknown f i ’s. i57,9,11,13.

1594 Phys. Fluids, Vol. 9, No. 6, June 1997 Q. Zou and X. He

Copyright ©2001. All Rights Reserved.


There is no special treatment at the wall of the inlet/outlet if We first present results using the pressure and velocity
bounceback is used there. Modification of the flow boundary conditions given in this paper at all boundaries, including
condition for d3q15i is similar to d2q9i. The velocity flow walls. The range of Re is from 0.0001 to 30.0; the range of
boundary condition can be derived similarly. t is from 0.56 to 20.0 and the range of u 0 is from 0.001 to
0.4; the largest density difference simulated ~not the limit! is
r in 55.6, r out 54.4 with nx55,ny53 corresponding to an
IV. WALL BOUNDARY CONDITIONS FOR THE LBGK
effective pressure gradient of G 8 50.1, where G 8 is defined
MODEL
as G 8 52(1/r 0 )(d p/dx). The magnitude of average density
The ‘‘complete’’ bounceback scheme which assigns r 0 is 5, but it is irrelevant for the simulation.15 All simula-
each f i the value of the f j of its opposite direction with no tions in this paper use double-precision.
relaxation on the bounceback nodes is very easy and conve- For all cases where the simulation is stable, the steady-
nient to apply. The treatment is independent of the direction state velocity, v x , is uniform in the x-direction, and is accu-
of f i ’s, which is one of the major advantages of the LGA and rate up to machine accuracy compared to the analytical so-
LBE methods. However, the bounceback rule with the wall lution in Eq. ~6!. The maximum of u v y u is on the order of
placed at the bounceback nodes gives a first-order error in 10213. For example, for nx55,ny53,u 0 50.1, t 50.56, Re
velocity. This has been shown analytically9 for some simple 510, the maximum relative error in v x is 0.1816310211,
flows and computationally14 for 2-D cavity flows. Several while the maximum relative error in r is 0.3553310215, and
theoretical studies have shown that if the wall is placed half- the maximum magnitude of v y is 0.5551310215. The results
way between the bounceback row and the first flow row for other cases are similar to this example. In all simulations,
~‘‘half-way wall bounceback’’!, the scheme gives a second- the density is uniform in the cross channel direction, and
order accuracy8,9,16,17 for some simple flows, including an linear in the flow direction. The computed and the analytical
inclined channel flow and a plane stagnation flow. For ex- density gradients differ only at the 14th digit. It is also no-
ample, if the d2q9 model with half-way wall bounceback is ticed that when a pressure ~density! gradient drives Poi-
used to simulate the 2-D Poiseuille flow with forcing, the seuille flow, the maximum Reynolds number which makes
error in velocity ~it is the same for any node! is given by9 the simulation stable is less than that with external forcing.
u 0 @ 4 t ~ 4 t 25 ! 13 # 2 Similar results are obtained by specifying the analytical
u tj 2u j 52 d , ~37! velocity profile given in Eq. ~6! at the inlet and pressure
3
~density! at the outlet, using the flow boundary conditions in
where u tj ,u j are the analytical and computed x-velocity, re- this paper. In this case, there is a uniform pressure ~density!
spectively, and u 0 is the center velocity. For a fixed t , the difference in the region, which depends on u 0 and the outlet
error is second-order in the lattice spacing d . Of course, large density.
value of t will give large errors,2,5 because the Chapman– We next present results for Poiseuille flow using pres-
Enskog procedure breaks down when t is large. However, sure or velocity boundary conditions only at the flow bound-
for t between 0.5 and 1.25, the magnitude of the error given aries, and using simple bounceback at the walls. For half-
in ~37! is less than or equal to 1.1 u 0 d 2 . Thus, it is worth- way wall bounceback, if there are ny nodes on the
while to consider this boundary condition in more general y-direction, then the first and last nodes are the bounceback
situations, especially in 3-D flows. nodes with the wall being located half-way between the
bounceback node and the first flow node. There are
ly5ny22 lattice steps across the channel and the lattice
V. NUMERICAL RESULTS
spacing is d 52/(ny22)52/ly. The length of the channel is
In this section, we present numerical results using the set to twice as the width. At the inlet/outlet, bounceback is
models d2q9i and d3q15i. For 2-D Poiseuille flow, the width also used at the nodes on the bounceback rows, thus, there is
of the channel is assumed to be 2L52, and we use nx,ny no special treatment for the corner nodes. Three combina-
lattice nodes on the x- and y-directions, thus, tions of inlet/outlet ~I/O! conditions and wall conditions were
d 52/(ny21). The initial condition is the equilibrium distri- tested.
bution, using a constant density r 0 , and zero velocity. The
~1! The flow boundary condition given in this paper with
steady-state is reached if
half-way wall bounceback.
( i ( j u v x ~ i, j,t1 d ! 2 v x ~ i, j,t ! u 1 u v y ~ i, j,t1 d ! 2 v y ~ i, j,t ! u ~2! The flow boundary condition proposed in Ref. 7 with
( i ( j u v x ~ i, j,t ! u 1 u v y ~ i, j,t ! u half-way wall bounceback. ~It assumes an additional
layer of nodes beyond the boundary flow nodes and uses
< d •Tol, ~38! an extrapolation formula to derive the incoming f i ’s of
where Tol is a tolerance set to 10212. We also define the the additional layer before streaming.!
maximum relative error in velocity ( v x , v y ) as in Ref. 18: ~3! The I/O and wall conditions used in Ref. 7.

A~ u tx 2 v x ! 2 1 ~ u ty 2 v y ! 2 To study convergence, we fix t and the Reynolds num-


err m [max , ~39! ber and vary the lattice spacing, d , from 1/2 to 1/32. The
u0
peak velocity, u 0 , is reduced along with d , to keep compress-
where u tx ,u ty
is the analytical velocity u 0 is the peak velocity, ibility error of the same size as discretization error. Three
and the maximum is over the entire lattice. examples are reported in Table I using the pressure boundary

Phys. Fluids, Vol. 9, No. 6, June 1997 Q. Zou and X. He 1595

Copyright ©2001. All Rights Reserved.


TABLE I. Maximum relative errors for 2-D Poiseuille flow with pressure specified at the inlet and outlet. The
results of three boundary conditions Nos. 1, 2, 3 are given. In each box, the upper figure is the error, and the
lower figure is the ratio of two consecutive errors. The last column shows the order of convergence using
least-squares fitting. The symbol ~22! represents 1022 .

lx 8 16 32 64 128 order
ly 4 8 16 32 64

u0 0.8333~21! 0.4167~21! 0.2084~21! 0.1042~21! 0.5208~22!


No. 1 0.6031~21! 0.1500~21! 0.3729~22! 0.9297~23! 0.2324~23! 2.005
Re 5 10 4.021 4.023 4.011 4.000
t 50.6 No. 2 0.5917~21! 0.1479~21! 0.3699~22! 0.9265~23! 0.2352~23! 1.995
4.001 3.998 3.992 3.939
No. 3 unstable
u0 0.2500 0.1250 0.6250~21! 0.3125~21! 0.1563~21!
No. 1 0.3276~21! 0.8319~22! 0.2054~22! 0.5111~23! 0.1276~23! 2.003
Re 5 10 3.938 4.050 4.019 4.005
t 50.8 No. 2 0.3250~21! 0.8125~22! 0.2032~22! 0.5085~23! 0.1283~23! 1 .997
4.000 3.999 3.996 3.963
No. 3 0.1000 0.2500~21! 0.6250~22! 0.1563~22! 0.3920~23! 1.999
4.000 4.000 3.999 3.987
u0 0.5000~21! 0.2500~21! 0.1250~21! 0.6250~22! 0.3125~22!
No. 1 0.5550~21! 0.1441~21! 0.3617~22! 0.9021~23! 0.2249~23! 1.989
Re 5 1 4.011 4.010 3.984 3.851
t 51.1 No. 2 0.5750~21! 0.1437~21! 0.3594~22! 0.8984~23! 0.2246~23! 2. 000
4.001 3.998 4.000 4.000
No. 3 0.5000~21! 0.1250~21! 0.3125~22! 0.7812~23! 0.1953~23! 2.000
4.000 4.000 4.000 4.000

S D
condition. The ratio of two consecutive maximum relative `
16a 2 dp
errors is also shown. The order of convergence, from a least- u x ~ y,z ! 5
mp3
2
dx (
i51,3,5, . . .
~ 21 ! ~ i21 ! /2
squares fitting, is shown in the last column. For the cases of
Nos. 1, 2 with the half-way wall bounceback, the maximum
relative velocity errors are similar and the convergence rate F
3 12
cosh~ i p b/2a ! G
cosh~ i p z/2a ! cos~ i p y/2a !
i3
. ~40!
is consistent with second-order accuracy. The magnitude of
We use a5b52 in the simulations. Results of the following
the errors is close to that obtained using No. 3. The quantity
boundary conditions are reported.
Tol in Eq. ~38! is set to 1028 .
To study stability, we compared the 3 cases with a ~1! The flow boundary condition given in this paper with the
simple equilibrium scheme, which is known to be stable. half-way wall bounceback.
This scheme imposes the equilibrium distribution at the flow ~2! The flow boundary condition in Ref. 7 with the half-way
boundaries. In the simulation of Poiseuille flow with wall bounceback.
bounceback at the walls, using the equilibrium scheme to ~3! The flow and wall boundary conditions in Ref. 7.
~4! The flow and wall boundary conditions in Ref. 6.
prescribe velocity inlet and density outlet conditions, and
~5! The flow boundary condition in Ref. 7 with bounceback
with lx516,ly58, u 0 50.1. We obtained a maximum of Re
at wall nodes without collision.
500. Once any boundary condition or flow boundary condi-
tion in any of the schemes in2,5–7,18 or in this paper is used, Again, we fix t and the Reynolds number, vary d from
the maximum Re number is reduced dramatically. For ex- 1/2 to 1/16, to study convergence. Three examples are re-
ample, the maximum Re reduces to 63 and 56, respectively, ported in Table II. The quantity Tol in the 3-D version of
for cases No. 1 and No. 2. The maximum Re further reduces Eq. ~38! is set as 1028 . From Table II, we can see that Nos.
to 12 for case No. 3. It is also noted that when the parameters 1–4 all give an accuracy close to second order, and that the
errors with half-way wall bounceback are comparable to
are close to the region of instability, the simulation may have
those obtained using the boundary conditions in Refs. 7 and
unusual large errors.
6. On the other hand, bounceback without collision ~No. 5!
Simulations of 3-D square duct flow were performed us- introduces an error of first-order throughout the flow. Thus,
ing d3q15i and d3q15 with the pressure flow boundary con- half-way wall bounceback has different behavior than boun-
dition. Only the results for d3q15i are reported, since the ceback without collision.
results of d3q15 are similar. The analytical solution of It is noted that the order of convergence for 3-D duct
a flow in an infinitely long rectangular duct flow, with all boundary conditions, is lower than that for 2-D
2a<y<a,2b<z<b,with x being the flow direction is Poiseuille flows. For example, the ratios of errors at the high-
given by19 est resolution are not very close to 4 in some cases. It ap-

1596 Phys. Fluids, Vol. 9, No. 6, June 1997 Q. Zou and X. He

Copyright ©2001. All Rights Reserved.


TABLE II. Maximum relative errors for 3-D square duct flow with pressure specified at the inlet and outlet. The
results of five boundary conditions ~Nos. 1–5! are given. In each box, the upper figure is the error, and the lower
figure is the ratio of two consecutive errors. The last column shows the order of convergence using least-squares
fitting.

lx 8 16 32 64 order
ly,lz 4 8 16 32

u0 0.8333~21! 0.4167~21! 0.2083~21! 0.1042~21!


No. 1 0.4028 0.1054 0.2742~21! 0.7289~22! 1.931
Re 5 10 3.822 3.844 3.762
t 50.6 No. 2 unstable

No. 3 unstable

No. 4 0.2210 0.5565~21! 0.1293~21! 0.3132~22! 2.053


3.971 4.304 4.128
u0 0.1250 0.6250~21! 0.3125~21! 0.1563~21!
No. 1 0.1382 0.3980~21! 0.9805~22! 0.2388~22! 1.959
Re 5 5 3.472 4.059 4.106
t 50.8 No. 2 0.1371 0.3659~21! 0.9243~22! 0.2310~22! 1.966
3.747 3.959 4.001
No. 3 0.3397 0.9563~21! 0.2117~21! 0.5741~22! 1.984
3.552 4.517 3.688
No. 4 0.8567~21! 0.1543~21! 0.4502~21! 0.1278~22! 1.998
5.552 3.427 3.523
No. 5 0.6539 0.3345 0.1536 0.7935~21! 1.025
1.955 2.178 1.936
u0 0.1000~21! 0.5000~22! 0.2500~22! 0.1250~22!
No. 1 0.2091 0.6537~21! 0.1817~21! 0.4807~22! 1.818
Re 5 0.2 3.199 3.598 3.780
t 51.1 No. 2 0.2114 0.6448~21! 0.1787~21! 0.4737~22! 1.829
3.279 3.608 3.772
No. 3 0.3109 0.7740~21! 0.1966~21! 0.4904~22! 1.994
4.017 3.937 4.009
No. 4 0.2070 0.4973~21! 0.1277~21! 0.3341~22! 1.982
4.162 3.894 3.822

pears that in 3-D duct flow, the four edges pose additional from 0.6 to 1.2 in the simulations. The magnitude of the
difficulties to resolving the flow. Even with forcing, the den- error is comparable with that using some published boundary
sity is not uniform in a cross section for the half-way wall conditions.
bounceback or for boundary conditions in Refs. 7 and 6. We have also observed that the half-way wall bounce-
Nevertheless, the order of convergence for 3-D duct flow is back method is approximately second-order accurate for the
still close to 2. The half-way wall bounceback has a weaker channel flows considered, and conclude that it deserves seri-
convergence when t .1 while the boundary condition in ous consideration in a LBGK simulation.
Ref. 7 performs better as t .1 but worse as t ,1.
We would like to point out that a second-order accuracy ACKNOWLEDGMENTS
of the half-way wall bounceback in the flows considered
does not imply a second-order accuracy for any flows. The Discussions with R. Maier and R. Bernard are appreci-
statement can be applied to other boundary conditions as ated. Q. Z. would like to thank the Associated Western Uni-
well. One is encouraged to do some tests on a simplified flow versities, Inc. for providing a fellowship and to thank G.
of the type of flows to be simulated. Doolen and S. Chen for helping to arrange his visit to the
Los Alamos National Lab. Some computations are per-
formed on the Convex Exempler SPP-1000 of Kansas State
VI. DISCUSSIONS University. Q. Z. would like to thank National Science Foun-
In this paper we have derived boundary conditions for dation Grant No. DMR-9413513 which provided funds for
the incompressible LBGK models, d2q9i and d3q15i, using a the acquisition of the machine.
new way to specify flow boundary conditions based on boun-
ceback of the non-equilibrium distribution. For the test prob- 1
S. Succi, D. d’Humières, Y. Qian, and S. A. Orszag, ‘‘On the small-scale
lem of Poiseuille flow with pressure or velocity inlet/outlet dynamical behavior of lattice BGK and lattice Boltzmann schemes,’’ J.
Sci. Comput. 8, 219 ~1993!.
conditions, the new method recovers the analytic solution 2
D. R. Noble, S. Chen, J. G. Georgiadis, and R. O. Buckius, ‘‘A consistent
within machine accuracy, and it is approximately of second- hydrodynamic boundary condition for the lattice Boltzmann method,’’
order accuracy for the 3-D channel flows with t ranging Phys. Fluids 7, 203 ~1995!.

Phys. Fluids, Vol. 9, No. 6, June 1997 Q. Zou and X. He 1597

Copyright ©2001. All Rights Reserved.


3 12
D. W. Grunau, ‘‘Lattice methods for modeling hydrodynamics,’’ Ph.D. H. Chen, S, Chen, and W. H. Matthaeus, ‘‘Recovery of Navier–Stokes
thesis, Colorado State University, 1993. equations using a lattice-gas Boltzmann method,’’ Phys. Rev. A 45, 5771
4
P. A. Skordos, ‘‘Initial and boundary conditions for the lattice Boltzmann ~1992!.
method,’’ Phys. Rev. E 48, 4823 ~1993!. 13
Y. H. Qian and S. A. Orszag, ‘‘Lattice BGK models for Navier–Stokes
5
T. Inamuro, M. Yoshino, and F. Ogino, ‘‘A non-slip boundary condition equation,’’ Europhys. Lett. 21, 255 ~1993!.
for lattice Boltzmann simulations,’’ Phys. Fluids 7, 2928 ~1996!. 14
S. Hou, Q. Zou, S. Chen, G. D. Doolen, and A. C. Cogley, ‘‘Simulation of
6
R. S. Maier, R. S. Bernard, and D. W. Grunau, ‘‘Boundary conditions for cavity flow by the lattice Boltzmann method,’’ J. Comput. Phys. 118, 329
the lattice Boltzmann method,’’ Phys. Fluids 8, 1788 ~1996!. ~1995!.
7 15
S. Chen, D. O. Martinez, and R. Mei, ‘‘On boundary conditions in lattice Q. Zou, S. Hou, S. Chen, and G. D. Doolen, ‘‘An improved incompress-
Boltzmann methods,’’ Phys. Fluids 8, 2527 ~1996!. ible lattice Boltzmann model for time-independent flows,’’ J. Stat. Phys.
8
Q. Zou, S. Hou, and G. D. Doolen, ‘‘Analytical solutions of the lattice 81, 35 ~1995!.
Boltzmann BGK model,’’ J. Stat. Phys. 81, 319 ~1995!. 16
R. Cornubert, D. d’Humières, and D. Levermore, ‘‘A Knudsen layer
9
X. He, Q. Zou, L. S. Luo, and M. Dembo, ‘‘Analytic solutions of simple theory for lattice gases,’’ Physica D 47, 241 ~1991!.
17
flows and non-slip boundary condition for the lattice Boltzmann BGK I. Ginzbourg and P. M. Adler, ‘‘Boundary flow condition analysis for the
model,’’ J. Stat. Phys. 87, 115 ~1997!. three-dimensional lattice Boltzmann model,’’ J. Phys. II France 4, 191
10
S. Chen, H. Chen, D. O. Martinez, and W. H. Matthaeus, ‘‘Lattice ~1994!.
18
Boltzmann model for simulation of magnetohydrodynamics,’’ Phys. Rev. D. R. Noble, J. G. Georgiadis, and R.O. Buckius, ‘‘Direct assessment of
Lett. 67, 3776 ~1991!. lattice Boltzmann hydrodynamics and boundary conditions for recirculat-
11
Y. Qian, D. d’Humières, and P. Lallemand, ‘‘Recovery of Navier–Stokes ing flows,’’ J. Stat. Phys. 81, 17 ~1995!.
equations using a lattice-gas Boltzmann method,’’ Europhys. Lett. 17, 479 19
F. M. White, Viscous Fluid Flow ~McGraw-Hill, New York, 1974!, p.
~1992!. 123.

1598 Phys. Fluids, Vol. 9, No. 6, June 1997 Q. Zou and X. He

Copyright ©2001. All Rights Reserved.

Anda mungkin juga menyukai