You are on page 1of 5

2D flow around a circular cylinder using lattice Boltzmann method (LBM)

Rory Locke
School of Natural Sciences, University of California, Merced, California 95344, USA
(Dated: December 16, 2016)

INTRODUCTION

The study of the flow around a cylinder is a fundamental fluid mechanics problem. The practical applications
range from fields such as airfoils, submarines, bridges,
and sky scrapers. In its most elementary form the flow
around a cylinder may be modeled using Laplaces equation. Here the flow is assumed to be an incompressible,
inviscid fluid with constant mass density. Far from the
cylinder, the flow is unidirectional and uniform. The flow
has no vorticity and thus the velocity field is irrotational
and can be modeled as a velocity potential. The result of
this assumption leads to symmetric flow forward and aft
of the cylinder, as well as above and below. This symmetry results in zero net drag on the cylinder, a property known as dAlemberts paradox. However, unlike an
ideal inviscid fluid, a real fluid no matter how small the
viscosity, will acquire vorticity in a thin boundary layer
adjacent to the cylinder.
To model the realistic flow of a fluid past a cylinder
the drag force on the cylinder must be accounted. This
leads to mathematical difficulties because now there is no
closed form solution for the flow with the accompanying
drag force. Numerical techniques must now be employed
to obtain solutions that closely align with experimental
results. Furthermore other difficulties arise in modeling
the flow around a cylinder with drag due to instabilities
that occur as the Reynolds number, Re = U D/, where
U is the velocity of the inlet stream, D the dimeter of
the cylinder, and the viscosity, is increased. Boundary
layer separation can occur, and a trailing wake will develop behind the cylinder. The pressure will be lower on
the wake side of the cylinder, than on the upstream side,
resulting in a drag force in the downstream direction.
Different numerical techniques have been employed with
varying degrees of success for different Reynolds numbers but few have been successful in capturing the accurate results for a wide range of Reynolds numbers. One
common approach to solve the Navier-Stokes equation, a
partial differential, macroscopic scale interpretations of
the transport equation is to use finite difference (FD) or
finite volume methods(FVM) to discretize the continuous
partial differential equation(s) (PDEs) to obtain approximate algebraic equation(s). This equation in practice
is often difficult to solve analytically due to nonlinearities, in this particular case the drag force, and also due
to complicated geometries and boundary conditions thus
creative numerical discretization schemes must be employed to achieve accurate, stable solutions that converge

to the real PDE solution.


Another less common approach is to simulate the individual fluid particles leading to a microscopic model of
the transport equation. This method is referred to as
molecular dynamics (MD) and seeks to solve Hamiltons
equation. This approach is less common in the CFD community due to the fact that individual particle positions
and velocities must be found and successively tracked
throughout the simulation. This is extremely computationally costly and time consuming for any macroscopic
system of interest.
Historically, the lattice Boltzmann method was derived
from its forerunner lattice gas automata (LGA) and in
particular from the FHP model, after the name of Frisch,
Hasslacher and Pomeau. [1] The fundamental idea behind lattice gas automata is that microscopic interactions
of artificial particles living on the microscopic lattice can
lead to the corresponding macroscopic equations to describe the same fluid flows.
Here I propose to use a third approach which bridges
the gap between the microscopic and macroscopic scale
interpretations called the Lattice Boltzmann Method
(LBM). The LBM method is considered a mesoscopic
interpretation in that it considers the behavior of a collection of particles. The fundamental idea of LBM is
to construct simplified mesoscopic kinetic models that
incorporate the essential microscopic physics that on average obey the macroscopic equations. In this paper I
will show numerical results using the LBM method to
simulate the 2D flow around a cylinder for Re = 20, 40,
100, 120, and 150 using the open source CFD-LBM solver
Palabos as well as an open Matlab script which employs
LBM to solve the same problem.
The outline of this paper is as follows. Section 2:
Mathematical Problem - I will derive the lattice Boltzmann method, the approximations used for the following simulations and accompanying boundary conditions.
Section 3: Numerical Method - I will outline the LBM
algorithm, show the physical space setup, lattice space
setup, and the non-dimensional quantities. Also, I will
show the model used for extracting forces in the LBM
method which will be used for quantitative analysis of
the coefficients of drag and lift on the cylinder to compare
with the literature. Section 3: Numerical Simulations I will show qualitative analysis of grid and domain dependence and accompanying simulations of the velocity
fields. Section 4: I will show the results from my simulations and compare them to experimental images as well
as images from simulations performed using the Finite

