1

Notes on
Advanced Computational Fluid
Dynamics (ME5361)
Part2

Dr C. Shu
Office: E2-03-07
Tel. 6874 6476
e-mail: mpeshuc@nus.edu.sg




Department of Mechanical Engineering
National University of Singapore




2

Table of Contents

1. Domain-free Discretization (DFD) Method
1.1 Introduction
1.2 Domain-free discretization (DFD) method
1.3 Sample Applications of DFD Method
1.4 Application of DFD Method to Solve Navier-Stokes Equations
2. Least Square-based Finite Difference (LSFD) Method
2.1 Introduction
2.2 LSFD Method
2.3 Numerical Analysis of Convergence Rate
2.4 Sample Applications of LSFD to Flow Problems
3. Radial Basis Function-based Differential Quadrature (RBF-DQ)
Method
3.1 Introduction
3.2 Radial Basis Functions (RBFs) and Function Approximation
3.3 Differential Quadrature (DQ) Method for Derivative
Approximation
3.4 Global Radial Basis Function-based Differential Quadrature
(RBF-DQ) Method
3.5 Local RBF-DQ Method
3.6 Sample Applications of Local RBF-DQ Method
3.7 Application of Local RBF-DQ Method to Flow Problems
4. Standard Lattice Boltzmann Method (LBM)
4.1 Introduction


3
4.2 Lattice Gas Cellular Automata (LGCA)
4.3 Kinetic theory
4.4 Lattice Boltzmann Method (LBM)
4.5 Practical Implementation of LBM for Lid-Driven Square
Cavity Flows
5. Taylor Series Expansion- and Least Square- based Lattice
Boltzmann Method (TLLBM)
5.1 Introduction
5.2 Conventional models for problems with complex geometry
5.3 Taylor Series Expansion- and Least Square-based Lattice
Boltzmann Method (TLLBM)
5.4 Accuracy Analysis of TLLBM
5.5 Practical Implementation of TLLBM for Flow around a
Circular Cylinder
6. Application of TLLBM to Simulate Thermal Flows
6.1 Introduction
6.2 Internal Energy Density Distribution Function (IEDDF)
Thermal Model
6.3 Application of IEDDF thermal model on arbitrary mesh by
using TLLBM
6.4 Boundary conditions
6.5 Practical implementation of IEDDF thermal model for natural
convection in a square cavity using the technique of TLLBM


4
1. Domain-Free Discretization (DFD) method

1.1 Introduction

Most engineering problems are governed by a set of partial differential equations (PDEs).
For example, the Newtonian viscous flow can be modeled by Navier-Stokes equations.
How to efficiently solve PDEs has a significant meaning to engineering applications.
Basically, there are two ways to obtain the solution of a PDE. The first way is to pursue
an analytical expression for the solution. This way is also called the analytical method,
and the resulting solution is termed analytical solution. The analytical solution is exact at
any location in a solution domain. The other way is to pursue an approximate solution for
a given PDE. Usually, the approximate solution is defined by the functional values at
discrete points obtained by a numerical technique. So, this way is also called the
numerical method, and the approximate solution is noted as numerical solution. It is
indicated that the numerical method is usually applied when the analytical solution of a
PDE is difficult to be obtained. Although the analytical and numerical methods can both
give the solution of a PDE, they involve quite different solution procedures.

For the analytical method, the PDE and its boundary conditions are dealt with separately.
In other words, the analytical solution is usually obtained by two steps. In the first step,
we only consider the PDE and obtain its general solution. Then in the second step, the
expression of the general solution is substituted into the boundary conditions to determine
the unknown coefficients in the general solution. Clearly, the first step does not involve


5
the solution domain. The solution domain (geometry of the problem) is only involved in
the second step when the boundary condition is implemented. So, the analytical method
can be well applied to both regular and irregular domain problems.

In contrast, the numerical method solves the PDE by directly coupling it with the
boundary condition. In other words, the numerical solution is obtained in just one step. In
this step, the PDE is discretized on the solution domain with proper implementation of
the boundary condition. We can see clearly that the numerical discretization of the PDE
by a numerical method is problem-dependent. Due to this feature, some numerical
methods can only be applied to regular domain problems. Examples are the finite
difference method and the global method of differential quadrature (DQ), which is more
efficient by using just a few grid points to obtain accurate numerical results. These
methods discretize the derivatives in a PDE along a straight mesh line. Thus, they require
the computational domain to be rectangular or a combination of rectangular sub-domains.
When a problem with complex geometry is considered, the curved boundary of the
problem may not coincide with the straight mesh line. To apply the finite difference and
DQ methods, one has to do the coordinate transformation, which maps the irregular
physical domain to a regular domain in the computational space. In general, the
coordinate transformation can be made by numerical grid generation technique. In the
computational space, the finite difference schemes and the DQ method can be directly
applied since in this space, the solution domain is regular. To do numerical calculation in
the computational space, we need to transform the governing PDEs and their boundary
conditions into the relevant forms in the computational space. This process is very


6
complicated, and problem-dependent. In addition, it may bring additional errors into the
numerical computation. For many years, researchers expect to develop an efficient
numerical method, which can avoid the complicated coordinate transformation process.

On the other hand, we note that the need of coordinate transformation for irregular
domain problems is actually due to the coupling of numerical discretization of a PDE
with the boundary condition associated with the solution domain. We can see clearly that
if numerical discretization of the PDE by a numerical method is not restricted by the
solution domain, then the complicated coordinate transformation technique can be
avoided, and the numerical computation for regular and irregular domain problems can
be efficiently done in the Cartesian coordinate system or the cylindrical coordinate
system. Here, we may ask whether such a numerical method exists or not. If the idea of
developing this numerical method is correct, then the second question is how to develop
the method. The answer towards these questions leads to the development of domain-free
discretization (DFD) method.

To answer the first question, we can get the inspiration from the analytical method. As
discussed previously, the analytical solution for a particular problem is obtained by two
steps. In the first step, the general solution of the PDE is obtained which involves some
constants. These constants are then determined by the boundary condition in the second
step, and as a result, the particular solution is obtained for a given problem. In general,
the implementation of the boundary condition is associated with geometry of the
problem. So, we can see that the geometry of the problem is only related to the particular


7
solution. The PDE itself has no connection to the solution domain. The obvious fact is
that once the particular solution is obtained, it exactly satisfies the PDE not only for the
points inside the solution domain but also for the points outside the solution domain. In
the following, we will illustrate this feature by some examples. The first example is the
determination of a straight line. It is well known that two points A and B can uniquely
determine a straight line represented by a line equation. This line equation is applicable
for all the points along the straight line including the points in the interval between A and
B and the points outside the interval between A and B. Another example is the solution of
a one-dimensional boundary value problem. Suppose that the governing differential
equation is
x u
dx
u d
− =
2
2

(1.1)
and the solution domain is 1 0 ≤ ≤ x . The boundary condition for equation (1.1) is given
by
1 ) 1 ( , 0 ) 0 (
1
+ − = =

e e u u
(1.2)
At first, we solve equation (1.1) and obtain its general solution as
x e c e c u
x x
+ + =

2 1

(1.3)
In the second step, we substitute the boundary condition (equation (1.2)) into equation
(1.3) and get the two constants
1
c and
2
c as
1 , 1
2 1
− = = c c
Thus, the particular solution for the problem is
x e e u
x x
+ − =


(1.4)



8
It is easy to prove that the solution form (1.4) satisfies the differential equation (1.1) not
only in the solution domain 1 0 ≤ ≤ x , but also in the whole one-dimensional field
∞ < < ∞ − x .

Inspiration from analytical method:
ƒ the PDE and its solution domain can be treated separately;
ƒ the solution obtained satisfies the PDE for both the points inside the domain and
the points outside the domain (the solution obtained can be used to calculate the
exact function values of the problem anywhere as long as the solution is smooth,
no matter whether the position is inside the domain or not)

Now, it is supposed that the differential equation (1.1) is approximated by the second
order central difference scheme, which has the following discrete form
i i
i i i
x u
x
u u u
− =

+ −
+ −
2
1 1
) (
2

(1.5)
The error between equation (1.5) and equation (1.1) is in the order of
2
) ( x ∆ . Note that
equation (1.5) gives a set of algebraic equations which are resulted from the numerical
discretization. Obviously, in the solution domain 1 0 ≤ ≤ x , the solution form (1.4)
accurately satisfies the discrete equation (1.5). Here, it is interesting to show that for
points outside the solution domain 1 0 ≤ ≤ x , equation (1.4) also satisfies equation (1.5)
with second order of accuracy. Consider a point 2 =
i
x and take x ∆ as 0.1. From
equation (1.4), we can get
94 2537208156 . 9 =
i
u , 57 4363258230 . 8
1
=
− i
u , 15 1437134843 . 10
1
=
+ i
u


9
Substituting above values into the left and right sides of equation (1.5) respectively, we
get
2597675984 . 7
) (
2
2
1 1
=

+ −
+ −
x
u u u
i i i

(1.6a)
94 2537208156 . 7 = −
i i
x u (1.6b)
Obviously, the difference of the two sides in equation (1.5) is in the order of
2
) ( x ∆ . This
example gives us an important hint. That is, the discrete form of a PDE resulted from
numerical discretization is not restricted by the geometry of the problem. It can involve
some points outside the solution domain. This is a very important feature.

From the inspiration of the analytical method, a new discretization method, the domain-
free discretization method is presented. The basic idea of the domain-free discretization
method is that the discrete form of the given differential equation is irrelevant of solution
domain. In other words, the discrete form of PDEs can involve some points outside the
solution domain. Therefore, the complicated coordinate transformation technique can be
avoided, and the numerical computation for regular and irregular domain problems can
be efficiently done in the standard coordinate system, such as Cartesian, cylindrical
coordinate system.

1.2 Domain-free Discretization Method

As shown in the introduction, the discrete form of the differential equation resulted from
the numerical discretization can be applied to the points inside the solution domain and


10
the points outside the solution domain. When the form is applied to the points outside the
solution domain, it involves the computation of the functional values at these points.
From the example shown in the introduction, the functional values at the points outside
the solution domain can be given from the analytical expression of the solution for a
specific problem. However, it is impossible to give the analytical solution in practice.

On the other hand, we note that although the analytical expression of the solution for the
whole domain is difficult to be given, we may be able to find the approximate form of the
solution in part of the whole domain. An example is to find the approximate form of the
solution along a line. Consider a two-dimensional problem and suppose that its analytical
expression of the solution is represented by ) , ( y x u . Along a vertical line of
i
x x = , the
analytical solution is given by ) , ( y x u
i
. Clearly, ) , ( y x u
i
is only the function of the
variable y. If along this vertical line, the functional values at certain mesh nodes are
given, then ) , ( y x u
i
can be approximated by some interpolation schemes. Once the
approximate form of the solution along a vertical line is found, it can be applied for all
the points along that line including the points inside and outside the solution domain. The
above idea is the essence of the Domain-Free Discretization method.

Consider a two-dimensional domain as shown in Figure 1.1. The boundaries of this
domain can be represented by two curves ) (x y
t
and ) (x y
b
with b x a ≤ ≤ .



11
y
y
t
(x)
y
b
(x)
x
a b x
k
x
i
A
A'
A''



Figure 1.1 Mesh point distribution used by the domain-free discretization method

For the numerical computation, we first descompose the whole domain into several
subdomains by vertical lines
i
x x = , N i ,..., 2 , 1 = , where N is the number of vertical lines.
Along each vertical line, the solution is only the function of y. The domain-free
discretization method first discretizes all the derivatives of a PDE in the x direction, and
reduces the PDE into a set of ordinary differential equations (ODEs). Note that along
each vertical line, the solution is governed by an ordinary differential equation (ODE).
Then, mesh nodes are distributed along each vertical line. The functional values at all
mesh nodes are the numerical (approximate) solutions of the PDE. Generally, the number
of mesh nodes on different vertical lines may be different. As shown in Figure 1.1,
i
M ,
the number of mesh nodes on the vertical line of
i
x x = may not be equal to
k
M which is
the number of mesh nodes on the vertical line of
k
x x = . Furthermore, the y coordinates
of relevant mesh nodes on these two lines may not be the same. Clearly, there is no


12
structure for the grid node distribution in the whole domain. The number of mesh nodes
used in the whole domain can be computed by

=
N
i
i
M
1
.

With the mesh nodes distributed along each vertical line, the domain-free discretization
method further discretizes the resultant ODEs and gives a set of algebraic equations. In
other words, the derivatives in the y direction for an ODE along a specific vertical line
are further discretized by a numerical method. It should be emphasized that the mesh
nodes used to further discretize the ODE along a vertical line are always within the
solution domain. However, since all the ODEs are coupled, the resulting algebraic
equations may involve some points on neighboring lines, which are possibly not the mesh
nodes of these lines, and can be inside the solution domain or outside of the solution
domain. An example is shown in Figure 1.1. When the resultant ODE is discretized at a
mesh node A, the resulting algebraic equation involves points A′ and A″ on two
neighboring lines. Obviously, A′ and A″ are not the mesh nodes on relevant lines with A′
being outside of the solution domain and A″ being inside the solution domain. The
functional values at these points have to be determined from the approximate form of the
solution along the relevant line. In DFD method, the functional values are calculated by
using interpolation technique for points inside the solution domain, and extrapolation
technique for points outside the solution domain. In general, Domain-Free Discretization
method involves two aspects. One is the derivative discretization by some numerical
methods. The other is the computation of functional values at a point by using
interpolation/extrapolation technique.


13

It should be noticed here that the mesh nodes are always distributed inside the physical
domain though the DFD may involve the points outside the domain. To clarify, by “mesh
node” or “node”, we mean those specific points inside the physical domain at which the
numerical solution is defined; by “point” we mean a position in a certain coordinate
system, which may be either inside or outside of the physical domain.

Take the two-dimensional Poisson equation as an example to illustrate the procedure of
domain-free discretization method. The Poisson equation in the Cartesian coordinate
system can be written as
) , (
2
2
2
2
y x f
y x
=


+

∂ ψ ψ

(1.7)

Numerical Discretization
Before the numerical discretization is conducted, we need to distribute N vertical lines in
the physical domain by the x coordinate N i x
i
,..., 2 , 1 , = , or M horizontal lines by the y
coordinate M j y
j
,..., 2 , 1 , = . If the vertical lines are distributed, the derivatives in the x
direction should be discretized first. Otherwise, the derivatives in the y direction are
discretized first. Suppose that the vertical lines are distributed in the physical domain, as
shown in Figure 1.1, we need to discretize the derivatives in the x direction. We can use
either the second order central difference scheme or the DQ method to discretize these
derivatives. When the central difference scheme is applied, equation (1.7) can be reduced
to


14
) , (
) ( ) ( ) ( 2 ) (
2
2
2
1 1
y x f
dy
y d
x
y y y
i
i i i i
= +

+ −
+ −
ψ ψ ψ ψ
, N i ,..., 2 , 1 =
(1.8)
And when the DQ method is applied, equation (1.7) can be simplified to
) , (
) (
) (
2
2
1
,
y x f
dy
y d
y b
i
i
N
k
k k i
= +

=
ψ
ψ , N i ,..., 2 , 1 =
(1.9)

where
k i
b
,
is the DQ weighting coefficient of the second order derivative in the x
direction. Note that both equation (1.8) and equation (1.9) are ordinary differential
equations for solutions along vertical lines. But equation (1.8) only involves solutions on
three neighboring lines, whereas equation (1.9) involves solutions on all the vertical lines.
In addition, equation (1.8) is applied on a uniform mesh along the x direction while
equation (1.9) is applied on a non-uniform mesh along the x direction. For a general case,
it is difficult to obtain the analytical solution of either equation (1.8) or equation (1.9).
Thus, we need to further distribute the mesh nodes along each vertical line, and pursue
the numerical solutions at these nodes. As mentioned previously, the number of mesh
nodes on different vertical lines could be different, and as a consequence, there is no
structure for the mesh node distribution. At the mesh node along each vertical line, the
derivatives in the y direction are further discretized by the DQ method. For the sample
problem, at the mesh point
i j
M j y ,..., 2 , 1 , = along a vertical line of
i
x x = , equation
(1.8) can be discretized by the DQ method as
) , ( ) (
) ( ) ( 2 ) (
1
,
2
1 1
j i k
M
k
i k j
j i j i j i
y x f y b
x
y y y
i
= +

+ −

=
+ −
ψ
ψ ψ ψ
, N i ,..., 2 , 1 =
(1.10)

where
i
M is the number of mesh points along the line of
i
x x = , and
k j
b
,
is the
weighting coefficient of the second order derivative in the y direction. Note that the


15
weighting coefficient
k j
b
,
on different vertical lines may be different. Equation (1.10) is
an algebraic equation system. It is indicated that the position
j
y on the vertical lines of
1 −
=
i
x x and
1 +
=
i
x x may not be the mesh node, which may also be outside the physical
domain. We will show in the following that the values of ) (
1 j i
y

ψ and ) (
1 j i
y
+
ψ can be
computed from the approximate form of ) (
1
y
i−
ψ and ) (
1
y
i+
ψ . In a similar way, equation
(1.9) can be further discretized by the DQ method as
) , ( ) ( ) (
1
,
1
, j i
M
k
k i k j
N
k
j k k i
y x f y b y b
i
= +
∑ ∑
= =
ψ ψ ,
i
M j ,..., 2 , 1 =
(1.11)
As compared to equation (1.10), equation (1.11) involves the computation of the
functional value at the position
j
y on all the vertical lines. Again, this value can be given
from the approximate form of the solution along each vertical line.

Approximate form of the solution along the line
Consider a vertical line of
k
x x = . On this line, there are
k
M grid nodes. Suppose that the
functional values at
k
M grid nodes are known. It is well known that the functional value
at any location on the line can be computed by the interpolation/extrapolation scheme,
such as the spline function, the radial basis function approximation, the low order
interpolated polynomial or the Lagrange interpolated polynomial.

1) Lagrange interpolation polynomial
If DQ method is adopted in the DFD method, the Lagrange interpolated polynomial is
selected as the interpolation/extrapolation scheme because it is consistent with the DQ


16
discretization. Using Lagrange interpolated polynomial, the solution on the line can be
approximated by


=
=
k
M
l
l k l k k
y y y x Lag y
1
) ( ) , , ( ) ( ψ ψ
(1.12)
where


=


=
k
M
ll l
ll ll l
ll
l k
y y
y y
y y x Lag
) (
1
) , , (
(1.13)

Using equation (1.12), the functional value at the position
j
y can be computed by


=
=
k
M
l
l k j l k j k
y y y x Lag y
1
) ( ) , , ( ) ( ψ ψ
(1.14)

where ) , , (
j l k
y y x Lag is given from


=


=
k
M
ll l
ll ll l
ll j
j l k
y y
y y
y y x Lag
) (
1
) , , (
(1.15)

Substituting equation (1.14) into equation (1.10), we can get
) , ( ) (
) ( ) , , ( ) ( 2 ) ( ) , , (
1
1
1
1
1 1
1
1
2
1 1
j i
M
k
k i jk
l i
M
l
j l i j i l i
M
l
j l i
y x f y b
y y y x Lag y y y y x Lag
x
i
i i
= +

+ −


∑ ∑
=
+
=
+ −
=

+ −
ψ
ψ ψ ψ

(1.16)

Similarly, substituting equation (1.14) into equation (1.11) gives
) , ( ) ( ) ( ) , , (
1
,
1 1
, j i
M
k
k i k j
N
k
l k
M
l
j l k k i
y x f y b y y y x Lag b
i k
= +
∑ ∑ ∑
= = =
ψ ψ
(1.17)
Now, the original partial differential equation (1.7) is reduced to an algebraic equation
system (1.16) or (1.17), which can be solved by using any standard solver. It is noted that
during the above process, the geometry of the physical domain is not directly involved in
the discretization and no coordinate transformation is introduced. Therefore, the method
can be applied to any irregular domain problem. That is why we call it Domain Free
Discretization method.



17
Note that equation (1.14) can be applied to a point inside the physical domain or a point
outside the physical domain. When the position
j
y is inside the physical domain, the use
of equation (1.14) is usually called the Lagrange interpolation. In contrast, when the
position
j
y is outside the physical domain, the use of equation (1.14) is called the
Lagrange extrapolation. It is found that the Lagrange interpolation can give very accurate
results, but the Lagrange extrapolation may cause a large numerical error, especially for a
nonlinear problem. The possible reason is that Lagrange extrapolation coefficients
) , , (
j l k
y y x Lag are very large, especially for the case in which the high order Lagrange
interpolated polynomial is involved, and the extrapolation point is far away from the
physical domain. The large extrapolation coefficients may introduce a large round-off
error, which can eventually lead the computation to diverge. To seek more appropriate
extrapolation method, we take local extrapolation instead of the global extrapolation. In
other words, we will use three local nodes to constitute a second order polynomial to do
the extrapolation. When y < ) (
k b
x y , the extrapolation is given by
3 ,
2 , 3 , 1 , 3 ,
2 , 1 ,
2 ,
1 , 2 , 3 , 2 ,
1 , 3 ,
1 ,
3 , 1 , 2 , 1 ,
3 , 2 ,
) )( (
) )( (

) )( (
) )( (
) )( (
) )( (
) (
k
k k k k
k k
k
k k k k
k k
k
k k k k
k k
k
y y y y
y y y y
y y y y
y y y y
y y y y
y y y y
y
ψ
ψ ψ ψ
− −
− −
+
− −
− −
+
− −
− −
=

(1.18)

and when y > ) (
k t
x y , the local extrapolation becomes
) )( (
) )( (

) )( (
) )( (
) )( (
) )( (
) (
, 1 , 2 , 1 ,
1 , , 2 ,
, 2 , 1 , 2 ,
2 , , 1 ,
2 , , 1 , ,
, 2 , 1 ,
k k k k
k k k
k k k k
k k k
k k k k
k k k
M k M k M k M k
M k M k M k
M k M k M k M k
M k M k M k
M k M k M k M k
M k M k M k
k
y y y y
y y y y
y y y y
y y y y
y y y y
y y y y
y
− −
− −
+
− −
− −
+
− −
− −
=
− − −
− −
− − −
− −
− −
− −
ψ
ψ ψ
ψ


(1.19)





18
2) Radial basis function approximation
Radial basis function is a recent tool for interpolating data. Due to the favourable
properties of the RBF (that is, high accuracy and absence of the notorious “snaking”
property for polynomial-based interpolation scheme), the RBF interpolation scheme is
used as the interpolation/extrapolation technique in the DFD.

Because Radial Basis Function (RBF) approximation is applied to the interpolation and
extrapolation in the y direction. Therefore, we only consider one-dimensional
interpolation by RBF. The vector
T
M k k k k
k
y y y )} ( , ), ( ), ( {
2 1
ψ ψ ψ L = Ψ represents all the
nodal variables at the N nodes on the kth line along the y direction. The RBF
approximation for the real function ) ( y
k
ψ is:

=
=
k
M
l
l k kl k
y y y
1
) , ( ) ( ϕ λ ψ
(1.20)
where ) , (
l k
y y ϕ is a radial basis function,
kl
λ is the coefficient for ) , (
l k
y y ϕ
corresponding to the approximated point. Due to its good performance for many cases,
we choose the multi-quadric RBF (MQ)
2 2
) ( ) , ( c y y y y
l l k
+ − = ϕ
(1.21)
where c is the shape parameter for MQ.
The coefficient
kl
λ in Eq. (1.20) can be determined by collocation method,


19
k
M
l
l j k kl j k
M j y y y
k
, , 2 , 1 , ) , ( ) (
1
L = =

=
ϕ λ ψ
(1.22)
There are N equations for N unknowns, so the problem is well-posed. Eq. (1.22) can be
written in the form of matrix as follows,
k k
Aλ ψ
v
v
=
(1.23)
where

=
) (
) (
) (
2
1
k
M k
k
k
k
y
y
y
ψ
ψ
ψ
ψ
M
v
,

=
k
kM
k
k
k
λ
λ
λ
λ
M
v
2
1
,

+ − + −
+ − + −
+ − + −
=
c c y y c y y
c y y c c y y
c y y c y y c
A
k k
k
k
M M
M
M
L
M O M M
L
L
2 2
2
2 2
1
2 2
2
2 2
1 2
2 2
1
2 2
2 1
) ( ) (
) ( ) (
) ( ) (

Because the non-singularity of A is guaranteed, therefore, this equation is solvable.
k
λ
v

can be obtained by,
k k
A ψ λ
v
v
1 −
=
(1.24)
As
k
λ
v
is known, we can get the function value of ) ( y
k
ψ at any position on the kth line
along the y direction by the interpolation formulation as shown in Eq.(1.20).

Substituting Eq. (1.24) into Eq. (1.20), we have
ψ ψ ϕ ψ
v
v
v v
) ( ) ( ) (
1
y y y R A = =

(1.25)
where ) ( y R
v
is defined by

1
) ( ) (

= A y y R ϕ
v
v

(1.26)


20
We will use Eq. (1.25) instead of Eq. (1.20) for interpolation and extrapolation.
Substituting equation (1.25) into equation (1.10), we can get
) , ( ) (
) ( ) , , ( ) ( 2 ) ( ) , , (
1
1
1
1
1 1
1
1
2
1 1
j i
M
k
k i jk
l i
M
l
j l i j i l i
M
l
j l i
y x f y b
y y y x R y y y y x R
x
i
i i
= +

+ −


∑ ∑
=
+
=
+ −
=

+ −
ψ
ψ ψ ψ

(1.27)

Similarly, substituting equation (1.14) into equation (1.11) gives
) , ( ) ( ) ( ) , , (
1
,
1 1
, j i
M
k
k i k j
N
k
l k
M
l
j l k k i
y x f y b y y y x R b
i k
= +
∑ ∑ ∑
= = =
ψ ψ
(1.28)

It should be noted that the RBF approximation used here is a global approximation, as it
uses all the mesh nodes along the radial line to constitute the approximation scheme.
Therefore, the extrapolation implemented with RBF is also the global approximation. For
convenience, we will use the same value of the shape parameter c at all the points along a
certain vertical line for both interpolation and extrapolation. It is found from practice that
c=0.815*dS
i
/M
i

for the ith vertical line (where dS
i
refers to the computational domain for the ith vertical
line, i.e., the distance between two curves ) (x y
t
and ) (x y
b
along that line; and M
i
is the
number of nodes on it) can give satisfactory results.

It has been demonstrated that with the RBF interpolation scheme, the RBF-DFD method
can lead to a more stable computation than that with Lagrange interpolation scheme. The
high order polynomial-based approximation scheme has the polynomial snaking
problems. It has been found that the distribution of weighting coefficients of the global
polynomial approximation scheme (including the global derivative approximation
method, such as the DQ method) exhibits clearly oscillatory behavior. The amplitude of


21
the oscillation becomes larger and larger when the domain is decreased (such as the gap
between the two curves ) (x y
t
and ) (x y
b
along the vertical line decreases). The
magnitude is even increased in orders and the “snaking” problem becomes more serious.
It introduces more and more high frequency errors into the computation and eventually
leads to a very oscillatory behavior. On the contrary, the radial basis function-based
approximation scheme does not encounter the problem of “snaking”. Therefore, the
process of convergence for RBF-DFD method is more stable.

The drawback of the RBF approach is that the accuracy is heavily depends on the choice
of shape parameter c, and a general and effective algorithm of searching the optimal
value of c is still absent.

Solution of Algebraic Equations
The resultant algebraic equation systems (1.16) and (1.17), (1.27) and (1.28), can be
solved by using any standard solver, such as SOR method.

In DFD method, because the number of nodes along the y direction can be arbitrary, and
the y coordinates of relevant mesh nodes on adjacent lines may not be the same,
therefore, there is no requirement for structured mesh. The flexibility of the DFD method
on grid structure makes it possible to design more reasonable grid for some irregular
physical domain problems to reduce the unnecessary computer cost. For example, as
shown in Figure 1.2, in the y direction, through properly control on the number of nodes
distributed at different vertical lines, the rigid structured grid can be replaced by a


22
relatively reasonable unstructured grid with less nodes. Eventually, the unnecessary
computational cost can be reduced.
C
C'
x
i
x
k
x
y

Figure 1.2 Unstructured grid

1.3 Sample Applications of DFD Method

In this section, we will validate the domain-free discretization method by applying it to
solve the sample linear and nonlinear differential equations. In particular, the
performances of all-nodes (Lagrange interpolated polynomial) and 3-nodes (local low
order polynomial) extrapolation are studied. To effectively validate the accuracy of
numerical results and show the efficiency of the method for solving irregular domain
problems, the inverse problems are considered in this section. In other words, the
differential equation and its exact solution are given and fixed in advance. Here, the exact
solution is used in two aspects. One is to compare with the numerical results. The other is
used to specify the boundary condition for different irregular domains. Since the exact


23
solution is fixed, it is interesting to check whether the same numerical results can be
achieved when the DFD method is applied to different solution domains.

Linear Differential Equation
We take the following two-dimensional Poisson equation
4
2
2
2
2
=


+


y x
ψ ψ
(1.29)
as an example. The exact solution of equation (1.29) is fixed as 1
2 2
− + = y x ψ , which
will be used to specify the Dirichlet boundary condition when a specific domain is given.
When different solution domains are considered, the boundary conditions are different
but the solutions should be the same. Suppose that the solution domain is circular. Its
boundary can be expressed by
1
2 2
= + y x , 1 1 ≤ ≤ − x
(1.30)
or by two curves
¦
¹
¦
´
¦
− − =
− =
2
2
1 ) (
1 ) (
x x y
x x y
b
t

(1.31)
To apply the DFD method, the circular domain is decomposed by 21 vertical lines. Then
on each vertical line, we distribute certain number of mesh nodes. The numbers of mesh
nodes on 21 vertical lines are respectively 1 , 3 , 5 ,..., 19 , 21 , 19 ,..., 5 , 3 , 1 =
i
M , N i ,..., 2 , 1 = .
Note that the number of mesh nodes on the first and last vertical lines is just 1. This is
because for the circular domain, there is only one node on these two lines.



24
For numerical discretization, all the derivatives are discretized by the DQ method. As
shown in Fig. 1.1, the resultant algebraic equations involve the computation of the
functional values at points inside and outside the circular domain. For the internal points,
we can simply apply the Lagrange interpolation, while for the external points, we can use
both the all-nodes and 3-nodes extrapolation. The resultant algebraic equations are solved
by the SOR iteration method. Once the numerical result at each mesh node is obtained,
we can compute the relative error, ) , (
j i
y x err , defined by
exact
exact numerical
j i
y x err
ψ
ψ ψ −
= ) , (
Then, on each vertical line, a maximum relative error can be found. Table 1.1 shows the
maximum relative errors on different vertical lines obtained by the all-nodes
extrapolation and the 3-nodes extrapolation. Due to the symmetry of the problem, only
the results on the right half of the circular domain are listed.

Table 1.1 Comparison of Maximum Relative Errors on Different Lines for a Circular
Domain ( 21 = N )
i 11 12 13 14 15 16 17 18 19 20 21
i
x
0 0.1495 0.2956 0.4351 0.5649 0.6821 0.7840 0.8685 0.9335 0.9777 1.0
All-nodes
Extrapolation
1.97379 1.8389 1.6219 1.2093 0.7355 0.3742 0.1743 0.0799 0.0713 0.0114 0.0
3 nodes
Extrapolation
0.0491 0.0509 0.0596 0.0693 0.0774 0.0778 0.0750 0.0646 0.0728 0.0114 0.0




25

It can be seen from Table 1.1 that when the all-nodes extrapolation is used, the maximum
relative errors on some vertical lines are very big. In fact, the maximum relative error
occurs on the vertical line of
11
x x = , which passes through the center of the circular
domain. The reason is that when the numerical discretization is applied at the mesh nodes
near the boundary on this line, the resultant algebraic equations involve extrapolation
almost on every vertical line and some extrapolation coefficients are very large. So, a
large numerical error is introduced. It can also be observed from Table 1.1 that when the
all-nodes extrapolation is replaced by the 3-nodes local extrapolation, the accuracy of
numerical results is greatly improved. For example, on the vertical line of
11
x x = , the
maximum relative error is reduced from 1.97379 by the all-nodes extrapolation to 0.0491
by the 3-nodes extrapolation. The maximum relative errors by the 3-nodes extrapolation
on other vertical lines are also very small, showing that an accurate numerical result is
obtained.

We have also applied the DFD method to solve the model differential equation on the
following domains: elliptic, trapezoidal and expansion channel. The boundary of the
elliptic domain is given by
¦
¹
¦
´
¦
− − =
− =
2
2
1 8 . 0 ) (
1 8 . 0 ) (
x x y
x x y
b
t
, 1 1 ≤ ≤ − x
(1.32)

and the boundary of the trapezoidal domain is represented by


26
¦
¹
¦
´
¦
=
⋅ + =
0 ) (
30 tan 1 ) (
0
x y
x x y
b
t
, 2 0 ≤ ≤ x
(1.33)

For the expansion channel, its boundary is denoted by
| |
¦
¹
¦
´
¦
− − =
=
) 2 tanh( ) 3 2 tanh(
2
1
) (
1 ) (
x x y
x y
b
t
, 3 / 10 0 ≤ ≤ x
(1.34)
It was found that when the DFD method is applied to above domains, both the all-nodes
extrapolation and the 3-nodes extrapolation can give reasonable numerical results. The
maximum relative errors in the whole solution domains are listed in Table 1.2. It can be
seen from Table 1.2 that for the trapezoidal domain and expansion channel, the accuracy
of numerical results is much higher than that for the circular and elliptic domains. The
reason is that more nodes for extrapolation in a resulting algebraic equation are needed
for the circular and elliptic domains. The large extrapolation coefficients could affect the
accuracy of numerical results.

Table 1.2 Comparison of Maximum Relative Errors on Different Physical Domains for A
Linear Problem
Physical Domains 3-nodes Extrapolation All-nodes Extrapolation
Circular 0.07777 1.9738
Elliptic 0.03535 0.07146
Trapezoidal 0.0001205 0.00000177
Expansion Channel 0.0000866 0.0000198



27
It should be indicated that when the DFD method is applied, it is easy to consider
different solution domains in the program. We just need to change the statements for the
expression of ) (x y
t
and ) (x y
b
.

Nonlinear Differential Equation
The DFD method is further validated by its application to solve a sample nonlinear
differential equation. Again, we consider an inverse problem. The differential equation is
given by
) 1 ( 2 4
2 2
2
2
2
2
− + + =


+


+


y x x
x y x
ψ
ψ
ψ ψ

(1.35)
and the exact solution is fixed as 1
2 2
− + = y x ψ when different domains are considered.
Like the linear case, equation (1.35) is also solved on the circular, elliptic, trapezoidal
domains and the expansion channel. It was found that when the all-nodes extrapolation is
applied, the numerical computation on the above 4 domains could not lead to a converged
solution. However, when the 3-nodes extrapolation is used, accurate numerical results
can be obtained for all the domains. This indicates that the large extrapolation
coefficients have more effect on the nonlinear differential equation than on the linear
differential equation. From our numerical experiments, it is suggested that for a nonlinear
differential equation, the 3-nodes or other local extrapolation can be used to get a
converged and accurate numerical result. For the model nonlinear differential equation
solved by the DFD method on 4 respective domains, the maximum relative errors in the
whole solution domain are listed in Table 1.3. As compared to the linear case, it can be
seen from Table 1.3 that for the nonlinear case, the accuracy of numerical results for the


28
circular and elliptic domains remain the same, but the accuracy of the results for the
trapezoidal domain and the expansion channel is slightly reduced.

Table 1.3 Comparison of Maximum Relative Errors on Different Physical Domains for A
Nonlinear Problem

Physical Domains 3-nodes Extrapolation
Circular 0.07828
Elliptic 0.03538
Trapezoidal 0.001813
Expansion Channel 0.001055


1.4 Application of DFD Method to Solve Navier-Stokes Equations

As an example, DFD method is applied to simulate incompressible flow in a smooth
expansion channel. This problem was first proposed by Roache (1981), and was chosen by a
workshop of International Association for Hydraulic Research (IAHR) Working Group
(Napolitano et al, 1985) as a suitable test case for assessing various numerical methods.



29
Description of the Problem
Inlet
Symmetric Line y
t
(x)=1
Solid wall y
b
(x)
(0,1)
(0, 0)
y
x
(Re/3,1)
Outlet

Figure 1.3 Geometry of the expansion channel
The half of the expansion channel is shown in Figure 1.3. It is noted that when different
Reynolds number is considered, the physical domain is also different. The boundary of
the expansion channel can be analytically expressed by
3 Re/ 0 for )], 2 tanh( )
Re
30
2 [tanh(
2
1
) ( = ≤ ≤ − − =
out b
x x
x
x y
(1.36)
on the lower boundary (solid wall), and
1 ) ( = x y
t
(1.37)
on the upper boundary (symmetry line).

Governing Equations
The two-dimensional, incompressible Navier-Stokes equations are chosen as the
governing equations for the problem. In the Cartesian coordinate system, the version of
vorticity-stream function formulation can be written as


30
) (
Re
1
2
2
2
2
y x y
v
x
u


+


=


+

∂ ω ω ω ω

(1.38)
ω
ψ ψ
=


+


2
2
2
2
y x

(1.39)
where , , Re, , , v u ψ ω are vorticity, stream function, Reynolds number, velocity
components in the x and y directions respectively. Velocity v u, can be calculated from
the stream function by
¦
¦
¹
¦
¦
´
¦


− =


=
x
v
y
u
ψ
ψ

(1.40)

Boundary Conditions
The boundary conditions of the problem are given as follows. At inlet, the fully
developed velocity profile is given, which is then converted to the stream function
distribution
0 at ,
0
) 3 (
2
1
3 2
=
¦
¹
¦
´
¦
=
− =
x
y y
x
ψ
ψ

(1.41)
At outlet, the natural boundary condition
3 Re/ at ,
0
0
=
¹
´
¦
=
=
x
x
x
ω
ψ

(1.42)
is applied. On the lower boundary (solid wall), the no-slip boundary condition is
implemented, which is written as


31
) ( at ,
0 /
0
x y y
n
b
=
¹
´
¦
= ∂ ∂
=
ψ
ψ

(1.43)
where n is the unit length in the normal direction. The symmetric boundary condition
) ( at ,
0
1
x y y
t
=
¹
´
¦
=
=
ω
ψ

(1.44)
is applied on the upper boundary (symmetry line).

The boundary condition for vorticity at inlet and lower boundary can be given from
equation (1.39). Since the lower boundary is curved, when equation (1.39) is discretized
in the Cartesian coordinate system, its discrete form will involve some points outside the
physical domain. The functional value at points outside the physical domain needs to use
the extrapolation form of the solution. However, the implementation of the boundary
condition directly or indirectly involves the use of the extrapolation form of the solution
which can influence accuracy of the algorithms and stability of the computation greatly.
Therefore, in DFD method, we always make the implementation of boundary condition
(especially for Neumann boundary condition) as accurate as possible. Thus, to meet this
requirement, we adopt the transformed form of equation (1.39) to implement the
boundary condition for vorticity on the lower boundary. According to Shu et al (1994), in
the Curvilinear coordinate system, we have

+ +

+ =
∂ξ
∂ψ
∂η
∂ψ
∂η

∂η
∂ψ
∂ξ
∂ψ
∂ξ

ω B C
J
B A
J
1 1

(1.45)
In the Curvilinear coordinate system, the lower boundary is defined as 0 = η , and on this
boundary, we have 0 / = ∂ ∂ ξ ψ and 0 / = ∂ ∂ η ψ . Using these conditions, equation (1.45)
can be simplified on the lower boundary as


32

2
2
∂η
ψ ∂
ω
J
C
=
(1.46)
The coefficients C, J and coordinate transformation can be given as
) (
1
2 2
ξ ξ
y x
J
C + =
(1.47)

ξ η η ξ
y x y x J − = (1.48)
Re / 3 / x x x
out
= = ξ (1.49)

y
x y y
x y x y
x y y
b
b t
b


=


=
) (
) ( ) (
) (
η
(1.50)
With equation (1.47)-(1.50), equation (1.46) can be further reduced to
2
2
4 2
)]
Re
30
2 [cosh( Re
225
1
y
x


+ =
ψ
ω
(1.51)
Equation (1.51) can be directly discretized (in the Cartesian coordinate system) along a
vertical line by using the DQ method. Note that its discrete form does not involve any
point outside the physical domain.

Discretization of Governing Equations
For numerical discretization of Navier-Stokes equations, the derivatives with respect to
the y coordinate are approximated by the DQ method, whereas the derivatives with
respect to the x coordinate can be discretized by the second order FD scheme or DQ
method. The difference between using the FD scheme and the DQ method in the x
direction will be discussed in the following.


33

As shown in the previous section, the DFD method first decomposes the physical domain
by a series of vertical or horizontal lines. For the former as an example, the derivatives in
the x direction should be discretized either by DQ method or by the 2
nd
FD scheme.
When the DQ method is applied, the resultant equation would involve all vertical lines
while when the second order FD scheme is used, only three neighboring lines are
involved. It is clear that when further numerical discretization is applied at mesh nodes
along each vertical line, the resulting discrete equation from the DQ application in the x
direction would involve more points outside the physical domain than those from the
second order FD application in the x direction. In other words, the use of the DQ method
in the x direction would involve more extrapolation.

From the previous section, as to extrapolation approximation, for polynomial based DFD
method, the coefficients of Lagrange interpolation polynomial increase dramatically; one
has to give up the global approximation and shifts to use the three local nodes to
constitute a local low-order polynomial.

1) Discretization of derivatives by DQ method
Using the DQ method to discretize all the spatial derivatives, equations (1.38)-(1.39) are
reduced to

¦
¦
¹
¦
¦
´
¦
= +
+ = +
∑ ∑
∑ ∑ ∑ ∑
= =
= = = =
ij
M
k
ik jk
N
k
kj ik
N
k
M
k
N
k
M
k
ik jk kj ik ik jk ij kj ik ij
i
i i
b b
b b a v a u
ω ψ ψ
ω ω ω ω
1 1
1 1 1 1
) (
Re
1

(1.52)


34
for N i ,..., 2 , 1 = and
i
M j ,..., 2 , 1 = . where N is the grid number in the x direction
(number of vertical lines) and
i
M is the number of grid nodes on the line of
i
x x = .
ik
a
and
ik
b are the DQ weighting coefficients of the first and second order derivatives in the
x direction; similarly,
jk
a and
jk
b are the DQ weighting coefficients of the first and
second order derivatives in the y direction. Equation (1.52) involves many points which
need interpolation or extrapolation, as can be seen clearly from Figure 1.4.
A
3
A
2
A
1
B B
1
B
2

Figure 1.4 Extrapolation when DQ method is used
When the DQ method is used, the derivative at a point is expressed by the weighted sum
of functional values at the points that are located in the same line as this point. For
example, as shown in Figure 1.4,
x ∂
∂ψ
at point ) , ( j i B is approximated by

=
=


N
k
kj ik
B
a
x
1
ψ
ψ

(1.53)

Clearly,
B
x ∂
∂ψ
is related to the functional values at point
3 2 1
, , A A A ,…, which are outside
the domain and need extrapolation, and the values at points
1
B ,
2
B ,…, which are inside
the domain and need interpolation. In general, the nearer the extrapolation points from


35
the boundary, the higher the accuracy of extrapolation. As shown in Figure 1.4, point
3
A
is far away from the boundary, thus the extrapolation for this point will bring a large
numerical error into the computation of
B
x ∂
∂ψ
. For this case, although the program can
run, the obtained results are not accurate. To improve this, we should try to make the
discretization form of
x ∂
∂ψ
at point B involving the extrapolation as less as possible. For
the approximation of
x ∂
∂ψ
at point B, if we only consider two neighboring points
1
A and
1
B , the discretization technique becomes the second order FD scheme which will be
discussed in the following.

2) Discretizing derivatives by FD method
In this part, the derivatives in the x direction are discretized by the second order FD
scheme, whereas the derivatives in the y direction are still discretized by the DQ method.
After numerical discretization, the discrete form of equations (1.38)-(1.39) is

