Professional Documents
Culture Documents
entitled
Towards Development of a Multiphase Simulation Model Using Lattice
Boltzmann 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
An Abstract of
Towards Development of a Multiphase Simulation Model Using Lattice
Boltzmann 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
The University of Toledo
December 2011
iii
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.
Contents
Abstract............................................................................................................................. iii
Acknowledgements ......................................................................................................... v
Contents............................................................................................................................ vi
List of Tables .................................................................................................................... ix
List of Figures ................................................................................................................... x
1 Background ................................................................................................................... 1
1.1
Introduction ....................................................................................................... 1
1.2
1.3
1.4
2.2
2.3
2.5
2.6
3.2
3.3
3.4
3.5
Introduction ..................................................................................................... 50
4.2
Shan-Chen Model............................................................................................ 50
4.3
Validation ......................................................................................................... 54
4.4
4.5
viii
List of Tables
3.1
3.2
3.3
3.4
3.5
4.1
4.2
ix
List of Figures
1-1
1-2
2-1
2-2
2-3
2-4
2-5
2-6
2-7
3-1
3-2
3-3
3-4
3-5
Plot of Error v.s. number of grid points along the width of channel for
verification of accuracy ..... 38
3-6
3-7
3-8
3-9
3-13 Instantaneous
4-2
4-3
4-4
xi
4-5
4-6
4-7
4-8
xii
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
1
1.2
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.
velocity whose direction is along the link connecting one of the neighboring
nodes. Thus the particles possess momentum and the collisions between them
are 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
2
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.
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
(1.1)
where
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
1.3
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]
4
(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 precursor 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 MaxwellBoltzmann 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
and
direction. The total fraction of particles which have the velocities in between
5
in
and
and
and
is given by
. The
is given by
(1.7)
add up to one
(1.8)
Solving the definite integral Eq. (1.8), a relation between the constants
and
is
derived as
(1.9)
(1.11)
where
is the mass of the particle. On the other hand, the average kinetic
is given as
(1.12)
If the velocities are considered instead of the speeds, the distribution function is
given as
(1.15)
where
Chapter 2
Lattice Boltzmann Method
2.1
Boltzmann Equation
The Boltzmann equation is a partial differential equation which governs
after time
contributed
at a fixed point
which
[14].
(2.2)
In the limit
2.2
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)
and
2.3
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
distribution function
distribution functions
is a polynomial in .
velocities).
The integrals Eq. (2.5)-(2.7) are thus transformed into summation:
10
with
with
with
where
(2.14)
(2.15)
Since
are constants, the discrete form of the Boltzmann equation Eq. (2.3)
and time
[18] leads to
(2.17)
11
(2.18)
where the velocity
is related to the
for a two dimensional model which is used in the current work. The
speed of sound,
temperature
and mass
as
(2.20)
is given as
(2.22)
12
(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)
The weights
in the discretized
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)
13
(2.27)
For a two dimensional model the polynomial
is set to [17]
(2.28)
(2.31)
The value of
is chosen as
where
is the
time step. For this model, the speed of the sound is related to the lattice velocity
as
14
(2.32)
The equilibrium distribution function for the finite set of velocities of D2Q9
model is then given as
(2.33)
The
15
(2.35)
where
2.4
Computational Approach
In order to make the model computationally simple, the time step
and
in a system of units specific to the LBM called lattice units. The other
16
(2.38)
The
direction values of
The
direction values of
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
the node
is the post collision value. The collision step, Eq. (2.42) is local to
which makes it easy to implement using parallel computing
techniques.
17
Figure 2-2: Figure showing collision and propagation. The first step,
collision is local to node A. The post collision distribution
functions (maroon color) are propagated to the neighboring
nodes 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
Figure 2-4: Figure depicting the bounce back method. The distribution
functions are reversed.
19
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
collision step is carried out as usual but the incoming distribution functions on
the wall nodes at time
(2.45)
where
where
is the
is the
component of
(2.46)
Similarly, in
where
is the
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]
22
is given as
(2.49)
With
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.
(2.53)
(2.54)
(2.55)
Where
23
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
functions are calculated from the boundary conditions on the other sides (top
and bottom).
2.6
.
(2.57)
The density
25
(2.59)
It should be noted that the average fluid density
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.
26
(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.
27
Chapter 3
Coding, Validation & Verification
3.1
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
control file.
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.
28
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, yDim
DOUBLE 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,
xDim
DO y=1, yDim
xnew = x+ex(j)
ynew = y+ey(j)
IF ((xnew >= 1 .AND. xnew &
& <= xDim) .AND. & (ynew >= &
& 1 .AND. ynew <= yDim &
& )) f(xnew,ynew,j)=fplus(x,y,j)
END DO
END DO
END DO
!$OMP END DO
!$OMP END PARALLEL
END SUBROUTINE Stream
3.2
velocity and an outflow was solved. The analytical solution of this flow was
compared to the numerical solution. A fluid with the following properties was
29
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
Inlet
Velocity
Density
Channel
Width
Channel
Length
Reynolds
Number
The parameters are converted into lattice units where the time step and the grid
spacing are
and
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
channel be
. The relation between the physical grid spacing and the lattice grid
spacing is given as
30
(3.2)
Using the above relation the grid spacing in physical units is given as
. Recalling the
(in
lattice units). Using these values, the value of kinematic viscosity in lattice units
is
The relation between the viscosity in physical units and lattice units is given by
(3.3)
and therefore
To scale the density, the unit for mass in lattice units is defined as
the units for density in lattice units is given as
31
and hence
is
density.
(3.4)
Hence it is verified that both systems have the same Reynolds number. It is also
important to verify the Mach number in lattice units
the simulation
might get unstable because the model recovers macroscopic equations in lowMach number limit. In order to reduce the Mach number we can increase the
number of grid points (
relaxation parameter
relaxation parameter
approaches
where
wall.
nodes along
the width of the channel, the effective channel width, which considers the
effective wall is
So,
with
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
The residual is taken on the
equation below
(3.5)
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.
Flow development
x=4
0.250
x=50
x=100
x=150
x=200
0.150
x=350
0.100
Velocity (lu/ts)
0.200
0.050
0.000
1
11
16
21
26
31
36
41
46
51
Y Position
Figure 3-3: Flow development in the channel across various cross section
along -direction. The flow is developed towards a complete
Poiseulle 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.
35
The no-slip boundary condition and the velocity inlet condition are
benchmarked with this case as the results of match with the analytical solution.
Analytical Vs. Numerical
0.25
Analytical
x=250
Velocity (lu/ts)
0.2
0.15
0.1
0.05
0
1
11
16
21
26
31
36
41
46
51
Y Position
Figure 3-4: Comparison between the analytical and numerical solution.
The numerical solution is in complete agreement with the
analytical solution.
3.3
velocity driven Poiseulle flow. Recalling the equation for Reynolds number
36
The values of
and
and
as
constant. The solutions were compared to the analytical solutions and the error
was calculated as
(3.6)
where
are the normalized analytical and numerical solutions. The numerical solution is
taken at a down-stream length of
, the value of
is
the table
Table 3.2: Table showing the combinations of width and velocity (for
) for a velocity driven Poiseulle flow
37
where
is the number of
Convergence factor
Error
Error
3.9000E-04
3.7000E-04
3.5000E-04
3.3000E-04
3.1000E-04
2.9000E-04
2.7000E-04
2.5000E-04
20
30
40
50
60
70
80
90
100
Grid Points
Figure 3-5: Figure showing the plot of error vs. number of grid points at
the 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.
38
3.4
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 Poiseulle
flow
Inlet
Pressure
Exit
Pressure
Channel
Width
Channel
Length
Relaxation
Time
Kinematic
Viscosity
0.33333
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
39
where,
3.4.3 Results
The results are taken after the residual calculated is in the order of
Residual Plot
1.00E+01
log(residual)
1.00E-01
1.00E-03
1.00E-05
1.00E-07
1.00E-09
1.00E-11
1.00E-13
1000
11000
21000
31000
41000
51000
Time Steps
Figure 3-6: Figure showing the residual plot for pressure driven Poiseulle
flow.
40
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.
41
variation in pressure
Velocity (lu/ts)
Analytical
0.08
x=10
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
1
11
16
21
26
31
36
41
46
51
Y Position
Figure 3-9: Comparison between the analytical and numerical solution in a
pressure driven Poiseulle flow. The numerical solution is in
complete agreement with the analytical solution for the
Pressure driven Poiseulle flow solved with D2Q9
Incompressible model.
42
3.5
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
43
direction
direction
Kinematic Viscosity
Dimensionless relaxation time
Velocity (lu/ts)
0.1
0.08
0.06
0.04
0.02
0
1
26
51
76
101
126
151
176
201
226
251
276
301
326
Y Direction
Figure 3-11: Inlet parabolic velocity profile with an average velocity of
for flow over a cylinder
The channel has a parabolic inlet velocity profile with average inlet flow velocity
as
44
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
channel. The vortex shedding can be clearly seen downstream of the cylinder.
velocity
45
velocity
Coefficient of Drag
Coefficient of Drag
3.40
3.22<Cd<3.24 Reference [23]
3.32
3.24
3.16
3.08
3.00
165000
169000
173000
177000
181000
185000
46
over
cylinder
and
fall within
of the range
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
.
Co-efficient of Drag
Co-efficiemt of Drag
3.40
3.32
3.24
3.16
3.08
3.00
289500
292000
294500
297000
299500
cylinder
The parameters used for this simulation are same except that the radius
and the distance of centre of cylinder from both walls was
corresponding value of the dimensionless relaxation time
47
is
. The
. The peak
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
range
is within the
Coefficient of Lift
1.55
1.0084
1.10
0.65
0.20
-0.25
-0.70
-1.15
-1.60
165000
-1.0416
169000
173000
177000
181000
185000
where
is the frequency of the vortex shedding. This frequency of vortex shedding was
48
determined from the plot of the lift coefficient against time, averaging the peak to
peak time difference . The frequency was found as
(3.12)
which is 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 vorticity
can 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.
49
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
50
(4.1)
where
is the dimension
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
is given
as
(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
51
is a fluid node.
For
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
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
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)
52
The above equation varies for different types of interaction potential functions
. One such function proposed by Shan-Chen [30] is
(4.10)
where
and
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)
53
are
G=-50
G=-70
Pressure
80
G=-92.4
G=-120
60
G=-150
40
20
0
-20
0
200
400
600
800
1000
Density
Figure 4-1: Equation of State for Shan-Chen model with
given by Eq.
(4.11) and
. The units of density are
and
pressure are
4.3
Validation
To perform a validation check on the code a
boundary conditions on all sides was chosen. The domain is initialized with a
density of
, where
and
. This
54
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.
. The
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.
55
4.4
Fluid-Wall Interaction
The fluid wall interaction force is given by [38]
(4.16)
where
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
56
(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
Figure 4-4: Normalized density pictures for various contact angles. The
contact angles are
in order.
The results shown above are in agreement with the results shown in the
reference [36].
4.5
and
, where
is a random
57
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 NoSlip condition was implemented on the wall nodes.
Slider
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
58
Normalized density plots at various time steps were generated and it was
observed that as expected, for
contact angle of
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 at
various time steps.
59
Condensation
Figure 4-8: Figure showing the high pressure region in the parabolic slider
bearing.
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.
61
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
62
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 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.
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,
63
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.
64
Though only one equation of state was modeled in this code, other
equations of state can be incorporated by simply replacing interaction potential
function
65
References
[1]
John, D. Anderson, Jr., Computational Fluid Dynamics: The Basics with
Application, McGraw Hill, 1995
[2]
Courant, R., Friedrichs, K., and Lewy, H., On the partial difference
equations of mathematical physics, IBM Journal of Research and Development,
vol. 11, 1967, pp. 215-234
[3]
[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 Two
Dimensional 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 Two
Dimensional 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 the
Navier-Stokes Equation, Physical Review Letters, vol. 56, no. 14, 1986, pp. 15051508
[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-gas
hydrodynamics , Physical Review A, vol. 36, no. 5, 1987, pp. 2248-2253
66
Online, http://galileo.phys.virginia.edu/classes/252/kinetic_theory.html
Online, http://www.palabos.org/wiki/models:bc
67
[26] Schafer, M., Turek, S., Benchmark computations of laminar fow over a
cylinder, Notes in Numerical Fluid Mechanics, vol. 52. Vieweg Verlag:
Braunschweig, 1996; pp. 547566
[27] Yu, D., Mei, R., Shyy, W., A multi-block lattice Boltzmann method for
viscous 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 with
multiple 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 phase
transitions by the lattice Boltzmann equation, Physical Review E, vol. 49, no. 4,
1994, pp. 2941-2948
[32] Swift, M. R., Orlandini, E., Osborn, W. R., Yeomans, J. M., Lattice
Boltzmann Simulation of Nonideal fluids, Physical Review E, vol.75, no.5, 1995,
pp. 830-833
68
[33] Swift, M. R., Orlandini, E., Osborn, W. R., Yeomans, J. M., Lattice
Boltzmann simulations of liquid-gas and binary fluid systems, Physical Review
E, vol.54, no.5, 1996, pp.5041-5052
[34] He, X., Shan, X., Doolen, G. D., Discrete Boltzmann equation model for
nonideal gases, Physical Review 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 Theory
and Lattice Boltzmann Models for Multiphase flows, Journal of Statistical
Physics, 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 complex
three-dimensional geometries by the lattice Boltzmann method, Physical
Review E, vol. 53, no. 1, 1996, pp. 743-750
69