Upload
lasierra
View
244
Download
2
Embed Size (px)
Citation preview
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
1/81
A Thesis
entitled
Towards Development of a Multiphase Simulation Model Using LatticeBoltzmann Method (LBM)
by
Narender Reddy Koosukuntla
Submitted to the Graduate Faculty as partial fulfillment of the requirements for
the Master of Science Degree in Mechanical Engineering
Dr. Sorin Cioc, Committee Chair
Dr. Ray Hixon, Committee Member
Dr. Yong Gan, Committee Member
Dr. Patricia Komuniecki, DeanCollege of Graduate Studies
The University of Toledo
December 2011
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
2/81
Copyright 2011, Narender Reddy Koosukuntla
This document is copyrighted material. Under copyright law, no part of thisdocument may be reproduced without the expressed permission of the author.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
3/81
iii
An Abstract of
Towards Development of a Multiphase Simulation Model Using LatticeBoltzmann Method (LBM)
by
Narender Reddy Koosukuntla
Submitted to the Graduate Faculty as partial fulfillment of the requirements forthe Master of Science Degree in Mechanical Engineering
The University of ToledoDecember 2011
Lattice Boltzmann Method is evolving as a substitute to the prevalent and
predominant CFD modeling especially in cases such as multiphase flows, porous
media flows and micro flows. This study is aimed at developing simulation
model for multiphase flows for practical applications such as cavitation in a
journal bearing or lubrication of micro contact. The code is first validated against
benchmark single phase flows like Poiseulle flow and flow over a cylinder. In the
process, various boundary conditions like velocity, pressure, out-flow, no-slip
and periodic boundary conditions are tested. Finally, the Shan-Chen model for
multiphase physics, which is based on the interaction force between the fluid
particles, is incorporated into the code and is validated.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
4/81
To my family and my teachers
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
5/81
v
Acknowledgements
I express my sincere gratitude to my advisor Dr.Sorin Cioc for his great
support while working on this thesis. It took me some time in understanding the
Lattice Boltzmann Method and collecting the literature related to it. Dr. Cioc was
very patient, motivated me whenever I was down and helped me in
understanding the concepts better. Without his encouragement and guidance
this thesis would not have been possible.
I sincerely thank Dr. Ray Hixon for his valuable lectures in CFD and for
being on the committee. The assignments and project work by Dr. Hixon gave a
foundation to me in numerical methods and programming. I sincerely thank Dr.
Yong Gan for being on the committee. Dr. Gan was encouraging and positive
about the outcome of this work.
I would like to thank the administrators and members of the forum at
www.palabos.org for their timely replies. I thank Dr.Michael Sukop (Florida
International University) for replying to my emails on questions related to LBM.
I am thankful to my friend Dr.Vasanth Allampalli for all the exciting discussions
we had. Finally, I take this opportunity to thank my family and all my friends for
their unconditional love and support.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
6/81
vi
Contents
Abstract............................................................................................................................. iii
Acknowledgements ......................................................................................................... v
Contents ............................................................................................................................ vi
List of Tables .................................................................................................................... ix
List of Figures ................................................................................................................... x
1 Background ................................................................................................................... 1
1.1 Introduction ....................................................................................................... 1
1.2 Lattice Gas Automata ....................................................................................... 2
1.3 Evolution of Lattice Boltzmann Method ....................................................... 4
1.4 Distribution Functions ..................................................................................... 5
2 Lattice Boltzmann Method ......................................................................................... 8
2.1 Boltzmann Equation ......................................................................................... 8
2.2 BGK Collision Operator ................................................................................... 9
2.3 Lattice Boltzmann Equation .......................................................................... 10
2.3.1 Equilibrium distribution functions .................................................... 12
2.3.2 D2Q9 Model .......................................................................................... 13
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
7/81
vii
2.3.3 Recovering Navier-Stokes Equations ................................................ 15
2.4 Computational Approach .............................................................................. 16
2.5 Boundary Conditions ..................................................................................... 18
2.5.1 No-Slip Boundary Conditions ............................................................ 19
2.5.2 Zou-He Velocity and Pressure Conditionss ..................................... 20
2.5.3 Periodic boundary conditions ............................................................ 24
2.6 Incompressible D2Q9 Model ......................................................................... 25
2.6.1 Zou-He Boundary conditions for Incompressible D2Q9 ............... 26
3 Coding, Validation & Verification ........................................................................... 28
3.1 About the Code ............................................................................................... 28
3.2 Velocity Driven Poiseulle Flow ..................................................................... 29
3.2.1 Conversion to Lattice Units ................................................................. 30
3.2.2 Analytical Solution ............................................................................... 32
3.2.3 Boundary Conditions ........................................................................... 33
3.2.4 Results ..................................................................................................... 34
3.3 Verification of the Order of Accuracy .......................................................... 36
3.4 Pressure driven Poiseulle Flow ..................................................................... 39
3.4.1 Boundary Conditions ........................................................................... 39
3.4.2 Analytical Solution ............................................................................... 40
3.4.3 Results ..................................................................................................... 40
3.5 Flow over a Cylinder (Re=100) ..................................................................... 43
3.5.1 Parameters .............................................................................................. 43
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
8/81
viii
3.5.2 Boundary Conditions ........................................................................... 45
3.5.3 Results ..................................................................................................... 45
4 Multi-Phase LBM ....................................................................................................... 50
4.1 Introduction ..................................................................................................... 50
4.2 Shan-Chen Model............................................................................................ 50
4.3 Validation ......................................................................................................... 54
4.4 Fluid-Wall Interaction .................................................................................... 56
4.5 Parabolic Slider Bearing ................................................................................. 57
4.5.1 Results ..................................................................................................... 58
5 Conclusions & Future Work ..................................................................................... 62
References ....................................................................................................................... 66
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
9/81
ix
List of Tables
3.1 Table showing the parameters for Velocity driven Poiseulle flow. 30
3.2 Table showing the combinations of width and velocity (Re=100) for avelocity driven Poiseulle flow ... 37
3.3 Study of convergence factor ... 38
3.4 Table showing the parameters for pressure driven Poiseulle flow . 39
3.5 Table showing the parameters for flow over a cylinder 43
4.1 Table showing the adsorption coefficient for various contact angles. 56
4.2 Table showing the parameters for Parabolic Slider bearing ....... . 58
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
10/81
x
List of Figures
1-1 Square lattice showing links from node A to its neighboring nodes . 2
1-2 Triangular lattice showing links from node A to its neighboring nodes .. 3
2-1 Velocities and their directions in D2Q9 model . 15
2-2 Figure showing collision and propagation .... 18
2-3 Figure showing missing distribution functions on boundary nodes 19
2-4 Figure depicting bounce back method for No-Slip velocity condition . 19
2-5 Missing distribution functions on the inlet boundary . 21
2-6 Figure showing the periodic boun dary .. 24
2-7 Periodic boundaries after implementation.. 24
3-1 Figure showing subroutine with parallelization using OpenMP 29
3-2 Figure depicting the resultant velocity at steady state in a velocitydriven Poiseulle flow. 34
3-3 Plot showing flow development in the channel across various crosssections for velocity driven Poiseulle flow 35
3-4 Comparison between analytical and numerical solution for velocitydriven Poiseull e flow 36
3-5 Plot of Error v.s. number of grid points along the width of channel forverification of accuracy .. ... 38
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
11/81
xi
3-6 Residual plot for pressure driven Poiseulle flow.. 40
3-7 Figure showing the resultant velocity for a pressure driven Poiseulleflow .. 41
3-8 Density variation in a pressure driven Poiseulle flow 42
3-9 Comparison between analytical and numerical solution for pressuredriven Poiseulle flow. 42
3-10 Figure showing geometrical specifications for flow over a cylinder .. 43
3-11 Inlet parabolic velocity profile for flow over a cylinder 44
3-12 Instantaneous velocity contours for flow over a cylinder ... . 45
3-13 Instantaneous velocity contours in the vicinity of the cylinder 46
3-14 Coefficient of drag, , for flow over a cylinder (asymmetrically placedin the channel) .... 46
3-15 Coefficient of drag, , for flow over a cylinder (symmetrically placed inthe channel) ..... 47
3-16 Coefficient of lift, , for flow over a cylinder (symmetrically placed inthe channel) ..... 48
3-17 Figure showing vorticity for flow over an asymmetrically placedcylinder in the channel .. 49
4-1 Figure showing Equation of State for Shan-Chen multiphase model 54
4-2 Normalized density pictures showing phase separation at various timesteps with the random variable 55
4-3 Normalized density pictures showing phase separation at various timesteps with the random variable .. 56
4-4 Normalized density pictures showing the formation of contact angleswith different adsorption coefficients.. 57
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
12/81
xii
4-5 Figure showing the geometry of the slider bearing... 58
4-6 Figure showing normalized density in the slider bearing at various timesteps .. 59
4-7 Figure showing the condensation in the slider bearing 60
4-8 Figure showing high pressure region in slider bearing 60
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
13/81
1
Chapter 1
Background
1.1 Introduction
The Navier-Stokes equations are solved in standard CFD. These equations
are set of partial differential equations which are non-linear in nature and
derived based on the laws of conservation of mass, momentum and energy [1].
These equations are macroscopic in nature, which assumes that the fluid is a
continuum [1]. Solving these equations numerically requires discretization (finite
difference, finite volume, or finite element) of the partial differential equations.
Numerical instabilities are the major issue in these methods [2].
Molecular Dynamics (MD) is a microscopic approach where the fluid
dynamics is modeled based on the collisions and other interactions between the
individual molecules [3]. In these models the macroscopic properties are
recovered using statistical mechanics [3]. The major drawback in MD models is
excessive usage of the computing resources and their limitation to extend to
larger domains [3]. Lattice Gas Automata (LGA), one of the Molecular Dynamics
model forms the precursor for Lattice Boltzmann Method (LBM) which is
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
14/81
2
evolving as a substitute to the prevalent and predominant CFD [4]. In this
chapter, an insight into LGA and the evolution of the LBM is discussed briefly.
1.2 Lattice Gas Automata
Lattice is a regular arrangement of primitive shapes. There are many
kinds of lattice in two dimensions where the primitive shape can be rectangle,
triangle, regular hexagon etc. A square lattice is shown in Figure 1-1.
Figure 1-1: Square lattice showing links from node A to its neighboring
nodes. This lattice is used in the HPP model.
Lattice Gas Automata (LGA) deals with a group of particles residing on
the lattice nodes and colliding with particles located at the neighboring nodes
while conserving the mass and the momentum. Each particle is assigned a
velocity whose direction is along the link connecting one of the neighboring
nodes. Thus the particles possess momentum and the collisions between themare governed by a set of rules which change the velocities of the particles while
conserving the total momentum of all the particles summed up at a node. The
particles then propagate to their surrounding nodes according to the direction of
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
15/81
3
their new velocities. During each time step iteration, at each lattice node, there is
collision between the particles followed by propagation. These kinds of models
were first proposed by Hardy, Pomeau and de Pazzis [5] [6] in 1973. This model,
named HPP after them, was aimed at recovering the Navier-Stokes equations,
but failed to do so. Figure 1-1 shows the lattice used in the HPP model.
Figure 1-2: Triangular lattice showing links from node A to itsneighboring nodes. This lattice used in the FHP model.
Frisch, Hasslacher and Pomeau in 1986 have found out that, in addition to
the conservation of mass and momentum, in order to ensure isotropy the
underlying lattice must be sufficiently symmetric [7]. They replaced the square
lattice used in the HPP model with a triangular lattice shown in Figure 1-2 which
gives hexagonal symmetry. This model was named after them as FHP. Further
details about these models are not relevant to the present scope of the thesis and
will not be discussed here.
LGA models are basically described by the kinetic equation
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
16/81
4
(1.1)
where is a boolean in direction having a velocity of and is the collision
function, which is dependent on the LGA model. Vectors from here on are
represented using bold letters, e.g. in the above equation is a vector and is a
scalar.
In these models the density is calculated by summing up the total number
of particles at each node.
(1.2)
Similarly the momentum density is given by
(1.3)
where is the macroscopic velocity (mean velocity of all the particles).
1.3 Evolution of Lattice Boltzmann Method
The validity of the LGA was tested by many researchers who have
simulated specific flows which have exact analytical solutions [8] [9] [10]. The
microscopic nature of the LGA resulted in the simulations to be intrinsically
noisy [10] [11] and proved to be costly in terms of memory and time taken for the
computations [10]. In order to eliminate this noise, McNamara and Zanetti in
1988 [10] have introduced the first generation Lattice Boltzmann Method (LBM),
by replacing the boolean fields in Eq. (1.1) by the single particle distribution
functions [12]
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
17/81
5
(1.4) These models will not be operated in a microscopic scale since we are not dealing
with single particles anymore. These kinds of models are called as mesoscopic
models in literature.
Though the reduction in noise was observed, these models inherited other
problems from LGA such as lack of Galilean invariance [10]. However, modern
LBMs use the Boltzmann distribution functions and are free from all the
problems which are encountered by the LGA [12]. Though LGA forms the pre-
cursor for the development of LBM, it was shown by various authors that Eq.
(1.4) can be derived through proper phase space discretization of the Boltzmann
equation. The details of one such derivation are given in Section 2.3.
For proper understanding of the Lattice Boltzmann Method it is necessary
to get an insight into the distribution functions. Some brief notes on the Maxwell-Boltzmann distribution functions are presented in the next section.
1.4 Distribution Functions
An insight into the Maxwell distribution functions is given in the online
reference [13]. Excerpts from this reference are put in this section for easy
accessibility.The distribution function is defined as the fraction of particles in a
certain location of a container of gas having velocities between and in
direction. The total fraction of particles which have the velocities in between
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
18/81
6
and , and , and is given by . Theappropriate form of the particle distribution function is proposed by Maxwell
using his symmetry argument.
(1.5) In a three dimensional velocity space the magnitude of velocity is given by
(1.6)
The above equation actually represents a sphere centered at origin with the
surface area . The distribution function corresponding to all the
combinations of the triples which yield the same speed is given by
(1.7) All these fractions corresponding to add up to one
(1.8)
Solving the definite integral Eq. (1.8), a relation between the constants and isderived as
(1.9) The average kinetic energy per particle is given by
(1.10)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
19/81
7
(1.11)
where is the mass of the particle. On the other hand, the average kinetic
energy in-terms of temperature and Boltzmann constant is given as
(1.12)
Therefore the value of B is
(1.13)
The final result after substituting the values of
in the Eq. (1.7) is given as
(1.14) If the velocities are considered instead of the speeds, the distribution function is
given as
(1.15)
where is the velocity vector.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
20/81
8
Chapter 2
Lattice Boltzmann Method
2.1 Boltzmann Equation
The Boltzmann equation is a partial differential equation which governs
the transport phenomenon of the density distribution function. This function is
defined as , which denotes the mass density at location contributedby the set of particles having the velocity in range about . These particles
move to a location after time has elapsed. The number of
particles in this set doesnt change in the absence of collisions [14].
(2.1) If collisions between particles are accounted then the number of particles in the
final set will change and is given by introducing a collision function whichdefines the rate of change of the distribution function
at a fixed point [14].
(2.2)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
21/81
9
In the limit , the equation transforms to
(2.3) where the total derivative is defined as
(2.4) The moments of the distribution function over velocity space are taken to obtain
the macroscopic quantities such as density, momentum density, and internal
energy [14]
(2.5)
(2.6)
(2.7)
where is the macroscopic velocity vector and is the specific internal energy.
2.2 BGK Collision Operator
In general, the Boltzmann equation Eq. (2.3) is difficult to solve even for
simple physical systems, mainly because of collision terms [15]. Bhatnagar, Gross
and Krook [15] in 1954 have replaced the troublesome collision function with a
mathematically simple relaxation term based on the fact that the collisions tend
to relax the distribution function to equilibrium.
(2.8)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
22/81
10
The relaxation time is given by and is the equilibrium distribution function.This equilibrium distribution function has a Maxwell-Boltzmann distribution of
velocities and is proportional to the density [15].
2.3 Lattice Boltzmann Equation
As discussed in Section 1.2 and 1.3, the Lattice Boltzmann Equation (LBE)
has its roots from the LGA. It is also possible to derive the LBE by appropriate
phase discretization of the continuous Boltzmann equation (2.3) [16] [17]. Finite
set of velocities along the links of the lattice are introduced and the
distribution function is transformed to corresponding discretedistribution functions by the authors of reference [17] as follows:
In order to preserve the conservation laws, when discretized, these
moments must be preserved exactly [17]. In general, the moments of the
distribution function are given by
(2.9) where is a polynomial in .
The integral Eq. (2.9) can be evaluated by the quadrature as
(2.10)
where are the weights and is the number of abscissas chosen (discrete
velocities).
The integrals Eq. (2.5)-(2.7) are thus transformed into summation:
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
23/81
11
with , the mass density is given as
(2.11)
with , the momentum density is given as
(2.12) with , the internal energy is given as
(2.13)
where
(2.14) (2.15)
Since are constants, the discrete form of the Boltzmann equation Eq. (2.3)
using the BGK collision operator is then given by
(2.16) First order discretization of the above equation with lattice spacing and time
step [18] leads to
(2.17)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
24/81
12
(2.18) where the velocity and the frequency is related to the
dimensionless relaxation time [16] [17]. In the Eq. (2.18) the unknowns
are and the known function is .2.3.1 Equilibrium distribution functions
The equilibrium distribution functions for modern LBM are chosen as the
Maxwell distribution functions discussed in Section 1.4
(2.19) where for a two dimensional model which is used in the current work. The
speed of sound, , can be related to the constants Boltzmann constant ,
temperature and mass as
(2.20)
Expanding the Eq. (2.19) in the low-Mach number limit [17]:
(2.21) The Taylor series expansion of is given as
(2.22)
Using Eq. (2.22) we have
(2.23)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
25/81
13
(2.24)
Based on the above equations, the equilibrium distribution function expanded in
the low Mach number limit is approximated as [17]
(2.25) For the velocity we have
(2.26) According to Eq. (2.15)
The weights are derived based on the model chosen. Different models exist
based on the dimension of the problem, the number of discrete microscopic
velocities and the lattice itself [19]. The physical point in the discretized
physical/temporal space corresponds to a point on the lattice.
2.3.2 D2Q9 Model
D2Q9 model is referred as a two dimensional model with square lattice
and nine-velocities. As discussed in the previous section the weights are
specific to the model. These weights are derived by evaluating the moments of
equilibrium distribution function given in Eq. (2.25). Substituting the equilibrium
distribution function Eq. (2.25) into Eq. (2.9)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
26/81
14
(2.27)
For a two dimensional model the polynomial is set to [17]
(2.28)
This assumption, in general, is sufficient to calculate the required moments (mass
density, momentum density and internal energy) [17]. Evaluating the integral
given in Eq. (2.27) it was shown [17] that the equilibrium distribution function is
given by
(2.29) where
(2.30)
and the velocities of this model have three distinct values of the magnitudes
given by (See also Figure 2-1) (2.31)
The value of is chosen as where is the lattice spacing and is the
time step. For this model, the speed of the sound is related to the lattice velocity
as
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
27/81
15
(2.32) The equilibrium distribution function for the finite set of velocities of D2Q9
model is then given as
(2.33)
Figure 2-1: Velocities and their directions in D2Q9 model. Thedistribution functions are labeled in blue color.
2.3.3 Recovering Navier-Stokes Equations
Application of the Chapman-Enskog expansion [14] to the lattice
Boltzmann equation for D2Q9 model in the incompressible limit yields the
Navier-Stokes equations [12] [4]. The corresponding shear viscosity is
(2.34)
and the equation of state is
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
28/81
16
(2.35)
where is the speed of the sound.
Though a first order discretization is used in deriving the Lattice Boltzmann
equation, Eq. (2.18), the method is second order accurate in both space and time
[20]. The viscosity of the Boltzmann Equation, Eq. (2.3) with BGK collision
operator, is ; By correcting this viscosity to Eq. (2.34) for the Lattice
Boltzmann Equation, the truncation errors are corrected [20].
2.4 Computational Approach
In order to make the model computationally simple, the time step and
the grid spacing are chosen to be equal to one time step and one lattice
unit in a system of units specific to the LBM called lattice units. The other
dependent parameters are scaled appropriately. Once the computations are
done, the results are scaled back. Detailed explanation on these steps is given in
the section 3.2.
Eq. (2.18) can be written as
(2.36) where
(2.37)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
29/81
17
(2.38)
The direction values of are given as:
(2.39)
The direction values of are given as:
(2.40)
Re-arranging the terms of Eq. (2.36) with we have
(2.41) The value of (in lattice units) is used from here on. The above equation is
solved in two steps namely, collision and propagation (see Figure 2-2). The right
side of the equation corresponds to the collision and the left side corresponds to
propagation. The two steps are written as
(2.42) (2.43)
where
is the post collision value. The collision step, Eq. (2.42) is local to
the node which makes it easy to implement using parallel computing
techniques.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
30/81
18
Figure 2-2: Figure showing collision and propagation. The first step,collision is local to node A. The post collision distributionfunctions (maroon color) are propagated to the neighboringnodes as shown in the last figure
The boundary nodes do not have all the neighboring nodes, hence there are some
missing distribution functions on these nodes after the propagation step is
carried out. These missing distribution functions are derived from the various
types of boundary conditions needed to solve the problem.
2.5 Boundary Conditions
The macroscopic quantities such as are computed by the summation
of the distribution functions as mentioned in Eq. (2.11-2.13). Whereas on the
boundary nodes we have the macroscopic quantities which need to be
transformed into the missing distribution functions. Figure 2-3 shows the
missing distribution functions on the boundary nodes after the propagation step.
Boundary conditions like no-slip, constant velocity inlet, constant pressure,
outflow etc., are implemented in different ways by various authors. Some of
these boundary conditions which have been used in this thesis are explained
below.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
31/81
19
Figure 2-3: Figure showing missing distribution functions on boundary
nodes. The nodes marked with B are the boundary nodes andthe ones marked with I are the interior nodes. Not all nodes areshowing the distribution functions for the purpose of clearillustration.
2.5.1 No-Slip Boundary Conditions
The no-slip boundary condition used in this work is achieved using the
bounce-back method. This method is relatively easy to implement and is suitablefor any kind of geometries.
Figure 2-4: Figure depicting the bounce back method. The distributionfunctions are reversed.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
32/81
20
The fundamental concept of the bounce back method is that the out-going
distribution functions are reflected back into the domain. Based on the method of
this reflection these boundary conditions are classified into two types, namely
full-way bounce back and the half-way bounce back [21].
In a full-way bounce back method the collision step is skipped on the wall
nodes, instead the direction of the distribution functions on the wall nodes is
reversed [21]. The streaming step is carried out as usual. On any wall node
the collision step in Eq. (2.42) is replaced by the following equation
(2.44) where is the opposite direction of . In a half-way bounce back method the
collision step is carried out as usual but the incoming distribution functions on
the wall nodes at time are replaced by the outgoing distribution functions on
the wall nodes at time [21]. Thus, in a half-way bounce back method, thecollision step is un-altered. In both the methods of implementing the bounce
back boundary conditions the no-slip condition is achieved half-way between the
wall and the fluid node [22].
2.5.2 Zou-He Velocity and Pressure Conditionss
Zou and He in 1997 have proposed a method of specifying the velocity and
pressure on the boundaries [23]. In this method only the missing distribution
functions are derived from the specified macroscopic pressure or velocity. For an
inlet boundary node , after the streaming step has been carried out, it is seen in
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
33/81
21
Figure 2-5 that the distribution functions are missing. The values of themissing distribution functions in-terms of the known distribution functions and
the given inlet velocity are derived by Zou and He [23] as follows.
Figure 2-5: Inlet boundary conditions. Figure A shows the missingdistribution functions at the inlet. Figure B shows thepopulated distribution functions (in green) with the Zou-Hemethod.
From Eq. (2.11):
(2.45) where is the intermediate calculated density
From Eq. (2.12):
where is the component of the inlet velocity and is the component of
the lattice velocity in direction. Using Eq. (2.39) yields
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
34/81
22
(2.46)
Similarly, in direction (parallel to the boundary)
where is the component of the inlet velocity. With for the inlet
velocity condition,
(2.47) From Eq. (2.45) and Eq. (2.46)
(2.48) An assumption that the non-equilibrium part of distribution functions normal to
the boundary are bounced back is made by Zou and He [23]
From the Eq. (2.33)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
35/81
23
Thus the value of the distribution function is given as
(2.49) With known and solving Eq. (2.43) and (2.44), the values of are given as (2.50)
(2.51)
It should be observed that the inlet velocity is normal to the boundary and does
not have any directional component.
Similarly the pressure boundary condition is implemented by substituting
the missing distribution functions as follows:
(2.52)
(2.53) (2.54)
(2.55)
Where is the calculated intermediate velocity and is the density related
to inlet pressure through the equation of state (EOS).
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
36/81
24
2.5.3 Periodic boundary conditions
Unlike conventional CFD, periodic boundary conditions are implemented
in a different fashion in LBM.
Figure 2-6: Figure showing the periodic boundary.
Figure 2-7: Figure showing the periodic boundary condition afterimplementation. The corner nodes A, B, C, D still does nothave all the distribution functions.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
37/81
25
The post collision distribution functions on the boundary nodes are copied
onto the other periodic boundary as if the propagation step was carried out.
Figure 2-6 below demonstrates how the post collision distribution functions on
the right boundary are shifted to the left periodic boundary. Once the periodic
boundary condition is implemented, the corner nodes still have missing
distribution functions (nodes in Figure 2-7). These missing distributionfunctions are calculated from the boundary conditions on the other sides (top
and bottom).
2.6 Incompressible D2Q9 Model
He and Luo have proposed an incompressible model which reduces the
compressibility effects of the model described so far [24]. The density in
calculating the equilibrium distribution function is replaced by
(2.56)
where is the average fluid density and is the fluctuation in the density.
Hence the new equilibrium distribution function is derived by substituting the
new value of the density and ignoring the higher order terms .
(2.57)
The density and the momentum density are now given by the equations
(2.58)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
38/81
26
(2.59) It should be noted that the average fluid density is used for calculating the
momentum density. The Zou-He boundary conditions which are derived based
on the equilibrium distribution function are subject to change with this model
but the bounce back method for the no-slip boundary condition remains the
same.
2.6.1 Zou-He Boundary conditions for Incompressible D2Q9
The derivation of the boundary conditions for the incompressible model is
similar to deriving the boundary conditions mentioned in Section 2.7.2. The new
equilibrium distribution function Eq. (2.57) is used in the process. The final
equations for the velocity inlet condition are given as:
(2.60)
(2.61) (2.62) (2.63)
The final equations for the pressure inlet condition are given as:
(2.64)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
39/81
27
(2.65)
(2.66)
(2.67) (2.68)
The incompressible D2Q9 model is used for solving the Poiseulle flow and flow
over a cylinder in the next chapter.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
40/81
28
Chapter 3
Coding, Validation & Verification
3.1 About the Code
A modularized in house FORTRAN 90 code was developed. Intel Visual
Fortran for Windows was used for this purpose. Most common features of LBM,
collision, propagation, various boundary conditions, calculating macro variables
like density, velocity from the distribution functions were written as different
modules and tested.
The code reads the flow parameters like the grid dimensions, model used
(original, incompressible), number of time steps, data output variables,
dimensionless relaxation time and other problem specific constants from the
control file. Data utilities were developed to write the values to file at set
intervals. The code has the ability to write the values in *.dat and *.vtk formats.
These data files are read by software like MATLAB and ParaView to assess the
results. Problems which have analytical/experimental results like Poiseulle flow,
flow over a cylinder were solved using this code for validation.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
41/81
29
Function profiling was used to find the highly time consuming functions.
The expensive functions were parallelized using OpenMP [25]. The following
code snippet shows how the propagation function which is non local is
parallelized.
! Subroutine to stream to next nodes SUBROUTINE Stream(fplus, f, xDim, yDim)
USE LBM_Constants, ONLY : ex, ey
IMPLICIT NONE
INTEGER , INTENT (IN):: xDim, yDimDOUBLE PRECISION , INTENT (INOUT):: f(xDim,yDim,0:8)DOUBLE PRECISION , INTENT (IN):: fplus(xDim,yDim,0:8)INTEGER :: j, x, y, xnew, ynew
!$OMP PARALLEL PRIVATE(xnew, ynew) !$OMP DO DO j = 0, 8
DO x=1, xDimDO y=1, yDim
xnew = x+ex(j)ynew = y+ey(j)IF ((xnew >= 1 .AND. xnew && = && 1 .AND. ynew
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
42/81
30
chosen for this study. An incompressible LBM model was chosen as it best suits
the problem.
Table 3.1: Table showing the parameters for Velocity driven Poiseulle flow
InletVelocity Density
ChannelWidth
ChannelLength
ReynoldsNumber
3.2.1 Conversion to Lattice Units
The Reynolds number for this flow is given by
(3.1)
From the above equation the kinematic viscosity is
The parameters are converted into lattice units where the time step and the grid
spacing are and respectively. The parameters are converted directly to
lattice units from physical units. The following steps show how the physical
units (with a subscript p) are transformed to lattice units (with a subscript l).
Let the number of points in direction, which account for the width of the
channel be
The width of the channel in lattice units is with the grid spacing
. The relation between the physical grid spacing and the lattice grid
spacing is given as
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
43/81
31
(3.2)
Using the above relation the grid spacing in physical units is given as
Let the value of the dimensionless relaxation time be . Recalling the
formula for kinematic viscosity, Eq. (2.34)
In lattice units, where , the speed of sound is (inlattice units). Using these values, the value of kinematic viscosity in lattice unitsis
The relation between the viscosity in physical units and lattice units is given by
(3.3)
and therefore
The inlet velocity when converted into lattice units is given by
To scale the density, the unit for mass in lattice units is defined as and hence
the units for density in lattice units is given as and the units for pressure
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
44/81
32
is . The fluid density in lattice units is chosen based on the reference
density.
(3.4)
To verify if the transformation is correct, we calculate the Reynolds number
using the parameters in lattice units
Hence it is verified that both systems have the same Reynolds number. It is also
important to verify the Mach number in lattice units
If the Mach number is not considerably less than unity ( the simulation
might get unstable because the model recovers macroscopic equations in low-
Mach number limit. In order to reduce the Mach number we can increase the
number of grid points ( ) across the channel width or decrease the value of the
relaxation parameter . It should also be noted that when the value of the
relaxation parameter approaches , the value of the kinematic viscosity
approaches . Hence it is necessary to find an optimum set of parameter values.
The results are converted back to physical units by scaling them using .
3.2.2 Analytical Solution
The analytical solution for the Poiseulle flow with uniform velocity inlet
is given by the following equations provided as follows
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
45/81
33
The maximum centre line velocity is given as
The average velocity is given a
The velocity profile is given by,
where is the position of the top wall and is the position of the bottom
wall.
3.2.3 Boundary Conditions
The uniform inlet velocity is implemented by Zou-He Velocity boundary
conditions. No-slip condition using the bounce back method is implemented on
the walls. With the bounce back boundary conditions, the wall is situated half
way between the wall node and the neighboring fluid node. This is corrected by
taking an extra lattice unit in the width of the channel. If there are nodes along
the width of the channel, the effective channel width, which considers the
effective wall is
So, nodes are taken instead which accounts for the width of with
and . This can be avoided by using Zou-He velocity
condition as the no-slip condition and by substituting the value of velocity as
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
46/81
34
zero. In case we use the Zou-He velocity condition as the no-slip, as we are using
the Zou-He condition for the inlet velocity too, there will be insufficient
distribution functions on the corner nodes which needs special treatment. The
outflow condition used in this case is achieved by extrapolating the velocities on
the boundary and implementing these extrapolated velocities using the Zou-He
velocity boundary condition.
3.2.4 Results
The results are collected after the solution has reached a steady state. The
steady state condition is checked by calculating the residual at each time step. If
the residual is less than then the solution is expected to reach steady state.
The residual is taken on the component of the velocity and is given by the
equation below
(3.5)
Figure 3-2: Figure depicting the resultant velocity at steady state in aVelocity driven Poiseulle flow. The maximum centre linevelocity of 0.25 is achieved in the centre as expected. Thevelocity near the walls is zero.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
47/81
35
Figure 3-2 shows the flow in the channel at a steady state. The analytical and the
numerical results at a downstream location of the channel are compared to see if
they are in agreement with each other.
Figure 3-3: Flow development in the channel across various cross sectionalong -direction. The flow is developed towards a completePoiseulle profile.
Figure 3-3 shows the plots of the velocities across the channel at various
positions along the channel length. Figure 3-4 shows the comparison between
the numerical solution and the analytical solution. It is observed that the
numerical results are in good agreement with the analytical solution.
0.000
0.050
0.100
0.150
0.200
0.250
1 6 11 16 21 26 31 36 41 46 51
V e l o c
i t y
( l u / t s
)
Y Position
Flow developmentx=4
x=50
x=100
x=150
x=200
x=350
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
48/81
36
The no-slip boundary condition and the velocity inlet condition are
benchmarked with this case as the results of match with the analytical solution.
Figure 3-4: Comparison between the analytical and numerical solution.The numerical solution is in complete agreement with theanalytical solution.
3.3 Verification of the Order of Accuracy
The code is verified for its accuracy by fixing the Reynolds number in the
velocity driven Poiseulle flow. Recalling the equation for Reynolds number
0
0.05
0.1
0.15
0.2
0.25
1 6 11 16 21 26 31 36 41 46 51
V
e l o c
i t y
( l u / t s
)
Y Position
Analytical Vs. Numerical
Analytical
x=250
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
49/81
37
The values of and were varied by keeping the product and as
constant. The solutions were compared to the analytical solutions and the error
was calculated as
(3.6) where is the number of internal points in the cross section and
are the normalized analytical and numerical solutions. The numerical solution is
taken at a down-stream length of from the entrance for all the grids. With
, for the Reynolds number to be , the value of is
. Different combinations of giving this value are show below in
the table
Table 3.2: Table showing the combinations of width and velocity (for
) for a velocity driven Poiseulle flow
The convergence coefficient is calculated by
(3.7)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
50/81
38
where is the number of points in the dense grid and is the number of
points on the coarse grid. are the associated errors.
The table below shows the errors associated
Table 3.3: Table showing the study of convergence factor
Grid Points Error Convergence factor
Figure 3-5: Figure showing the plot of error vs. number of grid points atthe channel entrance.
By verifying the convergence it can be seen that the solver is indeed second order
accurate in spatial dimension as stated in Section 2.3.3.
2.5000E-04
2.7000E-04
2.9000E-04
3.1000E-04
3.3000E-04
3.5000E-04
3.7000E-04
3.9000E-04
4.1000E-04
4.3000E-04
4.5000E-04
20 30 40 50 60 70 80 90 100
E
r r o r
Grid Points
Grid Points vs. Error
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
51/81
39
3.4 Pressure driven Poiseulle Flow
The flow between parallel plates driven by a pressure difference was
solved using the incompressible D2Q9 model. The following parameters were
used for the study. Unlike the velocity driven flow where the physical units are
transformed into lattice units, in this test case the parameters were directly taken
in lattice units for simplicity.
Table 3.4: Table showing the parameters for pressure driven Poiseulleflow
InletPressure
ExitPressure
ChannelWidth
ChannelLength
RelaxationTime
KinematicViscosity
0.33333
3.4.1 Boundary Conditions
Zou-He pressure boundary conditions are implemented at both the ends
of the channel. The densities corresponding to the pressures were calculated
using the equation of state Eq. (2.35) as and . The bounce
back method was used to achieve the no-slip condition on both walls. As
discussed in the section 3.2.3, a correction method was adopted to account for the
resultant wall produced at half way between the wall and the fluid node. The
average fluid density was chosen for the simulation.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
52/81
40
3.4.2 Analytical Solution
The analytical solution for a pressure driven Poiseulle flow is given by the
equations shown below.
The maximum centre line velocity is given as
(3.8)
where, is the length of the channel and is the average fluid density. The
velocity profile is given by
(3.9)
3.4.3 Results
The results are taken after the residual calculated is in the order of .
Figure 3-6: Figure showing the residual plot for pressure driven Poiseulleflow.
1.00E-13
1.00E-11
1.00E-09
1.00E-07
1.00E-05
1.00E-03
1.00E-01
1.00E+01
1000 11000 21000 31000 41000 51000
l o g ( r e s i
d u a l
)
Time Steps
Residual Plot
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
53/81
41
For this case, after around time steps, the residual approached the order of
. Figure 3-6 shows the plot of residual against time steps.
Figure 3-7 below shows the steady state flow in a pressure driven flow in
a channel. The maximum centre line velocity was achieved in the centre of the
channel. Also, the no-slip condition was achieved on the walls. The inlet and exit
pressures are exactly as the imposed conditions.
Figure 3-7: Figure showing the velocity distribution in a channel
with pressure difference. Velocities are by color.
Figure 3-8 shows the smooth transition from high density to low density
(corresponds to high pressure to low pressure through equation of state). This is
achieved because of the incompressible model used. A comparison was made
between the analytical and numerical solution in the Figure 3-9. It is observed
that the numerical results are in good agreement with the analytical results. Also,
the maximum velocity calculated according to the Eq. (3.8) is achieved. This case
benchmarks the inlet and exit pressure boundary conditions.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
54/81
42
Figure 3-8: Figure showing the density variation in pressuredriven Poiseulle flow.
Figure 3-9: Comparison between the analytical and numerical solution in apressure driven Poiseulle flow. The numerical solution is incomplete agreement with the analytical solution for thePressure driven Poiseulle flow solved with D2Q9Incompressible model.
0
0.01
0.02
0.03
0.040.05
0.06
0.07
0.08
0.09
1 6 11 16 21 26 31 36 41 46 51
V e l o c i
t y ( l u / t s
)
Y Position
Analytical v.s. Numerical
Analytical
x=10
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
55/81
43
3.5 Flow over a Cylinder (Re=100)
Flow over a cylinder between two parallel plates was solved using the
incompressible D2Q9 LBM. The geometrical specifications of the channel and the
cylinder are shown in Figure 3-10. The results were compared with the work of
Schafer and Turek [26] who studied the laminar flow over a cylinder for similar
kind of geometry. The dimensions are given in terms of the radius of the
cylinder. For simplicity, the system of units chosen was lattice units.
Figure 3-10: Figure showing the geometrical specifications for flow over a
cylinder.
3.5.1 Parameters
Flow parameters and their derivations are given in the table below.
Table 3.5: Table showing the parameters for flow over a cylinder
Units
Value 40
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
56/81
44
Distance from centre to lower wall
Distance from centre to upper wall
Length of the channel Width of the channel
Number of grid points in direction
Number of grid points in direction
Kinematic Viscosity
Dimensionless relaxation time
Figure 3-11: Inlet parabolic velocity profile with an average velocity offor flow over a cylinder
The channel has a parabolic inlet velocity profile with average inlet flow velocity
as
0
0.02
0.04
0.06
0.08
0.1
1 26 51 76 101 126 151 176 201 226 251 276 301 326
V
e l o c i t y ( l u / t s
)
Y Direction
Inlet Velocity Profile
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
57/81
45
The parabolic inlet velocity profile is calculated as (see Figure 3-11)
(3.10)
3.5.2 Boundary Conditions
Bounce back boundary conditions were used on the channel walls and on
the cylinder nodes. Zou-He velocity condition was used to implement the
parabolic velocity profile at the inlet. The outlet condition is same as the one
implemented for the velocity driven Poiseulle flow.
3.5.3 Results
Figure 3-12, 3-13 shows the instantaneous velocity contours in the
channel. The vortex shedding can be clearly seen downstream of the cylinder.
Figure 3-12: Instantaneous velocity contours for flow over acylinder.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
58/81
46
Figure 3-13: Instantaneous velocity contours in the vicinity of thecylinder.
Figure 3-14: Coefficient of drag, , for flow over a cylinder(asymmetrically placed in the channel)
3.00
3.08
3.16
3.24
3.32
3.40
165000 169000 173000 177000 181000 185000
C o e
f f i c i e n
t o f
D r a g
Time ( ts, lattice units )
Coefficient of Drag
3.22
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
59/81
47
The coefficient of drag is plotted in Figure 3-14. It can be observed that
there are two peaks for the drag coefficient here. Similar kind of plot with two
peaks can be observed in references [27] [28] for flow over a cylinder placed
asymmetrically in a channel. The peaks and fall within of the range
given by Schaufer and Turek [26].
It was suspected that the two peaks of are due to the asymmetry of the
position of the cylinder in the channel. To verify this, a case with no asymmetry
was studied and it can be observed in Figure 3-15 that there is only one peak
value for .
Figure 3-15: Co-efficient of Drag for flow over a cylinder(symmetrically placed in the channel)
The parameters used for this simulation are same except that the radius
and the distance of centre of cylinder from both walls was . The
corresponding value of the dimensionless relaxation time is . The peak
3.00
3.08
3.16
3.24
3.32
3.40
289500 292000 294500 297000 299500
C o - e f
f i c i e m
t o f
D r a g
Time ( ts, lattice units )
Co-efficient of Drag
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
60/81
48
value of the drag coefficient obtained in this case is and the minimum
value is .
The coefficient of lift was plotted for the first (asymmetric) case and it
was observed that it is fluctuating with a mean slightly less than zero. Again, the
mean being non-zero is due to the asymmetry of the position of the cylinder in
the channel. The maximum of the lift coefficient achieved is within the
range as given in the reference [26].
Figure 3-16: Co-efficient of Lift for flow over a cylinder (asymmetricallyplaced in the channel)
The frequency of the vortex shedding is determined by the Strouhal
number given as
(3.11) where is the diameter of the cylinder, is the average inlet flow velocity and is the frequency of the vortex shedding. This frequency of vortex shedding was
-1.60
-1.15
-0.70
-0.25
0.20
0.65
1.10
1.55
165000 169000 173000 177000 181000 185000
C o e
f f i c i e n
t o f L i f t
Time ( ts, lattice units )
Coefficient of Lift
-1.0416
1.0084
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
61/81
49
determined from the plot of the lift coefficient against time, averaging the peak to
peak time difference . The frequency was found as
(3.12)
The Strouhal number calculated for this model was which is in the
range given in the reference [26]. The vorticity distribution in the
channel is presented in Figure 3-17. It can be seen that vortices are formed
downstream of the cylinder.
Figure 3-17: Vorticity for the flow over a cylinder. The pattern for vorticitycan be observed in the figure.
The cylinder boundary is not exactly smooth; it is a stair-case like approximation
to the curved cylinder boundary. The no-slip condition was used on the cylinder
nodes. Another option was to use a curved boundary condition which is based
on the interpolation/extrapolation of the distribution functions. This case of the
flow over the cylinder validates the code for solving unsteady flows. Also, this
test case reassures the functionality of the inlet velocity condition and no-slip
condition. It also validates the approach used to approximate curved wall
boundaries.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
62/81
50
Chapter 4
Multi-Phase LBM
4.1 Introduction
In this case, multiphase refers to phenomenon where a fluid separates into
different phases. This phase change might be triggered due to various factors
such as change in temperature, pressure, geometry etc. Statistical mechanics and
the underlying thermodynamics makes it easy for the LBM to deal with the
phase changes which otherwise is complicated to model using the conventional
CFD techniques. There are various multiphase models existing using the LBM,
such as Chromodynamic model [29], Shan-Chen Model [30] [31], Free energy
model [32] [33] and HSD model [34]. Shan-Chen model is based on incorporating
the long-range attractive forces between the distribution functions.
4.2 Shan-Chen Model
This model is based on incorporating the attraction force between the
distribution functions. In the original Shan-Chen model the interaction force is
approximated using the following equation [30] [31]
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
63/81
51
(4.1)
where is the number of nearest sites with equal distance , is the dimension
of the space (2 in our case) and is the temperature like term. Other neighboring
sites (next nearest) can be considered in the Eq. (4.1) if the term is
evaluated properly [35]. More generally, the equation can be written as [35]
(4.2)
For a D2Q9 model there are four sites which are at a distance of one lattice unit
and other four sites which are at a distance of lattice units away from the sitewhere the interaction force needs to be calculated. Hence the value of is givenas
(4.3) Various forms of the interaction force can be developed from formulating the
[35]. One widely used formulation with a six point scheme to evaluate the
divergence term for the interaction force for a D2Q9 model is given as
(4.4)
where is the interaction strength, are the weights for LBM model and is
the interaction potential which is a function of density. In the summation given
by Eq. (4.4), the values of are considered only if is a fluid node.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
64/81
52
For the force calculated is positive, which accounts for an attraction force.
This attractive force is incorporated [36] into the existing model as follows:
(4.5)
Where is the change in velocity due to the additional force term. The change
in velocity is then added to the equilibrium velocity (velocity used in calculating
the equilibrium distribution functions)
(4.6)
The intermediate velocity is used in calculating the equilibrium distribution
functions. The final macroscopic velocity is calculated as
(4.7)
With the incorporation of the additional forcing term the algorithm of the
existing LBM model is changed slightly. Additional subroutines are used to
calculate the interaction potential and the interaction force . It can be shown
that the Equation of State of the fluid simulated with the incorporation force as
mentioned in Eq. (4.4) is [37]
(4.8)
in lattice units,
(4.9)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
65/81
53
The above equation varies for different types of interaction potential functions
. One such function proposed by Shan-Chen [30] is
(4.10)
where and are arbitrary constants. With this interaction potential the
equation of state becomes [36]
(4.11)
The equation of state given above has a non-ideal component. With this
equation, for values of pressure below the critical value, two phases ( ) can
co-exist [36].
The critical values of the equation of state are given by equating the first
and second derivatives of pressure with density equal to zero. Considering the
equation of state Eq. (4.11)
(4.12)
(4.13)
By solving the above two equations the critical values are given as
(4.14)
(4.15)
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
66/81
54
The critical values for the equation of state with are
. The critical values are marked in dashed lines in Figure 4-1.
Figure 4-1: Equation of State for Shan-Chen model with given by Eq.
(4.11) and . The units of density are andpressure are . This figure is given in reference [36]
4.3 Validation
To perform a validation check on the code a lattice with periodic
boundary conditions on all sides was chosen. The domain is initialized with a
density of , where is a random number between and . This
initial randomization is necessary to create the imbalance between the forces
which account for the phase separation [36]. The total number of time steps
required for the domain to phase separate into a single liquid droplet
-20
0
20
40
60
80
100
0 200 400 600 800 1000
P r e s s u r e
Density
Equation of State for SC-ModelG=-50
G=-70
G=-92.4
G=-120
G=-150
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
67/81
55
surrounded by vapor or vice versa is dependent on the randomization, i.e., for
smaller values the number of time steps is larger. Values of ,
and are used in this simulation. The normalized density plots at
various time steps were captured. It can be observed that the domain phase
separates. These results shown in Figure 4-2 are in good agreement with the
results shown in the reference [36]. The dark portion corresponds to the density
of liquid and the white portion corresponds to the density of the vapor.
Figure 4-2: Normalized density pictures at various time steps . Therandomization variable is between .
A similar test case was run with a smaller randomization variable , between
and . Though the final results are the same, the time taken is more in this case.
The results can be seen in Figure 4-3.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
68/81
56
Figure 4-3: Normal density pictures at various time steps . Therandomization variable is between and . The time taken inthis case is larger.
4.4 Fluid-Wall Interaction
The fluid wall interaction force is given by [38]
(4.16)
where is the adsorption coefficient and is a function whose value is
one if the node is a wall and zero otherwise. Sukop and Thorne in their
book [36] have shown that different contact angles can be achieved between the
fluid and the surface by varying the value of .
Table 4.1: Table showing the adsorption coefficient for contact angles.
Contact Angle
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
69/81
57
According to Sukop and Thorne [36], the values of (with ) for
different contact angles is given in the Table 4.1. A validation case mentioned in
the reference [36] is run to check if the simulation code is working for the contact
angles. A similar test case as in section 4.3 was performed except a wall placed in
between the domain was run for this purpose. The initial densities (with random
variations) chosen in the simulations for contact angles are
respectively. Figure 4-4 shows the results obtained.
Figure 4-4: Normalized density pictures for various contact angles. Thecontact angles are in order.
The results shown above are in agreement with the results shown in the
reference [36].
4.5 Parabolic Slider Bearing
To observe the phenomenon of multiphase in the slider bearing, the
domain was initialized with a density of , where is a random
number between and . This density falls in the unstable portion of the
equation of state for . The slider wall was given a
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
70/81
58
velocity and it was studied if the liquid droplets move because of the velocity
imparted by the slider. This test case was performed as a basic check for the
combination of moving wall boundary condition with the multiphase model.
Periodic boundary conditions were implemented on the left and right part of the
domain. Zou-He velocity condition was implemented on the slider and the No-
Slip condition was implemented on the wall nodes.
Figure 4-5: Figure showing the geometry of the slider bearing.
As shown in the Figure 4-5, the slider was given a velocity of in the
direction. The parameters used for this simulation are given in the Table 4.2
below.
Table 4.2: Table showing the parameters for Slider Bearing test case
4.5.1 Results
Slider
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
71/81
59
Normalized density plots at various time steps were generated and it was
observed that as expected, for , the liquid droplets formed have a
contact angle of degrees. Also, since periodic boundary conditions are used
on inlet and the exit, the liquid droplets exit from the right and enter through left
because of the velocity imparted by the slider. In the Figure 4-6 it can be
observed that the liquid droplets in the vicinity of the slider move from left to
right, while in the same time the liquid droplets coalesce.
Figure 4-6: Figure showing the normalized density in the Slider Bearing atvarious time steps.
An interesting condensation phenomenon was observed in the region of
high pressure. This phenomenon is seen in Figure 4-7. The high pressure region
for this geometry is located on the left side in the vicinity of the curved bearing.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
72/81
60
Figure 4-7: Figure showing condensation in high pressure region in SliderBearing.
Figure 4-8: Figure showing the high pressure region in the parabolic sliderbearing.
To show that the particular region where the condensation is occurring
has indeed higher pressures, a test case with same geometry and simulation
Condensation
High pressure region
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
73/81
61
parameters was run without the multiphase model (no interaction forces). The
pressure contours obtained due to the movement of the slider is shown in Figure
4-8. It was observed that the higher pressure region was in the location where the
condensation was occurring in the multiphase simulation. The multiphase
dynamics is different from the single phase dynamics, but this test case gives an
intuitive correlation.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
74/81
62
Chapter 5
Conclusions & Future Work
Literature review was done on Lattice Boltzmann Method (LBM). Various
aspects such as derivation of the Lattice Boltzmann Equation, boundary
conditions, multiphase models were studied. The model with BGK collision, two
dimension and nine discrete velocities, D2Q9 was chosen. Initially, the equations
were programmed in FORTRAN90 to simulate single phase flows
(incompressible). The code written is a serial code which calls different
subroutines whenever required. These subroutines were optimized for
performance using function profiling. The inbuilt profiling tools in the Intel
Visual Fortran were used for this purpose. The propagation function which took
more time relative to other subroutines is optimized for performance using
OpenMP. Though the propagation function is optimized for performance, for the
grid sizes used in this work it was observed that the code without the OpenMP
takes less time due to the overhead of creating and killing threads in each
iteration. In future work instead of using the OpenMP on specific function, the
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
75/81
63
grid can be divided into different blocks and MPI can be used. The code
developed was validated for single phase with standard test cases:
Velocity driven Poiseulle flow was solved using the code developed. It was
observed that the numerical solution is in agreement with the analytical
solution. To check for the order of accuracy, in this test case the grid points
were varied by keeping the Reynolds number as constant. The order of
accuracy was as expected. The velocity inlet condition and no-slip wall
condition are benchmarked using this test case.
As a second test case, pressure driven Poiseulle flow was solved. The
numerical results obtained are compared to the analytical solution and it
was observed that there was no deviation from the analytical solution.
Constant pressure boundary conditions are benchmarked in this test case.
Flow over a cylinder with Reynolds number was chosen as the third
test case. The cylinder was placed asymmetrically in the channel. The drag,
lift coefficients and the Strouhal number were obtained from the results.
The results produced agree very well with the results in the literature. It
was observed that there are two peaks for the drag coefficient. It was
assumed that this behavior is because of the asymmetry in the position of
the cylinder in the channel. To verify this, a test case with the cylinder
placed exactly in the centre of the channel was modeled and showed that
there was only one peak for the drag coefficient. Confirming the initial
assumption, the lift coefficient too had the mean lift slightly less than zero,
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
76/81
64
which again was a consequence of the asymmetry of the position of the
cylinder in the channel. The no-slip condition was used on the cylinder
nodes.
The Shan-Chen model for multiphase was incorporated into the code. The
test cases mentioned in the reference [36] were chosen for validation:
A square domain with periodic boundary conditions on all sides was
chosen and initialized with density chosen from the unstable portion of the
equation of state (see Figure 4-1). It was observed that the domain phase
separate as mentioned in the reference [36]. It was also observed that the
time taken for phase separation depend on the randomization of the initial
density.
To validate the code for contact angle dynamics, a square domain with a
wall placed in the centre was chosen. Periodic boundary conditions on all
sides were chosen for this case too. It was observed that, as mentioned in
the reference [36], that the contact angles produced as expected by varying
the adsorption coefficient.
To observe the phenomenon of multiphase flow in a slider bearing, the
domain was initialized with a random density which falls in the unstable portion
of the equation of state. The slider wall was given a velocity and it was studied if
the liquid droplets moved because of the velocity imparted by the slider. It was
observed that the velocity was imparted by the slider to the liquid droplets. It
was also observed that condensation occurs in the highest pressure region.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
77/81
65
Though only one equation of state was modeled in this code, other
equations of state can be incorporated by simply replacing interaction potential
function as mentioned in the reference [35]. The future work is dependent
on modeling the physical fluid using parameters such as interaction strength,
interaction potential and adsorption coefficient of the multiphase model.
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
78/81
66
References
[1] John, D. Anderson, Jr., Computational Fluid Dynamics: The Basics withApplication , McGraw Hill, 1995
[2] Courant, R., Friedrichs, K., and Lewy, H. , On the partial differenceequations of mathematical physic s, IBM Journal of Research and Development,vol. 11, 1967, pp. 215-234
[3] Mohamad, A, A., Lattice Boltzmann Method , 1st Edition, Springer, 2011
[4] Chen, S., Doolen, G. D., Lattice Boltzmann Method for Fluid Flows,Annual Review of Fluid Mechanics, vol. 30, 1998, pp. 329-364
[5] Hardy, J., Pomeau, Y., and de Pazzis, O. , Time Evolution of a TwoDimensional Classical Lattice System, Physical Review Letters, vol. 31, no. 5,1973, pp. 276-279
[6] Hardy, J., Pomeau, Y., and de Pazzis, O., Time Evolution of a TwoDimensional model system. I. Invariant states and time correlation functions , Journal of Mathematical Physics, vol. 14, no. 2, 1973, pp. 1746-1759
[7] Frish, U., Hasslacher, B., Pomeau, Y., Lattice-Gas Automata for theNavier-Stokes Equation , Physical Review Letters, vol. 56, no. 14, 1986, pp. 1505-1508
[8] DHumires, D., Lallemand, P., Lattice Gas Automata for Fluid
Mechanics, Physica A, vol. 140, 1986, pp. 326-335
[9] Balasubramanian, K., Hayot, F., Saam, W. F., Darcys law from lattice-gashydrodynamics , Physical Review A, vol. 36, no. 5, 1987, pp. 2248-2253
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
79/81
67
[10] MacNamara, G. R., Zanetti, G., Use of the Boltzmann Equation tosimulate Lattice- Gas Automata, Physical Review Letters, vol. 61, no. 20, 1988,pp. 2332-2335
[11] Dahlburg, J. P., Montgomery, D., Noise and compressibility in lattice -gasfluids, Physical Review A, vol. 36, no. 5, 1987, pp. 2471 -2474
[12] Wolf-Gladrow, D. A., Lattice -gas cellular automata and lattice Boltzmannmodels, Springer, 2000
[13] Online, http://galileo.phys.virginia.edu/classes/252/kinetic_theory.html
[14] Chapman, S., Cowling, T. G., The Mathematical Theory of Non -UnifromGases , 3rd Edition, The Cambride University Library, 1970
[15] Bhatnagar, P. L., Gross, E. P., Krook, M., A Model for Collision Process inGases. I. Small Amplitude Processes in Charged and Neutral One-ComponentSystems , Physical Review, vol. 94, no. 3, 1954, pp. 511-525
[16] Sterling, J. D., Chen, S., Stability Analysis of Lattice Boltzmann Models , Journal of Computational Physics, vol. 123, article no. 16, 1996, pp. 196-206
[17] He, X., Luo, L.-S., Theory of lattice Boltzmann method: From the
Boltzmann equation to the lattice Boltzmann equation , Physical Review E, vol.56, no. 6, 1997, pp. 6811-6817
[18] Inamuro, T., Yoshino, M., Ogino, F., Accuracy of the lattice Boltzmannmethod for small Knudsen number with finite Reynolds number , Physics ofFluids, vol. 9, 1997, pp. 3535 3542
[19] Qian, Y. H., DHumi res, D., Lallemand, P., Lattice BGK Models forNavier- Stokes Equation, Europhysics Letters, vol. 17, no . 6, 1992, pp. 479-484
[20] Yu, D., Mei, R., Luo, L.-S., Shyy, W., Viscous flow computations with themethod of lattice Boltzmann equation , Progress in Aerospace Sciences, vol. 39,no. 5, 2003, pp. 329-367
[21] Online, http://www.palabos.org/wiki/models:bc
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
80/81
68
[22] Cornubert, R., DHumires, D., Levermore, D., A Knudsen numbertheory for lattice gases , Physica D, vol. 47, 1991, pp. 241-259
[23] Zou, Q., He, X., On pressure and velocity boundary conditions for thelattice Boltzmann BGK model , Physics of Fluids, vol. 6, 1997, pp. 1591-1598
[24] He, X., Luo, L.-S., Lattice Boltzmann Model for Incompressible Navier-Stokes Equation , Journal of Statistical Physics, vol. 88, no. 3/4, 1997, pp. 927-944
[25] Online, OpenMp. [Online] http://openmp.org/wp/
[26] Schafer, M., Turek, S., Benchmark computations of laminar fow over acylinder , Notes in Numerical Fluid Mechanics, vol. 52. Vieweg Verlag:Braunschweig, 1996; pp. 547 566
[27] Yu, D., Mei, R., Shyy, W., A multi -block lattice Boltzmann method forviscous fluid flows , International Journal for Numerical Methods in Fluids, vol.39, 2002, pp. 99-120
[28] Filippova, O., Hanel , D., Grid refinement for Lattice-BGK Models , Journal of Computational Physics, vol. 147, 1998, pp. 219-228
[29] Gunstensen, A. K., Rothman, D. H., Zaleski, S., Zanetti, G., Lattice
Boltzmann model for immiscible fluids , Physical Review A, vol. 43, no. 8, 1991,pp. 4320-4327
[30] Shan, X., Chen, H., Lattice Boltzmann model for simulating flows withmultiple phases and components , Physical Review E, vol. 47, no. 3, 1993, pp.1815-1819
[31] Shan, X., Chen, H., Simulation of nonideal gases and liquid-gas phasetransitions by the lattice Boltzmann equation , Physical Review E, vol. 4 9, no. 4,1994, pp. 2941-2948
[32] Swift, M. R., Orlandini, E., Osborn, W. R., Yeomans, J. M., LatticeBoltzmann Simulation of Nonideal fluids , Physical Review E, vol. 75, no.5, 1995,pp. 830-833
7/30/2019 Towards Development of a Multiphase Simulation Model Using Lattice Boltzmann Method (LBM)--Narender Reddy
81/81
[33] Swift, M. R., Orlandini, E., Osborn, W. R., Yeomans, J. M., LatticeBoltzmann simulations of liquid-gas and binary fluid systems , Physical ReviewE, vol.54, no.5, 1996, pp.5041-5052
[34] He, X., Shan, X., Doolen, G. D., Discrete Boltzmann equation model fornonideal gases, Physical Revi ew E , vol.57, no.1, 1998, pp. R13-R16
[35] Yuan, P., Schaefer. L., Equations of State in a lattice Boltzmann model,Physics of Fluids, vol. 18, 2006, pp. 042101-11
[36] He, X., Doolen, G. D., Thermodynamic Foundations of Kinetic Theoryand Lattice Boltzmann Models for Multiphase flows , Journal of StatisticalPhysics, vol. 117, no. 112, 2002, pp. 309-328
[37] Sukop, M. C., Thorne, Jr. T., Lattice Boltzmann Modeling , 2nd Edition,Springer, 2007
[38] Martys, N., Chen, H., Simulation of multicomponent fluids in complexthree-dimensional geometries by the lattice Boltzmann method , PhysicalReview E, vol. 53, no. 1, 1996, pp. 743-750