2
Volume Method. I will compare the coefficients of drag
and lift with the literature to validate this method.
MATHEMATICAL PROBLEM

The LBM solves discrete density distribution functions


and obtains the velocities and densities as moments of
this distribution function. It can be derived by discretizing the continuous Boltzmann Transport equation:
(t + e )f = (f )

FIG. 1. Schematic diagram for the lattice discretization

(1)

where f is the particle distribution function (PDF), e


is the particle velocity, and is the collision operator.
Particle distribution functions live on lattice nodes and
can only move in discrete directions. The PDFs must
follow the discretized lattice Boltzmann equation
fi (x + tei , t + t) fi (x, t) = i (f0 , f1 , f2 , ...)

(2)

where the left hand side is equivalent to a streaming


or advection step, and the left hand side a collision
step. Now fi is the discrete particle distribution function (PDF) and ei is the discrete particle velocity. In
general the difficulty in utilizing the LBM method lies
within choosing the appropriate collision operator. Here
we use the Bhatnagar-Gross-Krook (BGK) [2] approximation to the collision operator so that Eq. 2 becomes

fi (x + tei , t + t) fi (x, t) =

[fi (x, t) fieq (x, t)]


(3)

fieq is the local is a local equilibrium value for the population of particles in the direction of link ei . The term
is a relaxation time, and is related to the kinematic
viscosity by

1
c2 t

1
(3 + )
2

(4)

where c = x
t is the lattice speed. The equilibrium particle distribution is derived from the Maxwell-Boltzmann
distribution. For an incompressible, two-dimensional
flow

FIG. 2. Schematic diagram for mid-grid bounce-back boundary condition scheme

the D2Q9 configuration the weighting factor i and the


discrete particle velocities e are given by

i= 0
4/9,
(6)
i = 1/9,
i= 1, 2, 3, 4

1/36, i= 5, 6, 7, 8

i=0
(0, 0)
ei = c (1, 0), (0, 1), (1, 0), (0, 1)
i = 1, 2, 3, 4

(1, 1), (1, 1), (1, 1), (1, 1) i = 5, 6, 7, 8


(7)
The macroscopic variables may be recovered from the
hydrodynamic moments fi . The macroscopic fluid density and momentum density are
Z
=

f de =

fieq

(8)

fieq ei

(9)



3ei u 9(ei u)2
3(u)2
fieq = i 1 + 2 +

c
2c4
2c2

(5)

where i is the weight function according to the distance


of the node from the master node of the lattice and
is the mass density of the fluid. The lattice model used
in LBM simulations are commonly referred to as DnQm
where n is the spacial dimension and m is the number
of discrete velocity directions. For the following simulations we will use the popular D2Q9 shown in Fig. 1. For

Z
u =

ef de =

X
i

In LBM simulation the boundary condition for the particle distribution function on a solid wall can be given by a
popular approach known as bounce-back scheme. [3] This
scheme is analogous to the macroscopic no slip boundary
condition is implemented for the top and bottom channel
walls as well as the cylinder. Despite the fact that this

FIG. 3. Geometry of the 2D system

produces a stair-case like boundary for curved surfaces,


for the present case this limitation does not play a significant role and is necessary to implement the momentumexchange force calculation needed for the drag and lift
coefficients outlined later. The mid-grid scheme in Fig. 2
is second order accurate. [4] The boundary conditions
for the inlet and outlet are Dirichlet, the inlet having a
Poiseuille profile and the outlet a constant pressure.

FIG. 4. Schematic diagram for the flow past an asymmetrically placed cylinder in a channel

cylinder diameter was chosen as D = 80 lattice units and


channel height H = 328 keeping a ratio of cylinder diameter to channel height at =1/4.1 for all Re numbers.
The simulations for this paper were performed using Palabos and MATLAB for the following non dimensionalized
systems setup, Fig. 4. To qualitatively compare my results to those in the literature the most common way is
to compare the resulting drag and lift coefficients given
by

NUMERICAL METHOD - LBM

cd =

Numerical Method

2Fx
2

(10)

U D

and
Implementation of the LBM scheme is as follows:
cl =

Rescale the problem from physical space to dimensionless system.