¦
¦
¹
¦
¦
´
¦
= +

+ −
+

+ −
= +



∑ ∑
=
− +
=
− +
=
− +
ij
M
k
ik jk
j i j i j i
M
k
ik jk
j i j i j i
M
k
ik jk ij
j i j i
ij
i
i i
b
x
b
x
a v
x
u
ω ψ
ψ ψ ψ
ω
ω ω ω
ω
ω ω
1
2
, 1 , , 1
1
2
, 1 , , 1
1
, 1 , 1
2
)
2
(
Re
1
2

(1.54)
where
jk
a and
jk
b are the DQ weighting coefficients of the first and second order
derivatives in the y direction. Note that the position
j
y on the line of
1 −
=
i
x x or
1 +
=
i
x x
may not be the mesh nodes. For the general case, both interpolation and extrapolation
have to be carried out since the geometry is irregular and no coordinate transformation is
introduced.


36

A
1
B B
1
x
i
B( i, j)
interpolation extrapolation x
i-1
x
i+1

Figure 1.5 Extrapolation when FD method is used

As shown in Figure 1.5, the point
1
A is outside the physical domain. The functional value
at this point is obtained by the 3-nodes polynomial local extrapolation. The three nodes
are those that are nearest to
1
A on the line of
1 −
=
i
x x . The point
1
B is an inner point. The
functional value at this point is obtained by global interpolation of all mesh nodes on the
line of
1 +
=
i
x x by Lagrange polynomial interpolation or RBF approximation scheme. For
equation (1.54),
j i , 1 +
ω and
j i , 1 +
ψ are obtained by interpolation on the line of
1 +
=
i
x x
while
j i , 1 −
ω and
j i , 1 −
ψ are obtained by extrapolation on the line of
1 −
=
i
x x . The resultant
set of algebraic equations is then solved by SOR iteration method.

3) Implementation of Boundary Conditions
At inlet
The discretized form of the boundary condition at inlet can be easily written as


37
¦
¹
¦
´
¦
− =
− =
) 1 ( 3
) 3 (
2
1
1 1
2
1
2
1 1
j j
j j j
y
y y
ω
ψ

(1.55)

where 1 ,..., 2
1
− = M j , and
1
M is the number of grid nodes on the line of
1
x x = .
Equation ) 1 ( 3
1 1 j j
y − = ω is just used as an initial condition. It must be updated with the
iteration process by equation

j
j
j
j
j
x
v
y
x
v
y
u
1
1
1
1
1
) 1 ( 3


− − =





= ω
(1.56)

j
x
v
1


can be obtained by the following method.

By using Taylor series expansion, we have
¦
¦
¹
¦
¦
´
¦
∆ ⋅


+ ∆ ⋅


+ =
∆ ⋅


+ ∆ ⋅


+ =
2
1
2
2
1
1 3
2
1
2
2
1
1 2
4
2
1
) 2 (
2
1
x
x
v
x
x
v
v v
x
x
v
x
x
v
v v
j
j
j j
j
j
j j

(1.57)

Solving above equations, we obtain

x
v v v
x
v
j j j
j

− −
=


2
3 4
1 3 2
1

(1.58)
At the inlet, we have 0
1
=
j
v . Substituting this condition into above equation gives
x
v v
x
v
j j
j


=


2
4
3 2
1

(1.59)
where
j
v
2
and
j
v
3
are velocity components on the lines of
2
x x = and
3
x x =
respectively, and are obtained by Lagrange interpolation or RBF approximation.


38

The velocity components at the inlet can be written as
¦
¹
¦
´
¦
=
− =
0
) 2 (
2
3
1
2
1 1 1
j
j j j
v
y y u

(1.60)

Along symmetry line
Along the symmetry line, the discretized boundary condition is
¦
¹
¦
´
¦
=
=
0
1
1
i
i
iM
M iM
ω
ψ ψ

(1.61)
where N i ,..., 2 , 1 = , and N is the number of mesh nodes in the x direction.

Using equation (1.40), the velocity component u , v on the symmetry line can be given as
¦
¹
¦
´
¦
=
ψ =

=
0
1
i
i
i i
iM
M
k
ik k M iM
v
a u

(1.62)

Note that the DQ method has been used to discretize the first order derivative in equation
(1.62).

At outlet
By using Taylor series expansion, the natural boundary condition at outlet can be
approximated by


39
¦
¦
¹
¦
¦
´
¦

=

=
− −
− −
3
4
3
4
, 2 , 1
, 2 , 1
j N j N
Nj
j N j N
Nj
ω ω
ω
ψ ψ
ψ

(1.63)

where 1 ,..., 2 − =
N
M j , and
N
M is the number of mesh nodes on the line of
N
x x = .

Similarly, the velocity components at outlet can be computed by

¦
¹
¦
´
¦
=
ψ =

=
0
1
Nj
M
k
Nk jk Nj
v
a u
N

(1.64)

Again, the derivatives in the y direction are discretized by the DQ method.

On the solid wall
Along the wall, the boundary condition of vorticity is discretized by the DQ method in the
y direction. The discretized boundary condition is

¦
¦
¹
¦
¦
´
¦


+ =
=

=
i
M
k
ik k
i
i
i
b
x
1
1
4 2
1
11 1
)]
Re
30
2 [cosh( Re
225
1 ψ ω
ψ ψ

(1.65)
where N i ,..., 2 , 1 = , and N is the number of grid nodes in the x direction.

For the velocity components at the solid wall, we have
¹
´
¦
=
=
0
0
1
1
i
i
v
u

(1.66)



40
Some Numerical Results

The numerical results obtained by the DFD method are compared well with available data
in the literature. This can be observed from Figure 1.6, which displays the vorticity
distribution along the wall for Re=10. The present results are obtained by a mesh size of
41×15. Also included in Fig. 1.6 are the results of Shu et al (1994) using the DQ method
with coordinate transformation and the benchmark solution of IAHR workshop given by
Cliffe et al using a finite element method with results being grid-independent. Note that
the results of Cliffe et al are shown in the paper of Napolitano et al. (1985). It is seen from
the figure that the present results agree very well with the benchmark solution of the
problem.
Wall Vorticity Distribution for Re=10
-1.0
0.0
1.0
2.0
3.0
-0.2 0.0 0.2 0.4 0.6 0.8 1.0
x/x
out
V
o
r
t
i
c
i
t
y
Benchmark
Shu et al
present

Figure 1.6 Comparison of wall vorticity distribution (mesh size: 41×21)

The flow in the expansion channel has a feature that a quasi-self-similar solution can be
obtained when Reynolds number is much larger than 1. This feature has been confirmed


41
in Figure 1.7, which displays the wall vorticity distribution for different Reynolds
numbers obtained by the DFD method. Clearly, as Reynolds number increases to the
value of much larger than 1, the solution takes on a quasi-self-similar form, i.e. the wall
vorticity becomes independent of Re when plotted against x/x
out
.

Wall Vorticity Distribution
-1.0
0.0
1.0
2.0
3.0
0.0 0.2 0.4 0.6 0.8 1.0
x/x
out
V
o
r
t
i
c
i
t
y
Re=10
Re=100
Re=200


Figure 1.7 Wall vorticity distribution for different Reynolds numbers
(mesh size: 41×21)

References

Napolitano, M. and Orlandi, P. (1985), “Laminar Flow In A Complex Geometry: A
Comparison”, Int. J. Numer. Methods Fluids, 5, 667-683


42
Roache, P., (1981), "Scaling of High Reynolds Number Weakly Separated Channel
Flows", Symposium on Numerical and Physical Aspects of Aerodynamic Flows,
1981.
Shu C. (2000), Differential Quadrature and Its Application in Engineering, Springer-
Verlag, London.
Shu C., Chew Y. T., Khoo, B. C. and Yeo, K. S. (1994), “A Global Method For Solving
Incompressible Navier-Stokes Equations in General Coordinate System”, in
Advances in Computational Methods in Fluid Dynamics, Proceedings of ASME
Fluids Engineering Summer Meeting, Hyatt Regency Lake Tahoe, U.S.A., 381-386.
Shu,C. and Fan, L. F.(2001): A new discretization method and its application to solve
incompressible Navier-Stokes equation, Computational Mechanics 27:292-301.
Shu C., Wu Y.L. (2002): Domain-free discretization method for doubly connected
domain and its application to simulate natural convection in eccentric annuli,
Comput. Methods Appl. Mech. Engrg. 191 (2002):1827–1841
Wu Y.L., Shu C. (2002): Development of RBF-DQ method for derivative approximation
and its application to simulate natural convection in concentric annuli,
Computational Mechanics 29 (2002): 477-485
Wu Y.L., Shu C., Qiu J and Tani J (2003): Implementing Multi-Grid approach in
Domain-Free Discretization method to speed up convergence, Computer Methods
in Applied Mechanics and Engineering 192 (2003): 2425-2438

43
2. Least Square-based Finite Difference Method

2.1 Introduction

Nowadays, numerical solution of the fluid mechanics equations on the computer has been
developed into an important subject of fluid dynamics, i.e., computational fluid dynamics
(CFD). The core of CFD is to construct a numerical approximation that simulates the
behavior of dependent variables in the governing equations. The function or derivative
approximation, which is also named discretization method, is then employed to discretize
the governing equations. As a result, a system of algebraic equations or difference
equations are then obtained, which can be solved on a computer. A powerful
discretization method must be simple, efficient, and robust. The most popular
discretization methods used in CFD to date are the finite difference method (FDM), finite
element method (FEM) and finite volume method (FVM). Many other methods are
originated from the above three methods, or have the similar formulations. Therefore,
these three numerical methods are also regarded as standard/traditional numerical
methods in computational fluid dynamics. A brief review of these methods is given
below:

The fundamental idea of FD method is to approximate/interpolate the unknown functions
by a local Taylor series expansion at grid points in the adopted mesh system (we can also
use a local low order polynomial approximation). However, FD method is further
simplified in the practical implementations. It essentially approximates the derivatives in

44
the governing equations by a linear combination of values of dependent variables at a
finite number of grid points. The most suitable computational domain for FD method is
the rectangular type, where it is accurate, efficient and simple to implement. However, it
does not adapt well to problems with complex geometry without appropriate coordinate
transformation. As compared with FD method, FE and FV methods are much more
powerful for the problems with geometrical complexity. It is due to the fact that they can
be applied on the unstructured mesh. The distinguishing feature of FEM is that it solves
the weak form of the partial differential equations. The solution domain is divided into a
set of finite elements, which are generally unstructured to fit the complex geometry. After
its initial development from an engineering background, FEM has been formulated by
mathematicians into a very elegant and strict framework, in which precise mathematical
conditions for the existence of solution and convergence criteria and error bounds were
well established. To fully understand the aspects of finite element discretization,
appropriate mathematical background is needed for the end-users, such as functional
analysis. The greater complexity of the FEM method makes them cost more
computational efforts than the FDM. The FVM is similar to the FEM in many ways,
except that the FVM uses the integral form of the conservation equations as its starting
point. Since all terms that need be approximated in the FVM have physical meaning, it is
very popular with engineers. As compared with FDM, the disadvantage of FVM appears
in the three-dimensional applications, in which it is difficult for FVM to develop an
approach with order higher than second. One common point of these standard numerical
methods is that they all are mesh-using methods, i.e., before the start of computation,
they need to build up large data structure to store detailed elemental information

45
comprising all node-based and element-based connectivity and hierarchical data about the
computational mesh. As a consequence, the obtained numerical results depend strongly
on the mesh properties. Due to their good performance, these three methods are widely
used in process, mechanical, chemical, civil, and environment engineering.

However, despite of the popularity of traditional methods (such as FD, FE, and FV) in the
field of flow simulations, a lot of new numerical schemes occurred in the past two
decades. One may wonder why the search for new methods continues. The reason lies in
fluid mechanics itself, i.e., dynamic and geometrical complexity of flow problems.

Dynamic complexity of flow problems
Fluid mechanics consists of flow problems with very different characters. From the point
of view of the disparities of the length, time and velocity scales spurred by flow
mechanism, it encompasses laminar, turbulent, incompressible, compressible, transonic,
and supersonic flows, with single or multiple components. From the point of view of
fluid characteristics, it encompasses inertia dominated, viscosity dominated, surface
tension dominated, heat conduction dominated, potential, advection-dominated flows.
Moreover, many combinations of them are usually considered. This is the so-called
dynamic complexity of flow problems. It is impossible to develop a numerical scheme
that can handle all of these situations. In general, one numerical method can only be
applied to a narrow scope of flow problems more efficiently and successful than the other
methods. Many important complex problems still cannot be treated reliably and
efficiently with standard numerical schemes.

46

Geometrical complexity of flow problems
In addition to the various flow patterns, many flow problems involve complex
geometries, for example, multi-domain configuration, large deformation, moving
boundaries and bodies with complex shapes. These represent another main difficulty
confronted in the computational fluid dynamics, i.e., geometrical complexity. To deal
with the geometrical complexity, standard numerical schemes like FDM, FEM and FVM
employ different kinds of meshes. FDM is mainly applied to flow problems with regular
domain such as rectangular regions, or circular, concentric, and sectorial regions, so that
Cartesian or cylindrical meshes can be employed. The geometry flexibility of FD method
can be enhanced by means of the coordinate transformation techniques, which map a
complex physical domain into a regular computational domain. However, the
construction of body-fitting meshes and transformation of governing equations are not
only tedious and problem-dependent, but also introduce additional geometrical error into
the scheme and degrade the accuracy of the solution. Although some preliminary
successes were achieved, the flexibility of irregular geometry is still a major deterrence in
the broad application of FD method.

To remove the difficulties arising from the complex geometries, FV and FE method use
unstructured mesh to fit the shape of physical domain. Usually, the unstructured mesh is
triangular mesh in two-dimension and pyramid mesh in three-dimension. However,
unstructured mesh generation is not a trivial job. In many cases, mesh generation even
absorbs far more time and costs more than the numerical solution itself. For example, the

47
generation of a mesh for the simulation of airflow past an aircraft may require several
months, while the solution computations may take only a few hours on a supercomputer.
The generation of three-dimensional unstructured meshes for FE and FV method, despite
of recent advances in this field, is certainly the bottleneck in most industrial
computations. Another difficulty appears in the simulation of moving boundary
problems. With the moving of boundaries, successive re-meshing of the domain may be
required to avoid the break down of the computation due to excessive mesh distortion if
standard schemes are employed. Therefore, we need to map the solution between
different meshes. This interpolation process not only subsequently increases the cost of
the simulation, but also leads to a degradation of accuracy and possible unstable
computation.

In spite of the great success standard numerical methods achieved, these drawbacks
impair their computational efficiency and even limit their applicability to applications.
That is why the search for better numerical methods continues.

Concept of mesh-free
In recent years, many new numerical schemes have been proposed to avoid the weakness
of the standard numerical methods described previously, especially on the geometrical
complexity. Among the new developed numerical schemes, a group of so-called meshless
or mesh-free methods especially attracted the attention of engineers, physicists and
mathematicians. As its name implies, mesh-free methods are deliberately designed to be
absent from the dependence on the mesh. The terms meshless and mesh-free refer to the

48
ability of the method to construct functional approximation or interpolation entirely from
the information at a set of nodes, without any pre-specified connectivity or relationships
among the nodes. A method is considered mesh-free if the discretization of governing
equations of flow problems does not depend on the availability of a well-generated mesh.
Some mesh-free methods do have a weak dependence on background meshes to carry out
numerical quadrature calculations. Such methods are still regarded as mesh-free because
there is no fixed connection among the nodes, but not “truly” mesh-free method due to
the background meshes.

One of the key advantages of mesh-free method as compared to the standard methods is
the saving of time and human-labor on the mesh construction when complex geometry is
involved. Instead of mesh generation, mesh-free methods use node generation. From the
point of view of computational efforts, node generation is seen as an easier and faster job.
Another advantage of mesh-free method is easily construction of high-order schemes.
The construction of higher-order schemes on unstructured grids by standard schemes has
encountered severe obstacles in the areas of stability and storage. Most programs are still
based on linear elements, or, equivalently linear function reconstruction. The use of
mesh-free schemes can facilitate the construction of higher-order discretization. From the
use of mesh-free methods, we also can enjoy the computational ease of adding and
subtracting nodes from the pre-existing nodes. This property is highly appreciated in the
flow problems with large deformation or moving boundaries.


49
It is known that any discretization method requires an approximation/interpolation
scheme based on a linear combination of a set of basis functions. The approximation/
interpolation scheme is usually referred as approximation kernel. Mesh-free methods are
not the exceptions. However, their approximation kernels are not constructed on meshes
but on a cloud of scattered nodes instead.

Currently, most of mesh-free methods are designed to solve the weak form of partial
differential equations. In fact, they are developed from the FE method. The least square-
based finite difference (LSFD) method introduced in this chapter and the radial basis
function-based differential quadrature (RBF-DQ) method introduced in the next chapter
are developed from the FD method and its equivalent, the DQ method. They are used to
solve the strong form of partial differential equations.

2.2 Least Square-based Finite Difference (LSFD) Method

One Dimensional Taylor Series Formulation and Conventional FD Scheme

o o o
1 2 3
x x


Figure 2.1 Configuration for One-dimensional FD scheme


50
Let us consider the one-dimensional grid points shown in Figure 2.1. For grid point 2,
located in the middle between grid points 1 and 3 such that
2 3 1 2
x x x x x − = − = ∆ , the
Taylor series expansions around point 2 give
( ) ...
2
1
2
2
2
2
2
2 1

|
|
.
|

\
| φ
∆ + |
.
|

\
| φ
∆ − φ = φ
dx
d
x
dx
d
x (2.1a)
( ) ...
2
1
2
2
2
2
2
2 3
+
|
|
.
|

\
|
φ
∆ + |
.
|

\
| φ
∆ + φ = φ
dx
d
x
dx
d
x (2.1b)
Truncating the series just after the third term, and adding and subtracting the two
equations, we obtain the following second-order finite-difference approximations for the
first and second order derivatives:
) (
2
2 1 3
2
x O
x dx
d
∆ +

φ − φ
= |
.
|

\
| φ
(2.2a)
) (
) (
2
2
3 2 1
2
2
2
x O
x dx
d
∆ +

φ + φ − φ
=
|
|
.
|

\
| φ
(2.2b)
The substitution of such expression into the differential equation leads to the finite
difference equation.

FD’s limitation in complex geometry
Conventional FD scheme is very popular in the industrial CFD applications in regular
domain and has shown very good performance, especially when efficiency and accuracy
is regarded. However, it confronts difficulties while applied to multi-dimensional
problems involved with complex geometries. In general, to deal with multi-dimensional
problems, convectional FD scheme usually uses fractional techniques and treats them as
multi- one-dimensional problems. In other words, it must be applied along a mesh line.

51
For the domain of simple geometry such as rectangle or circle, mesh lines can be
generated according to Cartesian or cylindrical coordinates, and therefore we can solve
the related flow problem easily. For domains of greater complexity, coordinate
transformation techniques must be implemented to locate the computational mesh points
on the domain boundaries. Body-fitted meshes are then generated by solving partial
differential equations. However, it must be noted that the grid generation for highly
irregular domains is problem-dependent and not an easy task, sometime even a mission
impossible. In addition, coordinate transformation technique not only brings complexity
into the computation, but also introduces additional numerical error into the scheme. To
circumvent the difficulties confronted by conventional FD scheme in the complex
geometries, one solution resorts to removing the dependence of traditional FD scheme on
meshes, i.e., the mesh-free scheme.

Motivation of constructing FD-like mesh-free method
One mesh-free idea can be naturally inspired from the construction of conventional FD
scheme. As well-known, one-dimensional (1D) Taylor series expansion is used in the
development of the conventional FD schemes, in which only the derivatives in one spatial
direction are involved and considered as unknowns. To solve for these unknown
derivatives, one needs to apply the 1D Taylor series expansion at some collocation points
along the respective spatial direction. In like manner, this procedure can be extended to
the two-dimensional (2D) case, in which the 2D Taylor series expansion is applied. We
call this procedure as two-dimensional Taylor series formulation. Since the formulation
only requires the information about the relative positions of the supporting nodes to the

52
reference node, the constructed scheme can be considered as a mesh-free approach. The
details will be described below.

Two-Dimensional Taylor Series Formulation
In the two-dimensional Taylor series formulation, Taylor series expansion is employed to
approximate the unknown function within a local support of reference node. As shown in
Figure 2.2, the functional value near a reference node o can be approximated by the
functional value and its derivatives at the node o by,
( ) ( ) ( )( )
( ) ( ) ( ) ( ) ( )( ) ...
2
1
2
1
6
1
6
1
2
1
2
1
0
2
2
2
0
2
2
2
0
3
2
3
0
3
2
3
0
2
0
2
2
2
0
2
2
2
0
0
0
+
|
|
.
|

\
|
∂ ∂
φ ∂
∆ ∆ +
|
|
.
|

\
|
∂ ∂
φ ∂
∆ ∆ +
|
|
.
|

\
|

φ ∂
∆ +
|
|
.
|

\
|

φ ∂
∆ +
|
|
.
|

\
|
∂ ∂
φ ∂
∆ ∆ +
|
|
.
|

\
|

φ ∂
∆ +
|
|
.
|

\
|

φ ∂
∆ +
|
|
.
|

\
|

φ ∂
∆ + |
.
|

\
|

φ ∂
∆ + φ = φ
y x
y x
y x
y x
y
y
x
x
y x
y x
y
y
x
x
y
y
x
x
(2.3)

Figure 2.2 Supporting knots around a reference knot

Suppose that equation (2.3) is truncated to the third order derivatives. Then it has 9
unknowns. Among them, 2 are the first order derivatives, 3 are the second order
derivatives, and 4 are the third order derivatives. Like the conventional FD scheme, we
Reference knot
Supporting knots
Non-supporting knots


53
need 9 equations to solve for these 9 unknowns. This can be achieved by applying
equation (2.3) at 9 neighbouring points. Suppose that all the 9 points are within a circular
sub-domain
o
D of radius
o
d about node o. Application of equation (2.3) at 9
neighbouring points gives
dφ ⋅ = −
T
j o j
s φ φ , j = 1, 2, …, 9 (2.4)
where
( ) ( ) ( )( ) ( )
( ) ( ) ( ) ( )( )

∆ ∆ ∆ ∆ ∆

∆ ∆ ∆ ∆ ∆ ∆ ∆ =
2 2 3
3 2 2
2
1
,
2
1
,
6
1

,
6
1
, ,
2
1
,
2
1
, ,
j j j j j
j j j j j j j
T
j
y x y x y
x y x y x y x s

|
|
.
|

\
|
∂ ∂
φ ∂
|
|
.
|

\
|
∂ ∂
φ ∂
|
|
.
|

\
|

φ ∂
|
|
.
|

\
|

φ ∂

|
|
.
|

\
|
∂ ∂
φ ∂
|
|
.
|

\
|

φ ∂
|
|
.
|

\
|

φ ∂
|
|
.
|

\
|

φ ∂
|
.
|

\
|

φ ∂
=
0
2
3
0
2
3
0
3
3
0
3
3
0
2
0
2
2
0
2
2
0
0
T
, , ,
, , , , ,
y x y x y x
y x
y x
y x


In above equations, the subscript o denotes functional value at node o, subscript j (j =
1,2,..,9) denotes functional value at supporting node j in
o
D .
j j o
x x x ∆ = − and
j j o
y y y ∆ = − , where ( , )
j j
x y denotes the Cartesian coordinates of node j. It is noted that
in this development, we truncated the Taylor series expansion after the third order
derivatives. This allows us to approximate the second-order derivatives to the second-
order accuracy and the first-order derivatives to the third-order accuracy.
Furthermore, by defining
| |
0 9 0 1
T
..., , φ − φ φ − φ = ∆φ (2.5)
| |
9 9 9 1
T
..., ,
×
= s s S (2.6)
we can further assemble equations (2.4) into the following succinct matrix form:

54
= Sd ∆ϕ ϕ (2.7)
The square matrix S contains all the geometric information about the distribution of the
supporting nodes. If the matrix S is non-singular, the derivative vector dϕ can be
obtained as
1 −
= ∆ d S ϕ ϕ (2.8)
Application of equation (2.8) to discretize derivatives in the differential equations yields
the requisite system of finite-difference equations. Up to this point, the development is
similar to that of the conventional finite-difference scheme. The only difference is that we
have used 9 supporting nodes surrounding the reference node in the present two-
dimensional formulation.

Studying the structure of matrix S, it is clear that the distribution of the supporting nodes
will determine whether it is singular; or it is ill-conditioned for inversion. Assuming the
matrix to be non-singular so that an inverse exists, we observed that the matrix tends to
become ill-conditioned numerically when one or more of the supporting nodes are very
close to the reference node, i.e. ( , ) 0
j j
x y ∆ ∆ ≈ for some j. Secondly, it is noted that the
matrix may become ill-conditioned or singular when some supporting nodes are very
close to each other.

Local Distance Scaling
To overcome the first difficulty, the radius
o
d of the support domain is used to scale the
local distance ( )
j j
y x ∆ ∆ , ,

55
o
j
j
d
x
x

= ∆ ,
o
j
j
d
y
y

= ∆ (2.9)

Table 2.1 Condition number of the coefficient matrix before and after scaling

After
Scaling
Before scaling
Grid
spacing h
N/A 0.1 0.01 0.001 0.0001
Condition
number
8.7246 9.0321 58.027 550.95 5480.5

An experiment has been carried out to test the effect of scaling, and the results are shown
in Table 2.1. It can be clearly observed that the condition number of resultant matrix
) , ( y x ∆ ∆ S is greatly improved as compared with matrix ) , ( y x ∆ ∆ S . It indicates that by
local support scaling we can alleviate the negative effect caused by small value of
) , ( y x ∆ ∆ . The derivative vector then leaves,
∆φ D S dφ
1 −
= (2.10)
where the scaling matrix D is the diagonal matrix,
|
|
|
|
|
|
|
|
|
|
|
|
|
.
|

\
|
=









3
3
3
3
2
2
2
1
1
o
o
o
o
o
o
o
o
o
d
d
d
d
d
d
d
d
d
D (2.11)

56
However, the second difficulty is not so easy to resolve. This is because little is known
about the effects of node distribution on the conditioning of the matrix, except for a few
special cases, such as when all the supporting nodes are located on a straight line. For
numerical implementation, we would hence have to check and ensure that the matrix S is
well-conditioned at every node of the computational domain. This can be done by a trial-
and-error process. However, the process greatly increases the computational cost. In the
following, we will provide an alternative, which comes in the form of least-squares
technique to optimize the approximation of the vector dϕ. The least-squares technique
allows an optimal approximation to be derived from an over-determined set of equations.
It allows the use of a great number of nodes to bypass the problem of singularity.

Least-Square technique
Suppose that the optimal approximation of the derivative vector at the node o is b.
Similar to equation (2.4), the functional value at its neighbouring point can be
approximated by
b s ⋅ = −
T
j o j
φ φ , j=1, 2,…, n (2.12)
Equation (2.12) is applied at n ( 9 ≥ n ) supporting points in the domain
o
D . The vector b
(optimal approximation of the derivative vector dφ ) can be obtained by the least square
technique. To do this, we define the approximation error as E, which is given as
( ) ( )

=
⋅ − − =
n
j
j j
E
1
2
0
b s b
T
φ φ (2.13)
To minimize the error, we need to set

57
0 =
|
.
|

\
|


=dφ b
b
E
(2.14)
Substitution of equation (2.13) into equation (2.14) gives
( ) 0 2
,
1
9
1
, 0
= −
|
|
.
|

\
|
− φ − φ
∑ ∑
= =
m j
n
j k
k k j j
S b S for m = 1,…,9 (2.15)
where
k j
S
,
represents the entry of the matrix S at j-th row and k-th column, and
k
b
represents the element of derivative vector dφ at k-th row. Equation (2.15) can be further
simplified as,
( )
m j
n
j k
k k j
n
j
j m j
S b S S
,
1
9
1
,
1
0 , ∑ ∑ ∑
= = =
|
|
.
|

\
|
= φ − φ for m = 1,…,9 (2.16)
Noticing that ( ) ( )
T
j m m j
S S
, ,
= , equation (2.16) can be rewritten in the form of matrix,
b S S ∆φ S
T T
= (2.17)
Thus, we get the explicit expression for the optimal derivative approximation by least-
square technique as
( ) ∆φ S S S dφ
T T
1 −
= = b (2.18)
We note that the matrix S S
T
is positive-definite if the columns of S are linearly
independent.

Proof: If the columns of S are linearly independent, then 0 0 ≠ ⇒ ≠ Sx x and therefore
0 0
2
2
> = ⇒ ≠ Sx Sx S x x
T T
. Hence S S
T
is positive definite.


58
As we have discussed above, the column vectors are prone to be linearly dependent when
we use the same number of supporting points as that of determined derivatives. It
depends on how the supporting points disperse in the sub-domain. In general, since they
are randomly generated, we cannot guarantee that we can have the “perfect” pattern of
supporting point at every node without additional check and adjustment. However, this
situation can be improved by using more supporting points than the number of
approximated derivatives. As a result, with the increasing of the number of supporting
points, the dimension of the column vectors increase correspondingly. At the same time,
the possibility of linear-independence for the column vectors increase greatly as well.
They will finally become linearly independent if we continuously adopt more and more
supporting points. Thus, we can say that the matrix S S
T
is symmetric and positive-
definite. This conclusion can be applicable to most of the “grid” or point distributions
except for some unreasonable ones. For example, ] 2 [ ] 1 [ column column α = , where α is a
constant. This implies that all the points lie on one line, which is obviously a bad grid for
a two dimensional problem. Up to date, the largest number of supporting points used to
ensure the linear-independent column vectors is 16, for the 9 of approximated derivatives.
Equation (2.18) shows that by increasing the number of local supporting points, the
optimal derivative vector can be well obtained.

Weighting function
Through the use of least-square technique to avoid the singularity of the coefficient
matrix, it makes almost even error-distribution at the supporting points, which may not be

59
the optimal. Therefore, further improvement can be made to get better distribution of
approximation errors. That is the reason for the introduction of the weighting function.

The least square approximation (2.13) assumes the square errors to be uniformly
distributed across the supporting points. For a given amount of total error, one would
normally prefer the approximation error to be small in the crucial central region around
the reference node, where the derivatives are evaluated, and be willing to tolerate higher
errors for points further out, since the latter is expected to have smaller influence on the
desired derivatives. The redistribution of errors can be achieved by introducing a
distance-related weighting function that assigns greater weightage to points near the
reference node. Such weighting functions typically have the following properties:
• They are positive within the support domain;
• Their values decrease with increasing distance from the reference node.
Five different weighting functions are examined in the present study. All the four
functions have the properties described above.
1) 1 0 =
i
W (equivalent to no weighting) (2.19a)
2)
4 2
) 1 ( / 4 1
i i
r W − π = (2.19b)
3)
i i
r W / 1 2 = (2.19c)
4)
4 3 2
3 8 6 1 3
i i i i
r r r W − + − = (2.19d)
5)
4
/ 1 4
i i
r W = (2.19e)

60
where
o
i i
i
d
y x
r
2 2
∆ + ∆
= , the index i is the ith supporting point, and
o
d denotes the
radius of support domain, 1 0 ≤ ≤
i
r . The adoption of weighting function actually serves
as the precondition procedure for derivative vector in such a way that,
( ) ∆φ W S WS S dφ
T T
1 −
= (2.20)
where W is an n n × diagonal matrix formed by applying equation (2.19) at n supporting
points,
|
|
|
.
|

\
|
=
n
W
W
0
0
1
O W (2.21)
Using scaling and define C= ( ) W S S W S
T T
1 −
, equation (2.20) gives
∆φ D C dφ = (2.22)
where the matrix D is given in equation (2.11). Note that if only the first- and second-
order derivative approximation is required, only the first five entries of dφ need to be
considered. However, the inclusion of high-order terms can increase the accuracy of the
method.

Now, a least-square technique based mesh-free approach is fully developed. Since it
shares many common properties with FD scheme, the approach is named as Least-Square
based Finite Difference (LSFD) method. It is also interesting to note that for the method,

61
at each node the coefficient matrix remains unchanged for a fixed set of supporting points
and its inverse matrix needs to be calculated only once. The increase in computational
cost is acceptable as compared to the traditional FDM but the new scheme gives the
flexibility for complex problems. Furthermore, the derivatives given by equation (2.22)
are independent of the governing equations, and can be used repeatedly for other
problems with the same distribution of supporting points.