Discretize the dimensionless system by the lattice
spacing x and time t.
Construct the discrete particle distrubution functions fi from the macroscopic parameter values
and u
Streaming step - move fi to the next lattice nodes.
Calculate the macroscopic parameter variables.
Determine the fieq from macroscopic parameter
variables.
Collision step - determine changes in direction
along lattice following the conservation laws.
Repeat from streaming step until desire time span
is achieved.
The physical setup follows that of Schafer et al. [?
] The physical parameters are kinematic viscosity =
2
kg
103 ms and fluid density = 1.0 m
3 . To rescale the physical space into dimensionless space I followed the outline
by Latt [6]. The characteristic length l0 is chosen to be
the diameter of the cylinder. Given the average velocity U = 32 Um , where the mean velocity Um = 0.3 m
s , the
Reynolds number is found to be Re = 20. From this we
determine that the characteristic time, t0 = 0.5s. The

2Fy
2

(11)

U D

This requires the calculations of the force on the cylinder. Normally this is done by integrating the stress over
the cylinder, but in the LBM method a different approach
is taken. Here I implement the momentum-exchange
method to compute the force of the fluid on the cylinder. This method states that the total force acting on a
solid surface is given by Mei et al. [7]
F =

Nd
XX

ei [fi (xb , t)+fi (xb +ei t, t)][1w(xb +ei )]

xb i=1

x
t

(12)
xb is the position of lattice nodes on the boundary, Nd
is the number of non-zero lattice velocity vectors and
w(xb + ei ) is a binary variable which denotes a 0 for a
fluid node,xf , and a 1 for a boundary node xb . The inner
summation calculates the momentum exchange between
solid nodes and all possible neighboring nodes around
that solid. The outer summation calculates the force
contributed by all boundary nodes .

Numerical Simulations

This section will demonstrate the dependence of the


LBM scheme to grid and resolutions sizes. Accuracy of
the lattice Boltzmann method was briefly explored by

FIG. 7. Streamline plots numerical and experimental. Top


Row: Re = 0.16. Bottom Row: Re = 40.

FIG. 8. Velocity plots LBM and FVM. Re = 150


FIG. 5. Contour plots showing domain independence for
grids: 400 x 100, 800 x 200,1600 x 400 from top to bottom.
Re = 120

Fig. 5 and Fig. 6. Fig. 5 shows velocity contour plots


for Re =120. The aspect ratio of was held constant at
1/4.1 and the domain size was varied. The flow dynamics obtained are qualitatively similar for varying domain
sizes. Fig. 6 shows velocity contour plots for Re =100.
t
For Ulb = x
[6], x was varied and subsequently Ulb for
different lattice spacings taking care not to surpass a lattice speed that would be greater than the speed of sound.
The flow dynamics obtained are qualitatively similar for
varying grid sizes.

RESULTS AND DISCUSSION

FIG. 6. Contour plots showing grid independence for Re =


100 and Ulb = 0.1, 0.15, 0.2 from top to bottom.

Maier & Bernard [8] who noted that in general, the accuracy of the method is moderated by several factors including spatial resolution, the Mach number, and the lattice mean free path. The LBM is limited for flows in the
subsonic region and does not allow for supersonic flows.
This leads to the relation that Ulb must be less than the
speed of sound. With this in mind the domain and grid
sized were varied and the qualitative results shown in

Comparison of streamlines to those of experiments by


Van Dyke [9] show good agreement as shown in Fig. 7.
The top row shown simulations in the left column and
the accompanying experimental images in the right. The
top row shows results for a low Re number, 0.16 in which
a creeping flow shows smooth streamlines all the way
around the cylinder. This image demonstrates a close
example of an ideal potential flow in which the Re is zero
due to the flow being inviscid. The Re was increased to
40 for the bottom row in Fig. 7. Here you can clearly
see the vortex structures in the trailing wake behind the
cylinder. This flow is still steady but approaching the
critical Reynolds number, Rc, in which the first instability occurs and the laminar steady flow transitions into a
laminar unsteady flow. This results in periodic shedding
of the vortex structures from the top and bottom of the
cylinder.

5
calculation of the force from the momentum exchange
method. The lift coefficient shows similar behavior oscillating around zero but have a finite non-zero average.

FIG. 9. Streamline plots numerical and experimental. Top


Row: Re = 0.16. Bottom Row: Re = 40.

Drag coefficent vs. time


2.87

2.86

Cd, drag coefficient

2.85

2.84

2.83

2.82

2.81

2.8

2.79

2.78
2.4