Theoretical Analysis of Discretization Error
Although we are interested in the accuracy of LSFD method, it seems better to begin by
investigating the error incurred in the discretization of derivatives. For simplicity, the
error analysis in this section is carried out on a uniform mesh with a grid spacing h. In
this development, since we have truncated the Taylor series expansion after the third
order derivatives, the truncation error for equation (2.12) can be written as:
( )
4 4
) ( , ) (
i i i
y x O e ∆ ∆ = , i=1, …, n (2.23)
Specifically, since a uniform mesh is chosen for analysis, we can see that
i
x ∆ and
i
y ∆
are proportional to the grid spacing h. Therefore, we say
( )
4
h O e
i
= , i=1, …, n (2.24)
Equation (2.4) can be rewritten as:
| | ( ) | | | |
1 1 9 9 1 × × × ×
+ =
n exact n n
e dφ S ∆φ (2.25)
where the derivative vector
exact
dφ has the same form as the derivative vector dφ except
that its entries represent the exact values of derivatives.


62
In order to get the explicit expression of discretization error for the derivative vector dφ
achieved by least-square technique, we substitute equation (2.25) into equation (2.18).
Then, we have,
( ) dφ S S e dφ S S
T T
= +
exact
(2.26)
Denoting the discretization error E for the derivative vector as
exacct
dφ dφ E − = and
substituting it into equation (2.26), we have,
e S E S S
T T
= (2.27)
The structure of the matrix S demonstrates that it stores the information about grid
spacing and the relative positions of the supporting points corresponding to the center
point. However, we can extract the information about grid spacing from S by scaling, i.e.,
H S S = (2.28)
where
9
3
3
3
3
2 2 2
3
3
1 1 1
) (
) (
) (
×
|
|
|
|
|
|
|
.
|

\
|
∆ ∆ ∆
∆ ∆ ∆
∆ ∆ ∆
=
n
n n n
h
y
h
y
h
x
h
y
h
y
h
x
h
y
h
y
h
x
L
M M M M
L
L
S and
9 9
3
2
×
|
|
|
|
|
|
.
|

\
|
=
h
h
h
h
O
H
h
x
i

and
h
y
i

are constants for a uniform mesh since the set of supporting points for the
center point is fixed as long as they are chosen. Therefore, we can see that matrix S is
only concerned with the point-distribution in the domain and matrix H is related to the
influence of the mesh refinement.
Substituting equation (2.28) into equation (2.27) and simplifying the expression gives,
( ) e S S S H E
T T 1
1 −

= (2.29)

63
Since the matrix S S
T
is symmetric, positive and definite, it implies the existence and
boundness of ( )
1 −
S S
T
. Observing that matrix ( )
T T
S S S
1 −
does not have information of
grid spacing h, we can say that the entries of the resultant vector ( ) e S S S
T T
1 −
remain the
same order of those in the vector e , i.e, O(h
4
). Accordingly, we can decide the order of
discretization error vector E:

=
) (
) (
) (
) (
) (
) (
) (
) (
) (
2
2
2
3
3
h O
h O
h O
h O
h O
h O
h O
h O
h O
E (2.30)
which indicates that the LSFD scheme allows us to approximate the second-order
derivatives to the second-order accuracy and the first-order derivatives to the third-order
accuracy. This is very encouraging conclusion, which shows that the use of least-square
technique does not degrade the order of accuracy of finite-difference approximation.

Though the above analysis of discretization error of the scheme is made on the uniformly
distributed points, it can also be extended to other kinds of point distributions such as
scattered point distribution. The difference only lies on the choice of local distance
scaling or the so-called “mesh” size h. The order of discretization error remains the same.
From the analysis above, it can also be seen that the number of supporting points has no
effect on the order of discretization error, which is determined by the order of truncated

64
Taylor series expansion instead. However, it can influence the accuracy of LSFD scheme
in another way. As discussed in the previous section, large number of supporting points
mainly contributes to convertibility of coefficient matrix, but also expands the local
support of reference node. In other words, the radius of local support or the “mesh” size h
will become larger with the increasing of supporting points. That will slightly lower the
accuracy of spatial discretization by LSFD method.

2.3 Numerical Analysis of Convergence Rate

In this section, numerical examples are performed on a Poisson solver to investigate the
numerical characteristics of the LSFD method, such as the role of weighting function in
the scheme, and analysis of discretization error, etc.

Consider the problem of a two-dimensional Poisson equation in a square domain
( 1 0 , 1 0 ≤ ≤ ≤ ≤ y x ). The governing equation and boundary condition are defined by
y x
y
u
x
u
π π π sin sin 2
2
2
2
2
2
⋅ − =


+


for 0<x<1, 0<y<1, (2.31)
Boundary condition: x u + =1 on Ω ∂ ,
The analytical solution for this problem is y x x y x u π π sin sin 1 ) , ( ⋅ + + = .
To solve equation (2.31), the Laplacian operator must be firstly discretized by LSFD
method. Suppose that the derivative coefficients for the Laplacian operator have been
computed, then, equation (2.31) is replaced by a difference equation with the form:

65
y x u w w
d
N
k
k
i
yy
k i
xx
k i
π ⋅ π π − = +

=
sin sin 2 ) (
2
1
, ,
(2.32)
where subscript i represent the reference node, N
d
denotes the number of supporting
points (including reference node itself) and subscript k represents the k
th
support point of
node i.
xx
k i
w
,
denotes the derivative coefficients for the second-order derivative with
respect to x coordinate at the k
th
support point of node i, and so for the
yy
k i
w
,
. In the
following, a subroutine written in Fortran is provided along with the related ones, as an
example to show how to compute the derivative coefficients in the LSFD method.
c-------------------------------------------------------------------------------------------------
c---- This program is used to calculate the derivative coefficients in the LSFD method.
c---- Some explanations about the interface of this subroutine LSFD
c---- INPUT: pxy, xy,iw OUTPUT: v_deriv
c---- pxy: store the positions of the supporting points
c---- xy: store the position of the reference node
c---- iw: specify the weighting function implemented
c---- v_deriv: store the vector of computed derivative coefficients

c---- Some important symbols and variables
c---- np: the number of supporting points
c---- idim: the number of derivatives contained in the Taylor series expansion
c---- wi: the diagonal weighting function matrix
c---- A: the original coefficient matrix
c--------------------------------------------------------------------------------------------------
subroutine LSFD(pxy, xy, iw, v_deriv)
implicit real*8(a-h,o-z)
parameter(np=12,nd=np+1,idim=9)
dimension pxy(np,2),xy(2),r(idim,np)
dimension vd_temp(idim,nd),v_deriv(nd,5)
dimension A(np,idim),b(idim,np),d(idim,np),wi(np,np)
dimension unity(idim,idim),et(idim,idim),e(idim,idim)

error_tolerance=1e-9
if(iw.lt.0 .and. iw.gt.4)then
write(*,*)'wrong weighting functions'
stop
endif

c-------------------- Find the scaling parameter ----------------------

66
scaling=0.d0
do i=1,np
dx=pxy(i,1)-xy(1)
dy=pxy(i,2)-xy(2)
scaling=dmax1(scaling,dsqrt(dx*dx+dy*dy))
enddo
scaling=scaling*1.2d0
c-----------------------------------------------------------------------------------

do i=1,np
dx=(pxy(i,1)-xy(1))/scaling
dy=(pxy(i,2)-xy(2))/scaling
A(i,1)=dx
A(i,2)=dy
A(i,3)=dx*dx*0.5d0
A(i,4)=dy*dy*0.5d0
A(i,5)=dx*dy
A(i,6)=(dx**3)/6.d0
A(i,7)=(dy**3)/6.d0
A(i,8)=0.5d0*dx*dx*dy
A(i,9)=0.5d0*dx*dy*dy
enddo

do ip=1,np
do jp=1,np
if(ip.eq.jp)then
dx=pxy(ip,1)-xy(1)
dy=pxy(ip,2)-xy(2)
dxy=dsqrt(dx*dx+dy*dy)/scaling
if(iw.eq.0)wi(ip,ip)=1.d0
if(iw.eq.1)wi(ip,ip)=dsqrt(4.d0/pi)*(1.d0-dxy*dxy)**4.d0
if(iw.eq.2)wi(ip,ip)=1.d0/dxy
if(iw.eq.4)wi(ip,ip)=1.d0/(dxy**4.d0)
if(iw.eq.3)wi(ip,ip)=1.-6.d0*dxy*dxy+8.d0*dxy**3.d0-3.d0*dxy**4.d0
else
wi(ip,jp)=0.d0
endif
enddo
enddo

do ik1=1,idim
do ik2=1,np
b(ik1,ik2)=A(ik2,ik1)
enddo
enddo


67
call brmul(b,wi,idim,np,np,d)
call brmul(d,a,idim,np,idim,e)

do ik1=1,idim
do ik2=1,idim
et(ik1,ik2)=e(ik1,ik2)
enddo
enddo

call brinv(e,idim,l)

call brmul(e,et,idim,idim,idim,unite)

c------------------- Check the computed inverse of coefficient matrix --------------------
c---- if AA
-1
.ne. I or has larger error more than the tolerance, stop the program
c---- which indicates the large condition number.
erre=0.d0
do ik1=1,idim
do ik2=1,idim
if(ik1.eq.ik2)then
erre=dmax1(erre,dabs(1.d0-unity(ik1,ik2)))
else
erre=dmax1(erre,dabs(unity(ik1,ik2)))
endif
enddo
enddo

if(erre.gt.error_tolerance)then
write(*,*)'too large inverse error',erre
write(*,*)xy(1),xy(2)
stop
endif
c---------------------------------------------------------------------------------------------------------

call brmul(e,d,idim,idim,np,r)

do ik1=1,idim
do ik2=1,np
vd_temp(ik1,ik2)=r(ik1,ik2)
enddo
enddo

do ik1=1,idim
do ik2=1,np
vd_temp(ik1,nd)=vd_temp(ik1,nd)-vd_temp(ik1,ik2)
enddo

68
enddo

c---- Recover the derivative coefficients from the scaling -----
do ik1=1,5
do ik2=1,nd
if(ik1.eq.1 .or. ik1.eq.2)then
v_deriv(ik2,ik1)=vd_temp(ik1,ik2)/scaling
elseif(ik1.eq.3 .or. ik1.eq.4 .or. ik1.eq.5)then
v_deriv(ik2,ik1)=vd_temp(ik1,ik2)/scaling/scaling
endif
enddo
enddo

return
end

c---------- Subroutine used to calculate the product of matrix multiplication
subroutine brmul(a,b,m,n,k,c)
dimension a(m,n),b(n,k),c(m,k)
double precision a,b,c
do 175 i=1,m
do 175 j=1,k
c(i,j)=0.0
do 171 l=1,n
c(i,j)=c(i,j)+a(i,l)*b(l,j)
171 continue
175 continue
return
end

c------- subroutine to numerically compute the inverse of an nxn matrix A.
c------- The inverse of A will replace A as a return parameter after computation.

subroutine brinv(a,n,l)
dimension a(9,9),is(9),js(9)
double precision a,t,d
l=1
do 100 k=1,n
d=0.0
do 10 i=k,n
do 10 j=k,n
if (abs(a(i,j)).gt.d) then
d=abs(a(i,j))
is(k)=i
js(k)=j

69
end if
10 continue
if (d+1.0.eq.1.0) then
l=0
write(*,20)
return
end if
20 format(1x,'err**not inv')
do 30 j=1,n
t=a(k,j)
a(k,j)=a(is(k),j)
a(is(k),j)=t
30 continue
do 40 i=1,n
t=a(i,k)
a(i,k)=a(i,js(k))
a(i,js(k))=t
40 continue
a(k,k)=1/a(k,k)
do 50 j=1,n
if (j.ne.k) then
a(k,j)=a(k,j)*a(k,k)
end if
50 continue
do 70 i=1,n
if (i.ne.k) then
do 60 j=1,n
if (j.ne.k) then
a(i,j)=a(i,j)-a(i,k)*a(k,j)
end if
60 continue
end if
70 continue
do 80 i=1,n
if (i.ne.k) then
a(i,k)=-a(i,k)*a(k,k)
end if
80 continue
100 continue
do 130 k=n,1,-1
do 110 j=1,n
t=a(k,j)
a(k,j)=a(js(k),j)
a(js(k),j)=t
110 continue
do 120 i=1,n

70
t=a(i,k)
a(i,k)=a(i,is(k))
a(i,is(k))=t
120 continue
130 continue
return
end


After the numerical discretization, the corresponding algebraic equations are solved by
the Gaussian-Seidel iterative method. The computed results are then compared with the
analytical solutions. Convergence is measured by the following relative error norm:
Relative L
2
error norm:

∑ −
=
=
N
i
exact
N
i
exact num
u
u u
1
2
1
2
(2.33)
The effect of five weighting functions as shown in equation (2.19) on the convergence
and accuracy of the solution is investigated. In order to study the difference between the
accuracy achieved by conventional FD scheme and LSFD method, the central-difference
FD scheme is also used to solve this Poisson equation on the same mesh.

Table 2.2 Comparison of Log10(err) for the solution of Poisson equation with different
weighting functions
Grid spacing

0.0500 0.0200 0.0133 0.0100 0.0067 0.005
W
0
-2.7108 -3.5219 -3.8770 -4.1289 -4.4831 -4.7345
W
1
-2.8275 -3.6385 -3.9941 -4.2455 -4.5999 -4.8515
W
2
-2.7237 -3.5346 -3.8902 -4.1416 -4.4958
--
4.7472
LSFD
W
3
-2.8073 -3.6182 -3.9741 -4.2253 -4.5795 -4.8311

71

W
4
-2.8207 -3.6312 -3.9873 -4.2382 -4.5925 -4.8441
Conventional
Central FDM
-3.3208 -4.1175 -4.4703 -4.7208 -5.0750 -5.3277

Table 2.2 shows the relative L
2
error of the numerical solutions achieved by
LSFD with different grid spacing and weighting functions. From this table, we can see
that the difference of numerical errors is very small when the same grid spacing is used
with different weighting functions. The W
1
weighting function gives slightly superior
performance. Figure 2.3 shows the decay of relative L
2
error of the numerical solutions
with respect to the grid spacing for the weighing function W
0
, W
1
, W
2
, W
3
, W
4
,
respectively. We notice from the figure that the five convergence curves are actually the
straight lines. Moreover, they are parallel to each other and have the same convergence
rate (=2.01), with different weighting functions. In other words, the weighting functions
have no significant influence on the convergence rate. But, for the same grid spacing, the
LSFD method without weighting gives the worst accuracy. This implies that the role of
weighing function in assigning greater weightage to nearby nodal values does help to
improve numerical accuracy slightly. The convergence rate of present results (=2.01) is
consistent with the early analysis of having the second order of accuracy for the second
order derivatives by our LSFD schemes. This is a very encouraging feature as it shows
that the least-square minimization of errors in weighted or non-weighted form does not
cause a deterioration of formal approximation accuracy. This conclusion is also well
illustrated in Figure 2.4 where the convergence curve of conventional central-difference
FD scheme is also included. Since the central-difference FD scheme can approximate the
second-order derivatives to the second-order accuracy on the uniform mesh, its

72
convergence rate should be 2 theoretically. As shown in Figure 2.4, its convergence line
is in parallel with those of LSFD schemes. It is noted that the central-difference FD
scheme produces the most accurate solution among the six schemes. The reason may be
due to the fact that the radius of supporting points in the LSFD method is actually larger
than the grid spacing h. In general, more supporting points are needed in the LSFD
scheme than in the conventional FD scheme.
O
A
B
C
D
log10(h)
l
o
g
1
0
(
e
r
r
)
-2.225 -2.2 -2.175 -2.15 -2.125
-4.6
-4.5
-4.4
W0
W1
W2
W3
W4
O
A
B
C
D

Figure 2.3 Convergence curves of LSFD with different weighting functions


73

O
O
O
O
O
O
A
A
A
A
A
A
F
F
F
F
F
log10(h)
l
o
g
1
0
(
e
r
r
)
-2.25 -2 -1.75 -1.5
-5
-4.5
-4
-3.5
-3
W0
W1
W2
W3
W4
CD
O
A
F

Figure 2.4 Convergence curves of LSFD and central-difference FD Schemes

2.4 Sample Applications of LSFD to Flow Problems

u=0
v=0
T=1
u=0
v=0
T=0
u
T
y
= = = 0 0 0 , , v


u
T
y
= = = 0 0 0 , , v




Figure 2.5 Configuration of Natural Convection in A Square Cavity


74
The problem being considered is a two-dimensional buoyancy-driven flow of a
Boussinesq fluid in a square cavity, as shown schematically in Figure 2.5. The horizontal
walls of the cavity are insulated while the vertical walls are kept at different
temperatures. This problem has been studied by many researchers, and can serve as a
good model for testing and validating new numerical methods. The flow and heat transfer
in the cavity are governed by the following non-dimensional equations in terms of stream
function ψ , vorticity ω and temperature T:
x
T
Ra
y x y
v
x
u
t ∂

+
|
|
.
|

\
|


+


=


+


+


Pr Pr
2
2
2
2
ω ω ω ω ω
(2.34)
ω
ψ ψ
=


+


2
2
2
2
y x
(2.35)
2
2
2
2
y
T
x
T
y
T
v
x
T
u
t
T


+


=


+


+


(2.36)
where Pr and Ra are the Prandtl and Rayleigh numbers respectively. The Prandtl number
of Pr=0.71 is taken for the model problem. The u, v denote the components of velocity in
the x and y direction, which can be calculated from the stream function
y
u


=
ψ
,
x
v

ψ ∂
− = (2.37)
Equations (2.34)-(2.36) are subjected to the initial conditions
0 = = = = = v u T ψ ω , when t=0 (2.38)
and boundary conditions for t>0,
0 = ψ , T=1, at x=0, 0≤y≤1, (2.39)
0 = ψ , T=0, at x=1, 0≤y≤1, (2.40)

75
0 =


=
y
T
ψ , T=0, at y=0,1, 0<x<1. (2.41)
No explicit mesh is required by the LSFD method. The discretization of the
computational domain thus comprises merely a set of points at which dependent field
variables are defined. Only a single nodal index i is required to enumerate the nodal
points for problems in two or three space dimensions. At a general nodal point of index i,
the LSFD approximations of the governing equations (2.34-2.36) give:

∑ ∑ ∑ ∑
=
= = = =
∆ +
|
|
.
|

\
|
ω ∆ + ω ∆ = ω ∆ + ω ∆ =
ω
i
i i i i
n
k
k
i
x
k i
n
k
n
k
n
k
k
i
y
k i
k
i
x
k i
k
i
y
k i
n
k
i
k
i
x
k i i
i
T c Ra
c c c v c u
dt
d
1
) 1 (
,
1 1 1
) 2 (
,
) 2 (
,
) 1 (
,
1
) 1 (
,
Pr
Pr
(2.42)
∑ ∑ = ∆ + ∆
= =
i i
n
k
n
k
i
k
i
y
k i
k
i
x
k i
c c
1 1
) 2 (
,
) 2 (
,
ω ψ ψ (2.43)
∑ ∑ ∑ ∑
= = = =
∆ + ∆ = ∆ + ∆ =
i i i i
n
k
n
k
n
k
k
i
y
k i
k
i
x
k i
k
i
y
k i
n
k
i
k
i
x
k i i
i
T c T c T c v T c u
dt
dT
1 1 1
) 2 (
,
) 2 (
,
) 1 (
,
1
) 1 (
,
(2.44)

=
∆ =
i
n
k
k
i
y
k i i
c u
1
) 1 (
,
ψ and

=
∆ =
i
n
k
k
i
x
k i i
c v
1
) 1 (
,
ψ (2.45)
where
i
k
i
k
i
F F F − = ∆ , F
i
represents the unknown value at node i, F
i
k
represents the
unknown value at the kth supporting point for the node i.
) 1 (
,
x
k i
c ,
) 1 (
,
y
k i
c ,
) 2 (
,
x
k i
c and
) 2 (
,
y
k i
c represent the computed LSFD coefficients at the kth supporting point around the ith
node for the first and second order derivatives in the x and y direction, respectively.

It should be indicated that the LSFD scheme approximates any derivative by a linear
combination of functional values randomly distributed at supporting points. In general, its
expression of a derivative approximation at a boundary point may involve information at

76
other boundary points. So, when it is applied to implement the Neumann boundary
condition (derivative condition), it is very difficult to get an explicit formulation to
update the functional value at the boundary point. This difficulty can be easily removed
by using the conventional one-sided finite difference scheme. The strategy will be
addressed in the following.

For the practical applications of mesh-free method, there are some other things worthy of
attentions in addition to the spatial discretization. For example, for many flow
applications the solution may need different resolutions for different regions. High
resolution is typically required for regions near boundaries if incompressible flow is
considered. Thus, when we use either mesh-based or point-based methods, the density of
mesh/point distribution should reflect that need. In such circumstances, the distribution of
the nodes or points in domain must be generated either adaptively or by using known
information about the specific physical problem. Both of them can be implemented in the
mesh-free method as we can freely add or delete nodes instead of re-meshing. For
incompressible flow and heat transfer in practical applications involving complex
geometry, rapid variations of physical variables usually occur in the boundary layer.
Thus, we would like to be able to control the point distribution in these areas to ensure
that the boundary phenomena are captured. This requirement leads to the adoption of
locally orthogonal grids near the boundary. The locally orthogonal grid generation can be
made by the algebraic formulation or by the fast hyperbolic method. Another advantage
of this method is that user can explicitly give/determine the grid spacing in the normal
direction of the boundary. This feature is very attractive in the viscous flow simulations.

77
It should be emphasized that as only several layers of grids are concerned here, the
problem of grid shock formation in hyperbolic grid generation over strong concave
surface is completely avoided. Another important benefit of having locally orthogonal
grid at the boundary is to facilitate the efficient implementation of Neumann-type
boundary condition. As it can be seen from Fig. 2.6, the derivatives in Neumann-type
boundary condition can be easily discretized by the one-side finite difference schemes
and expressed in terms of the function values at the wall and interior knots.


Figure 2.6 Locally orthogonal grids near the boundary

As shown in Figure 2.6, three layers of structured points are distributed at and near the
boundary. Note that this special arrangement of points is only used to implement the
derivative condition. As for discretization of governing equation, at any interior point
including the point on the three layers, any spatial derivative is discretized by the LSFD
scheme. Clearly, this strategy separates the discretization of governing equations done at
the interior points by the LSFD schemes and the implementation of Neumann boundary
Wall
w
w+1
w+2
Random knot distribution
Locally orthogonal grid

78
condition done at the boundary points by conventional FD schemes. In other words, our
strategy combines the advantages of the conventional FD schemes for easy
implementation of boundary conditions and the LSFD schemes for flexibility to complex
geometry. As shown in Fig. 2.6, the use of one-side FD scheme at the boundary point
gives,
Stream function: 0 =
i
ψ at all boundary nodes, (2.46)
Temperature: 0 =
i
T , at x=0, 0≤y≤1,
1 =
i
T , at x=1, 0≤y≤1, (2.47)

3
4
2 1 + +

=
w w
w
T T
T , at y=0,1, 0<x<1 (second-order FD scheme)
Vorticity:
1 2
1
2
1 3
+
+
− =
w
w
w
h
ω
ψ
ω (second-order FD scheme) (2.48)
where w denotes a point on the wall, w+1 and w+2 denote the first and second adjacent
points in the flow field from the wall. Our numerical simulations of this problem are
performed on a composite node distribution, which includes locally orthogonal grids near
the boundary and random points filled at the rest as shown in Fig. 2.7.

After numerical discretization by the LSFD method, the resultant algebraic equations are
solved by the SOR iteration method. The numerical results are visualized by isotherms
and streamlines. The results for the problems with Ra=10
4
and 10
5
are illustrated in Fig.
2.8.


79


Figure 2.7 Locally orthogonal grid and random node distribution


(a) Isotherms of Ra=10
4
(b) Streamlines of Ra=10
4




80

(c) Isotherms of Ra=10
5
(d) Isotherms of Ra=10
5



Figure 2.8 Isotherms and Streamlines of Ra=10
4
, 10
5
by LSFD method

The LSFD method has also been applied to unsteady incompressible flow problems, for
example, flow past circular cylinders. The studies of flow around one or arrays of circular
cylinders are of practical importance in engineering. In many areas of engineering,
circular cylinders form the basic component of structures, for example, heat exchange
tubes, cooling systems for nuclear power plants, offshore structures, cooling towers,
chimney stacks and transmission cables, etc. The engineering structures mentioned above
are exposed to either air or water flow, and therefore they experience flow-induced
vibration, which could lead to the structure failure under severe conditions.

According to the specific characteristic of practical problems, there are many choices to
generate the nodes. If we simulate the flow around several circular cylinders, in which the
geometrical configuration is formed by several boundaries of simple shapes, i.e., circular
cylinders and rectangular outer boundary. For each circular cylinder, the nodes in its
neighborhood can be generated by the use of the local polar-cylindrical grid. At the

81
middle of two cylinders there is an invisible line which forms the border of the two
systems. Then, the sets of nodes generated from the local polar-cylindrical grid are
truncated by the outer boundary – a rectangle. The node distribution generated for the
flow past two circular cylinders in staggered arrangement is shown in Fig 2.9.
.... ... . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ..................................................................................................................
..... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. .. ..................................................................................................................
... ... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... .... ................................................................................................................. ... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ...................................................................................................................... .. .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ... ................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ... .................................................................................................................... . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ................................................................................................................... ... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ..................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. ... .................................................................................................................... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ..................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. .................................................................................................................... . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .... ................................................................................................................ ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ................................................................................................................... ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. ................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ................................................................................................................. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ................................................................................................................. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ................................................................................................................. ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .................................................................................................................. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ................................................................................................................. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................ ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ................................................................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ................................................................................................................. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ................................................................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.............................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
......................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
......................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
......................................................................................
. .
. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................................
...
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..........................................................................
..
..
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
......................................................................
..
..
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
....................................................................
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...............................................................
..
..
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..............................................................
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................
..
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................................
...
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................ ... . .. .. .. .. ...........................
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........... .. .. . . . . . . . . . . . . . . .. ......................
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.......... . . . . . . . . . . . . . . . . . . . . . . ... .................
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..............
..
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .............
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..........
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
. . . . . . . . .
. . . . . . . . . . . . . . .
. .
.
.
.
. . .
. . . . . . . . . .
.
.
.
. . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ...................................................................................................................... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ...................................................................................................................... .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ....................................................................................................................... . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ... .................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .... .................................................................................................................. ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ..................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. ... .................................................................................................................. .. .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ..................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. ................................................................................................................... ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ... ................................................................................................................. ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................... ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ................................................................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ................................................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.....................................................................................................
. .
. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...........................................................................................
...
..
.
.
.
.
. .
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...................................................................................
..
..
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
. .
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
. .
..............................................................................
..
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
...........................................................................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.......................................................................
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .
.
....................................................................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.................................................................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.............................................................
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
................... ... .. .. .. . .. ............................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
.
.............. ... . .. . . . . . . . . . .. . . .. ......................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
.
............. . . . . . . . . . . . . . . . . . . . . . . .. ..................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.......... . . . . . . . . . . . . . . . . . . . . . . . . . .. . ..............
..
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
...... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ..........
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
.
.
... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..........
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ...
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . .
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . .
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
. . . . . . . . . . . .
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
. . . . . .
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
. .
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
. .
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
. . . . . . . . . . . . . . .
.
.
.
.
. . . . . . . . .
.
.
. . . .
.
.
. .
.
.
.
.... ...... ... .. ... .. .. .. . .. . . .. . . . .. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. . . . .. . .. .. . .. .. .. ... ... ..... ..................................................................................................................
.... ...... ... .. ... .. .. .. . .. . . .. . . . .. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. . . . .. . .. .. . .. .. .. ... ... ..... .................................................................................................................. . .. ......
. . . . . . .. ...........
. . . . . . . . . .. ..............
. . . . . . . .
........
. . . . . .
......
. . . . .
.....
. . . . .
.....
. . . .
....
. . .
...
. . . .
....
. . .
...
. . .
...
. . .
...
. . .
...
. . .
...
. . .
...
. .
..
. .
..
. .
..
. .
..
. .
..
. .
..
. .
..
.
.
. .
..
.
.
. .
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . .
. . . . . . . . . . . .
.
. . . .
.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . .
. . . . . . . . . . . . .
.
. . . . . . . .
. . . . . . . . . . . .
.
.
.
.
. . . . .
. . . . . . . .
. .
.
.
.
.
. . . .
. . . . . .
.
.
.
.
.
.
.
.
.
.
. . . .
.
.
.
.
.
.
.
.
.
.
.
. . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.... ..... .... .. .. .. ... . .. . .. . . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .. . . .. . .. .. . .. .. ... ... ..... ...................................................................................................................... ...... ... .. .. .. .. .. .. . . .. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. . .. .. . ... .. ... ..... ....................................................................................................................... ..... ... .. .. .. .. . .. .. . . .. . . . . . . .. . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . .. . .. . . .. .. .. .. .. ... ....... ...................................................................................................................... .... ... .. .. .. .. . .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. .. .. .. .... ..... ....................................................................................................................... .... ... .. .. .. .. . . .. .. . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . .. . . . . . . . . .. . . . . . . . . .. . . . .. . . .. . .. .. .. ... ... .... ........................................................ ................................................................. ... ... .. .. .. . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. .. .. .. ... .... ......................................................................................................................... ..... .. .. .. .. .. . . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. . . .. .. .. .. ... ... ........................................................................................................................... ... .... .. . .. .. . . .. . . . . .. . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . .. . . .. .. .. .. .. ... ..................................................................... .................................................. ...... ... .. ... .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. . .. ... .. ..... ...................................................................................................................... .... ... .. .. .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . . .. .. .. ... ... ......................................................................................................................... .... .. .. .. .. .. . . . .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . .. . . .. . .. . .. ... ... ............................................................................ ........................................... ..... ... .. .. . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. . .. .. .. ... .... ...................................................................................................................... .... .. .. .. .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. . .. ... ..... ........................................................................................................................ ... .. .. .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. . ... .... ........................................................................................................................ .... .. .. .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. .. ... .... ....................................................................................................................... .... .. .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. . ... ... ....................................................................................................................... .... .. ... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. ... .... ....................................................................................................................... ... .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. ... ......................................................................................................................... ... ... . .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. .. ... ....................................................................................................................... .... .. .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. .. .. ...... ................................................................................................................ ...... .. .. .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ... ......................................................................................................................... ... .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. .. ... ...................................................................................................................... .... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. .. ... ...................................................................................................................... ... ... . .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. .. .... ..................................................................................................................... ... .. .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . ... ... ..................................................................................................................... ... .. .. .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ..... ................................................................................................................... ... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .... ................................................................................................................... .... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. ... ..................................................................................................................... ... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. .. ....................................................................................................................... ... . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ... ................................................................................................................... ..... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. ....................................................................................................................... ... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... .. ... .................................................................................................................... .... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .................................................................................................................... .... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. .. ... ..................................................................................................................... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. ...................................................................................................................... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ... ................................................................................................................... ... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. ....................................................................................................................... .. .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. .. ...................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ...................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ..................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. ..................................................................................................................... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. .. ...................................................................................................................... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .................................................................................................................... ... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ..................................................................................................................... ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ..................................................................................................................... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ...................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. ..................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .... .................................................................................................................. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ...................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ... .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ................................................................................................................... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ..................................................................................................................... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ...............................................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ...........................................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..........................................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .......................................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .....................................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ...................................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ...............................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ................................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..............................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ............................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ............................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...........................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .........................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ........................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ......................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ......................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......................................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..............................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.........................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.....................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.............................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..........................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.........................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.......................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.....................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...............................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.............................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...........................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..........................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.......................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.......................................
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
................ .. ....... ............
. . . . . . . . . . . . . . . . . . . . . . . . . . .
............. .. .. .. . .. .. .. ..........
. . . . . . . . . . . . . . . . . . . . . . . . . . .
.......... .. . . . . . . . . . . . . . . .. .. ......
. . . . . . . . . . . . . . . . . . . . . . . . .
..... .. . . . . . . . . . . . . . . . . . . . . . . . .. ..
. . . . . . . . . . . . . . . . . . . . . . . . .
.... . .. . . . . . . . . . . . . . . . . . . . . . . .. .. .
. . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . . . .
. .
. . . . . .
. .
.... ..... .... .. .. .. ... . .. . .. . . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .. . . .. . .. .. . .. .. ... ... ..... ...................................................................................................................... ..... .... .. .. .. .. .. .. . . .. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. . .. .. . ... .. ... .... ........................................................................................................................ ..... ... .. .. .. .. . .. .. . . .. . . . . . . .. . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . .. . .. . . .. .. .. .. .. ... ....... ..................................................................................................................... ..... ... .. .. .. .. . .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. .. .. .. .... ..... ....................................................................................................................... .... ... .. .. .. .. . . .. .. . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . .. . . . . . . . . .. . . . . . . . . .. . . . .. . . .. . .. .. .. ... .. ..... ........................................................ ................................................................. ... ... .. .. .. . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. .. .. .. ... .... ......................................................................................................................... ..... .. .. .. .. . .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .. . .. .. .. .. ... ... ........................................................................................................................... ... .... .. . .. .. . . .. . . . . .. . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . .. . . .. .. .. .. .. ... ..................................................................... .................................................. ...... ... .. ... .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. . .. ... .. ..... ...................................................................................................................... .... ... .. .. .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. .. .. ... ... ......................................................................................................................... .... .. .. .. .. .. . . . .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. ... ... ............................................................................ .......................................... ...... ... .. .. . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. . .. .. .. ... .... ...................................................................................................................... .... .. .. .. .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. . .. ... ..... ........................................................................................................................ ... .. .. .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . ... .... ........................................................................................................................ .... .. .. .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. .. .. ... .... ....................................................................................................................... .... .. .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. . ... ... ....................................................................................................................... .... .. ... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. ... ... ........................................................................................................................ ... .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. . .. ... ...... ................................................................................................................... ... ... . .. .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .. . .. .. ... ....................................................................................................................... ... ... .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. .. .. ...... ................................................................................................................ ...... .. .. .. . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ... ......................................................................................................................... ... .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. ... ...................................................................................................................... .... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . .. .. ... ...................................................................................................................... ... .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. .. .... .................................................................................................................... .... .. .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .. . ... ... ..................................................................................................................... ... .. .. . .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ..... ................................................................................................................... ... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .... ................................................................................................................... .... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. ... ..................................................................................................................... ... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. .. ....................................................................................................................... ... . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ... ................................................................................................................... ..... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. ....................................................................................................................... ... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... .. ... .................................................................................................................... .... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .................................................................................................................... .... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. .. ... ..................................................................................................................... .. .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. ...................................................................................................................... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ... ................................................................................................................... ... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. ....................................................................................................................... .. .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . .. .. ...................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ...................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... ..................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .. ..................................................................................................................... .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . . ... ...................................................................................................................... .. . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .................................................................................................................... ... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ..................................................................................................................... ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ... .................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ...................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... .. ..................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ... ................................................................................................................... .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ...................................................................................................................... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. ... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. ................................................................................................................... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. .................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .................................................................................................................. .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ................................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ... .................................................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .................................................................................................................... .. . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . ..................................................................................................................... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .................................................................................................................... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..
....................................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................................................... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
......................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
....................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.............................................................................. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
............................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.......................................................................... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.......................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................................................ .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
........................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
....................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
..................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
................................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
... .. ........ ................................................
.. .
.
. . .
. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .. .. .. . .. .. .. ...........................................
..
..
.
.
.
.
.
.
.
. .
.
. . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .. .. ...................................
..
.
.
..
..
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . ...............................
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . .. .. ...........................
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . .. .....................
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .. .................
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . ...............
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . ............
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .. ........
...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . .. .......
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . . . . . . . . .
. . . . . . . . . . . .. .....
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . . . . . . .
. . . . . . . . . . ....
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . . . .
. . . . . . . . . ..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . . .
. . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . .
. . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. . .
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.

Figure 2.9 Node distribution for the flow around two staggered circular cylinders

Some numerical results are shown in Figs 2.10-2.11. In Fig.2.10, drag and lift coefficient
of flow past a pair of side-by-side cylinders with Reynolds number of Re=100 are
illustrated, while the instantaneous vorticity contours and streamlines are shown in
Fig.2.11. It can be clearly observed that the anti-symmetric (in-phase) synchronized
Karman vortex streets have been successfully simulated.

82
time
C
D
1
C
D
2
150 160 170 180
0.7
0.8
0.9
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2
CD1
CD2
time
C
L
1
C
L
2
150 160 170 180
-4
-3
-2
-1
0
1
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
2.5
3
CL1
CL2


Figure 2.10 Drag and lift coefficients of flow past a pair of side-by-side cylinder (T=3D) at Re=100



Figure 2.11 Instantaneous vorticity contours and streamlines for flow past a pair of side-by-side
cylinders (T=3D) at Re=100

References

H. Ding, C. Shu, K. S. Yeo and D. Xu, (2004), ‘Development of Least Square-based
Two-dimensional Finite Difference Schemes and Their Application to Simulate
Natural Convection in A Cavity”, Computers & Fluids, 33, 137-154.


83
3. Radial Basis Function-based Differential
Quadrature (RBF-DQ) Method

3.1 Introduction

In this chapter, we present another mesh-free method, which combines the derivative
approximation by the differential quadrature (DQ) method, and the function
approximation by the radial basis functions (RBFs). As a result, the method can be used
to directly approximate the derivatives of dependent variables on a scattered set of nodes.

Radial basis functions (RBFs) have been under intensive research as a technique for
multivariate data and function interpolation in the past decades, especially in multi-
dimensional applications. Their performance demonstrates that RBFs constitute a
powerful framework for interpolating or approximating data on non-uniform grids. RBFs
are attractive for pre-wavelet construction due to their exceptional rates of convergence
and infinite differentiability. Since RBFs have excellent performance for function
approximation, many researchers turn to explore their ability for solving PDEs. The first
trial of such exploration was made by Kansa (1990). As shown by Kansa (1990), using
RBFs as a meshless collocation method to solve PDEs possesses the following
advantages: (1) first of all, it is a truly mesh-free method, and is independent of spatial
dimension in the sense that the convergence order is of O(h
d+1
) where h is the density of
the collocation points and d is the spatial dimension; (2) furthermore, in the context of

84
scattered data interpolation, it is known that some RBFs have spectral convergence. In
other words, as the spatial dimension of the problem increases, the convergence order
also increases, and hence, much fewer scattered collocation points will be needed to
maintain the same accuracy as compared with conventional finite difference, finite
element and finite volume methods. This shows the applicability of the RBFs for solving
high-dimensional problems. It should be indicated that although some excellent results
were obtained, all previous works related to the application of RBFs for the numerical
solution of PDEs are actually based on the function approximation instead of derivative
approximation. In other words, these works directly substitute the expression of function
approximation by RBFs into a PDE, and then change the dependent variables into the
coefficients of function approximation. The process is very complicated, especially for
non-linear problems. For the nonlinear case, some special techniques such as numerical
continuation and bifurcation approach have to be used to solve the resultant nonlinear
equations. Since the techniques are very complicated, it is not easy to apply them for
solving practical problems such as fluid dynamics, which usually require a large number
of mesh points for accurate solution.

Differential quadrature (DQ) method is a global approach for derivative approximation. It
can obtain very accurate numerical results by using a considerably small number of grid
points. The advantages of the DQ approximation and RBFs can be combined to provide
an efficient discretization method, which is a derivative approximation approach and is
mesh-free. In our method, the RBFs are taken as the test functions in the DQ
approximation to compute the weighting coefficients. Once the weighting coefficients are

85
computed, the solution process for a PDE is exactly the same as the conventional DQ
method and finite difference schemes. Moreover, the method can be consistently well
applied to linear and nonlinear problems.

3.2 Radial Basis Functions (RBFs) and Function Approximation

A radial basis function, denoted by ) (
2
j
x x − ϕ , is a continuous spline which depends on
the separation distances of a subset of scattered points
d
ℜ ⊂ Ω ∈ x , d =1, 2, or 3 denotes
the spatial dimension. The “radial” is named due to RBFs’ spherical symmetry about the
centre point
j
x . The distances are usually taken to be the Euclidean metric. There are
many RBFs (expression of ϕ ) available. The most commonly used RBFs are
Multiquadrics (MQ):
2 2
) ( c r r + = ϕ (3.1a)
Thin-plate splines (TPS): ) log( ) (
2
r r r = ϕ (3.1b)
Gaussians:
2
) (
cr
e r

= ϕ (3.1c)
Inverse multiquadrics:
2 2
1
) (
c r
r
+
= ϕ (3.1d)
where
2
j
r x x − = and shape parameter c is a positive constant. Among above popular
radial basis functions, the Gaussian and the inverse MQ are positive definite functions,
while the TPS and the MQ are conditionally positive definite functions.


86
In recent years, the theory of radial basis function has undergone intensive research and
enjoyed considerable success as a technique for interpolating multivariable data and
functions. Simply, the RBF interpolation technique can be described as following: if the
function values of a function f(x) are known on a set of scattered points
d
ℜ ⊂ Ω ∈ x , the
approximation of f(x) can be written as a linear combination of N radial basis functions,
) ( ) ( ) (
1
2
x x x x ψ ϕ λ + − ≅

=
N
j
j j
f
(3.2)
where N is the number of centers or sometimes called knots x, ) ..., , , (
2 1 d
x x x = x ,
d is the dimension of the problem, λ ’s are coefficients to be determined and ϕ is the
radial basis function. Equation (3.2) can be written without the additional polynomial ψ .
If
d
q
Ψ denotes the space of d-variate polynomials of order not exceeding q, and letting the
polynomials P
1
, …, P
m
be the basis of
d
q
Ψ in
d
ℜ , then the polynomial ) (x ψ , in equation
(3.2), is usually written in the following form:

=
=
m
i
i i
P
1
) ( ) ( x x ζ ψ
(3.3)
where m=(q-1+d)!/(d!(q-1)!). To determine the coefficients ( )
N
λ λ ..., ,
1
and
( )
m
ζ ζ ..., ,
1
, extra m equations are required in addition to the N equations resulting
from the collocating equation (3.2) at the N knots. This is insured by the m conditions for
equation (3.2), viz

=
=
N
j
j i j
P
1
0 ) (x λ i=1, …, m
(3.4)
The matrix formulation of equations (3.2) and (3.4) can be expressed as b Ax = with the
known function value on the scattered points as the components of vector b, and

87
|
|
.
|

\
|
=
0
T
m
m
P
P ϕ
A
T
) , ( ζ λ = x
(3.5)

It has been proven that for a case when the nodes are all distinct, the matrix resulting
from the above radial basis function interpolation is always nonsingular. In 1982, Franke
published a review article evaluating the interpolation methods for scattered data
available at that time. Among the methods tested, RBFs outperformed all the other
methods regarding accuracy, stability, efficiency, memory requirement, and simplicity of
implementation. Among the RBFs tested by Franke, Hardy’s multiquadrics (MQ) were
ranked the best in accuracy, followed by thin plate splines (TPS).

Though TPS radial basis functions have been considered as optimal functions for
multivariate data interpolation, they do only converge linearly. Comparatively, the MQ
functions converge exponentially and always produce a minimal semi-norm error.
However, despite MQ’s excellent performance, it contains a shape parameter c, which is
given by end-user to control the surface shape of basis functions. When value of shape
parameter c is small, the resulting interpolating surface forms a cone-like basis functions.
As value of shape parameter c increases, the peak of the cone gradually flattens. The
choice of the value of c can greatly affect the accuracy of the approximation. It was found
that by increasing c, the root-mean-square error of the goodness-of-fit dropped to a
minimum value and then grew rapidly thereafter. This is due to the fact that the MQ
coefficient matrix becomes ill-conditioned when
2 2
r c >> . How to choose the optimal

88
shape parameter remains an open problem. No mathematical theory has been developed
so far to determine such an optimal value. Similar difficulties are also encountered in
choosing the shape parameter for the inverse MQ and Gaussian radial basis functions.

3.3 Differential Quadrature (DQ) Method for Derivative Approximation

x
i
y
j


Figure 3.1 A Structured mesh for a two-dimensional problem

It is well known that any integral over a closed domain can be approximated by a linear
weighted sum of all the functional values in the integral domain. Following this idea,
Bellman et al. (1972) suggested that the partial derivative of a function with respect to an
independent variable can be approximated by a linear weighted sum of functional values
at all mesh points in that direction. As shown in Fig. 3.1, DQ approximates the derivative

89
of a function with respect to x at a mesh point ) , (
j i
y x (represented by the symbol ) by
all the functional values along the mesh line of
j
y y = (represented by the symbol ),
and the derivative of the function with respect to y by all the functional values along the
mesh line of
i
x x = (represented by the symbol ). Mathematically, the DQ
approximation of the nth order derivative with respect to x,
) (n
x
f , and the mth order
derivative with respect to y,
) (m
y
f , at ) , (
j i
y x can be written as
) , ( ) , (
1
) (
,
) (
j k
N
k
n
k i j i
n
x
y x f w y x f

=
= (3.6a)
) , ( ) , (
1
) (
,
) (
k i
M
k
m
k j j i
m
y
y x f w y x f

=
= (3.6b)
where N, M are respectively the number of mesh points in the x and y direction,
) (
,
n
k i
w ,
) (
,
m
k j
w are the DQ weighting coefficients in the x and y directions. As shown by Shu
(2000),
) (
,
n
k i
w depends on the approximation of the one-dimensional function ) , (
j
y x f (x
is the variable), while
) (
,
m
k j
w depends on the approximation of the one-dimensional
function ) , ( y x f
i
(y is the variable). When ) , (
j
y x f or ) , ( y x f
i
is approximated by a
high order polynomial, Shu and Richards (1992) derived a simple algebraic formulation
and a recurrence relationship to compute
) (
,
n
k i
w and
) (
,
m
k j
w . When the function is
approximated by a Fourier series expansion, Shu and Chew (1997) also derived simple
algebraic formulations to compute the weighting coefficients of the first and second order
derivatives. For simple geometry, the above DQ approach can obtain very accurate
results by using a considerably small number of mesh points. However, for complex

90
geometry, the above scheme cannot be applied directly. The coordinate transformation
technique must be introduced. To remove this drawback, we need to develop a more
efficient approach.

It is noted that the basic idea of the DQ method is that any derivative can be
approximated by a linear weighted sum of functional values at some mesh points. We can
keep this idea but release the choice of functional values along a mesh line in the
conventional DQ approximation. In other words, for a two-dimensional problem shown
in Fig. 2.1, any spatial derivative is approximated by a linear weighted sum of all the
functional values in the whole two-dimensional domain. In this approximation, a mesh
point in the two-dimensional domain is represented by one index, k, while in the
conventional DQ approximation like equation (3.6), the mesh point is represented by two
indexes i, j. If the mesh is structured, it is easy to establish the relationship between i, j
and k. For the example shown in Fig. 2.1, k can be written as
M j N i j M i k ,..., 2 , 1 ; ,..., 2 , 1 , ) 1 ( = = + − = . Clearly, when i is changed from 1 to N and j
is changed from 1 to M, k is changed from 1 to M N NM × = . The new DQ
approximation for the mth order derivative with respect to x,
) (m
x
f , and the nth order
derivative with respect to y,
) (n
y
f , at ) , (
k k
y x can be written as
) , ( ) , (
1 1
1 1
) (
1 ,
) (
k k
NM
k
m
k k k k
m
x
y x f w y x f

=
= (3.7a)
) , ( ) , (
1 1
1 1
) (
1 ,
) (
k k
NM
k
n
k k k k
n
y
y x f w y x f

=
= (3.7b)


91
In the following, we will show that the weighting coefficients in equation (3.7) can be
determined by the function approximation of RBFs and the analysis of a linear vector
space.

3.4 Global Radial Basis Function-based Differential Quadrature (RBF-
DQ) Method

In this section, we will show in detail the global radial basis function-based differential
quadrature method. The development of this method is motivated by our desire to design
a numerical scheme that is as simple to implement as traditional finite difference schemes
while at the same time keeping the “truly” mesh-free nature. In the following, we will
show the details of global RBF-DQ method step by step.

Among above four RBFs, MQ, which was first presented by Hardy, is used extensively.
Franke did a comprehensive study on various RBFs, and found that MQ generally
performs better for the interpolation of 2D scattered data. Therefore, we will concentrate
on MQ radial basis functions.

The MQ RBFs are used as basis functions to determine the weighting coefficients in the
DQ approximation of derivatives for a two-dimensional problem. However, the method
can be easily extended to the case with other RBFs as basis functions or three-
dimensional problems.


92
Consider a two-dimensional problem. There are N knots randomly distributed in the
whole computational domain. Suppose that the solution of a partial differential equation
is continuous, which can be approximated by MQ RBFs, and only a constant is included
in the polynomial term ) (x ψ . Then, the function in the domain can be approximated by
MQ RBFs as
1
1
2 2 2
) ( ) ( ) , (
+
=
λ + + − + − λ =
∑ N
N
j
j j j j
c y y x x y x f (3.8)
To make the problem be well-posed, one more equation is required. From equation (3.4),
we have
∑ ∑
= ≠ =
λ − = λ ⇒ = λ
N
j
N
i j j
j i j
1 , 1
0 (3.9)
Substituting equation (3.9) into equation (3.8) gives
1
, 1
) , ( ) , (
+
≠ =
λ + λ =
∑ N
N
i j j
j j
y x g y x f (3.10)
where
2 2 2 2 2 2
) ( ) ( ) ( ) ( ) , (
i i i j j j j
c y y x x c y y x x y x g + − + − − + − + − = (3.11)
The number of unknowns in equation (3.8) is N. As no confusion rises,
1 +
λ
N
can be
replaced by
i
λ , and equation (3.8) can be written as
i
N
i j j
j j
y x g y x f λ + λ =

≠ = , 1
) , ( ) , ( (3.12)
It is easy to see that ) , ( y x f in equation (3.12) constitutes N-dimensional linear vector
space
N
V with respect to the operation of addition and multiplication. From the concept

93
of linear independence, the bases of a vector space can be considered as linearly
independent subset that spans the entire space. In the space
N
V , one set of base vectors is
1 ) , ( = y x g
i
, and ) , ( y x g
j
, i j N j ≠ = but ,..., 1 given by equation (3.11).

From the property of a linear vector space, if all the base functions satisfy the linear
equation (3.7), so does any function in the space
N
V represented by equation (3.12).
There is an interesting feature. From equation (3.12), while all the base functions are
given, the function ) , ( y x f is still unknown since the coefficients
i
λ are unknown.
However, when all the base functions satisfy equation (3.7), we can guarantee that
) , ( y x f also satisfies equation (3.7). In other words, we can guarantee that the solution of
a partial differential equation approximated by the radial basis function satisfies equation
(3.7). Thus, when the weighting coefficients of DQ approximation are determined by all
the base functions, they can be used to discretize the derivatives in a partial differential
equation. That is the essence of the RBF-DQ method.

Substituting all the base functions into equation (3.7a) as an example, we can obtain

=
=
N
k
m
k i
w
1
) (
,
0 (3.13a)

=
=


N
k
k k j
m
k i
m
i i j
m
y x g w
x
y x g
1
) (
,
) , (
) , (
, i j N j ≠ = but , ,..., 2 , 1 (3.13b)

94
For the given i, equation system (3.13) has N unknowns with N equations. So, solving
this equation system can obtain the weighting coefficients
) (
,
m
k i
w . From equation (3.11),
one can easily obtain the first order derivative of ) , ( y x g
j
as
2 2 2 2 2 2
) ( ) ( ) ( ) (
) , (
i i i
i
j j j
j j
c y y x x
x x
c y y x x
x x
x
y x g
+ − + −


+ − + −

=



In the matrix form, the weighting coefficient matrix of the x-derivative can then be
determined by
} { ] ][ [
x
T n
G W G = (3.14)
where
T n
W ] [ is the transpose of the weighting coefficient matrix ] [
n
W , and

=
) (
,
) (
2 ,
) (
1 ,
) (
, 2
) (
2 , 2
) (
1 , 2
) (
, 1
) (
2 , 1
) (
1 , 1
] [
n
N N
n
N
n
N
n
N
n n
n
N
n n
n
w w w
w w w
w w w
W
L
M O M M
L
L
,

=
) , ( ) , ( ) , (
) , ( ) , ( ) , (
1 1 1
] [
2 2 1 1
1 2 2 1 1 1 1
N N N N N
N N
y x g y x g y x g
y x g y x g y x g
G
L
M O M M
L
L

=
) , ( ) 2 , ( ) 1 , (
) , 1 ( ) 2 , 1 ( ) 1 , 1 (
0 0 0
] [
N N g N g N g
N g g g
G
n
x
n
x
n
x
n
x
n
x
n
x
x
L
M O M M
L
L

With the known matrices [G] and [G
x
], the weighting coefficient matrix ] [
n
W can be
obtained by using a direct method of LU decomposition. The weighting coefficient
matrix of the y-derivative can be obtained in a similar manner. Using these weighting
coefficients, we can discretize the spatial derivatives, and transform the governing
equations into a system of algebraic equations, which can be solved by iterative or direct
method.

95
One of the most attractive properties in above method is that the weighting coefficients
are only related to the basis functions and the position of the knots. That character is very
appealing when we deal with the nonlinear problems. Since the derivatives are directly
discretized, the method can be consistently well applied to linear and nonlinear problems.
Another attractive property of RBF-DQ method is that it is naturally mesh-free, i.e., all
the information required about the knots in the domain is nothing but their positions.

3.5 Local RBF-DQ Method

The RBF-DQ method presented in the last section is a global approach. In other words,
the function approximation form (3.12) uses all the knots in the computational domain.
When the number of knots, N, is large, the matrix [G] may be ill-conditioned. This limits
its application. To improve it, we developed the local RBF-DQ method. To do this, at
every knot in the domain, we construct a local support region. The local support in this
method has the same configuration as that discussed in the LSFD method. As shown in
Fig. 2.2, at any knot, there is a supporting region, in which there are N knots randomly
distributed. So, equation (3.12) is applied in the local support. That is the only difference
between the local RBF-DQ method and the global RBF-DQ method. All the related
formulations are the same for these two versions of RBF-DQ method.

As shown in the previous section, the MQ approximation of the function contains a shape
parameter c that could be knot-dependent and must be determined by the user. It is well
known that the value of c strongly influences the accuracy of MQ approximation, which

96
is used to approximate the solution of PDEs. Thus, there exists a problem of how to select
a “good” value of c so that the numerical solution of PDEs can achieve satisfactory
accuracy. In general, there are three main factors that could affect the optimal shape
parameter c for giving the most accurate results. These three factors are the scale of
supporting region, the number of supporting knots, and the distribution of supporting
knots. Among the three factors, the effect of knot distribution is the most difficult to be
studied since there are infinite kinds of distribution. In this section, we will mainly
discuss how to minimize the effect of two factors, that is, the scale of supporting region
and the number of supporting knots, on the shape parameter c.

In the local MQ-DQ method, the number of supporting knots is usually fixed for an
application. Since the knots are randomly generated, the scale of supporting region for
each reference knot could be different, and the optimal shape parameter c for accurate
numerical results may also be different. Usually, it is very difficult to assign different
values of c at different knots. However, this difficulty can be removed from the
normalization of scale in the supporting region. The idea is actually motivated from the
finite element method, where each element is usually mapped into a regular shape in the
computational space. The essence of this idea is to transform the local support to a unit
square for the two dimensional case or a unit box for the three dimensional case. So, the
discussion about the optimal shape parameter is now confined to the MQ test functions in
the unit square or box. The coordinate transformation has the form
i
D
x
x = ,
i
D
y
y = (3.15)

97
where ) , ( y x represents the coordinates of supporting region in the physical space, ) , ( y x
denotes the coordinates in the unit square,
i
D is the diameter of the minimal circle
enclosing all knots in the supporting region for the knot i. The corresponding MQ test
functions in the local support now become
2
2 2
c
D
y
y
D
x
x
i
i
i
i
+
|
|
.
|

\
|
− +
|
|
.
|

\
|
− = ϕ , N i ,..., 1 = , (3.16)
where N is the total number of the knots in the support. Compared with traditional MQ-
RBF, we can find that the shape parameter c is equivalent to
i
D c . The coordinate
transformation (3.15) also changes the formulation of the weighting coefficients in the
local MQ-DQ approximation. For example, by using the differential chain rule, the first
order partial derivative with respect to x can be written as
∑ ∑
= =
= = = =
N
j
j
i
x
j
N
j
j
x
j
i i
f
D
w
f w
D x d
df
D dx
x d
x d
df
dx
df
1
) 1 (
1
) 1 (
1 1
(3.17)
where
) 1 ( x
j
w are the weighting coefficients computed in the unit square,
i
x
j
D w /
) 1 (
are
the actual weighting coefficients in the physical domain. Clearly, when
i
D is changed,
the equivalent c in the physical space is automatically changed. In our application, c is
chosen as a constant. Its optimal value depends on the number of supporting knots. In the
next section, we will discuss this through a test example. The following present a
subroutine that is implemented to compute the derivative coefficients by local RBF-DQ
method. Many parameters in this subroutine have the same meanings as those in the one
for LSFD method. The programming is also very straightforward and exactly follows the
description in the notes.

98
c-------------------------------------------------------------------------------------------------
c---- This program is used to calculate the derivative coefficients in the Local MQ-DQ
c---- method.

c---- INPUT: pxy, xy, c
c---- OUTPUT: r
c---- pxy: store the positions of the supporting points
c---- xy: store the position of the reference node
c---- c: shape parameter for the MQ radial basis function
c---- r: vector of computed derivative coefficients

c---- Some important symbols and variables
c---- np: the number of supporting points
c---- A: coefficient matrix constructed from the basis functions
c---- b: derivative vectors of the basis functions
c-------------------------------------------------------------------------------------------------

subroutine MQRBF(pxy,xy,c,r)
parameter(np=12,nd=np+1)
implicit real*8(a-h,o-z)
dimension pxy(np,2),xy(2),r(nd,5),pn(nd,2)
dimension a(nd,nd),b(nd,5))

do 20 i=1,nd
if(i.ne.nd)then
pn(i,1)=pxy(i,1)
pn(i,2)=pxy(i,2)
else
pn(i,1)=xy(1)
pn(i,2)=xy(2)
endif
20 continue

scaling=0.d0
do i=1,np
dx=pxy(i,1)-xy(1)
dy=pxy(i,2)-xy(2)
scaling=dmax1(scaling,dsqrt(dx*dx+dy*dy))
enddo
scaling=scaling*2.0

do j=1,nd
a(nd,j)=1.d0
enddo

do 19 i=1,nd-1

99
do 19 j=1,nd
dx=(pn(j,1)-pn(i,1))/scaling
dy=(pn(j,2)-pn(i,2))/scaling
dxk=(pn(j,1)-pn(nd,1))/scaling
dyk=(pn(j,2)-pn(nd,2))/scaling
a(i,j)=dsqrt(dx*dx+dy*dy+c)-dsqrt(dxk*dxk+dyk*dyk+c)
19 continue

do 23 i=1,nd-1
dx=(-pn(i,1)+pn(nd,1))/scaling
dy=(-pn(i,2)+pn(nd,2))/scaling
ffunc=dsqrt(dx*dx+dy*dy+c)
b(i,1)=dx/ffunc
b(i,2)=dy/ffunc
b(i,3)=(dy*dy+c)/(ffunc**3.)-1.d0/dsqrt(c)
b(i,5)=-dx*dy/(ffunc**3.)
b(i,4)=(dx*dx+c)/(ffunc**3.)-1.d0/dsqrt(c)
23 continue
b(nd,1)=0.
b(nd,2)=0.
b(nd,3)=0.
b(nd,4)=0.
b(nd,5)=0.

do i=1,nd
do j=1,5
r(i,j)=b(i,j)
enddo
enddo
call agjdn(a,r,nd,5,l)

c---- Recover the derivative coefficients from the scaling -----
do ik1=1,5
do ik2=1,nd
if(ik1.eq.1 .or. ik1.eq.2)then
r(ik2,ik1)=r(ik2,ik1)/scaling
elseif(ik1.eq.3 .or. ik1.eq.4 .or. ik1.eq.5)then
r(ik2,ik1)=r(ik2,ik1)/scaling/scaling
endif
enddo
enddo
return
end


c-------This subroutine to numerically solve a linear problem Ax=b, in which A is a

100
c-------.nxn square matrix and b is a nxm matrix.
c------- The solution x is stored in b while the computation ends.
c------- Parameter l is used to return the information whether the computation is
c------- successfully performed. 1: Yes 0: No

subroutine agjdn(a,b,n,m,l)
implicit real*8(a-h,o-z)
dimension a(n,n),b(n,m),js(n)

l=1
do 8100 k=1,n
q=0.d0
do 810 i=k,n
do 810 j=k,n
if (dabs(a(i,j)).gt.q) then
q=dabs(a(i,j))
js(k)=j
is=i
end if
810 continue
if (q+1.0.eq.1.0) then
write(*,820)
l=0
return
end if
820 format(1x,' fail ')
do 830 j=k,n
d=a(k,j)
a(k,j)=a(is,j)
a(is,j)=d
830 continue
do 840 j=1,m
d=b(k,j)
b(k,j)=b(is,j)
b(is,j)=d
840 continue
do 850 i=1,n
d=a(i,k)
a(i,k)=a(i,js(k))
a(i,js(k))=d
850 continue
do 860 j=k+1,n
860 a(k,j)=a(k,j)/a(k,k)
do 870 j=1,m
870 b(k,j)=b(k,j)/a(k,k)
do 890 i=1,n

101
if (i.ne.k) then
do 880 j=k+1,n
880 a(i,j)=a(i,j)-a(i,k)*a(k,j)
do 885 j=1,m
885 b(i,j)=b(i,j)-a(i,k)*b(k,j)
end if
890 continue
8100 continue
do 8110 k=n,1,-1
do 8110 j=1,m
d=b(k,j)
b(k,j)=b(js(k),j)
b(js(k),j)=d
8110 continue
return
end


3.6 Sample Applications of Local RBF-DQ Method

Poisson equation
The optimal shape parameter is also related to the number of supporting knots. We will
study this effect through a sample problem. Consider the two-dimensional Poisson
equation in a square domain ( 1 0 , 1 0 ≤ ≤ ≤ ≤ y x ),
) , (
2
2
2
2
y x g
y
u
x
u
=


+


(3.18)
Suppose that the exact solution is given as
2
) 1 3 ( 6 6
) 4 . 5 cos(
4
5
) , (
− +
+
=
x
y
y x u (3.19)

102
Equation (3.19) will be used to provide the Dirichlet condition on the boundary, the
function ) , ( y x g , and to validate the numerical solution. The L
2
norm of relative error is
taken to measure the accuracy of numerical results, which is defined as
L
2
norm of relative error:
N
u
u u
N
i analytical
analytical numerical
2
1
8
10

=
− |
|
.
|

\
|
+

(3.20)
To conduct numerical experiments, the knot distribution in the square domain is fixed,
which is shown in Fig. 3.2. In total, there are 673 knots in the domain. The accuracy of
numerical results in terms of L2 norm of relative error is studied by changing the shape
parameter c and the number of knots in the supporting region. In this study, four
different support sizes (numbers of supporting knots) are used for discretization, and they
are 10, 16, 22 and 28.


Figure 3.2 Irregular knot distribution for solution of sample PDEs


103
Fig. 3.3 illustrates the variation of accuracy with different shape parameter and support
size (number of supporting knots). It can be seen from Fig. 3.3 that the L
2
norm of
relative error depends on the value of shape parameter c and the support size. It was
found that when the number of supporting knots is fixed, with increase of shape
parameter c , the accuracy of numerical results is improved. And when the shape
parameter c is fixed, with increase of the supporting knots, the accuracy of numerical
results is also improved. Another interesting phenomenon is that the shape parameter c
with small number of supporting knots is less sensitive than that with large number of
supporting knots. In other words, when the number of supporting knots is relatively
small, the shape parameter c can be chosen in a wide range to get a convergent solution,
in which the accuracy of numerical solution is changed gradually. But when the number
of supporting knots is large, the shape parameter c can only be selected in a small range
to get convergent solution, in which the accuracy of numerical results changes sharply.
So, one has to balance the good accuracy of numerical results and the sensitivity of the
shape parameter c when the number of supporting knots is chosen. From our
experiences, 16 supporting knots are a suitable choice.

104
shape parameter c2
L
o
g
1
0
(
R
e
l
a
t
i
v
e
L
2
e
r
r
o
r
n
o
r
m
)
0 10 20
-4
-3.5
-3
-2.5
-2
-1.5
10 points
16 points
22 points
28 points

Figure 3.3 Log
10
(error) vs
2
c with irregular knot distribution for Poisson problem

Advection-diffusion equation
The discretization of the derivatives by local RBF-DQ method in the nonlinear PDEs
follows the same way as that in the linear PDEs. It is interesting to see whether the effect
of shape parameter c on the accuracy of numerical solution for a nonlinear equation
behaves in the same way or a similar way to the linear equation. To study this, we
consider the following nonlinear equation,
) , (
2
2
2
2
y x q
y
u
x
u
u
y
u
x
u
=
|
|
.
|

\
|


+


+


+


(3.21)
For simplicity, we suppose that the exact solution of equation (3.21) is also given by
equation (3.19), which is used to determine the function ) , ( y x q and the boundary

105
condition. It was found that when the same conditions such as knot distribution, shape
parameter, and the number of supporting knots are used, the accuracy of numerical
results for equation (3.21) is very close to the accuracy for equation (3.18). This can be
clearly observed in Table 3.1, which compares the accuracy of results for linear and
nonlinear equations with the use of 22 supporting knots. This observation is very
interesting. It may imply that the choice of shape parameter is operator-independent.
From this point of view, we can first study the sample problem in details, and get an
optimal shape parameter c . Then this optimal value is used to solve incompressible
Navier-Stokes (N-S) equations. It is indeed that our computation of incompressible flow
problems follows this process.

Table 3.1 Comparison of accuracy for linear and nonlinear equations with using 22
supporting knots
Log
10
(L
2
norm of relative error)
Shape parameter
2
c Linear equation Nonlinear equation
0.500 -1.8332 -1.8314
1.400 -2.5138 -2.5117
2.300 -2.9455 -2.9431
3.500 -3.3879 -3.3852
5.000 -3.8410 -3.8386
6.500 -4.0905 -4.0903

3.7 Application of Local RBF-DQ Method to Flow Problems

For their physical complexity and practicality, the flow and thermal fields in enclosed
space are of great importance due to their wide applications such as in solar collector-

106
receivers, insulation and flooding protection for buried pipes used for district heating and
cooling, cooling systems in nuclear reactors, etc. The purpose of this section is to
investigate how the mesh-free methods behave in the solution of the natural convection
problem with complex geometry. A schematic view of a horizontal eccentric annulus
between a square outer cylinder and a heated circular inner cylinder is shown in Fig. 3.4.
Heat is generated uniformly within the circular inner cylinder, which is placed
concentrically or eccentrically within the cold square cylinder. From the non-slip
condition, the velocities u and v on both the inner and outer cylinder walls are zero. For
an eccentric annulus, the stream function values on the inner and outer cylinders are
different and a global circulation flow along the inner cylinder exists. The stream
function value on the outer cylinder wall is set to zero. The boundary condition can be
written as
0 , 0
_ _ _ _
= = = =
wall outer wall inner wall outer wall inner
v v u u (3.22)
0 , constant
_ _
= =
wall outer wall inner
ψ ψ (3.23)
0 , 1
_ _
= =
wall outer wall inner
T T (3.24)

107
X
Y
ε
) , (
0 0
y x
) 0 , 0 (
L
0
ϕ
R

Figure 3.4 Sketch of physical domain of natural convection between a square outer
cylinder and a circular inner cylinder

The governing equations for this problem are the same as equations (2.34)-(2.36). The
derivatives in the governing equations are discretized by the local MQ-DQ method, and
the Neumann boundary conditions are approximated by the conventional FD schemes.
The number of supporting knots is taken as 17, and the shape parameter
2
c is selected as
3.1. The numerical results for the cases with
0
0
45 = ϕ ,
5
10 3× = Ra and
( 6 . 2 = rr ) 2 /( R L rr = ) are presented by the streamlines and vorticity contours. As shown
in Fig. 3.5, the eddy on the left hand side in the flow expands in size due to the increasing
space, with the center of the eddy moving downwards. The thermal plume tends to
incline to the left from the vertical line as the eccentricity increases. The eddy on the
RHS remains the similar size but shifts above the inner cylinder. The increasing

108
eccentricity allows larger space for the eddy on the RHS, but the increasing eddy on the
left hand side limits the space for the eddy on the RHS. It is the balance between the two
eddies that make the thermal plumes above the top of the inner cylinder shifts from the
vertical line to the left.


ε =0.25

ε =0.50

ε =0.75

109

ε =0.95
Figure 3.5 Streamlines and isotherms for
5
10 3× = Ra , 6 . 2 = rr , and
0
0
45 = ϕ

References

R.L. Hardy, Multiquadric equations of topography and other irregular surfaces, Journal of
Geophysical Research, 76, pp1905-1915 (1971).
R. Franke, “Scattered data interpolation: tests of some methods”, Math. Comp., 38, pp.
181-199, (1982).
E. J. Kansa. “Multiquadrics – A scattered data approximation scheme with applications to
computational fluid-dynamics –I. Surface approximations and partial derivative
estimates”, Computers Math. Applic., 19, No (6-8) pp127-145 (1990).
E. J. Kansa. “Multiquadrics – A scattered data approximation scheme with applications to
computational fluid-dynamics –II. Solutions to parabolic, hyperbolic, and elliptic
partial differential equations”, Computers Math. Applic., 19, No (6-8) pp147-161
(1990).

110
R. E. Bellman, B. G. Kashef, and J. Casti, “Differential quadrature: A technique for the
rapid solution of nonlinear partial differential equations,” J. Comput. Phys. 10, 40-
52 (1972).
C. Shu, Differential quadrature and its application in engineering, Springer-Verlag,
London, 2000.
C. Shu and B. E. Richards, “Application of generalized differential quadrature to solve
two-dimensional incompressible Navier-Stokes equations,” Int. J. Numer. Methods
Fluids. 15, 791-798 (1992).
C. Shu and Y. T. Chew, “Fourier expansion-based differential quadrature and its
application to Helmholtz eigenvalue problems,” Commun. Numer. Methods Eng.
13, 643-653 (1997).
C. Shu, H. Ding, K. S. Yeo, ‘Local Radial Basis Function-based Differential Quadrature
Method and Its Application to Solve Two-dimensional Incompressible Navier-
Stokes Equations’, Computer Methods in Applied Mechanics and Engineering, Vol.
192, 941-954 (2003).

111
4. Standard Lattice Boltzmann Method (LBM)

4.1 Introduction

The natural phenomenon can be described at three levels: macroscopic,
mesoscopic and microscopic, see Fig. 4.1. Unlike conventional numerical methods,
which are based on discretization of macroscopic continuum equations, and unlike
molecular dynamics methods, which are based on atomic representation with
complicated molecule collision rules, the lattice Boltzmann method (LBM) is based
both on microscopic models and mesoscopic kinetic equations. Here the fluid is
imagined as a set of basic “fluid particles” evolving in fictional world, reacting with
simplified and relevant rules. Although this representation is far from the richness of
reality, it has been shown to be good enough to recover complex features of the natural
phenomenon. As an alternative computational fluid dynamics (CFD) approach, the
LBM has achieved great progress since the 90’s in the last century.



Figure 4.1 Three levels of natural phenomenon description


112
The Basic Idea of LBM
The fundamental idea of LBM is to construct simplified kinetic models that
incorporate the essential physics of microscopic or mesoscopic processes so that the
macroscopic averaged properties of the LBM obey the desired macroscopic
hydrodynamics. The basic premise of using these simplified kinetic-type methods for
macroscopic fluid flows is that the macroscopic dynamics of a fluid is the result of the
collective behavior of many microscopic particles in the system and the macroscopic
dynamics is not sensitive to the underlying details in microscopic physics.
The kinetic nature of the LBM distinguishes it from other numerical methods
mainly in three aspects. First, the convection operator of the LBM is linear in velocity
space. The nonlinear effects in macroscopic level are represented in the collision term
of the LBM. Since no nonlinear terms are included in the LBM, computational efforts
are greatly reduced as compared to those of some macroscopic CFD methods such as
the Navier-Stokes equation solvers. Second, the pressure of the LBM can be directly
calculated using an equation of state, unlike the direct numerical simulation of the
incompressible Navier-Stokes equations, in which the pressure must be obtained from
the Poisson equation. In general, solving this equation for pressure often produces
numerical difficulties which require special treatments. Third, the LBM utilizes a
minimal set of velocities in phase space. In contrast, the phase space of the traditional
Boltzmann equation with Maxwell equilibrium distribution is a complete functional
space. The average process involves information from the whole velocity space.
Therefore, the transformation relating the microscopic distribution function and
macroscopic quantities is greatly simplified.



113
Origination of LBM
The LBM originated from the lattice gas cellular automata (LGCA), which was
first introduced in 1973 by Hardy et al. The LGCA is constructed as a simplified,
fictitious molecular dynamic model in which space, time and particle velocities are all
discrete. The evolution of the LGCA consists of two sequential steps: streaming and
collision. In streaming, each particle moves to the nearest node in the direction of its
velocity. When particles arrive at a node, collision occurs and makes their velocity
change directions according to scatter rules. In 1986, Frisch, Hasslacher and Pomeau
showed that LGCA with collisions that conserve mass and momentum, in the
macroscopic limit, leads to the Navier-Stokes equations when the underlying lattice
guarantees the isotropy. This allows the LGCA to be a new scheme in the field of
CFD, especially suitable for parallel computing.
However, LGCA suffers some drawbacks such as large statistical noise, non-
Galilean invariance, an unphysical velocity-dependent pressure and large numerical
viscosities. These shortcomings have greatly hampered its development as a good
model in practical applications.
To overcome the above shortcomings, several lattice Boltzmann equation
(LBE) models had been developed and the most historically important of them are the
following four models:
1. In 1987, Frisch, d’Humières and Hasslacher used LBE at the cradle of LGCA to
calculate the viscosity of LGCA.
2. In 1988, McNamara and Zanetti introduced a LBE model, which eliminates the
statistical noise by using a single particle distribution function instead of the
Boolean function. Fermi-Dirac distributions were used as equilibrium functions.

114
3. In 1989, Higuera and Jimènez presented a LBE with a linearized collision operator,
which improved the numerical efficiency of the previous LBE.
4. The collision operator, which is based on the rules of LGCA, was further
simplified by using the Bhatnagar-Gross-Krook (BGK) (1954) relaxation
approximation (Koelman 1991 and Qian et al. 1992) in the classic kinetic theory.
This is the current widely used LBE with BGK models in the LBM. The
introduction of the BGK models eliminates the Galilean invariance and velocity-
dependence of pressure in the LGCA. Moreover, it also allows the easy tuning of
numerical viscosities by the relaxation parameters, thus making simulations of
flows with high Reynolds number possible.
The LBE with BGK models in the LBM are based on gas-kinetic
representations of fluid flow in a strongly reduced “particle” velocity space, in which
flow is described through the evolution of the discrete particle distribution functions on
uniform lattices. Hydrodynamic variables are computed at the lattice nodes as
moments of the discrete distribution functions. Under Taylor and Chapman-Enskog
expansions, the incompressible unsteady Navier-Stokes equations can be recovered
with second-order of accuracy for the low Knudsen number in space and time. Because
the kinetic form of the LBE is the same as that of the LGCA, the locality in the kinetic
approach is retained. Therefore, the LBM still keeps the merits of easy implementation
of boundary conditions, full parallelism and clear physical pictures of the LGCA.

4.2 Lattice Gas Cellular Automata (LGCA)

The first lattice gas cellular automaton (LGCA) was proposed in 1973 by
Hardy, Pomeau and de Pazzis. Although the HPP (named from the initials of the three

115
authors) model used in their work conserves the mass and moment, it does not yield
the desired Navier-Stokes equations in the macroscopic limit. In 1986, Frisch,
Hasslacher and Pomeau discovered that a LGCA model over a lattice with somewhat
higher symmetry than for the HPP square lattice model leads to the Navier-Stokes
equations in the macroscopic limit. This model with hexagonal symmetry is named
FHP according to the initials of the three authors. The discovery of the symmetry
constraint caused great excitement in the fluid dynamics community and become a
start point for a rapid development of the LGCA methods. The theoretical foundations
of LGCA were worked out by Wolfram (1986) and by Frisch et al. (1987).

Consider a regular lattice with hexagonal symmetry such that each lattice node
is surrounded by six neighbors identified by six connecting vectors 6 , , 1 , L = = i c
i i α
c ,
the index 2 , 1 = α scanning the spatial dimensions (see Fig. 4.2).


Figure 4.2 The FHP hexagonal lattice


116
Each lattice node hosts up to six cells and each cell occupies with one particle. The
particles can move only along one of the six directions defined by the discrete
displacements
t i
δ c r = ∆ and ruled by the exclusion principle. In a time cycle
t
δ , the
particles hop to the nearest neighbor pointed by the corresponding discrete vector
i
c .
All particles have the same mass m = 1. The particle occupation is defined by an
occupation number ) , ( t n
i
r (a set of Boolean variables) and
t t n
t t n
i
i
time and node at presence particle 1 ) , (
time and node at absence particle 0 ) , (
r r
r r
=
=
(4.1)
Obviously, the collection of the occupation numbers over the entire lattice with N
nodes defines 6N-dimensional time-dependent Boolean field whose evolution takes
place in a Boolean phase-space consisting of
N 6
2 discrete states. The evolution
equation of the FHP LGCA is as follows:
)) , ( ), , ( ( ) , ( ) , ( t n t n t n t n
eq
i i i i t i
r r r r r Ω + = + ∆ + δ 6 , , 1 L = i (4.2)
where the second term on the R.H.S. of Eq. (4.2) represents the collision which means
that, once arriving at the same node, the particles interact and reshuffle their
momentums so as to exchange mass and momentum among the different directions
allowed by the lattice. The collision rule of FHP is shown in Fig. 4.2. ) , ( t n
eq
i
r is the
local equilibrium distribution and expressed by a Fermi-Dirac distribution (Frisch et al
1987):
i
e
b
t n
eq
i
Φ
+
=
1
/
) , (
ρ
r (4.3)
where b(=6) is the number of the discrete speeds, ρ is the density and
i
Φ is a linear
combination of the mass, momentum and energy and for isothermal ideal fluids:
α α
u Bc A
i i
+ = Φ (4.4)

117
where A and B are free Lagrange parameters to be adjusted in order to secure mass and
momentum conservation and
α
u is the macroscopic velocity vector. The Lagrange
parameters A and B can be calculated by an expansion of Eq. (4.3) for small Mach
numbers
s
c U Ma / = ( u = U and
s
c is the sound speed) and we have the following
truncated equilibrium distributions:
) (
2
) ( ) , (
3
4 2
u O
c
u u Q
G
b c
u c
b b
t n
s
i
s
i eq
i
+ + + =
β α αβ
α α
ρ
ρ ρ ρ
r (4.5)
with
ρ
ρ
ρ


=
b
b
G
2
) ( (4.6)
αβ β α αβ
δ
2
s i i i
c c c Q − = (4.7)
D
c
c
s
= (4.8)
where D is the dimension. The density ρ and velocity
γ
u are defined as

=
i
i
t n ) , (r ρ (4.9)

=
i
i i
t n c u ) , (r
γ γ
ρ (4.10)
Note that
β α
u c
i
and
β α αβ
u u Q
i
are tensor operations, which mean summation when 2
indices are repeated.

To sum up, the LGCA can be characterized as follows:
⇒ LGCA is regular arrangement of cells with the same kind.
⇒ The cells are positioned at nodes of the lattice and hold a finite number of
discrete states.

118
⇒ At each node and each link to the nearest neighbor there is a cell which may
be empty or occupied by at most one particle (exclusion principle).
⇒ The lattice is symmetric.
⇒ All particles have the same mass and are indistinguishable.
⇒ The states are updated simultaneously at discrete time level by the particle
evolutions
⇒ The evolution is split in two steps which are called collision and streaming.
In the collision, each cell is assigned new values based on the values of the
cells in a local neighborhood. In the streaming, the state of each cell is
propagated by the particle to a neighboring cell.
⇒ The evolution rules are uniform in space and time.

Main disadvantages of LGCA
¾ Lack of Galilean invariance
This is due to improper choice of collision model.
¾ Statistical noise
The statistical noise LGCA suffered comes from the Boolean system.
¾ Unphysical solution
Pressure depends on the velocity.

To overcome the above drawbacks, the lattice Boltzmann method (LBM) was
developed.




119
4.3 Kinetic theory

Kinetic theory is the branch of statistic physics dealing with the dynamics of
non-equilibrium processes and their relaxation to thermodynamic equilibrium. The aim
of this section is to provide a minimal yet helpful theoretical introduction to the LBM
in the context of classical kinetic theory.

Continuum Boltzmann equation and Maxwell distribution
As shown in Fig. 4.1, the motion of a fluid can be described on various levels
and the continuum Boltzmann equation gives a description on a microscopic level. The
classic continuum Boltzmann equation is an intergro-differential equation for a single
particle distribution function ) , , ( t f c r and written as
) ( f Q
f f
t
f
=


+


+


c
F
r
c (4.11)
where c is the particle velocity and F is the body force. ) ( f Q is the collision integral
describing the two-particle collision and written as
∫ ∫
Ω − − Ω = d f f f f d f f f Q ] [ ) ( )) , ( (
2 1
'
2
'
1 2 1 2 2 1
c c c σ (4.12)
) (Ω σ is the differential collision cross section for the two particle collision which
transforms the velocities from } , {
2 1
c c (incoming) into } , {
'
2
'
1
c c (outgoing).

Central to the purpose of recovering hydrodynamic behaviors from the continuum
Boltzmann equation is the notion of local equilibrium. Mathematically, this requires
that the collision term is annihilated ( 0 ) ( = f Q ) and leads to the so-called detailed
balance condition:
2 1
'
2
'
1
f f f f = (4.13)

120
which means that any direct/inverse collision is dynamically balanced by an
inverse/direct partner. Taking logarithms of Eq. (4.13) yields:
2 1
'
2
'
1
ln ln ln ln f f f f + = + (4.14)
Eq. (4.14) shows that the microscopic property of a system does not change under the
effect of collision. The momentum and energy conservation laws should also be
satisfied. So, at the thermodynamic equilibrium, f ln must be a function of dynamic
elementary collision invariants ] 2 / , , 1 [ ) (
2
c c c ≡ ψ (proportional to mass, momentum
and kinetic energy) alone. Therefore the equilibrium distribution functions are all of
the form:
)
2
1
exp( ) (
2
c c B c C A f
eq
+ ⋅ + = (4.15)
where A, B and C are Lagrangian parameters carrying the functional dependence on
the conjugate hydrodynamic fields e u, , ρ (internal energy). The Maxwell distribution
function can be written as:
( )
( )


− =

RT
RT t f
D eq
2
u c
exp 2 ) , c , r (
2
2 /
π ρ (4.16)
where R is the gas constant, D is spatial dimension and T is the temperature.

Bhatnagar-Gross-Krook Approximation
One of the major problems when dealing with the Boltzmann equation is the
complicated nature of the collision integral ) ( f Q . To facilitate numerical and
analytical solutions of the Boltzmann equation, this collision integral is often replaced
by a simpler expression. The idea behind this replacement is that the large amount of
detailed two-body interactions is not likely to influence significantly the basic physical
quantities. The most widely known replacement is called BGK approximation:

121
τ
eq
f f
f Q

− = ) (
BGK
(4.17)
which was proposed by Bhatnagar, Gross and Krook in 1954. In Eq. (4.17),τ is a
typical relaxation time associated with collision relaxation to the local equilibrium.
In principle, the relaxation time τ is a complicated function of the distribution
function f. The drastic simplification associated with BGK is the assumption of a
constant value for the relaxation scale, which is equivalent to lump the whole spectrum
of relaxation scales into a single value.

4.4 Lattice Boltzmann Method (LBM)

As already indicated in Section 4.2, the Boolean particle distribution and the
Fermi-Dirac equilibrium distribution are used in the LGCA. Therefore two major
drawbacks of the LGCA are the statistical noise and lack of Galilean invariant. On the
other hand, the collision term in the LGCA is also complicated and any efforts to seek
the numerical solutions of the LGCA are difficult. To overcome the above drawbacks,
the LBM is proposed and the main feature of LBM is to replace the Boolean particle
distribution
i
n and the collision term by the continuum particle distribution function
i
f and the BGK approximation, respectively.

Lattice Boltzmann equation (LBE) with BGK approximation
The lattice Boltzmann equation (LBE) with BGK models can be written as:
( ) ( ) ( ) ( ) ( ) ( ) M i t f t f t f t f
eq
i i i t t i i
, , 1 , 0 , ,
1
, , L = − − = + + r r r e r
τ
δ δ (4.18)

122
where
i
f is the density distribution function, which depends on position r in the
physical space, the particle discrete velocity
i
e and time t;
eq
i
f is its corresponding
equilibrium state, which depends on the local macroscopic variables, ρ and u; τ is
the single relaxation parameter related to the hydrodynamic viscosity,
t
δ is the time
step and M is the number of discrete particle velocity.
The macroscopic density ρ and momentum density u ρ are defined as particle
moments of the distribution function
i
f :
∑ ∑
= =
= =
M
i
i i
M
i
i
f f
1 1
e u ρ ρ (4.19)
The equation of state and kinematic viscosity are defined as (Wolf-Gladrow 2000):
2
s
c P ρ = (4.20)
t s
c δ τ υ )
2
1
(
2
− = (4.21)
where υ is the kinematic viscosity and
s
c is the sound speed.

Discrete Boltzmann Equation and LBE
As shown above, LBE was originated from the LGCA method. On the other hand, we
can show that LBE can also be derived from the discrete Boltzmann equation. Without
considering the external force F, the Boltzmann equation with BGK approximation can
be written as
( )
( ) ( ) ( ) | | t f t f t f
t
t f
eq
b
, , , ,
1
, ,
, ,
r c r c r c c
r c
− − = ∇ ⋅ +


τ
(4.22)
Note that this is a single relaxation time model. It can be shown that the velocity space
of c can be discretized into a finite set of velocities } {
i
e without affecting the
conservation laws. In the discrete velocity space, the Boltzmann equation becomes

123
( )
( ) ( ) ( ) | | t f t f t f
t
t f
eq
i i
b
i i
i
, ,
1
,
,
r r r e
r
− − = ∇ ⋅ +


τ
(4.23)
where i indicates the different velocity directions. In the lattice context, i is equivalent
to the lattice direction, which usually takes a form of hexagonal or rectangular shapes.
Integrating equation (4.23) from t to
t
t δ + with the second order of accuracy gives

( ) ( ) ( ) ( ) ( ) ( ) M i t f t f t f t f
eq
i i
b
t
i t t i i
, , 1 , 0 , r , r , r , e r L = − − = − + +
τ
δ
δ δ (4.24)
Clearly, τ in equation (4.18) is the same as
t b
δ τ / in equation (4.24).

Equilibrium distribution function and discrete velocity models
Since the collision term in the LBE is described by the BGK approximation,
the local equilibrium is therefore from the Maxwell form. Using Taylor series
expansion, the Maxwell distribution function can be expanded in the small Mach
number limit as
( )
( )
( )
( )
( )
) (
2 ) ( 2
1 ) (
) (
2 ) ( 2
1
2
exp 2
2
2
exp
2
exp 2
2
2
exp 2
2
exp 2 ) , , (
2
2
2 /
2
2 /
2 /
2
2 /
3
2 2
3
2 2 2
2
2 2
u
u u) (c u c
u
u u) (c u c c
u u c c
u u c c
u c
c r
O
RT RT RT
c w
O
RT RT RT RT
RT
RT RT
RT
RT
RT
RT
RT t f
D
D
D
D eq
+
|
|
.
|

\
|


+

+ =
+
|
|
.
|

\
|


+

+

− =

− ⋅

− =

+ ⋅ −
− =


− =




ρ
π ρ
π ρ
π ρ
π ρ
(4.25)
From the equation of state (4.20), we know that
RT c
s
=
2
. Therefore, along the discrete velocity direction
i
e , we get

124
|
|
.
|

\
|
− ⋅
+

+ =
4
2
2 2
2
2
) (
1
s
s i
s
i
i
eq
i
c
c
c
w f
u u e
u e
ρ (4.26)
where
i
w are constants. The values of
i
w and
s
c depend on the specific choice of the
discrete velocities
i
e . Equation (4.26) can also be put in a tensor form
|
|
.
|

\
| −
+ + =
4
2 2
2
2
1
s
s i i
s
i
i
eq
i
c
u c u u e e
c
u e
w f
β α β α
α α
ρ (4.27)

Note that the repeated indexes β α, mean summation over the space dimension. The
constants
i
w can be defined by mass and momentum conservation, as well as isotropy:
1 =

i
i
w (4.28a)
0 e =

i
i i
w ═► 0 =

i
i i
e w
α
(4.28b)
0 ) u - u) e ((
2
2 2
= ⋅
∑ s
i
i i
c w ═►
2 2
u c u e u e w
s i
i
i i
=
∑ α β β α
(4.28c)
ij s j
i
i i
c w δ
2
= ⋅

e e (4.28d)
0 ) u - u) e (( e
2
2 2
= ⋅
∑ s
i
j i i
c w (4.28e)

Using equation (4.28) and Chapman- Enskog expansion to recover the Navier-
Stokes (N-S) equation, the constants
i
w can be determined. In the following, the
particle discrete velocity (DV) model is written as DnQm, where m is the speed model
and n is the space dimension. Popular examples are D1Q5, D2Q7, D2Q9, D3Q15 and
D3Q19, whose diagrams are sketched in Fig. 4.3(a-e), together with the synoptic Table
4.1 of their main parameters.


125
Table 4.1 Main parameters of some DnQm DV models
Models
i
e
i
w
2
s
c
D1Q5
(0)
( 1 ± )
( 2 ± )
6/12 ( i =0)
2/12 ( ) 2 , 1 = i
1/12 ( ) 4 , 3 = i
1
D2Q7
(0,0)
( ) 0 , 1 ± ,( 2 3 , 2 1 ± ± )
6/12 ( i =0)
1/12 ( ) 6 , , 1 L = i
1/4
D2Q9
(0,0)
( ) 0 , 1 ± ,( ) 1 , 0 ±
( 1 , 1 ± ± )
16/36 ( 0 = i )
4/36( ) 3 , , 0 , 1 2 L = + = l l i
1/36( ) 4 , , 1 , 2 L = = l l i
1/3
D3Q15
(0,0,0)
( ) 0 , 0 , 1 ± ,( ) 0 , 1 , 0 ± ,( ) 0 , 1 , 0 ±
( 1 , 1 , 1 ± ± ± )
16/72( 0 = i )
8/72( ) 6 , , 1 L = i
1/72( ) 14 , , 7 L = i
1/3
D3Q19
(0,0,0)
( ) 0 , 0 , 1 ± ,( ) 0 , 1 , 0 ± ,( ) 0 , 1 , 0 ±
( 0 , 1 , 1 ± ± ),( , 1 , 0 , 1 ± ± ),
( 1 , 1 , 0 ± ± )
12/36( 0 = i )
2/36( ) 6 , , 1 L = i
1/36( ) 18 , , 7 L = i
1/3



(a) D1Q5







(b) D2Q7 (c) D2Q9
6 5
4
3 2
0
1 0
1
2
3
4
5
6
7
8

126

(d) D3Q15 (e) D3Q19
Figure 4.3 Sketches of the DnQm discrete velocity models

Lattice Tensors and Isotropic Tensors
Te lattice velocity can form lattice tensors with different ranks. The nth rank lattice
tensor is defined as

=
i
i i i
n n
e e e L
α α α α α α
...
2 1 2 1
...

Consequently, we have the 1
st
, 2
nd
, 3
rd
and 4
th
rank lattice tensors as


=
i
i
e L
α α


=
i
i i
e e L
β α αβ


=
i
i i i
e e e L
γ β α αβγ


=
i
i i i i
e e e e L
ζ γ β α αβγζ

A tensor of nth rank is called isotropic if it is invariant with respect to arbitrary
orthogonal transformations (rotations and reflections). The most general isotropic
tensors up to 4th rank are provided by the following theorem.
¾ There are no isotropic tensors of rank 1 (vectors).
■ e=0
● e=1
♦ e= 3
■ e=0
● e=1
♦ e= 2

127
¾ An isotropic tensor of rank 2 is proportional to
αβ
δ .
¾ An isotropic tensor of rank 3 is proportional to
αβγ
ε with , 1
312 231 123
= = = ε ε ε
, 1
321 213 132
− = = = ε ε ε and zero others.
¾ There are three different (linear independent) tensors of rank 4
βγ αζ βζ αγ γζ αβ
δ δ δ δ δ δ , ,
which can be combined to the most general form

βγ αζ βζ αγ γζ αβ αβγζ
δ δ δ δ δ δ c b a L + + =
where a, b and c are arbitrary constants.

Generalized lattice tensors for multi-speed models
The nth rank generalized lattice tensor is defined as

=
i
i i i i
n n
e e e w T
α α α α α α
...
2 1 2 1
...

where
i
w are constants appeared in the equilibrium function. In the LBM context, the
lattice tensors of odd rank are usually zero.

From LBE to the Navier-Stokes equations: Chapman-Enskog Expansion
The macroscopic dynamics of a fluid can be seen as the result of the collective
behavior of microscopic particles in the system and it is well described by the Navier-
Stokes equations. The derivation of the macroscopic Navier-Stokes equations from the
LBE runs under the Chapman-Enskog expansion, which is a multi-scale analysis
developed by Chapman and Enskog between 1910 and 1920. The expansion
parameter used in Chapman-Enskog procedure is the Knudsen number L Kn / λ = ,
namely the ratio between the molecular mean free path λ and the characteristic length
L at which macroscopic variations can be appreciated.

128
In the following, the Chapman-Enskog expansion is employed to derive
incompressible Navier-Stokes equation based on the D2Q9 model. Theoretically the
LBE simulates the compressible Navier-Stokes equation instead of incompressible
one, because the spatial density variation is not zero in LBE simulations. In order to
correctly simulate incompressible Navier-Stokes equation in practice, one must ensure
that the Mach number is low and the density fluctuation (δρ ) is of the order ) (
2
Ma O
In the macroscopic level, the flow encounters the 3 basic time scales. The collision
happens very fast; the convection happens slower in the scale of
1 −
ε ; and the diffusion
happens much slower in the scale of
2 −
ε . In the space, the collision happens in the
scale of λ, while the convection and diffusion happen in the scale of L (
1
/

= ε λ L ).
The following multi-scale expansion will be introduced in the Chapman-Enskog
expansion

=
=
2
0
) (
j
j
i
j
i
f f ε (4.29)

=
+
∂ = ∂
1
0
1
j
t
j
t
j
ε (4.30)
1
1
r r
∇ = ∇ ε (4.31)
where ε is a small number, and
t
δ is in the same order of ε .
The second order Taylor series expansion of L.H.S. of the LBE (4.18) yields
0 ) ( ) (
1
) e (
2
) e (
3 2
= + − + ∇ ⋅ +


+ ∇ ⋅ +


t
eq
i i
t
i i
t
i i
O f f f
t
f
t
δ
τδ
δ
(4.32)
Using relationships (4.29-4.31) in expansion (4.32), one can obtain
0
) 2 ( 2 ) 1 ( ) 0 (
= + +
i i i
E E E ε ε (4.33)
where
) /( ) (
) 0 ( ) 0 (
t
eq
i i i
f f E τδ − = (4.34)

129
( )
( )
( ) ( ) 1 0
1
1
1
0
i
t
i i t i
f f e E
τδ
+ ∇ ⋅ + ∂ = (4.35)
( ) ( )
( )
( )
( )( )
( ) ( )
( )
( )
( ) ( ) 2 1
1
0
2 0
1 1
1
1
0 2
1
2
1
1
1
2
0 1
0 0 0 1
i
t
i i t i t
i
t
i i t i t
t
i i t i t i
f f e f
f f e e f e f E
τδ τ
τδ
δ
+
|
.
|

\
|
− ∇ ⋅ + ∂ + ∂ =
+ ∇ ⋅ + ∂ ∇ ⋅ + ∂ + ∇ ⋅ + ∂ + ∂ =
(4.36)
The distribution function
i
f is constrained by the following relationships
ρ =

=
M
i
i
f
0
(0)
, u e ρ =

=
M
i
i i
f
0
(0)
(4.37)
0
0
(j)
=

=
M
i
i
f , 0
0
) j (
=

=
M
i
i i
f e , 0
0
(2)
=

=
M
i
i
f , 0
0
) 2 (
=

=
M
i
i i
f e (4.38)

Mass Conservation
Summation of equation (4.35) over i leads to
∑ ∑ ∑ ∑
= = = =
+ ⋅ ∇ +


=
M
i
i
t
M
i
i i
M
i
i
M
i
i
f f f
t
E
0
(1)
0
(0)
1
0
(0)
0 0
) 1 (
1
e
τδ
(4.39)
which can be further reduced to
0
1
0
= ⋅ ∇ +


u ρ ρ
t
(4.40)
Similarly, Summation of equation (4.36) over i gives

∑ ∑ ∑ ∑
= = = =
τδ
+
|
.
|

\
|
τ
− ∇ ⋅ + ∂ +


=
M
i
i
t
M
i
i i t
M
i
i
M
i
i
f f f
t
E
0
(2)
0
(1)
1
0
(0)
1 0
) 2 (
1
2
1
1 ) (
0
e , (4.41)
Again using constraints (4.37) and (4.38), we have
0 =


ρ
1
t
. (4.42)
Combining Eq. (4.40) with Eq. (4.42) leads to the continuum equation
0 = ⋅ ∇ +


u ρ ρ
t
(4.43)

130

Momentum Conservation
Now consider the second moment of Eq. (4.35). For the second moment of (4.35) it is
obtained:
∑ ∑ ∑ ∑
= = = =
+ ∇ ⋅ +


=
M
i
i i
t
n
i
i i i
M
i
i i
M
i
i i
f f f
t
E
0
(1)
0
(0)
0
(0)
0 0
) 1 (
e
1
e ) e ( e
τδ
e (4.44)
Using equations (4.37-4.38), one can get
0 e e u
0
) 0 (
0
= ⋅ ∇ +



=
M
i
i i i
f
t
ρ (4.45a)
or in the following form
0
) 0 (
0
= Π ⋅ ∇ +


u ρ
t
(4.45b)
where
(0)
Π is the zeroth-order momentum flux tensor,

=
= Π
M
i
i i i
f e e
0
) 0 (
, ,
) 0 (
,
β α
β α
(4.46)
For the second moment of (4.36), using Eq. (4.35), it is obtained

∑ ∑ ∑ ∑
=
= = = =
+
|
|
.
|

\
|
∇ ⋅ +


|
.
|

\
|
− +


=
M
i
i i
t
M
i
i i i
M
i
i i
M
i
i i
M
i
i i
f
f f
t
f
t
e E
0
(2)
0
(1)
0
(1)
0 0
(0)
1 0
) 2 (
1
) (
2
1
1
e
e e e e
τδ
τ
(4.47)
Again using equations (4.37-4.38), we get
0
2
1
1
0
(1)
1
= ⋅ ∇
|
.
|

\
|
− +



=
M
i
i i i
f
t
e e u
τ
ρ (4.48a)
or in a form
0
2
1
1
) 1 (
1
= Π ⋅ ∇ |
.
|

\
|
− +


τ
ρu
t
(4.48b)
where
(1)
Π is the first-order momentum flux tensor,

131

=
= Π
M
i
i i i
f e e
0
) 1 (
, ,
) 1 (
,
β α
β α
(4.49)
To evaluate the zeroth- and first-order momentum flux tensors in Eqs. (4.45) and
(4.48), the following tensor
) (q
E of order q is defined

=
=
M
i
i i i i
q
q jk
e e e w E
1
q , k , j ,
) (
..
... , q k j ,..., , =1…3 (4.50)
where
j i
e
,
is the projection of
i
e on j -axis ( j =
1
x ,
2
x , or
3
x ). It can be shown that
for the D2Q9 model,
) (q
E can be written as
0
0
,
(1)
= =

=
M
i
j i i j
e w E
jk s k i
M
i
j i i jk
c e e w E δ
2
,
0
,
(2)
= =

=
(4.51)
0
0
, , ,
(3)
= =

=
M
i
l i k i j i i jkl
e e e w E (4.52)
jklm s
M
i
m i l i k i j i i jklm
c e e e e w E ∆ = =

=
4
0
, , , ,
(4)
(4.53)
where
kl jm km jl lm jk jklm
δ δ δ δ δ δ + + = ∆ ;
jk
δ and
jklm
δ are Kronecker delta with
two and four indices respectively.
Using these properties of tensor
) (q
E and Eq. (4.27), it follows for zeroth- and first-
order momentum flux tensor
k j jk s
M
i
i k i j i jk
u u c f e e ρ ρδ + = = Π

=
2
0
(0)
, ,
(0)
(4.54)
since
|
|
.
|

\
| −
+ + = =
4
2 2
2
0
2
1
s
s i i
s
i
i
eq
i i
c
u c u u e e
c
u e
w f f
β α β α
α α
ρ

kl jm km jl lm jk jklm
δ δ δ δ δ δ + + = ∆

k j jk m l kl jm km jl lm jk m l jklm
u u u u u u u 2 ) (
2
+ = + + = ∆ δ δ δ δ δ δ δ

132

⋅ ∇ + Π


− =
− = = Π

∑ ∑
=
= =
M
i
i l i k i j i jk t
M
i
i t k i j i t
M
i
i k i j i jk
f e e e
t
f D e e f e e
0
) 0 (
, , , 1
(0)
0
0
(0)
, ,
0
(1)
, ,
(1)
0
τδ
τδ
(4.55a)
Since
) ( ) (
) (
1
2 2
1
2
2
1
2
0
, , , , 1 2
0
) 0 (
, , , 1
j
k
k
j s
m
m jk s
j
k
k
j
jk s
m kl jm km jl lm jk x s m jklm s
M
i
m m i l i k i j i i
s
M
i
i l i k i j i
x
u
x
u c
x
u c
x
u
x
u
c
u c u c
u e e e e w
c
f e e e
l


+


+


+


+


+ ⋅ ∇ =
+ + ∂ = ∆ ⋅ ∇ =
⋅ ∇ = ⋅ ∇
∑ ∑
= =
ρ ρ ρ
δ δ ρ
δ ρδ δ ρδ δ ρδ ρ
ρ
u

) ( ) (
) ( ) ( ) (
) ( ) (
)] ( [ ) ( ) (
)] ( ) ( [ )] ( ) ( [ ) (
) ( ) (
) (
2 2
1
2
2 2
2
0
2
0
2
0
2
2 2
0
2
0 0 0 0
2
2
0
) 0 (
0
m k j
m j
k
k
j s
m
m jk s jk s
m k j
m j
k
k
j s m
m
jk s
m k j
m j
k
k
j s jk s
m
m
k j m k j
m j
k
k
j s jk s
m j
m
s
j
k m k
m
s
k
j k j jk s
k j j k k j jk s
k j jk s jk
u u u
x x
u
x
u c
x
u c c
u u u
x x
u
x
u c u
x
c
u u u
x x
u
x
u c
t
c
u
x t
u u u u u
x x
u
x
u c
t
c
u u
x
c
x
u u u
x
c
x
u
t
u u c
t
u u u
t
u u
t
u
t
c
u u c
t t
ρ
ρ ρ
ρ δ δ ρ
ρ
ρ ρ
ρ δ
ρ
ρ ρ
ρ δ
ρ ρ ρ
ρ ρ
ρ δ
ρ ρ ρ ρ ρ δ
ρ ρ ρ ρ δ
ρ δ ρ





+





⋅ ∇ − =





+





− =





+





=


+








+





=





− +





− +


− =





+


+


=
+


= ∏


- u

therefore, we have
) (
2
1
1
) ( ) (
2
1
1
2
1
1
2 2
2 2
0
(0)
, ,
0
(1)
, ,
(1)
0
Ma O
x
u
x
u
c
Ma O u u u
x x
u
x
u
c
f D e e f e e
k
j
j
k
t s
m k j
m k
j
j
k
s t
M
i
i t k i j i t
M
i
i k i j i jk
+



+


|
.
|

\
|
− − ≈
+




|
|
.
|

\
|


+


|
.
|

\
|
− − =
− = = Π
|
.
|

\
|

∑ ∑
= =
τ
ρτδ
ρ ρ
τ
τδ
τδ
τ
(4.55b)
(Note that
m m k j
x u u u ∂ ∂ / ) (ρ is considered very small, and is ignored)
Combining Eqs. (4.45) with (4.48), we can get:

133
u uu
u
2
) ( ∇ + −∇ = ∇ +


ρν ρ
ρ
P
t
(4.56)
where ν is kinematic viscosity given by
t
δ
τ
ν
6
1 2 −
= (4.57)
and 3 / 1 =
s
c for the D2Q9 model.
In the small Mach number limit, the density variation can be negligible. Thus one can
further obtain the incompressible Navier-Stokes equations
0 = ⋅ ∇ u (4.58)
u u u
u
2
1
∇ + ∇ − = ∇ ⋅ +


ν
ρ
P
t
(4.59)

Boundary Conditions
Boundary conditions are an essential issue since they determine solutions
which are compatible with external constraints. Mathematically, reasonable treatments
on boundaries should be able to accommodate both Dirichlet and Neumann boundary
conditions as well as be as simple as possible in treating complicated boundaries.






Figure 4.4 Sketch of boundary condition



Fluid Domain

i
f
n

i
f


134
Generally, formulating boundary conditions in the LBM consists of finding an
appropriate relation between the incoming (unknown) distribution functions (denoted
as

i
f ) and the outgoing (known) ones (denoted as

i
f ). Considering a fluid flowing in
a bounded domain Ω confined by a surrounding boundary Ω ∂ (see Fig. 4.4), the
outgoing and incoming functions at a boundary site x are defined by
n e 0 > ⋅
i
and n e 0 < ⋅
i
, (4.60)
respectively. The n is the outward normal vector of the boundary element centered in x.
In mathematical terms, the relation can be expressed as a linear integral equation:

∑∑
〉 〈
− Π =
y
y y x x
j
j ij i
f f ) ( ) ( ) ( (4.61)
where the kernel ) ( y x − Π
ij
of the boundary operator generally extends over a finite
range of values y inside the fluid domain. This boundary operator reflects the
interaction between the fluid molecules and the boundary. Consistent with this
molecular picture, boundary conditions can be viewed as special collisions between the
molecules and the boundary.

With the above knowledge, there have been many kinds of boundary treatments
introduced. Here we only focus on four classes of boundary conditions because they
are often encountered. The four classes of boundary conditions are: periodic, no-slip,
sliding walls and open inlet/outlet.


135

Figure 4.5 Sketch of Periodic, Non-slip and Sliding wall Boundary conditions

Periodic Boundary Conditions
Periodic boundary conditions are the simplest instance of boundary conditions.
The practical implementation of them can be expressed as follows:
) ( ) (
2 1
B f B f
j i
〉 〈
= (4.62a)
) ( ) (
1 2
B f B f
j i
〉 〈
= (4.62b)
where B
1
and B
2
represent the left and right boundary layers. To illustrate the idea, let
us take the D2Q9 DV model as an example and consider only the direction along the X
axis (Fig. 4.5). The i and j are:
{ } 8 , 2 , 1 ) , (
1
= 〈 B i { } 8 , 2 , 1 ) , (
2
= 〉 B j (4.63a)
{ } 6 , 5 , 4 ) , (
2
= 〈 B j { } 6 , 5 , 4 ) , (
1
= 〉 B i (4.63b)

No-slip Boundary Conditions
The so-called ‘no-slip’ boundary condition physically means that there is no
flow motion at the boundaries. Here we take a case of the physical boundary lying
exactly on a grid line as an example because this situation is easy for practical
applications. An implementation of the boundary conditions is the so-called bounce-
Flow direction
2
0
3 4
5
6 7 8
1
2
0
3 4
5
6 7 8
1
X
Y
2
0
3
4
5
6 7 8
1
2
0
3
4
5
6 7 8
1
U

136
back scheme of the distribution function. The bounce back means when a particle
streams to the boundaries, it just scatters back to the point it comes from:
) ( ) ( B f B f
j i
〉 〈
= (4.64)
Here
j i
e e − = . For the D2Q9 DV model and considering the direction along the y axis,
on the bottom wall (Fig. 4.5) we can rewrite equation (4.64) in terms of the boundary
kernel (Eq. (4.61)):

|
|
|
.
|

\
|
=







8
7
6
4
3
2
1 0 0
0 1 0
0 0 1
f
f
f
f
f
f
(4.65)
This complete reflection guarantees that both tangential and normal components of the
wall fluid speed vanish identically.

Sliding Walls
In the literature, there have been several ways to treat this kind of boundary
conditions. The most popular one is the use of equilibrium distribution boundary
condition (EDBC) (Hou et al. 1995) and the hydrodynamic boundary condition (HBC)
(Nobel et al. 1995). The EDBC is to set an equilibrium state on the boundaries
provided that the density is equal to the equilibrium value. This boundary treatment is
easy to be implemented.
In the HBC, the incoming distributions and density can be defined by solving
the conservation relations (density, momentum, mass flux or energy) on the wall.
Considering the D2Q9 DV model on the top wall (Fig. 4.5), we have:

|
|
|
.
|

\
|
− −
|
|
|
.
|

\
|
|
|
|
.
|

\
|
− −
|
|
|
.
|

\
|
=

|
|
|
.
|

\
|
− − −







4
3
2
5
1
0
8
7
6
1 1 1
1 0 1
1 1 1
0 0 0
1 1 0
1 1 1
1 1 1
1 0 1
1 1 1
f
f
f
f
f
f
u
u
f
f
f
y
x
ρ
ρ
ρ
(4.66)

137
Initially the tangential momentum conservation is ensured by setting f
1
= f
5
and the
distributions f
0
, f
1
, f
5
are not altered by the dynamics at any subsequent time step.
This boundary condition has a second order of accuracy.

Open Inlet and Outlet
Generally, for this kind of boundary conditions, it is common to assign a given
velocity profile at the inlet, while at the outlet either a given pressure or a no-flux
condition normal to the boundary is imposed.
In the LBM, the inlet boundary is easily implemented by constantly resetting
the equilibrium distributions with the desired values of density and inlet flow velocity:
) , (
in in
eq
i i
u f f ρ = (4.67)
At the outlet, the zero-gradient condition can be directly imposed by simply
extrapolating the information from the fluid field nearby the outlet to the outlet
boundary. However, one must guarantee that the outlet is placed far enough
downstream so as to allow the flow to settle down to the zero-gradient profile. The
formulation can be written as:
) ( ) ( 2 ) (
2 1
B f B f B f
i i outlet i
− = (4.68)
where B
1
and B
2
represent the first and second rows next to the outlet boundary B
outlet
.
Another way is to extrapolate the macroscopic variables to the outlet using the
zero gradient condition, and then use the equibrium function as the boundary condition.





138
4.5 Practical Implementation of LBM for Lid-Driven Square Cavity
Flows
To show the application of LBM explicitly, in this part we choose a two-
dimensional steady flow in a square cavity as a numerical example because this
problem is industrially

important and usually is taken as one of the standard

cases to
test new computational schemes. For this problem (Fig. 4.6), the flow in the cavity is
driven by the top lid moving from left to right with a constant velocity U. Here we
only study the flow with Re = 100 (Re = UL/υ is the Reynolds number based on the lid
velocity and the length of the square cavity) and adopt the D2Q9 DV model for the
LBM. For convenience, all variables used in this section are dimensionless and they
are defined as

Figure 4.6 Sketch of Lid-driven cavity flow

x c t t L y L x y x c ∆ = = = = / , / , ) / , / ( ) , ( , /
0
ρ ρ ρ u u (4.69)
where t x c ∆ ∆ = / is the lattice velocity, x is the dimensionless variable while x is the
dimensional variable. This definition is applied to other variables.

The procedure is described as follows:
u = 0
v = 0
u = 0
v = 0
u = 0 v = 0
u = U v = 0

139
1. Discretized the flow domain
Square domain is discretized by a uniform lattice with points of Imax×Imax, then
the Cartesian coordinates in the domain are
) 1 /(Imax ) 1 (
) 1 /(Imax ) 1 (
,
,
− − =
− − =
j y
i x
j i
j i

then
) 1 /(Imax 1 − = ∆ = ∆ = y x
t
δ ───────── Time step
2. Set basic computational parameters
Kp=8 ───────── Particle velocity number of D2Q9 model with particle
velocity:
( ) | | ( ) | | ( )
( ) | | ( ) | | ( )
¦
¹
¦
´
¦
= + − + −
= − −
=
=
8 , 7 , 6 , 5 4 / 2 / 5 sin , 4 / 2 / 5 cos 2
4 , 3 , 2 , 1 2 / 1 sin , 2 / 1 cos
0 0
α π π α π π α
α π α π α
α
α
e
Re=100 ───────── Reynolds number (flow parameter)
U=0.1 ───────── Lid velocity
Then
) 1
Re 6
(
2
1
+ =
t

τ ───────── Relxation parameter (L = 1)
3 / 1
2
=
s
c
3. Set Initial Field
t = 0
(i = 1, Imax; j = 1, Imax)
1
,
=
j i
ρ ───────── Initial density ρ
0
Imax) ( ,
=
≠ j j i
(u,v) u ; 0 ,
,imax ,imax
= =
i i
v U u ───── Initail velocity field
Then assuming

140
) 0 , , ( ) 0 , , ( = = = t j i f t j i f
eq
α α

with
( )



+

+ = =
2
2
4
2
2
2 2
1 ) 0 , , (
s
i,j
s
i,j
s
i,j
eq
c c c
w t j i f
u u e u e
α α
α α
ρ
(for value of
α
w , see Table 4.1)
4. Iteration procedure
t
t t δ + =
¾ Streaming:
) , , ( ) , , ( : 0
0 0
t j i f t j i f
t
= + = δ α (i = 1, Imax; j = 1, Imax-1);
) , , 1 ( ) , , ( : 1
1 1
t j i f t j i f
t
− = + = δ α (i = 2, Imax; j = 1, Imax-1);
) , 1 , ( ) , , ( : 2
2 2
t j i f t j i f
t
− = + = δ α (i = 1, Imax; j = 2, Imax-1);
) , , 1 ( ) , , ( : 3
3 3
t j i f t j i f
t
+ = + = δ α (i = Imax-1, 1; j = 1, Imax-1);
) , 1 , ( ) , , ( : 4
4 4
t j i f t j i f
t
+ = + = δ α (i = 1, Imax; j = Imax-1, 1);
) , 1 , 1 ( ) , , ( : 5
5 5
t j i f t j i f
t
− − = + = δ α (i = 2, Imax; j = 2, Imax-1);
) , 1 , 1 ( ) , , ( : 6
6 6
t j i f t j i f
t
− + = + = δ α (i = Imax-1; 1, j = 2, Imax-1);
) , 1 , 1 ( ) , , ( : 7
7 7
t j i f t j i f
t
+ + = + = δ α (i = Imax-1; 1, j = Imax-1, 1);
) , 1 , 1 ( ) , , ( : 8
8 8
t j i f t j i f
t
+ − = + = δ α (i = 2, Imax; j =Imax-1, 1);
¾ Collision:
)) , , ( ) , , ( (
1
) , , ( ) , , (
t
eq
t t t
t j i f t j i f t j i f t j i f δ δ
τ
δ δ
α α α α
+ − + − + = +
( Kp , , 0 L = α ; i = 1, Imax; j = 1, Imax-1);
Note that the collision is made at the same time level.



141
¾ Boundary Condition (Fig. 4.7):

Figure 4.7 Sketch of the boundary condition of LBM for the driven cavity flow

j = Imax: ) 0 , , ( ) , , ( = = + t j i f t j i f
eq
t α α
δ , ( 8 0L = α ; Imax , 1 = i )
j = 1:
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
8 6
4 2
7 5
t t
t t
t t
t j i f t j i f
t j i f t j i f
t j i f t j i f
δ δ
δ δ
δ δ
+ = +
+ = +
+ = +
( 1 max I , 2 − = i )
i = 1:
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
6 8
3 1
7 5
t t
t t
t t
t j i f t j i f
t j i f t j i f
t j i f t j i f
δ δ
δ δ
δ δ
+ = +
+ = +
+ = +
( 1 Imax , 2 − = j )
i = Imax:
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
5 7
1 3
8 6
t t
t t
t t
t j i f t j i f
t j i f t j i f
t j i f t j i f
δ δ
δ δ
δ δ
+ = +
+ = +
+ = +
( 1 Imax , 2 − = j )
3 1
f f =
7 5
f f =
6 8
f f =
2
f
6
f
3
f
7
f
4
f
ima , ( imax) , (
9 0 9 0
i f i f
eq
L L = =
=
α α
1
f
eq
f f
5 5
=
8
f
4 2
f f =
8 6
f f =
1 3
f f =
eq
f f
7 7
= 4
f
1
f
7 5
f f =
8
f
4 2
f f =
8 6
f f =
3
f
7
f
4
f
3 1
f f =
7 5
f f =
eq
f f
8 8
=
4 2
f f =
eq
f f
6 6
=
3
f
7
f
4
f
1
f
5
f

8
f
2
f

8 6
f f =
3
f f =

5 7
f f =
4
f

142
i = 1, j = 1:
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
8 8
6 6
4 2
3 1
7 5
t j i f t j i f
t j i f t j i f
t j i f t j i f
t j i f t j i f
t j i f t j i f
eq
t
eq
t
t t
t t
t t
= +
= +
+ = +
+ = +
+ = +
δ
δ
δ δ
δ δ
δ δ

i = Imax, j = 1:
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
) , , ( ) , , (
7 7
5 5
1 3
8 6
4 2
t j i f t j i f
t j i f t j i f
t j i f t j i f
t j i f t j i f
t j i f t j i f
eq
t
eq
t
t t
t t
t t
= +
= +
+ = +
+ = +
+ = +
δ
δ
δ δ
δ δ
δ δ

¾ Calculating macroscopic variables:
2
, ,
Kp
0 α
, ,
Kp
0 α
, ,
Kp
0 α
,
/ ) , , (
/ ) , , (
) , , (
s j i j i
y t j i
x t j i
t j i
c P
e t j i f v
e t j i f u
t j i f
ρ
ρ δ
ρ δ
δ ρ
α α
α α
α
=
+ =
+ =
+ =



=
=
=
(i = 1,Imax; j = 1,Imax-1)
and
2
Imax ,
Imax ,
Imax ,
Imax ,
0
1
s i
i
i
i
c P
v
U u
=
=
=
= ρ
(i = 1,Imax)
¾ Calculating new equilibrium:
( )



+

+ = +
2
2
4
2
2
2 2
1 ) , , (
s
i,j
s
i,j
s
i,j
t
eq
c c c
w t j i f
u u e u e
α α
α α
ρ δ
(i = 1,Imax; j = 1,Imax-1); (value of
α
w refers to Table 4.1)



143
¾ Set convergent critiria:

+ + +
− + + − +
=
j i
t t
t t
t j i v t j i u
t j i v t j i v t j i u t j i u
Error
,
2 2
2 2
)] , , ( [ )] , , ( [
)] , , ( ) , , ( [ )] , , ( ) , , ( [
δ δ
δ δ

(i = 1,Imax; j = 1,Imax-1)
If
6
10

> Error , repeat above steps. Otherwise go to next step for output
necessary information in the flow field .
5. Output information in the flow fied
The following flow information is usually required:
Normalized velocity along horizontal and vertical center lines of the cavity:
U v
j i
/
,
for i=1, Imax and j=(Imax-1)/2+1
U u
j i
/
,
for i=(Imax-1)/2+1 and j=1,Imax
Normalized stream function in the flow field:
∫ ∫
− =
1
0
,
1
0
,
,
dx
U
v
or dy
U
u
j i j i
j i
ψ (i = 1,Imax; j = 1,Imax)
Normalized vorticity function in the flow field:
j i
j i
j i
x
v
y
u
,
,
,
|
.
|

\
|



|
|
.
|

\
|


= ω (i = 1,Imax; j = 2,Jmax)
The following Figs. 4.8-4.9 are typical results obtained by the LBM and their
comparison with the Navier-Stokes solution.



144
0
0.2
0.4
0.6
0.8
1
-0.4 -0.2 0 0.2 0.4 0.6 0.8 1
U-Y
Ghia's data
Present
result
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0 0.2 0.4 0.6 0.8 1
X-V
Ghia's data
Present
result

Figure 4.8 U (left) and V (right) velocity profiles along vertical and horizontal
central lines of the square cavity at Re = 100 (65×65 uniform grid)


Figure 4.9 Streamlines (left) and vorticity contours (right) of the lid-driven square
cavity flows at Re = 100 (65×65 uniform grid)



References

Bhatnagar PL, Gross EP and Krook M, “A model for collision processes in gases, I:
small amplitude processes in charged and neutral one-dimensional system”, Phys.
Rev., 94, p511, 1954.
Chapman S and Cowling T, “The mathematical theory of non-uniform gases”, 3
rd

Edn., Cambridge University Press, 1990.

145
Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid
Mech. 30, 329 (1998).
Chen S, Martinez D and Mei R, “On boundary conditions in lattice Boltzmann
methods”, Phys. Fluids, 8, p2527, 1996.
Frisch U, Hasslacher B and Pomeau Y, “Lattice-gas automata for the Navier-Stokes
equations”, Phys. Rev. Lett., 56, p1505, 1986.
Frisch U, d'Humiéres D, Hasslacher B, Lallemand P, Pomeau Y and Rivet JP, “Lattice-
gas hydrodynamics in two and three dimensions”, Complex Syst., 1, p649, 1987.
Ghia U, Ghia KN and Shin CT, “High-resolution for incompressible flow using the
Navier-Stokes equations and a multigrid method”, J. Comp. Phys., 48, p387, 1982.
Hardy J, Pomeau Y and de Pazzis O, “Time evolution of a two-dimensional classical
lattice system”, Phys. Rev. Lett., 31, p276, 1973.
Hou S, Zou Q, Chen S, Doolen GD, and Cogley AC, “Simulation of cavity flow by
the lattice Boltzmann method”, J. Comp. Phys., 118, p329, 1995.
Koelman JMVA, “A simple lattice Boltzmann scheme for Navier-Stokes fluid flow”,
Europhys. Lett., 15, p603, 1991.
Luo L. S., Unified theory of the lattice Boltzmann models for nonideal gases, Phys.
Rev. Lett. 81(8): 1618-1621, 1998.
Maier RS, Bernard RS and Grunau DW, “Boundary conditions for lattice Boltzmann
method”, Phys. Fluids, 8, p1788, 1996.
Noble DR, Chen S, Georgiadis JG and Buckius RO, “A consistent hydrodynamic
boundary condition for the lattice Boltzmann method”, Phys. Fluids, 7, p203,
1995.
Qian YH, d’Humières D and Lallemand P, “Lattice BGK models Navier-Stokes
equation”, Europhys. Lett., 17, p479, 1992.

146
Qian YH, Succi S and Orszag SA, “Recent advances in lattice Boltzmann computing”,
Annu. Rev. Comp. Phys., 3, p195, 1995.
Succi S, “The Lattice Boltzmann Equation for Fluid Dynamics and Beyond”,
Clarendon Press, Oxford, UK, 2001.
Wolfram S, “Cellular automaton fluids. 1: Basic theory”, J. Stat. Phys., 45, p471,
1986.
Wolf-Gladrow, D. A., Lattice-Gas Cellular Automata and Lattice Boltzmann Models:
An Introduction, Lecture Notes in Mathematics 1725, Springer-Verlag, Germany
(2000).

147
5. Taylor Series Expansion- and Least Square-
based Lattice Boltzmann Method (TLLBM)

5.1 Introduction

Despite its huge success in many practical applications, the conventional LBM
introduced in Chapter 4 is still plagued with restriction of lattice-uniformity in physical
space, which makes the scheme macroscopically similar to a uniform Cartesian-grid
solver. This limits its application. This can be seen clearly in Fig. 5.1.

Mesh points
Positions from streaming


Fig. 5.1 Limitation of standard LBM to non-uniform mesh


148
For many practical problems, an irregular grid or a meshless structure is always
preferred due to the fact that curved boundaries can be described more accurately and
that computational resources can be used more efficiently with it.

Theoretically, the feature of lattice-uniformity is not necessary to be kept because the
distribution functions are continuous in physical space. In order to implement the LBE
more efficiently for flows with arbitrary geometry, we introduce in this part a new
version of LBM (Shu et al 2001, 2002, Niu et al 2002), which is based on the
conventional LBM, the well-known Taylor series expansion, the idea of developing
Runge-Kutta method and the least squares approach. The final form of our method is
an algebraic formulation, in which the coefficients only depend on the coordinates of
mesh points and lattice velocity, and are computed in advance. The new method is also
free of lattice models.

5.2 Conventional models for problems with complex geometry

To remove the difficulty of standard LBM for the application to flow problems with
complex geometry and the use of non-uniform mesh, a few versions of LBM were
presented. Basically, they can be classified into two categories: interpolation-
supplemented LBM (ISLBM) and differential LBM.

Interpolation-Supplemented LBM (ISLBM)
This method was proposed by He et al. in 1996. The basic idea of ISLBM is
that all the particles are streamed to positions in the flow field first, which may not
coincide with the mesh points. Then, in the second step, interpolation is performed in

149
the whole domain. As compared with the standard LBM, ISLBM requires much more
computational effort as interpolation is performed at every time step. For stable
computation, upwind interpolation is usually needed. The process of ISLBM is shown
in Fig. 5.2.
Mesh points
Positions from streaming


Fig. 5.2 Configuration of ISLBM

Differential LBM
Applying the first order Taylor series expansion to the standard LBE in time
and space, we can obtain the following two-dimensional equation,
t
eq
y x
t y x f t y x f
y
f
e
x
f
e
t
f
δ τ
α α α
α
α
α
α


=


+


+

∂ ) , , ( ) , , (
(5.1)
{recall | | τ δ δ δ
α α α α α α
/ ) , , ( ) , , ( ) , , ( ) , , ( t y x f t y x f t y x f t t t e y t e x f
eq
y x
− + = + + + }
Equation (5.1) is a wave-like equation, which can be solved by the conventional finite
difference (FD) scheme, finite volume (FV) method, and finite element (FE) method.

150
Note that when the FD scheme is applied, the coordinate transformation has to be
adopted for complex domain. In general, the upwind scheme is needed to get the stable
solution.

Two major drawbacks of this method are
• Artificial viscosity is too large, especially at high Re
• Lose primary advantage of standard LBM

It was found that the large artificial viscosity of differential LBM is actually due to the
first order Taylor series expansion, and the expansion in time is not necessary. So,
applying the second order Taylor series expansion in space, Chew et al. (2002) gives
| | τ
δ δ δ
δ δ δ δ
δ δ δ
δ δ
δ δ δ
δ δ
δ δ δ
δ δ
δ δ δ
δ δ δ δ δ
α α α
α
α α
α
α
α
α
α
α
α
α α
/ ) , , ( ) , , ( ) , , (
) , , (
) )( (
) , , (
) (
2
1 ) , , (
) (
2
1
) , , (
) (
) , , (
) ( ) , , (
2
2
2
2
2
2
2
t y x f t y x f t y x f
y x
t y y x x f
y e x e
y
t y y x x f
y e
x
t y y x x f
x e
y
t y y x x f
y e
x
t y y x x f
x e t y y x x f
eq t
t y t x
t
t y
t
t x
t
t y
t
t x t
− + =
∂ ∂
+ + + ∂
− − +

+ + + ∂
− +

+ + + ∂
− +

+ + + ∂
− +

+ + + ∂
− + + + +
(5.2)
The above equation can be used to simulate viscous flows at high Reynolds number.
But its computational efficiency is very low.

5.3 Taylor Series Expansion- and Least Square-based Lattice
Boltzmann Method (TLLBM)

We consider a two-dimensional (2D) case. As shown in Fig. 5.3, for simplicity, we let
point A represent the grid point ) , , ( t y x
A A
, point ' A represent the position
) , , (
t t y A t x A
t e y e x δ δ δ
α α
+ + + , and point P represent the position ) , , (
t P P
t y x δ +
with y y y x x x
A P A P
δ δ + = + = , . According to LBE, we have

151
| | τ δ
α α α α
/ ) , ( ) , ( ) , ( ) , ' ( t A f t A f t A f t A f
eq
t
− + = + (5.3)
{recall | | τ δ δ δ
α α α α α α
/ ) , , ( ) , , ( ) , , ( ) , , ( t y x f t y x f t y x f t t t e y t e x f
eq
y x
− + = + + + }

P
A
B
C
D
E
A'
B'
C'
D'
P'
E'


Figure 5.3 Configuration of particle movement along the α direction

For the general case, ' A may not coincide with the mesh point P. We first consider the
Taylor series expansion with truncation to the first order derivative terms. Then,
) , ' (
t
t A f δ
α
+ can be approximated by the corresponding function and its derivatives at
the mesh point P as
] ) ( , ) [(
) , ( ) , (
) , ( ) , ' (
2 2
A A
t
A
t
A t t
y x O
y
t P f
y
x
t P f
x t P f t A f ∆ ∆ +

+ ∂
∆ +

+ ∂
∆ + + = +
δ δ
δ δ
α α
α α

(5.4)
where
P t x A A
x e x x − + = ∆ δ
α
,
P t y A A
y e y y − + = ∆ δ
α
. Note that the above approximation
has a truncation error of the second order. Substituting equation (5.4) into equation (5.3)
gives
τ
δ δ
δ
α α
α
α α
α
) , ( ) , (
) , (
) , ( ) , (
) , (
t A f t A f
t A f
y
t P f
y
x
t P f
x t P f
eq
t
A
t
A t

+ =

+ ∂
∆ +

+ ∂
∆ + +
(5.5)
It is indicated that equation (5.5) is a first order differential equation, which
only involves two mesh points A and P. When a uniform grid is used, 0 = ∆ = ∆
A A
y x ,
equation (5.5) is reduced to the standard LBE. Solving equation (5.5) can provide the

152
density distribution functions at all the mesh points. In this work, we try to develop an
explicit formulation to update the distribution function. In fact, our new development
is inspired by the Runge-Kutta method.

Idea of Runge-Kutta method
ODE:
), , ( t u f
dt
du
=
0
u u = , when 0 = t (5.6)
Taylor series method:
....
6 2
3
3 3
2
2 2
1
+
|
|
.
|

\
|
+
|
|
.
|

\
|
+
|
.
|

\
|
+ =
+
n n
n
n n
dt
u d h
dt
u d h
dt
du
h u u , t h ∆ = (5.7)
Expressions of the second and higher order derivatives are obtained by
successive differentiation of equation (5.6)
Runge-Kutta method:
Choose some points between time level n and n+1, and apply Taylor series
expansion at the time level n+1 and these points to form an equation system so
that the second and higher order derivatives can be eliminated from the
equation system.

As we know, the Runge-Kutta method is developed to improve the Taylor series
method in the solution of ordinary differential equations (ODEs). As shown above,
Taylor series method involves evaluation of different orders of derivatives to update
the functional value at the next time level. For a given ODE with a complicated
expression, this application is very difficult. To improve the Taylor series method, the
Runge-Kutta method evaluates the functional values at some intermediate points and

153
then combines them (through the Taylor series expansion) to form a scheme with the
same order of accuracy.

Taylor series expansion-based LBM
With this idea in mind, we look at equation (5.5). We know that at the time level
t
t δ + , the density distribution function and its derivatives at the mesh point P are all
unknowns. So, equation (5.5) has three unknowns in total. To solve for the three
unknowns, we need three equations. However, equation (5.5) just provides one
equation. We need additional two equations to close the system. As shown in Fig. 5.3,
we can see that along the α direction, the particles at two mesh points B P, at the time
level t will stream to the new positions ' , ' B P at the time level
t
t δ + . The distribution
functions at these new positions can be computed through the standard LBE, which are
given below
| | τ δ
α α α α
/ ) , ( ) , ( ) , ( ) , ' ( t P f t P f t P f t P f
eq
t
− + = + (5.8)
| | τ δ
α α α α
/ ) , ( ) , ( ) , ( ) , ' ( t B f t B f t B f t B f
eq
t
− + = + (5.9)
Using Taylor series expansion with truncation to the first order derivative
terms, ) , ' (
t
t P f δ
α
+ , ) , ' (
t
t B f δ
α
+ in above equations can be approximated by the
function and its derivatives at the mesh point P. As a result, equations (5.8)-(5.9) can
be reduced to
τ
δ δ
δ
α α
α
α α
α
) , ( ) , (
) , (
) , ( ) , (
) , (
t P f t P f
t P f
y
t P f
y
x
t P f
x t P f
eq
t
P
t
P t

+ =

+ ∂
∆ +

+ ∂
∆ + +
(5.10)
τ
δ δ
δ
α α
α
α α
α
) , ( ) , (
) , (
) , ( ) , (
) , (
t B f t B f
t B f
y
t P f
y
x
t P f
x t P f
eq
t
B
t
B t

+ =

+ ∂
∆ +

+ ∂
∆ + +
(5.11)

154
where
t x P
e x δ
α
= ∆ ,
t y P
e y δ
α
= ∆

P t x B B
x e x x − + = ∆ δ
α
,
P t y B B
y e y y − + = ∆ δ
α

Equations (5.5), (5.10) and (5.11) form a system to solve for three unknowns.
The solution of this system gives
∆ ∆ = + / ) , (
P t
t P f δ
α
(5.12)
where
P A A P B P P B A B B A
y x y x y x y x y x y x ∆ ∆ − ∆ ∆ + ∆ ∆ − ∆ ∆ + ∆ ∆ − ∆ ∆ = ∆
B P A A P A B P P B P A B B A P
g y x y x g y x y x g y x y x
, , ,
) ( ) ( ) (
α α α
∆ ∆ − ∆ ∆ + ∆ ∆ − ∆ ∆ + ∆ ∆ − ∆ ∆ = ∆
| | τ
α α α α
/ ) , ( ) , ( ) , (
,
t P f t P f t P f g
eq
P
− + =
| | τ
α α α α
/ ) , ( ) , ( ) , (
,
t A f t A f t A f g
eq
A
− + =
| | τ
α α α α
/ ) , ( ) , ( ) , (
,
t B f t B f t B f g
eq
B
− + =
It should be noted that
A P
g g
, ,
,
α α
and
B
g
, α
are actually the post-collision state of
the distribution functions
α
f at the time level t and the mesh point P, A, B respectively.
Equation (5.12) has the second order of truncation error, which may introduce a large
numerical diffusion. To improve the accuracy of numerical computation, we need to
truncate the Taylor series expansion to the second order derivative terms. For the two-
dimensional case, this expansion involves six unknowns, that is, one distribution
function at the time level
t
t δ + , two first order derivatives, and three second order
derivatives. To solve for these unknowns, we need six equations to close the system.
This can be done by applying the second order Taylor series expansion at 6 points. As
shown in Fig. 5.3, the particles at six mesh points E D C B A P , , , , , at the time level t will
stream to positions ' , ' , ' , ' , ' , ' E D C B A P at the time level
t
t δ + . The distribution
functions at these new positions can be computed through the standard LBE. Then by

155
using the second order Taylor series expansion at these new positions in terms of the
distribution function and its derivatives at the mesh point P, we can obtain the following
equation system

=
= =
6
1
: , : : :
} { } {
j
j j i
T
i i
V s V s g
α α α α α
E D C B A P i , , , , , = (5.13)
where
( ) τ
α α α α
/
) , , ( ) , , ( ) , , ( : t y x t y x
eq
t y x i
i i i i i i
f f f g − + =
} , 2 / ) ( , 2 / ) ( , , , 1 { } {
2 2
: i i i i i i
T
i
y x y x y x s ∆ ∆ ∆ ∆ ∆ ∆ =
α


T
y x f y f x f y f x f f V } / , / , / , / , / , { } {
2 2 2 2 2
∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ =
α α α α α α α

i
g
: α
is the post-collision state of the distribution function
α
f at the ith point and the
time level t,
T
i
s } {
: α
is a vector with six elements formed by the coordinates of mesh
points, } {
α
V is the vector of unknowns at the mesh point P and the time level
t
t δ + ,
which also has six elements,
j i
s
, : α
is the jth element of the vector
T
i
s } {
: α
and
j
V
: α
is the
jth element of the vector { }
α
V . Our target is to find its first element
) , (
1 : t
t P f V δ
α α
+ = . Equation system (5.13) can be put into the following matrix form
} { } ]{ [
α α α
g V S = (5.14)
where
T
E D C B A P
g g g g g g g } , , , , , { } {
: : : : : : α α α α α α α
=

∆ ∆ ∆ ∆ ∆ ∆
∆ ∆ ∆ ∆ ∆ ∆
∆ ∆ ∆ ∆ ∆ ∆
∆ ∆ ∆ ∆ ∆ ∆
∆ ∆ ∆ ∆ ∆ ∆
∆ ∆ ∆ ∆ ∆ ∆
=

= =
E E E E E E
D D D D D D
C C C C C C
B B B B B B
A A A A A A
P P P P P P
T
E
T
D
T
C
T
B
T
A
T
P
j i
y x y x y x
y x y x y x
y x y x y x
y x y x y x
y x y x y x
y x y x y x
s
s
s
s
s
s
s S
2 / ) ( 2 / ) ( 1
2 / ) ( 2 / ) ( 1
2 / ) ( 2 / ) ( 1
2 / ) ( 2 / ) ( 1
2 / ) ( 2 / ) ( 1
2 / ) ( 2 / ) ( 1
} {
} {
} {
} {
} {
} {
] [ ] [
2 2
2 2
2 2
2 2
2 2
2 2
:
:
:
:
:
:
, :
α
α
α
α
α
α
α α


P t x C C
x e x x − + = ∆ δ
α
,
P t y C C
y e y y − + = ∆ δ
α


156

P t x D D
x e x x − + = ∆ δ
α
,
P t y D D
y e y y − + = ∆ δ
α


P t x E E
x e x x − + = ∆ δ
α
,
P t y E E
y e y y − + = ∆ δ
α

The expressions of
B B A A P P
y x y x y x ∆ ∆ ∆ ∆ ∆ ∆ , , , , , have been given previously. Since
[S
α
] is a 6×6 dimensional matrix, it is very difficult to obtain an analytical expression
for the solution of equation system (5.14). We need to use a numerical algorithm to
obtain the solution. Note that the matrix [S
α
] only depends on the coordinates of mesh
points, which can be computed once and stored for the application of equation (5.14) at
all time levels.

Improvement by least square method
In practical applications, it was found that the matrix [S
α
] might be singular or
ill-conditioned. To overcome this difficulty and ensure that the method is more
general, we introduce the least squares approach to optimize the approximation by
equation (5.13). Equation (5.13) has 6 unknowns (elements of the vector {V
α
}). If
equation (5.13) is applied at more than 6 mesh points, then the system is over-
determined. For this case, the unknown vector can be decided from the least squares
method. For simplicity, let the mesh point P be represented by the index 0 = i , and its
adjacent points be represented by index N i ,..., 2 , 1 = , where N is the number of
neighbouring points around P and it should be larger than 5. At each point, we can
define an error in terms of equation (5.13), that is,

=
− =
6
1
: , : : :
j
j j i i i
V s g err
α α α α
N i ,..., 2 , 1 , 0 = (5.15)
The square sum of all the errors is defined as

157
∑ ∑ ∑
= = =
|
|
.
|

\
|
− = =
N
i j
j j i i
N
i
i
V s g err E
0
2
6
1
: , : :
0
2
: α α α α α
(5.16)
To minimize the error E
α
, we need to set 6 ,..., 2 , 1 , 0 /
:
= = ∂ ∂ j V E
j α α
, which leads to
} { ] [ } ]{ [ ] [
α α α α α
g S V S S
T T
= (5.17)
where [S
α
] is a 6 ) 1 ( × + N dimensional matrix, which is given as

6 ) 1 (
2 2
1 1
2
1
2
1 1 1
0 0
2
0
2
0 0 0
2 / ) ( 2 / ) ( 1
2 / ) ( 2 / ) ( 1
2 / ) ( 2 / ) ( 1
] [
× +

∆ ∆ ∆ ∆ ∆ ∆
− − − − − −
− − − − − −
− − − − − −
∆ ∆ ∆ ∆ ∆ ∆
∆ ∆ ∆ ∆ ∆ ∆
=
N
N N N N N N
y x y x y x
y x y x y x
y x y x y x
S
α

and
T
N
g g g g } ,..., , { } {
: 1 : 0 : α α α α
=
The x ∆ and y ∆ values in the matrix [S
α
] are given as

t x
e x δ
α
= ∆
0

t y
e y δ
α
= ∆
0
(5.18a)

0
x e x x
t x i i
− + = ∆ δ
α

0
y e y y
t y i i
− + = ∆ δ
α
N i ,..., 2 , 1 = (5.18b)
Clearly, when the coordinates of mesh points are given, and the particle velocity and
time step size are specified, the matrix [S
α
] is determined. Then from equation (5.17),
we obtain
( ) } ]{ [ } { ] [ ] [ ] [ } {
1
α α α α α α α
g A g S S S V
T T
= =

(5.19)
Note that [A
α
] is a 6×(N+1) dimensional matrix. From equation (5.19), we can have
1 :
1
1
, 1 : 1 : 0 0
) , , (

+
=

= = +
j
N
j
j t
g a V t y x f
α α α α
δ (5.20)

158
where
j
a
, 1 : α
are the elements of the first row of the matrix [A
α
], which are pre-
computed before the LBM is applied. Therefore, little computational effort is
introduced as compared with the standard LBE. Note that the function g is evaluated at
the time level t. So, equation (5.20) is actually an explicit form to update the
distribution function at the time level
t
t δ + for any mesh point. In the above process,
there is no requirement for the selection of neighboring points. In other words,
equation (5.20) is independent from the mesh structure. It only needs to know the
coordinates of the mesh points. Thus, we can say that equation (5.20) is basically a
meshless form.

5.4 Accuracy Analysis of TLLBM

For simplicity, we take the one-dimensional model to illustrate our analysis. Under this
consideration, the standard LBE becomes
( ) ( )
( ) ( )
τ
δ δ
α α
α α α
t x f t x f
t x f t e x f
eq
t t
, ,
, ,

+ = + + (5.21)
Using Taylor series expansion, we have
( ) ( )
... 3 3
6
2
) (
2
, ,
3
3
3
2
3
2
2
3
3
3 3 2
2
2
2 2
2
2 2
+
|
|
.
|

\
|


+
∂ ∂

+
∂ ∂

+


+
∂ ∂

+


+


+


+


+ = + +
x
f
e
x t
f
e
x t
f
e
t
f
x t
f
e
x
f e
t
f
x
f
e
t
f
t x f t e x f
t
t
t t
t t t t
α
α
α
α
α
α
α α
α
α α α α
α
α
α α α
δ
δ
δ δ
δ δ δ δ

(5.22)
With equation (5.22), the standard LBE is equivalent to
) ( O
f f
x
f
e
x t
f
e
t
f
x
f
e
t
f
t
eq
t
t t
3
2
2
2
2
2
2 2
2
2
δ
τ
δ
δ δ
α α α
α
α
α
α α
α
α
+

=
|
|
.
|

\
|


+
∂ ∂

+


+


+




159
(5.23)
Equation (5.23) will be used to analyze the TLLBM. We start with the Taylor series
expansion that truncates to the second order derivative terms. With Taylor series
expansion, equation (5.21) can be written as
( ) ( )
( )
( )
( ) ( )
τ
δ δ
δ δ δ δ
α α
α
α α α
α α
t x f t x f
t x f
x
f x e
x
f
x e t x x f
eq
t
t t
, ,
,
2
,
2
2 2

+ =

∂ −
+


− + + +
(5.24)
As shown previously, the truncation error of equation (5.24) is third order.
Equation (5.24) consists of three unknowns, which should be determined by three
equations. Suppose that a local mesh point
i
x is considered. The three equations can
be obtained by applying the Taylor series expansion at the three positions streamed
respectively from mesh points
1 1
, ,
+ − i i i
x x x . Solving the three equations, we can get the
solution as
( ) ) ( ) ( ) ( ,
1 : 1 : 1 : 1 : : :
t g a t g a t g a t x f
i i i i i i t i + + − −
+ + = +
α α α α α α α
δ (5.25)
where ( )
( ) ( )
τ
α α
α α
t x f t x f
t x f t g
i i
eq
i i
, ,
, ) (
:

+ =

1
1
:
) 1 )( 1 (
+
+
+ −
− =
i i
i i
i
r r
r r
a
α
,
) (
) 1 (
1
1
1 :
i i i
i
i
r r r
r
a
+
+
=
+
+
− α
,
) (
) 1 (
1 1
1
1 :
i i i
i
i
r r r
r
a
+

=
+ +
+
+ α

) /( ) (
1 t i i i
e x x r δ
α −
− = , ) /( ) (
1 1 t i i i
e x x r δ
α
− =
+ +

Using the second order Taylor series expansion, equation (5.25) can be reduced to
] [
2
) (
) (
2
) , (
3
2
2 2
2
2 2
t
i t i
t i
t
t i
O
x
g e
x
g
e t g
t
f
t
f
t x f δ
δ
δ
δ
δ
α
α
α α
α
+


+


− =


+


+ (5.26)
On the other hand, from equation (5.21) and Taylor series expansion, we have

160
) ( ) , (
) , (
) , ( ) , (
) , ( ) (
2
t t t i
t t i
i i
eq
i i
O
x
f
e
t
f
t x f
t e x f
t x f t x f
t x f t g
δ δ δ
δ δ
τ
α
α
α
α
α α
α α
α
+


+


+ =
+ + =

+ =
(5.27)
Differentiating equation (5.27) with respect to x gives
) ( ) (
3
2
2
2
2
2
t t t t
i
t
O
x
f
e
x t
f
e
x
f
e
x
g
e δ δ δ δ δ
α
α
α
α
α
α α
+


+
∂ ∂

+


=


(5.28a)
) ( ) ( ) (
3
2
2
2
2
2
2
t t
i
t
O
x
f
e
x
g
e δ δ δ
α
α α
+


=


(5.28b)
Finally, by substituting equation (5.28) into equation (5.26), we obtain the same
differential equation as equation (5.23) and the truncation error has the following form
( )
( ) | |
1 1
3
1
6
+ +
− + −
i i i
t
r r r
e δ
α
(5.29)
As shown by Qian et al. (1992) and Wolf-Gladrow (2000), when Chapman-
Enskog expansion is applied to equation (5.23) with two time scales, the Navier-Stokes
equations can be recovered with second order of accuracy. This indicates that our
Taylor series expansion form can recover the Navier-Stokes equations with second
order of accuracy even when a non-uniform mesh (
1 +

i i
r r ) is used.

Next, we will consider the Taylor series expansion- and least squares- based
form. For the one-dimensional problem, the second order Taylor series expansion has
three unknowns, that is, the distribution function and its first and second order
derivatives at the mesh point
i
x and the time level
t
t δ + . As shown above, to solve for
these three unknowns, we need to have three equations, which are obtained by
applying the Taylor series expansion at three positions streamed from three mesh

161
points
1 1
, ,
+ − i i i
x x x . To apply the least squares approach, the Taylor series expansion is
applied at four positions, which are streamed respectively from four mesh
points
2 1 1
, , ,
− + − i i i i
x x x x . So, we can obtain four equations for three unknowns. As
shown in the previous section, by using the lease squares approach, the final equation
system can be obtained as
( )
( )
( )
|
|
|
|
|
|
|
.
|

\
|
=
|
|
|
|
|
|
.
|

\
|

+ ∂

+ ∂
+
|
|
|
|
|
|
.
|

\
|



=
− +
=
− +
=
− +
4
1
3 :
2
4
1
3 :
4
1
3 :
2
2
2
,
) (
,
,
4
1
2
1
2
1
2
1
2
1
4
k
k i k
k
k i k
k
k i
t i
t
t i
t
t i
g
g
g
x
t x f
e
x
t x f
e
t x f
d c b
c b a
b a
α
α
α
α
α
α
α
α
δ
δ
δ
δ
δ
δ
δ
(5.30)
where

=
=
4
1 k
k
a δ ,

=
=
4
1
2
k
k
b δ ,

=
=
4
1
3
k
k
c δ ,

=
=
4
1
4
k
k
d δ

1
2
1
1
) (


− − =
− −
=
i i
t
i i t
r r
e
x x e
δ
δ
δ
α
α
,
i
t
i i t
r
e
x x e
− =
− −
=

1
) (
1
2
δ
δ
δ
α
α

1
3
= =
t
t
e
e
δ
δ
δ
α
α
,
1
1
4
1
) (
+
+
+ =
− −
=
i
i i
r
t e
x x t e
δ
δ
δ
α
α

The function g
α
is defined as before. The solution of equation (5.30) gives
| |

=
− +
− − − − −

= +
4
1
3 :
2 2
) )( ( ) )( (
1
) , (
k
k i k k t i
g a c ac b a b ad bc t x f
α α
δ δ δ (5.31)
where ) 4 )( ( ) 4 )( (
2 2
ab c ac b a b ad bc − − − − − = ∆ . Using Taylor series expansion,
3 − +k i
g can be expressed as
3
:
3
3
3
2
:
2
2
2
:
:
3
:
3 3
3
2
:
2 2
3 :
3 : 3 :
) (
6
) 1 (
) (
2
) 1 (
) 1 (
6
) (
2
) (
) (
x
g
e
x
g
e
x
g
e g
x
g x x
x
g x x
x
g
x x g g
i
t
k i
t
k i
t k i
i i k i i i k i i
i k i i k i

∂ −
+

∂ −
+


− + =

∂ −
+

∂ −
+


− + =
− + − +
− + − +
α
α
α
α
α
α α
α α α
α α
δ
δ
δ
δ
δ δ

(5.32)

162
By substituting equation (5.32) into equation (5.31), we obtain
3
:
3 3
4
2
:
2 2
3
:
2 : 1
2
) (
2
) (
) , (
x
g e
s
x
g e
s
x
g
e s g s t x f
i t i t i
t i t i


+


+


+ = +
α α α α α
α α α
δ δ
δ δ (5.33)
where | |

=
− − − − −

=
4
1
2 2
1
) )( ( ) )( (
1
k
k k
a c ac b a b ad bc s δ δ
| |

=
− − − − − −

=
4
1
2 2
2
) 1 ( ) )( ( ) )( (
1
k
k k k
a c ac b a b ad bc s δ δ δ
| |

=
− − − − − −

=
4
1
2 2 2
3
) 1 ( ) )( ( ) )( (
1
k
k k k
a c ac b a b ad bc s δ δ δ
| |

=
− − − − − −

=
4
1
3 2 2
4
) 1 ( ) )( ( ) )( (
1
k
k k k
a c ac b a b ad bc s δ δ δ
Furthermore, from the definition of d c b a , , , , we have
| | 1 ) 4 )( ( ) 4 )( (
1
) ( ) ( ) ( ) (
1
2 2
4
1
2 2
4
1
1
= − − − − −

=

− − − − −

=
∑ ∑
= =
ab c ac b a b ad bc
a c ac b a b ad bc s
k
k
k
k

δ δ
(5.34a)
| | 1 )) ( 4 )( ( ) ) ( 4 )( (
1
) ( ( ) ( ) ) ( ( ) (
1
2
4
1
2 3 2
4
1
2
2
− = − − − − − − + + − −

=

− − − − − − + + − −

=
∑ ∑
= =
b c a c ac ac b ab a a b b ad bc
a c c ac b a a b b ad bc s
k
k k k
k
k k

δ δ δ δ δ

(5.34b)
| | 1 )} 2 ( ) 4 2 ( ){ ( )} 2 ( ) 4 2 ( ){ (
1
)} 2 ( ) 1 2 ( { ) (
)} 2 ( ) 1 2 ( { ) (
1
2
4
1
2 3 4 2 2
4
1
2 3 2
3
= + − − + − − − + − − + − −

=

+ − − + − −

− + − − + − −

=


=
=
b c d a a b c ac b a b c a a b b ad bc
a c ac b
a b ad bc s
k
k k k k k
k
k k k k k
δ δ δ δ δ
δ δ δ δ δ

(5.34c)

163

− − − −

+ − =

+ − − + − −

− + − − + − −

=



=
=
=
) )( ( ) (
1
1
)} 2 ( ) 1 2 ( { ) (
)} 2 ( ) 1 2 ( { ) (
1
4
1
5 2 2 2
4
1
3 4 5 2 2
4
1
2 3 4 2
4
k
k
k
k k k k k
k
k k k k k
a c ac b ad bc
a c ac b
a b ad bc s
δ
δ δ δ δ δ
δ δ δ δ δ
(5.34d)
The above results show that equation (5.33) can be reduced to exactly the same
form as equation (5.26). Equation (5.26) can recover the Navier-Stokes equations with
second order of accuracy. This means that our least square-based form can also recover
the Navier-Stokes equations with the second order of accuracy, no matter whether the
mesh is uniform or non-uniform.

5.5 Practical Implementation of TLLBM for Flow around a Circular
Cylinder

To show the efficiency of the TLLBM for the problem with complex geometry, we
consider a flow around an impulsively started circular cylinder at a low Reynolds
number. This problem is sketched as in Fig. 5.4. In this part, the Reynolds number
( υ / Re D U

= ), based on the upstream velocity

U and the diameter of the cylinder
D, is selected to be 20 and 40. The far field boundary is set at 50.5 diameters away
from the center of the cylinder and a 241×181 O-type grid is used (a typical mesh is
shown in Fig. 5.5). With this grid distribution, the time step, in units of 2 /( ) D U

, is
equal to 0.00375, and the maximum grid stretch ratio
max
r (defined as the ratio of the
maximum mesh spacing over the minimum mesh spacing) is 160.7. Three boundary
conditions are required in the simulation: One is at the cylinder surface, where a
complete half-way wall bounce back rule is used besides the non-slip boundary

164
condition; one is at central line (cut line) in the wake, where the periodic boundary
condition is imposed; the other is at far field r

, where the infinite flow field is
approximated and the density distribution function is always set at its equilibrium
state. Initially, the flow field is assumed to be irrotational and potential. The free
stream velocity U is set to be 0.15. For convenience, all variables used in this section
are dimensionless and they are defined as
min 0
/ , / , ) / , / ( ) , ( , / r c t t R y R x y x c ∆ = = = = ρ ρ ρ u u (5.35)
In the application, M is taken as 8 for convenience. As shown in Fig. 5.6, for an
internal mesh point ) , ( j i , 8 neighboring points are taken as ) 1 , 1 ( − − j i ; ) , 1 ( j i − ;
) 1 , 1 ( + − j i ; ) 1 , ( − j i ; ) 1 , ( + j i , ) 1 , 1 ( − + j i ; ) , 1 ( j i + ; ) 1 , 1 ( + + j i . Therefore, at each
mesh point, we only need to store 9 coefficients 9 ,..., 2 , 1 ,
, 1
= k a
k
before Eq. (5.20) is
applied. Note that the configuration of 9 mesh points as shown in Fig. 5.6 is applied in
all lattice directions ( 8 ,..., 2 , 1 = α ).

Periodic BC
y
x
θ
R
U



Figure 5.4 A sketch of the flow past an impulsively started circular cylinder

165

Figure 5.5 Computational mesh for flow around a circular cylinder

1 1 , i j + + 1 , i j + 1 1 , i j − +
1, i j −
1 1 , i j − − 1 , i j − 1 1 , i j + −
1, i j +
, i j


Figure 5.6 Schematic plot of neighboring point distributions around the point ( , i j )

The procedure is described as follows:
Discretize the flow domain
The Flow domain is discretized by an O-type ireegular lattice with points of
Imax×Jmax, then the Cartesian coordinates in the domain are
) 2 sin(
) 2 cos(
,
,
πξ
πξ
r y
r x
j i
j i
− =
=

with

166
| |
)
`
¹
¹
´
¦
− − − + =


) tan( ) 1 ( tan
1
1 ) (
1
0 0
χ η
χ
r r r r
) 2 /(Jmax ) 2 (
) 1 /(Imax ) 1 (
− − =
− − =
j
i
η
ξ

where r
0
=1 is the cylinder radius, r

is outer boundary, χ is the parameter
controlling the coordinate stretching; j representing the radial grid node
number. A uniform grid in the peripheral direction is adopted. then
0 ) 1 /(Jmax 1 min
r r r
t
− = =
− = η
δ δ ───── Time step
It is indicated here that we introduced a grid layer inside the boundary of the
circular cylinder for the ease of the boundry treatment and calculation.
Set basic computational parameters
Kp=8 ───── Particle velocity number of D2Q9 model with particle
velocity:
( ) | | ( ) | | ( )
( ) | | ( ) | | ( )
¦
¹
¦
´
¦
= + − + −
= − −
=
=
8 , 7 , 6 , 5 4 / 2 / 5 sin , 4 / 2 / 5 cos 2
4 , 3 , 2 , 1 2 / 1 sin , 2 / 1 cos
0 0
α π π α π π α
α π α π α
α
α
e
Re=20 ───── Reynolds number (flow parameter)
U=0.15 ───── Flow velocity
Then
) 1
Re 6
(
2
1
+ =
t
UDδ
τ ───── Relxation parameter(D = 2)
3 / 1
2
=
s
c
Computing Matrix Coefficients of [A
α
] In FORTRAN program
subroutine comatrix
dimension amt(6,9),am(9,6),dmt(6,6),af(9),bf(9),ima(9),jma(9)
dimension cmm(9,241,181,8)
dimension x(241,181),y(241,181)
dimension uc(8),vc(8)

167
c ********* Variable illustrations*****************************
c am(6,9)---------------------------------Matrix | |
α
S
c amt(6,9)--------------------------------Transpose of Matrix | |
α
S , that is | |
T
S
α

c dmt(6,6)-------------------------------- Multiplication and inverse of Matrix
c | |
α
S and | |
T
S
α
, that are| | | |
α α
S S
T
and
c | | | | ( )
1 −
α α
S S
T
, respectvely
c cmm(9,241,181,8)--------------------Elements of the first row of Matrix | |
α
A
c ima(9), jma(9)-------------------------Index of the collection points used for
c calculation of ) , , (
0 0 t
t y x f δ
α
+
c af(9),bf(9)------------------------------Variables of
0
x ∆ and
0
y ∆ , respectively
c x(241,181),y(241,181)---------------Cartesian coordinates of
j i j i
y x
, ,
,
c uc(8),vc(8)-----------------------------partcle discrete velocity components
c
y x
e e
α α
, for 8 , , 1 L = α
c************************************************************

do 6 k=1,Kp
do 6 i=1,Imax
do 6 j=2,Jmax-1
i1=i-1
i2=i+1
j1=j-1
j2=j+1
c--------periodic boundary condition
if(i.eq.1) i1=Imax-1
if(i.eq.im) i2=2
c-------------------------------------------
ima(1)=i
ima(2)=i1
ima(3)=i2
do 2 mi=1,3
ima(3+mi)=ima(mi)
ima(6+mi)=ima(mi)
2 continue
do 3 m=1,9
if(m.le.3) then
jma(m)=j
else if(m.gt.3.and.m.le.6) then
jma(m)=j1
else
jma(m)=j2
end if
3 continue
c
do 5 m=1,9
ik=ima(m)
jk=jma(m)

168
sx=x(ik,jk)-x(i,j)
sy=y(ik,jk)-y(i,j)
cx=uc(k)*dt
cy=vc(k)*dt
af(m)=sx+cx
bf(m)=sy+cy
am(m,1)=1.
am(m,2)=af(m)
am(m,3)=bf(m)
am(m,4)=0.5*af(m)**2
am(m,5)=0.5*bf(m)**2
am(m,6)=af(m)*bf(m)
c---------Transpose of Matrix | |
α
S , that is | |
T
S
α

do 4 n=1,6
amt(n,m)=am(m,n)
4 continue
c---------------------------------------------------------
5 continue
c --------Multiplication of Matrix | |
α
S and | |
T
S
α
, that is| | | |
α α
S S
T

call abmt(amt,am,dmt)
c------Computing the inverse of the Matrix dmt(6,6), that is | | | | ( )
1 −
α α
S S
T

call invam(dmt)
c -----Computing the elements of Matrix | |
α
A
call mtve(i,j,k,dmt,amt)
6 continue
return
end

subroutine abmt(amt,am,dmt)
c-----------------------------------------------------------------------------------------
c This subroutine is programed to carry out the multiplication of
c Matrix | |
α
S and | |
T
S
α

c------------------------------------------------------------------------------------------
dimension amt(6,9),am(9,6),dmt(6,6)
do 2 i=1,6
do 2 j=1,6
dmt(i,j)=0.0
do 1 l=1,9
dmt(i,j)=dmt(i,j)+amt(i,l)*am(l,j)
1 continue
2 continue
return
end

subroutine mtve(i,j,k,dmt,amt)
c-----------------------------------------------------------------------------------------
c This subroutine is programed to compute the elements of Matrix the

169
c | |
α
A and | | | | | | ( ) | |
T T
S S S A
α α α α
1 −
=
c------------------------------------------------------------------------------------------
dimension dmt(6,6),amt(6,9)
dimension cmm(9,241,181,8)
do 2 m=1,9
cmm(m,i,j,k)=0.0
do 2 l=1,6
cmm(m,i,j,k)=cmm(m,i,j,k)+dmt(1,l)*amt(l,m)
2 continue
return
end

subroutine invam(dmt)
c-----------------------------------------------------------------------------------------
c This subroutine is programed to compute the inversion of Matrix, that is
c | | | | ( )
1 −
α α
S S
T

c------------------------------------------------------------------------------------------
dimension dmt(6,6),me(6),mf(6),c(6),b(6)
c********Variable illustration*********************
c me(6),mf(6)---------------------------One dimensional integer dimensions only used
c in this subroutine
c c(6),b(6)-------------------------------One dimensional real dimensions only used
c in this subroutine
c***********************************************
ep=1.0e-16
do 10 k=1,6
dy=0.0
do 20 i=k,6
do 20 j=k,6
if (abs(dmt(i,j)).le.abs(dy)) go to 20
dy=dmt(i,j)
i2=i
j2=j
20 continue
if (abs(dy).lt.ep) go to 32
if (i2.eq.k) go to 33
do 11 j=1,6
w=dmt(i2,j)
dmt(i2,j)=dmt(k,j)
dmt(k,j)=w
11 continue
33 if(j2.eq.k) go to 44
do 22 i=1,6
w=dmt(i,j2)
dmt(i,j2)=dmt(i,k)
dmt(i,k)=w
22 continue
44 me(k)=i2
mf(k)=j2

170
do 50 j=1,6
if (j-k) 2,3,2
3 b(j)=1./dy
c(j)=1.
go to 4
2 b(j)=-dmt(k,j)/dy
c(j)=dmt(j,k)
4 dmt(k,j)=0.
dmt(j,k)=0.
50 continue
do 40 i=1,6
do 40 j=1,6
dmt(i,j)=dmt(i,j)+c(i)*b(j)
40 continue
10 continue
do 60 l=1,6
k=6-l+1
k1=me(k)
k2=mf(k)
if (k1.eq.k) go to 70
do 55 i=1,6
w=dmt(i,k1)
dmt(i,k1)=dmt(i,k)
dmt(i,k)=w
55 continue
70 if(k2.eq.k) go to 60
do 66 j=1,6
w=dmt(k2,j)
dmt(k2,j)=dmt(k,j)
dmt(k,j)=w
66 continue
60 continue
return
32 ep=-ep
return
end

Set Initial Field
t = 0
(i = 1, Imax; j = 2, Imax)
Initial density ρ
1
,
=
j i
ρ
Initail velocity field

171
0
2 ,
=
= j i
(u,v) u ;
0 ) ,
2 ( , ) 2 ( ,
= =
> > j j i j j i
v U u
Then assuming
) 0 , , ( ) 0 , , ( = = = t j i f t j i f
eq
α α
( 8 0L = α ;i = 1, Imax; j = 2, Imax)
) 0 , 3 , ( ) 0 , 1 , (
) 0 , 3 , ( ) 0 , 1 , (
) 0 , 3 , ( ) 0 , 1 , (
) 0 , 3 , ( ) 0 , 1 , (
) 0 , 3 , ( ) 0 , 1 , (
) 0 , 3 , ( ) 0 , 1 , (
) 0 , 3 , ( ) 0 , 1 , (
) 0 , 3 , ( ) 0 , 1 , (
7 8
5 7
8 6
7 5
2 4
1 3
4 2
3 1
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
t i f t i f
t i f t i f
t i f t i f
t i f t i f
t i f t i f
t i f t i f
t i f t i f
t i f t i f
( 8 0L = α ;i = 1, Imax)
( )



+

+ = =
2
2
4
2
2
2 2
1 ) 0 , , (
s
i,j
s
i,j
s
i,j
eq
c c c
w t j i f
u u e u e
α α
α α
ρ
(value of
α
w refers to Table 4.1)
Computational sequence
Flow Chart of Computation Flow Chart of Computation
Input
Calculating Geometric Parameter
and physical parameters
( N=0 )
Calculating
eq
f
α
τ ,
, 1 k
a
N=N+1
1
1
1
, 1 0 0
) , , (

+
=
∑ = +
k
M
k
k
g a t t y x f δ
α
∑ =
=
M
f
0 α
α
ρ
α
α
α
ρ e U ∑ =
=
M
f
0
Convergence ?
No
OUTPUT
YES
α
ρ e U Re, , ,

Figure 5.7 Flow Chart

172

Output information in the flow fied
The following flow information is usually required:
Time evolution of the wake length L , separation angle
s
θ and the drag
coefficient
d
C around the circular cylinder ( ) /( 2
2
D U C
d
ρ X F⋅ = and
F [ ( U U )] n pI dl ρυ = − + ∇ + ∇ ⋅

; n is the normal vector of the cylinder
surface)
Normalized stream function in the flow field:
) 2 sin( ) 2 cos(
) , (
0
,
πξ ξ π ψ v u u dr
U
j i u
r
r
r
r
j i
− = =



(i = 1,Imax; j = 2,Jmax)
Normalized vorticity function in the flow field:
j i
j i
j i
x
v
y
u
,
,
,
|
.
|

\
|



|
|
.
|

\
|


= ω (i = 1,Imax; j = 2,Jmax)
Some typical results of TLLBM are shown in Figs. 5.8-5.9.

0
1
2
3
4
5
0 4 8 12 16 20 24 t
L
Re=20
Re=40

Figure 5.8 Time evolution of the wake length for different Reynolds numbers (♦
Experimental data by Coutanceu & Bouard (1977 a,b); —TLLBM results)

173

(a) Re=20

(b) Re=40

Figure 5.9 Streamlines at the final steady state for different Reynolds numbers

References

Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid
Mech. 30, 329 (1998).
Y. T. Chew, C. Shu, X. D. Niu, A New Differential Lattice Boltzmann Equation and
Its Application to Simulate Incompressible Flows on Non-Uniform Grids,
Journal of Statistical Physics, Vol. 107, 329-342, 2002.
Coutanceau M and Bouard R, “Experimental determination of the main features of the
viscous flow in the wake of a circular cylinder in uniform translation. Part 1:
Steady flow”, J. Fluid Mech., 79, p231, 1977a.

174
Coutanceau M and Bouard R, “Experimental determination of the main features of the
viscous flow in the wake of a circular cylinder in uniform translation. Part 2:
Unsteady flow”, J. Fluid Mech., 79, p257, 1977b.
He X., Luo L-S and Dembo M., J. Comp. Phys., 129, p357, 1996.
Niu X. D., Chew Y. T. and Shu C., “Simulation of Flows around An Impulsively
Started Circular Cylinder by Taylor Series Expansion and Least Squares-based
Lattice Boltzmann Method”, J. Comp. Phys., 188(1), p176, 2003.
Qian YH, d’Humières D and Lallemand P, “Lattice BGK models Navier-Stokes
equation”, Europhys. Lett., 17, p479, 1992.
Shu C., Chew Y. T. and Niu X. D., “Least square-based LBM: A meshless Approach
for simulation of flows with complex geometry”, Phys. Rev. E., 64, P045701-1,
2001.
Shu C., Niu X.D. and Chew Y. T., “Taylor series expansion- and least square-based
lattice Boltzmann method: two-dimensional formulation and its applications”,
Phys. Rev. E., 65, P036708-1, 2002.
Succi S, “The Lattice Boltzmann Equation for Fluid Dynamics and Beyond”,
Clarendon Press, Oxford, UK, 2001.
Wolf-Gladrow, D. A., Lattice-Gas Cellular Automata and Lattice Boltzmann Models:
An Introduction, Lecture Notes in Mathematics 1725, Springer-Verlag, Germany
(2000).

175
6. Application of TLLBM to
Simulate Thermal Flows

6.1 Introduction

The LBE discussed so far does not address the issue of a self-consistent coupling
between temperature dynamics and heat transfer within the fluid flow. Fully thermo-
hydrodynamic LBE schemes represent a standing challenge to LBE research. Despite
several brilliant attempts, to date, a consistent thermodynamic LBE scheme working
over a wide range of temperatures is still lack. The difficulty is that heat and
temperature dynamics require more kinetic momentum and consequently they probe
the discrete space-time ‘fabric’ of the lattice more keenly than isothermal flows. So
this is one of the most challenging issues left with LBE research.

The current thermal models fall into the following categories. The first is the
multi-speed approach. This approach is a straightforward extension of the LBE
isothermal models in which only the density distribution function is used. To obtain
the temperature evolution equation at the macroscopic level, additional particle speeds
are necessary and the equilibrium distribution functions must include the higher-order
velocity terms. Although this approach has been shown to be theoretically possible,
previous models suffer severe numerical instability and the temperature variation is
limited to a narrow range. Some recent works may provide new directions for this type
of approach. The second is the passive-scalar approach. It utilizes the fact that the
macroscopic temperature satisfies the same evolution equation as a passive scalar if the
viscous heat dissipation and compression work done by the pressure are negligible. In

176
a passive-scalar-based LBE thermal model, the temperature is simulated by a new
density distribution function. The main advantage of this scheme over the multi-speed
counterpart is the enhancement of the numerical stability. The third is Luo’s scheme
(Luo 1998). He suggested that the difficulty of solving thermal problems could be
overcome by going back to the Boltzmann equation for dense gases, the time-honored
Enskog equation. Its practical value remains to be demonstrated because so far no
simulation result has been available. Attempts are also taken from a different way by
using higher isotropy of lattice. Pavol et al. (1998) proposed the non-space filling
lattices, typically octagons, which offer a higher degree of isotropy, to solve the
thermal problems. They have proposed the octagonal lattices in 2D and 3D. Some
preliminary simulations for 2D jet flow between plane boundaries held at constant
temperatures were reported. Another proposal to construct an energy-conserving LBE
model is to use a hybrid scheme in which the LBE flow simulation is decoupled from
the solution of the temperature equation. The temperature is simulated by the
conventional energy equation. The last category is the novel thermal model called the
internal energy density distribution function (IEDDF) model proposed by He et al.
(1998). This new scheme is based on the recent discovery that the LBE isothermal
models can be directly derived by properly discretizing the continuous Boltzmann
equation in temporal, spatial and the particle velocity spaces. Following the same
procedure, an LBE thermal model can be derived by discretizing the continuous
evolution equation for the internal energy density distribution. This IEDDF thermal
model has proven itself to be a stable and simple thermal model, so it is widely used
currently.


177
6.2 Internal Energy Density Distribution Function (IEDDF) Thermal
Model

The IEDDF thermal model introduces an internal energy density distribution function
to simulate the temperature field. The macroscopic density and velocity fields are still
simulated using the density distribution function.
The density distribution and internal energy density distribution functions satisfy
the following equations respectively:
( ) F
f f
f f
v
eq
t
+

− = ∇ • + ∂
τ
e (6.1)
( ) ( ) ( ) | | u u u u e e ∇ • + ∂ • − −

− = ∇ • + ∂
t
c
eq
t
f
g g
g g
τ
(6.2)
where
( )
eq
f
RT
F
u e G − •
=

and G is the external force acting on the unit mass.
By adopting second-order integration for the above two equations, we can get

( ) ( ) ( ) ( ) | |
t v
t v eq
t v
t
t t
F
t f t f t f t f
δ τ
δ τ
δ τ
δ
δ δ
α
α α α α α
5 . 0
, ,
5 . 0
, ,
+
+ −
+
− = − + + x x x e x (6.3)
( ) ( ) ( ) ( ) | |
( )
t c
t c
eq
t c
t
t t
q t f
t g t g t g t g
δ τ
δ τ
δ τ
δ
δ δ
α α
α α α α α
5 . 0
,
, ,
5 . 0
, ,
+
− −
+
− = − + +
x
x x x e x


(6.4)
where
( )
α α α α α
δ
τ
δ
F f f f f
t eq
v
t
2 2
− − + =
( )
α α α α α α
δ
τ
δ
q f g g g g
t eq
c
t
2 2
+ − + =
t
t
eq
t
F f f
f
δ τ
τ δ δ τ
ν
α ν α α ν
α
5 . 0
5 . 0 5 . 0
+
+ +
=


178
( ) ( ) ( )

∇ • − + Π • ∇ + ∇ − • − = u u e u e
α α α
ρ
p q
1

( ) ∇ + ∇ = ∏ u u υ ρ
( )
eq
f
RT
F
α
α
α
u e G − •
=
When D2Q9 DV model is used, the equilibrium distribution functions for the density
and internal energy density distributions are given as:
( )



+

+ =
2
2
4
2
2
2
3
2
9 3
1
c c c
w f
eq
u u e u e
α α
α α
ρ (6.5)
where 9 / 4
0
= w , 9 / 1 =
α
w for α =1,2,3,4, 36 / 1 =
α
w for α =5,6,7,8
2
2
0
3
2
c
g
eq
u ρε
− = (6.6a)
( )



+

+ =
2
2
4
2
2 4 , 3 , 2 , 1
5 . 1 5 . 4 5 . 1 5 . 1
9 c c c
g
eq
u u e u e
α α
ε ρ
(6.6b)
( )



+

+ =
2
2
4
2
2 8 . 7 . 6 . 5
5 . 1 5 . 4 6 3
36 c c c
g
eq
u u e u e
α α
ε ρ
(6.6c)
where RT = ε
Then the macroscopic density, velocity and temperature are calculated by

=
α
α
ρ f

(6.7a)
2
t
f
δ ρ
ρ
α
α α
G
e u + =


(6.7b)
∑ ∑
− =
α
α α
α
α
δ
ε ρ q f g
t
2
(6.7c)
The kinetic viscosity and thermal conductivity are determined from
RT
v
τ υ = RT
c
τ α 2 = (6.8)

179
Using the Chapman-Enskog expansion, the IEDDF thermal model can recover the
correct continuity, momentum and energy equations at the NS level:
( ) 0 = • ∇ + ∂ u ρ ρ
t
(6.9a)
( ) | | ∏ • ∇ + −∇ = ∇ • + ∂ p
t
u u u ρ (6.9b)
( ) ( ) ( ) u u : u • ∇ − ∇ ∏ + ∇ • ∇ = • ∇ + ∂ p
t
ε ρχ ε ρ ρε (6.9c)

6.3 Application of IEDDF thermal model on arbitrary mesh by using
TLLBM
When equations (6.3) and (6.4) are used on an arbitrary mesh, ) (
t
δ
α
e x + is
usually not at the grid point ) ( x x δ + . To solve this problem, the TLLBM technique
(Shu et al. 2001, 2002) introduced in the previous chapter can be applied to equations
(6.3) and (6.4) following the same procedure as shown in Chapter 5 for the isothermal
flows, which results in
'
1
1
, 1 1 0
) , (

=

= = +
k
M
k
k t
f a W t f δ
α
x (6.10a)
'
1
1
'
, 1
1
'
0
) , (

=

= = +
k
M
k
k t
g a W t g δ
α
x (6.10b)
where
t v
t v
k
eq
t v
t
k
t v
t
k
F
t f t f f
δ τ
δ τ
δ τ
δ
δ τ
δ
α
α α α α
5 . 0
) , , (
5 . 0
) , , (
5 . 0
1
'
+
+
+
+
|
|
.
|

\
|
+
− = e x e x
t c
t c
k
eq
t c
t
k
t c
t
k
q f
t g t g g
δ τ
δ τ
δ τ
δ
δ τ
δ
α α
α α α α
5 . 0
) , , (
5 . 0
) , , (
5 . 0
1
'
+

+
+
|
|
.
|

\
|
+
− = e x e x
T
y x g y g x g y g x g g W } / , / , / , / , / , { } {
2 2 2 2 2 '
∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ =
α α α α α α


180
When the same particle velocity models are chosen for the density and internal
energy density distributions, the geometric matrix A and
'
A

are the same, which can
save both the computational time and storage space.

6.4 Boundary conditions
The bounce-back rule of the non-equilibrium distribution proposed by Zou and
He (1997) is used. For the isothermal problems, the density distribution at the
boundary should satisfy the following condition:
iso neq iso neq
f f
, ,
β α
= , (
eq neq
f f f
α α α
− = ) (6.11a)
where
α
e and
β
e have opposite directions. For the thermal problems, the internal
energy density distribution at the boundary satisfies:
( )
iso neq neq iso neq neq
f g f g
, 2 , 2
β β β α α α
e e − − = −

(6.11b)
(
eq neq
g g g
α α α
− = )
Since the density distribution in the thermal model does not take into account the
temperature variation, its non-equilibrium part satisfies the boundary condition, Eq.
(6.11a) plays the role of
iso neq
f
,
in the boundary condition, Eq. (6.11b) for the internal
energy density distribution. The velocity of the wall is used when
eq
f for the boundary
nodes are calculated in order to enforce the no-slip boundary condition. The
temperature of the wall is also used when
eq
g for the boundary nodes are calculated in
order to satisfy the given temperature. For the Neumann type condition, the
temperature on the wall is unknown. In order to solve this problem, we transfer it to
the Dirichlet type condition by using the conventional second-order finite difference
approximation to get the temperature on the boundary. As an example, we consider the
case of the bottom wall.

181






Figure 6.1 Schematic plot of velocity directions

The schematic plot of velocity directions of the nine-bit model is shown in Figure 6.1.
The density distribution and internal energy density distribution at directions 1, 3, 7, 4,
and 8 are determined by the calculation using equations (6.10a) and (6.10b). And the
rest distributions at directions 5, 2, and 6 are determined by the bounce back rule for
the non-equilibrium distributions through equations (6.11a) and (6.11b). However, for
Neumann type boundary condition, when using equation (6.11b), the temperature on
the bottom wall is unknown. We transfer it to the Dirichlet type boundary condition.
When the heat flux (temperature gradient) is given, the temperature on the boundary
can be approximated by:
3
2 4
1 ,
3 , 2 ,
1 ,
i
i i
i
y
T
T T
T


∆ − −
= (6.12)
where
1 , i
T

is the approximate temperature on the wall;
2 , i
T and
3 , i
T

are the temperatures
inside the flow domain near the wall;
1 , i
y
T



is the given heat flux on the wall. The
iteration is needed in order to get accurate values of the temperature on the boundary
when Neumann type boundary condition is implemented.
fluid
1
5
8 4 7
3
6 2

182
At corner points, special treatment is needed. Take the left-bottom corner point
as an example, which is shown in Figure 6.2.







Figure 6.2 Schematic plot of velocity directions at the left-bottom corner

The density distribution and internal energy density distribution at directions 3, 4, and
7 are determined by the calculation using equations (6.10a) and (6.10b). The
distributions at directions 1, 2, and 5 are determined by the bounce back rule for the
non-equilibrium distributions through equations (6.11a) and (6.11b). For the direction
6 and direction 8, the values for these two directions have little influence on the results
of the numerical simulation using the standard LBM, because they do not contribute
any information into the interior parts. But for the TLLBM scheme, these values will
be used when calculating the interior points at these two directions. So the values at
these two directions should be correctly given. The second order extrapolation scheme
is used in our work to determine these values.
3
4
3 , 3
6
2 , 2
6 1 , 1
6
f f
f

= (6.13a)
3
4
3 , 3
6
2 , 2
6 1 , 1
6
g g
g

= (6.13b)
fluid
1
5
8 4 7
3
6 2

183
3
4
3 , 3
8
2 , 2
8 1 , 1
8
f f
f

= (6.13c)
3
4
3 , 3
8
2 , 2
8 1 , 1
8
g g
g

= (6.13d)
where
j i
f
,
α
or
j i
g
,
α
mean the density distribution or internal energy density distribution
for the particle velocity direction α

at the position ) , ( j i x .

6.5 Practical implementation of IEDDF thermal model for natural
convection in a square cavity using the technique of TLLBM

The problem definition and boundary conditions are displayed in Figure 6.3. The two
sidewalls are maintained at different temperatures. The temperature difference between
the walls introduces a temperature gradient in a fluid, and the consequent density
difference induces a fluid motion, that is, convection. The top and bottom walls are
adiabatic.









Figure 6.3 Configuration of natural convection in a square cavity
u=0, v=0, 0
T
y

=

u=0, v=0, 0
T
y

=

u=0
v=0
T=T
0
u=0
v=0
T=T
1


184

Buoyancy force and dimensionless parameters
The Boussinesq approximation is applied to the buoyancy force term. This means
that the properties β

and υ

are considered as constants, the density ρ

is constant, and
the buoyancy force term is assumed to depend linearly on the temperature,
( ) j G
m
T T g − =
0
β ρ ρ

(6.14)
where β

is the thermal expansion coefficient,
0
g is the acceleration due to gravity,
( )
2
0 1
T T
T
m
+
= is the average temperature, and j is the vertical direction opposite to that
of gravity.
The dynamical similarity depends on two dimensionless parameters: Prandtl
number Pr and Rayleigh number Ra,
υα
β
α
υ
3
0
Pr
TL g
Ra

= =

(6.15)
To ensure the code working properly in the near-incompressible regime, we carefully
choose the value of TL g ∆
0
β . Once TL g ∆
0
β

is determined, the kinetic viscosity and
thermal conductivity are determined through the two dimensionless numbers, Pr and
Ra. By using equation (6.8), two relaxation times
υ
τ and
c
τ are determined.
Nusselt number Nu is one of the most important dimensionless parameters in
describing the convective heat transport. Its average in the whole flow domain and
along the vertical line of
0
x x = can be defined by
( )
∫ ∫

=
L L
x
dxdy y x q
L T
L
Nu
0 0
2
,
1
α
(6.16a)
( )


=
L
x
dy y x q
L T
L
Nu
0
0
,
1
α
(6.16b)

185
where ( ) ( ) ( ) ( ) y x T
x
y x uT y x q
x
, , ,


− = α is the local heat flux in the horizontal x
direction.

Non-uniform grid and convergence criterion
A typical non-uniform grid as shown in Figure 6.4 is used. It can be seen clearly
from Figure 6.4 that mesh points are stretched near the wall to capture the thin
boundary layer. In the middle part of the flow field, the mesh is relatively coarse since
the velocity and temperature gradients are not very large in this region.

Figure 6.4 A Typical non-uniform mesh in a square cavity
The convergence criterion is set to
8
,
1
,
8 2
,
2
,
1 2
,
2
,
10 max , 10 ) ( ) ( max
− + − +
≤ − ≤ + − +
n
j i
n
j i
n
j i j i
n
j i j i
T T v u v u (6.17)
where n and n +1 represent the old and new time levels, respectively.

Calculation procedure is described as follows:
1.Grid generation
The non-uniform grid as shown in Figure 6.4 is generated. Time step is
determined from the minimum grid size.

2. Set basic computational parameters

186
Fix the value of TL g ∆
0
β

based on the Rayleigh number. It is usually chosen to
be 0.1 for low Rayleigh number and 0.15 for high Rayleigh number. Then the
value of
υ
τ and
c
τ can be determined by equation (6.15).

3. Computing Matrix Coefficients of [A
α
]
This has been shown in Chapter 5.
4. Set Initial Field at 0 = t
Initial density field 1
,
=
j i
ρ
Initial velocity field 0 =
j i,
u
Initial temperature field
0
T T =
j i,

Then assuming
) 0 , , ( ) 0 , , ( = = = t j i f t j i f
eq
α α

) 0 , , ( ) 0 , , ( = = = t j i g t j i g
eq
α α

5. Iteration

t
t t δ + =
5.1 Calculating the buoyancy force

( ) j G
m
T T g − =
0
β ρ ρ

5.2 Collision: computing post-collision functions
( ) ( ) ( ) ( ) | |
t v
t v eq
t v
t
t
F
t f t f t f t f
δ τ
δ τ
δ τ
δ
δ
α
α α α α
5 . 0
, ,
5 . 0
, ,
+
+ −
+
− = + x x x x

( ) ( ) ( ) ( ) | |
( )
t c
t c
eq
t c
t
t
q t f
t g t g t g t g
δ τ
δ τ
δ τ
δ
δ
α α
α α α α
5 . 0
,
, ,
5 . 0
, ,
+
− −
+
− = +
x
x x x x

5.3 Streaming: application of TLLBM formulations

187
'
1
1
1
, 1 1 0
) , (

+
=

= = +
k
M
k
k t
f a W t f δ
α
x
'
1
1
1
'
, 1
1
'
0
) , (

+
=

= = +
k
M
k
k t
g a W t g δ
α
x

5.4 Boundary condition
Apply the boundary condition as shown in Section 6.4.
5.5 Calculating macroscopic variables

=
α
α
ρ f

2
t
f
δ ρ
ρ
α
α α
G
e u + =



∑ ∑
− =
α
α α
α
α
δ
ε ρ q f g
t
2

5.6 Calculating the new equilibrium distribution functions for the density
distribution and internal energy density distribution.
5.7 Checking the convergent criteria. If it is satisfied, move to step 6. If not,
repeat 5.1-5.7 until the convergent criteria is satisfied.

6. Output needed information in the flow field




188

Fig. 6.5 Flow Chart of Computation
The following Figure 6.6 is one of the typical results obtained by the IEDDF thermal
model using the technique of TLLBM.

Figure 6.6 Temperature contours and streamlines for Ra=10
6

N=0 initial field of density,
velocity and temperature
Calculating
eq
f and
eq
g .
Grid generation
Calculation of
υ
τ and
c
τ
based on TL g ∆
0
β , Ra and
Pr.
Calculating geometric
parameter
k
a
, 1

Yes
'
1
1
1
, 1 1 0
) , (

+
=

= = +
k
M
k
k t
f a W t f δ
α
x
'
1
1
1
, 1
'
1 0
) , (

+
=

= = +
k
M
k
k t
g a W t g δ
α
x
Output
Convergence?

=
α
α
ρ f
2
t
f
δ ρ
ρ
α
α α
G
e u + =

∑ ∑
− =
α
α α
α
α
δ
ε ρ q f g
t
2

Boundary condition
N=N+1
No

189

We have also extended the IEDDF thermal model to be used on the three
dimensions. [Peng et al., J. Comp. Phys. 193, p260-274, 2003]. For the incompressible
flows, we proposed the simplified IEDDF thermal model which makes the
implementation easier and quicker. [Peng et al., Phys. Rev. E. 68, 026701, 2003].

References

Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid
Mech. 30, 329 (1998).
He X., S. Chen, and G. D. Doolen, A novel thermal model for the lattice Boltzmann
method in incompressible limit, J. Comput. Phys. 146:282-300, 1998.
Luo L. S., Unified theory of the lattice Boltzmann models for nonideal gases, Phys.
Rev. Lett. 81(8): 1618-1621, 1998.
Pavlo P., G. Vahala and L. Vahala, Higher-order isotropic velocity grids in lattice
methods, Phys. Rev. Lett. 80 (18): 3960, 1998.
Y. Peng, C. Shu and Y. T. Chew, A Three-dimensional incompressible thermal lattice
Boltzmann model and its application to simulate natural convection in a cubic
cavity', Journal of Computational Physics, 193, 260-274, 2003.
Y. Peng, C. Shu, Y. T. Chew, Simplified thermal lattice Boltzmann model for
incompressible thermal flows’, Physical Review E, Vol. 68, 026701, 2003.
Shu C., Chew Y. T. and Niu X. D., “Least square-based LBM: A meshless Approach
for simulation of flows with complex geometry”, Phys. Rev. E., 64, P045701-1,
2001.

190
Shu C., Niu X.D. and Chew Y. T., “Taylor series expansion- and least square-based
lattice Boltzmann method: two-dimensional formulation and its applications”,
Phys. Rev. E., 65, P036708-1, 2002.
Shu C., Y. T. Chew and Y. Peng, “Simulation of natural convection in a square cavity
by Taylor series expansion- and least square- based lattice Boltzmann method”, Int.
J. Mod. Phys. C, Vol. 13(10): 1399-1414, 2002
Wolf-Gladrow, D. A., Lattice-Gas Cellular Automata and Lattice Boltzmann Models:
An Introduction, Lecture Notes in Mathematics 1725, Springer-Verlag, Germany
(2000).
Zou Q and He X, “On pressure and velocity boundary conditions for the lattice
Boltzmann BGK model”, Phys. Fluids, 9, p1591, 1997.

Sign up to vote on this title
UsefulNot useful