2.6

2.8

3.2

3.4

t, time step

3.6

3.8

4.2

4.4
10 4

CONCLUSION

The LBM modeled applied to the benchmark case of


flow around a 2D cylinder for various Reynolds numbers
has proven to be a useful method in modeling computational fluid flows. Its advantages of being able to handle
complex boundary conditions and its ability to be highly
parallelizable make it appealing in the CFD community.
Much research has been done and continues in making
the method more robust through unstructured meshes
and new boundary condition techniques. In all the LBM
method has proven to be as competitive to previous FDM
and FVM method schemes. This project has allowed me
to expand my computational skills with a new platform
and exposed me to new programs such as Palabos and
Paraview. Also, this project has been a good introduction to the LBM numerical technique and is something I
hope to implement in future research.

FIG. 10. Plot showing the drag coefficient as a function of


time for Re = 100.

Further comparison was drawn between the LBM


method and other numerical schemes, in particular the
FVM. Fig. 8 shows a comparison between two velocity
fields from a Re = 150 simulation. The vortex shedding
and velocity magnitudes shown similar results. [10] Fig. 9
shows a comparison between to streamline plots from another FVM simulation by Rahman et. al. [11]. Here the
Re = 100 and both methods were able to capture the
vortex structures in the trailing wake of the cylinder. A
complete analysis of a numerical method modeling the
flow around a cylinder wouldnt be complete without a
calculation of the drag and lift coefficients for different Re
numbers. These simulations were setup to follow Schafer
et al. [5] in which he benchmarked computations of laminar flow around a cylinder for 2D and 3D systems. For
2D systems as outlined in Numerical Methods it was observed for a Re = 20 the drag coefficient ranged from
5.57-5.59. Also for a Re = 100 the drag coefficient ranged
from 3.22-3.24. My analysis showed drag coefficients of
5.21 and 2.84 for Re = 20 and 100 respectively. Fig. 10
shows the evolution of the drag coefficient over time for
Re = 100. The oscillatory behavior is due to the unsteady nature of the flow and the resulting periodic vortex shedding. The average value is lower than the range
measured by Schafer, this is in part do to not running the
simulation long enough to ensure the transient behavior
has subsided and the flow reached a steady, though oscillatory, state. The other reason is for the rather naive

Rlocke@ucmerced.edu
[1] U. Frisch, B. Hasslacher, and Y. Pomeau. Lattice-gas
automata for the NavierStokes equation Phys. Rev. Lett.,
56(14):1505 - 1508, Apr 1986
[2] P.L. Bhatnagar; E.P. Gross; M. Krook. A Model for Collision Processes in Gases. I. Small Amplitude Processes
in Charged and Neutral One-Component Systems. Physical Review. 94 (3): 511 - 525, 1954
[3] D.A. Perumal, and A.K. Dass. Simulation of Incompressible Flows in Two-Sided Lid-Driven Square Cavities, Part
II-LBM, CFD Letters, 2 , 1, 25 - 38, 2010.
[4] Q. Zou, and X. He. On pressure and velocity flow boundary conditions and bounce back for the lattice Boltzmann
BGK model, Phys. Fluids, 9, 1591 - 1598, 1997.
[5] S. Turek and M. Schafer. Recent benchmark computations
of laminar flow around a cylinder. 1996.
[6] Latt, J. Choice of units in lattice Boltzmann simulations.
wiki.palabos.org/m edia/howtos : lbunits.pdf , 2008.
[7] Yu, D., Mei, R., and Luo, L.S., Viscous flow computations with the method of Lattice Boltzmann equation,
Progress in Aerospace Sciences, 39 (2003), pp. 329 - 367.
[8] Robert S. Maier and Robert S. Bernard, Accuracy of the
Lattice-Boltzmann Method Int. J. Mod. Phys. C 08, 747
1997
[9] Milton Van Dyke, An Album of Fluid Motion, Stanford,
California, 4th edition, 1988.
[10] R., Amiralaie, S., Jabbari, G., Amiralaie, S. Numerical Study of Unsteady Laminar Flow around a Circular
Cylinder, Journal. Civil Eng. Urban. 2(2): 63-67. 2012
[11] Rahman, M., Karum, M., Alim, A. Numerical Investigation of unsteady flow past a circular cylinder using 2D
finite volume method, Journal of Naval Architecture and
Marine Engineering 4 (2007) 27-42

You might also like