You are on page 1of 190

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

1
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

2
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

3
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

4
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

5
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

6
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

d 2u (1.1)
=u−x
dx 2

and the solution domain is 0 ≤ x ≤ 1 . The boundary condition for equation (1.1) is given

by

u (0) = 0, u (1) = e − e −1 + 1 (1.2)

At first, we solve equation (1.1) and obtain its general solution as

u = c1e x + c 2 e − x + x (1.3)

In the second step, we substitute the boundary condition (equation (1.2)) into equation

(1.3) and get the two constants c1 and c 2 as

c1 = 1, c 2 = −1

Thus, the particular solution for the problem is

u = e x − e−x + x (1.4)

7
It is easy to prove that the solution form (1.4) satisfies the differential equation (1.1) not

only in the solution domain 0 ≤ x ≤ 1 , 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

u i −1 − 2u i + u i +1 (1.5)
2
= u i − xi
(∆x)

The error between equation (1.5) and equation (1.1) is in the order of (∆x) 2 . Note that

equation (1.5) gives a set of algebraic equations which are resulted from the numerical

discretization. Obviously, in the solution domain 0 ≤ x ≤ 1 , 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 0 ≤ x ≤ 1 , equation (1.4) also satisfies equation (1.5)

with second order of accuracy. Consider a point xi = 2 and take ∆x as 0.1. From

equation (1.4), we can get

u i = 9.253720815694 , u i −1 = 8.436325823057 , u i +1 = 10.143713484315

8
Substituting above values into the left and right sides of equation (1.5) respectively, we

get

u i −1 − 2u i + u i +1 (1.6a)
2
= 7.2597675984
( ∆x )

u i − xi = 7.253720815694 (1.6b)

Obviously, the difference of the two sides in equation (1.5) is in the order of (∆x) 2 . 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

9
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 u ( x, y ) . Along a vertical line of x = xi , the

analytical solution is given by u ( xi , y ) . Clearly, u ( xi , y ) is only the function of the

variable y. If along this vertical line, the functional values at certain mesh nodes are

given, then u ( xi , y ) 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 yt ( x) and y b ( x) with a ≤ x ≤ b .

10
y

yt(x)

A A''
A'
yb(x)

a xi xk b x

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 x = xi , i = 1,2,..., N , 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, M i ,

the number of mesh nodes on the vertical line of x = xi may not be equal to M k which is

the number of mesh nodes on the vertical line of x = x k . Furthermore, the y coordinates

of relevant mesh nodes on these two lines may not be the same. Clearly, there is no

11
structure for the grid node distribution in the whole domain. The number of mesh nodes

N
used in the whole domain can be computed by ∑Mi .
i =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.

12
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ψ (1.7)
+ = f ( x, y )
∂x 2 ∂y 2

Numerical Discretization
Before the numerical discretization is conducted, we need to distribute N vertical lines in

the physical domain by the x coordinate xi , i = 1,2,..., N , or M horizontal lines by the y

coordinate y j , j = 1,2,..., M . 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

13
ψ i −1 ( y ) − 2ψ i ( y ) + ψ i +1 ( y ) d 2ψ i ( y ) (1.8)
2
+ 2
= f ( xi , y ) , i = 1,2,..., N
∆x dy

And when the DQ method is applied, equation (1.7) can be simplified to

N
d 2ψ i ( y ) (1.9)
∑ bi,kψ k ( y) + dy 2
= f ( xi , y ) , i = 1,2,..., N
k =1

where bi ,k 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 y j , j = 1,2,..., M i along a vertical line of x = xi , equation

(1.8) can be discretized by the DQ method as

ψ i −1 ( y j ) − 2ψ i ( y j ) + ψ i +1 ( y j ) Mi (1.10)
2
+ ∑ b j ,kψ i ( y k ) = f ( xi , y j ) , i = 1,2,..., N
∆x k =1

where M i is the number of mesh points along the line of x = xi , and b j ,k is the

weighting coefficient of the second order derivative in the y direction. Note that the

14
weighting coefficient b j ,k on different vertical lines may be different. Equation (1.10) is

an algebraic equation system. It is indicated that the position y j on the vertical lines of

x = xi −1 and x = xi +1 may not be the mesh node, which may also be outside the physical

domain. We will show in the following that the values of ψ i −1 ( y j ) and ψ i +1 ( y j ) can be

computed from the approximate form of ψ i −1 ( y ) and ψ i +1 ( y ) . In a similar way, equation

(1.9) can be further discretized by the DQ method as

N Mi (1.11)
∑ bi,kψ k ( y j ) + ∑ b j ,kψ i ( y k ) = f ( xi , y j ) , j = 1,2,..., M i
k =1 k =1

As compared to equation (1.10), equation (1.11) involves the computation of the

functional value at the position y j 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 x = x k . On this line, there are M k grid nodes. Suppose that the

functional values at M k 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

15
discretization. Using Lagrange interpolated polynomial, the solution on the line can be

approximated by

Mk (1.12)
ψ k ( y ) = ∑ Lag ( x k , yl , y )ψ k ( yl )
l =1
where
Mk
y − yll (1.13)
Lag ( x k , yl , y ) = ∏ yl − yll
ll =1
(l ≠ll )

Using equation (1.12), the functional value at the position y j can be computed by
Mk (1.14)
ψ k ( y j ) = ∑ Lag ( x k , yl , y j )ψ k ( yl )
l =1

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


Mk
y j − y ll (1.15)
Lag ( x k , y l , y j ) = ∏y
ll =1 − y ll
l
( l ≠ ll )

Substituting equation (1.14) into equation (1.10), we can get


1  M i −1 M i +1
 (1.16)
2 ∑ ∑
Lag ( x i −1 , y l , y j ψ
) i −1 ( y l ) − 2ψ i ( y j ) + Lag ( xi +1 , y l , y j )ψ i +1 ( y l )
∆x  l =1 l =1 
Mi
+ ∑ b jkψ i ( y k ) = f ( xi , y j )
k =1
Similarly, substituting equation (1.14) into equation (1.11) gives
N Mk Mi (1.17)
∑ bi,k ∑ Lag ( xk , yl , y j )ψ k ( yl ) + ∑ b j ,kψ i ( y k ) = f ( xi , y j )
k =1 l =1 k =1
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.

16
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 y j is inside the physical domain, the use

of equation (1.14) is usually called the Lagrange interpolation. In contrast, when the

position y j 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

Lag ( x k , y l , y j ) 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 < y b ( x k ) , the extrapolation is given by

( y − y k , 2 )( y − y k ,3 ) ( y − y k ,3 )( y − y k ,1 ) (1.18)
ψ k ( y) = ψ k ,1 + ψ k ,2 +
( y k ,1 − y k , 2 )( y k ,1 − y k ,3 ) ( y k , 2 − y k ,3 )( y k , 2 − y k ,1 )
( y − y k ,1 )( y − y k , 2 )
ψ k ,3
( y k ,3 − y k ,1 )( y k ,3 − y k , 2 )
and when y > y t ( x k ) , the local extrapolation becomes
( y − y k ,M k −1 )( y − y k , M k − 2 )ψ k ,M k ( y − y k ,M k −1 )( y − y k , M k )ψ k ,M k − 2
ψ k ( y) = +
( y k , M k − y k , M k −1 )( y k , M k − y k , M k − 2 ) ( y k , M k − 2 − y k , M k −1 )( y k ,M k − 2 − y k ,M k )
(1.19)
( y − y k , M k − 2 )( y − y k , M k )ψ k ,M k −1
+
( y k ,M k −1 − y k , M k − 2 )( y k ,M k −1 − y k , M k )

17
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 Ψk = {ψ k ( y1 ),ψ k ( y 2 ), L ,ψ k ( y M k )}T represents all the

nodal variables at the N nodes on the kth line along the y direction. The RBF

approximation for the real function ψ k ( y ) is:

Mk (1.20)
ψ k ( y ) = ∑ λ kl ϕ k ( y, y l )
l =1

where ϕ k ( y, y l ) is a radial basis function, λ kl is the coefficient for ϕ k ( y, y l )

corresponding to the approximated point. Due to its good performance for many cases,

we choose the multi-quadric RBF (MQ)

ϕ k ( y, y l ) = ( y − y l ) 2 + c 2 (1.21)

where c is the shape parameter for MQ.

The coefficient λ kl in Eq. (1.20) can be determined by collocation method,

18
Mk (1.22)
ψ k ( y j ) = ∑ λ kl ϕ k ( y j , y l ) , j = 1,2, L , M k
l =1

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,


v v
ψ k = Aλ k (1.23)

ψ k ( y1 )  λ k 1 
ψ ( y )  v λ 
v
where ψ k=   , λ =  k2  ,
k 2

M  k M 
   
ψ k ( y M k ) λ kM k 

 c ( y1 − y 2 ) 2 + c 2 L ( y1 − y M k ) 2 + c 2 
 
 ( y 2 − y1 ) 2 + c 2 c L ( y2 − yM k ) 2 + c 2 
A= 
 M M O M 
 ( y M − y1 ) 2 + c 2 ( yM k − y2 ) + c 2 2
L c 
 k 
v
Because the non-singularity of A is guaranteed, therefore, this equation is solvable. λ k

can be obtained by,


v v
λ k = A −1ψ k (1.24)

v
As λ k is known, we can get the function value of ψ k ( y ) 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
ψ ( y ) = ϕ ( y ) A −1ψ = R ( y )ψ (1.25)
v
where R ( y ) is defined by
v v
R( y ) = ϕ ( y ) A −1 (1.26)

19
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

1  M i −1 M i +1
 (1.27)
2  ∑
∆x  l =1
R ( x i −1 , y l , y j ψ
) i −1 ( y l ) − 2ψ i ( y j ) + ∑ R ( xi +1 , y l , y j )ψ i +1 ( y l )
l =1 
Mi
+ ∑ b jkψ i ( y k ) = f ( xi , y j )
k =1
Similarly, substituting equation (1.14) into equation (1.11) gives
N Mk Mi (1.28)
∑ bi,k ∑ R( xk , yl , y j )ψ k ( yl ) + ∑ b j ,kψ i ( y k ) = f ( xi , y j )
k =1 l =1 k =1

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*dSi/Mi

for the ith vertical line (where dSi refers to the computational domain for the ith vertical

line, i.e., the distance between two curves yt (x) and y b (x) along that line; and Mi 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

20
the oscillation becomes larger and larger when the domain is decreased (such as the gap

between the two curves yt (x) and y b (x) 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

21
relatively reasonable unstructured grid with less nodes. Eventually, the unnecessary

computational cost can be reduced.

C' C

xk xi

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

22
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

∂ 2ψ ∂ 2ψ
+ =4 (1.29)
∂x 2 ∂y 2

as an example. The exact solution of equation (1.29) is fixed as ψ = x 2 + y 2 − 1 , 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

x2 + y2 = 1, −1 ≤ x ≤ 1 (1.30)

or by two curves

 y ( x) = 1 − x 2 (1.31)
t

 y b ( x) = − 1 − x 2

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 M i = 1,3,5,...,19,21,19,...,5,3,1 , i = 1,2,..., N .

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.

23
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, err ( xi , y j ) , defined by

ψ numerical − ψ exact
err ( xi , y j ) =
ψ exact

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 ( N = 21 )

i 11 12 13 14 15 16 17 18 19 20 21

xi 0 0.1495 0.2956 0.4351 0.5649 0.6821 0.7840 0.8685 0.9335 0.9777 1.0

All-nodes
1.97379 1.8389 1.6219 1.2093 0.7355 0.3742 0.1743 0.0799 0.0713 0.0114 0.0
Extrapolation

3 nodes
0.0491 0.0509 0.0596 0.0693 0.0774 0.0778 0.0750 0.0646 0.0728 0.0114 0.0
Extrapolation

24
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 x = x11 , 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 x = x11 , 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

 y ( x) = 0.8 1 − x 2 (1.32)
 t
 , −1 ≤ x ≤ 1
 yb ( x) = −0.8 1 − x 2

and the boundary of the trapezoidal domain is represented by

25
 y ( x) = 1 + x ⋅ tan 30 0 (1.33)
t , 0≤ x≤2

 yb ( x) = 0

For the expansion channel, its boundary is denoted by

 yt ( x) = 1 (1.34)

 1 , 0 ≤ x ≤ 10 / 3
 y b ( x ) = [tanh( 2 − 3 x ) − tanh( 2) ]
2

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

26
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 yt (x) and yb (x) .

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

∂ 2ψ ∂ 2ψ ∂ψ (1.35)
+ 2 +ψ = 4 + 2 x( x 2 + y 2 − 1)
∂x 2
∂y ∂x

and the exact solution is fixed as ψ = x 2 + y 2 − 1 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

27
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.

28
Description of the Problem

Symmetric Line yt (x)=1


(Re/3,1)
(0,1)

Inlet
Outlet
x
(0, 0)

Solid wall y b (x)

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

1 30 x (1.36)
y b ( x) = [tanh(2 − ) − tanh(2)], for 0 ≤ x ≤ xout = Re/ 3
2 Re

on the lower boundary (solid wall), and

yt ( x) = 1 (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

29
∂ω ∂ω 1 ∂ 2ω ∂ 2ω (1.38)
u +v = ( + )
∂x ∂y Re ∂x 2 ∂y 2

∂ 2ψ ∂ 2ψ (1.39)
+ =ω
∂x 2 ∂y 2

where ω ,ψ , Re, u, v, are vorticity, stream function, Reynolds number, velocity

components in the x and y directions respectively. Velocity u, v can be calculated from

the stream function by

 ∂ψ (1.40)
u = ∂ y

v = − ∂ψ
 ∂x

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

 1 (1.41)
ψ = (3 y − y )
2 3

 2 , at x = 0
ψ x = 0

At outlet, the natural boundary condition

ψ x = 0 (1.42)
 , at x = Re/ 3
ω x = 0

is applied. On the lower boundary (solid wall), the no-slip boundary condition is

implemented, which is written as

30
ψ = 0 (1.43)
 , at y = y b ( x )
∂ψ / ∂n = 0

where n is the unit length in the normal direction. The symmetric boundary condition

ψ = 1 (1.44)
 , at y = y t ( x)
ω = 0

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

1 ∂  ∂ψ ∂ψ  1 ∂  ∂ψ ∂ψ  (1.45)
ω=  A +B  + C +B
J ∂ξ  ∂ξ ∂η  J ∂η  ∂η ∂ξ 

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

31
C ∂ 2ψ (1.46)
ω=
J ∂η 2

The coefficients C, J and coordinate transformation can be given as

1 2 (1.47)
C= ( xξ + yξ2 )
J

J = xξ yη − xη yξ (1.48)

ξ = x / xout = 3 x / Re (1.49)

y − yb ( x) y − yb ( x) (1.50)
η= =
yt ( x) − yb ( x) ∆y

With equation (1.47)-(1.50), equation (1.46) can be further reduced to

  (1.51)
 225  ∂ 2ψ
ω = 1 +  2
 Re 2 [cosh(2 − 30 x )]4  ∂y
 Re 

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.

32
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 2nd 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

 N Mi
1 N Mi (1.52)
 ij ∑ ik kj
u a ω + v ij ∑ jk ik
a ω = ( ∑ ik kj ∑
b ω + b jk ω ik )
 k =1 k =1 Re k =1 k =1
N Mi
 b ψ + b ψ =ω
∑
k =1
ik kj ∑
k =1
jk ik ij

33
for i = 1,2,..., N and j = 1,2,..., M i . where N is the grid number in the x direction

(number of vertical lines) and M i is the number of grid nodes on the line of x = xi . a ik

and bik are the DQ weighting coefficients of the first and second order derivatives in the

x direction; similarly, a jk and b jk 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.

A3 A2 A1 B B1 B2

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, at point B(i, j ) is approximated by
∂x

∂ψ N (1.53)
= ∑ aikψ kj
∂x B k =1

∂ψ
Clearly, is related to the functional values at point A1 , A2 , A3 ,…, which are outside
∂x B

the domain and need extrapolation, and the values at points B1 , B2 ,…, which are inside

the domain and need interpolation. In general, the nearer the extrapolation points from

34
the boundary, the higher the accuracy of extrapolation. As shown in Figure 1.4, point A3

is far away from the boundary, thus the extrapolation for this point will bring a large

∂ψ
numerical error into the computation of . For this case, although the program can
∂x B

run, the obtained results are not accurate. To improve this, we should try to make the

∂ψ
discretization form of at point B involving the extrapolation as less as possible. For
∂x

∂ψ
the approximation of at point B, if we only consider two neighboring points A1 and
∂x

B1 , 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

 ω i +1, j − ω i −1, j Mi
1 ω i +1, j − 2ω i , j + ω i −1, j M i (1.54)
u
 ij + v ij ∑ jk ik
a ω = ( + ∑ b jk ω ik )
 2∆x k =1 Re ∆x 2 k =1

ψ
 i +1, j − 2ψ + ψ Mi
+ ∑ b jkψ ik = ω ij
i, j i −1, j
 ∆x 2
k =1

where a jk and b jk are the DQ weighting coefficients of the first and second order

derivatives in the y direction. Note that the position y j on the line of x = xi −1 or x = xi +1

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.

35
B( i, j)

A1 B B1

extrapolation xi-1 xi xi+1 interpolation

Figure 1.5 Extrapolation when FD method is used

As shown in Figure 1.5, the point A1 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 A1 on the line of x = xi −1 . The point B1 is an inner point. The

functional value at this point is obtained by global interpolation of all mesh nodes on the

line of x = xi +1 by Lagrange polynomial interpolation or RBF approximation scheme. For

equation (1.54), ω i +1, j and ψ i +1, j are obtained by interpolation on the line of x = xi +1

while ω i −1, j and ψ i −1, j are obtained by extrapolation on the line of x = xi −1 . 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

36
 1 (1.55)
ψ 1 j = (3 y1 j − y1 j )
2 2

 2
ω1 j = 3(1 − y1 j )

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

Equation ω 1 j = 3(1 − y1 j ) is just used as an initial condition. It must be updated with the

iteration process by equation

∂u ∂v ∂v (1.56)
ω1 j = − = 3(1 − y1 j ) −
∂y 1 j ∂x 1 j ∂x 1 j

∂v
can be obtained by the following method.
∂x 1 j

By using Taylor series expansion, we have

 ∂v 1 ∂ 2v (1.57)
v2 j = v1 j + ⋅ ∆x + ⋅ ∆x 2
 ∂x 1 j 2 ∂x 1 j
2


v = v + ∂v ⋅ (2∆x) + 1 ∂ v ⋅ 4∆x 2
2

 3j 1j
∂x 1 j 2 ∂x 2 1 j

Solving above equations, we obtain

∂v 4v2 j − v3 j − 3v1 j (1.58)


=
∂x 1 j 2 ∆x

At the inlet, we have v1 j = 0 . Substituting this condition into above equation gives

∂v 4v − v (1.59)
= 2j 3j
∂x 1 j 2 ∆x

where v2 j and v3 j are velocity components on the lines of x = x2 and x = x3

respectively, and are obtained by Lagrange interpolation or RBF approximation.

37
The velocity components at the inlet can be written as

 3 2 (1.60)
u1 j = (2 y1 j − y1 j )
 2
v1 j = 0

Along symmetry line

Along the symmetry line, the discretized boundary condition is

ψ iM i = ψ 1M 1 (1.61)

ω iM i = 0

where i = 1,2,..., N , 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

 Mi (1.62)
u iM i = ∑ a M i k ψ ik
 k =1
v = 0
 iM i

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

38
 4ψ N −1, j − ψ N − 2, j (1.63)
ψ Nj =
3

ω = 4ω N −1, j − ω N − 2 , j
 Nj
3

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

Similarly, the velocity components at outlet can be computed by

 MN (1.64)
u Nj = ∑ a jk ψ Nk
 k =1
v = 0
 Nj

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

ψ i1 = ψ 11 (1.65)

  
  225  Mi
30 xi 4  ∑
ω
 i1 = 1 +  b1kψ ik
  Re [cosh(2 −
2
)] k =1
 
 Re 

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

For the velocity components at the solid wall, we have

u i1 = 0 (1.66)

vi1 = 0

39
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

3.0

2.0 Benchmark
Shu et al
Vorticity

present
1.0

0.0
-0.2 0.0 0.2 0.4 0.6 0.8 1.0

-1.0
x/xout

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

40
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/xout.

Wall Vorticity Distribution

3.0

Re=10
2.0 Re=100
Re=200
Vorticity

1.0

0.0
0.0 0.2 0.4 0.6 0.8 1.0
-1.0
x/xout

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

41
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

42
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

43
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

44
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.

45
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

46
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

47
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.

48
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

1 2 3
o o o
x x

Figure 2.1 Configuration for One-dimensional FD scheme

49
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 ∆x = x 2 − x1 = x3 − x 2 , the

Taylor series expansions around point 2 give

 dφ  2 d φ
2
1
φ1 = φ 2 − ∆x  + (∆x )  2  − ... (2.1a)
 dx  2 2  dx  2

 dφ  1  d 2φ 
φ 3 = φ 2 + ∆x  + (∆x )2  2  + ... (2.1b)
 dx  2 2  dx  2

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:

 dφ  φ − φ1
  = 3 + O ( ∆x 2 ) (2.2a)
 dx  2 2∆x

 d 2φ  φ − 2φ 2 + φ 3
 2  = 1 + O ( ∆x ) (2.2b)
 dx  2 ( ∆x ) 2

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.

50
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

51
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∂ φ 2 ∂ φ  ∂ 2φ 
2 2
 ∂φ  1 1
φ = φ 0 + ∆x  + ∆y  + (∆x )  2  + (∆y )  2  + (∆x )(∆y ) 

 ∂x  0  ∂y  0 2  ∂x  0 2  ∂y 0  ∂x∂y 0 (2.3)
2  2  2   2 
+
1
(∆x )3  ∂ φ3  + 1 (∆y )3  ∂ φ3  + 1 (∆x )2 (∆y ) ∂ 2 φ  + 1 (∆x )(∆y )2  ∂ φ2  + ...

6  ∂x  0 6  ∂y  0 2  ∂x ∂y  0 2  ∂x∂y 0

Reference knot

Supporting knots

Non-supporting knots

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

52
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 Do of radius d o about node o. Application of equation (2.3) at 9

neighbouring points gives

φ j − φ o = s Tj ⋅ dφ , j = 1, 2, …, 9 (2.4)

where

 1
2
( ) ( ) ( )( ) ( )
1
2
1
s Tj = ∆x j , ∆y j , ∆x j 2 , ∆y j 2 , ∆x j ∆y j , ∆x j 3 ,
6

1
6
( ) ( ) 1
2
1
( )( )
∆y j 3 , ∆x j 2 (∆y ) j , ∆x j ∆y j 2 
2

 ∂φ   ∂φ   ∂ 2 φ   ∂ 2 φ   ∂ 2 φ 
dφ T =   ,   ,  2  ,  2  ,   ,

 ∂x  0  ∂y  0  ∂x  0  ∂y  0  ∂x∂y  0
 ∂ 3φ   ∂ 3φ   ∂ 3φ   ∂ 3φ  
        
 ∂x 3  ,  ∂y 3  ,  ∂x 2 ∂y  ,  ∂x∂y 2 
 0  0  0   0 

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 Do . ∆x j = x j − xo and

∆y j = y j − yo , where ( x j , y j ) 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

∆φ T = [φ1 − φ 0 , ..., φ 9 − φ 0 ] (2.5)

[
S T = s1 , ..., s 9 ]9×9
(2.6)

we can further assemble equations (2.4) into the following succinct matrix form:

53
∆ϕ = 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

dϕ = S −1∆ϕ (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. (∆x j , ∆y j ) ≈ 0 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 d o of the support domain is used to scale the

local distance (∆x j , ∆y j ) ,

54
∆x j ∆y j
∆x j = , ∆y j = (2.9)
do do

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

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

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

S ( ∆x , ∆y ) is greatly improved as compared with matrix S ( ∆x, ∆y ) . It indicates that by

local support scaling we can alleviate the negative effect caused by small value of

( ∆x, ∆y ) . The derivative vector then leaves,

dφ = S −1 D ∆φ (2.10)

where the scaling matrix D is the diagonal matrix,

 d o−1 
 
 d o−1 
 
 d o− 2 
 d o− 2 
 
D=  d o− 2  (2.11)
 d o−3 
 
 d o−3 
 d o−3 
 
 d o−3 

55
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

φ j − φ o = s Tj ⋅ b , j=1, 2,…, n (2.12)

Equation (2.12) is applied at n ( n ≥ 9 ) supporting points in the domain Do . 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
E (b ) = ∑ φ j − φ 0 − s Tj ⋅ b
2
(2.13)
j =1

To minimize the error, we need to set

56
 ∂E 
  =0 (2.14)
 ∂b  b =dφ

Substitution of equation (2.13) into equation (2.14) gives

n  9 
∑  j 0 ∑ S j ,k bk  − S j ,m = 0
2 φ − φ − ( ) for m = 1,…,9 (2.15)
j =1  k =1 

where S j ,k represents the entry of the matrix S at j-th row and k-th column, and bk

represents the element of derivative vector dφ at k-th row. Equation (2.15) can be further

simplified as,

n n  9 
S (− φ = )
∑ j ,m j 0 ∑  ∑ S j ,k bk S j ,m for m = 1,…,9
φ (2.16)
j =1 j =1  k =1 

Noticing that (S j ,m ) = (S m , j ) , equation (2.16) can be rewritten in the form of matrix,


T

S T ∆φ = S T S b (2.17)

Thus, we get the explicit expression for the optimal derivative approximation by least-

square technique as

( )
b = dφ = S T S
−1
S T ∆φ (2.18)

We note that the matrix S T S is positive-definite if the columns of S are linearly

independent.

Proof: If the columns of S are linearly independent, then x ≠ 0 ⇒ Sx ≠ 0 and therefore

2
x ≠ 0 ⇒ x T S T Sx = Sx 2 > 0 . Hence S TS is positive definite.

57
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 T S 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, [column1] = α [column 2] , 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

58
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) W 0 i = 1 (equivalent to no weighting) (2.19a)

2) W 1i = 4 / π (1 − ri 2 ) 4 (2.19b)

3) W 2 i = 1 / ri (2.19c)

4) W 3i = 1 − 6ri 2 + 8ri 3 − 3ri 4 (2.19d)

5) W 4 i = 1 / ri 4 (2.19e)

59
∆xi2 + ∆yi2
where ri = , the index i is the ith supporting point, and d o denotes the
do

radius of support domain, 0 ≤ ri ≤ 1 . The adoption of weighting function actually serves

as the precondition procedure for derivative vector in such a way that,

dφ = (S T WS ) S T W ∆φ
−1
(2.20)

where W is an n × n diagonal matrix formed by applying equation (2.19) at n supporting

points,

W1 0 
 
W= O  (2.21)
 0 W n 

Using scaling and define C= (S T W S ) S T W , equation (2.20) gives


−1

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,

60
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:

( )
ei = O (∆xi ) 4 , (∆y i ) 4 , i=1, …, n (2.23)

Specifically, since a uniform mesh is chosen for analysis, we can see that ∆xi and ∆y i

are proportional to the grid spacing h. Therefore, we say

ei = O (h 4 ), i=1, …, n (2.24)

Equation (2.4) can be rewritten as:

[∆φ]n×1 = (S )n×9 [dφexact ]9×1 + [e]n×1 (2.25)

where the derivative vector dφ exact has the same form as the derivative vector dφ except

that its entries represent the exact values of derivatives.

61
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,

S T (S dφ exact + e ) = S T S dφ (2.26)

Denoting the discretization error E for the derivative vector as E = dφ − dφ exacct and

substituting it into equation (2.26), we have,

S TS E = S Te (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.,

S = SH (2.28)

 ∆x1 ∆y1 ( ∆y1 ) 3 


 L  h 
 h h h3   
 h 
 ∆x 2 ∆y 2 ( ∆y 2 ) 
3

where S =  h L  
h 3  and H = 
2
h h
 M 
M M M   O 
 ∆x ∆y n ( ∆y n ) 3 
 n L   3
h  9×9

 h h h 3  n×9

∆x i ∆y i
and are constants for a uniform mesh since the set of supporting points for the
h h

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 = H −1 (S T S ) S T e
−1
(2.29)

62
Since the matrix S T S is symmetric, positive and definite, it implies the existence and

boundness of (S T S ) . Observing that matrix (S T S ) S T does not have information of


−1 −1

grid spacing h, we can say that the entries of the resultant vector (S T S ) S T e remain the
−1

same order of those in the vector e , i.e, O(h4). Accordingly, we can decide the order of

discretization error vector E:

O ( h 3 ) 
 3 
O ( h ) 
O ( h 2 )
 2 
O ( h )
E = O ( h 2 ) (2.30)
 
 O(h) 
 O(h) 
 
 O(h) 
 O(h) 
 

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

63
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

( 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 ). The governing equation and boundary condition are defined by

∂ 2u ∂ 2u
+ = −2π 2 sin πx ⋅ sin πy for 0<x<1, 0<y<1, (2.31)
∂x 2 ∂y 2

Boundary condition: u = 1 + x on ∂Ω ,

The analytical solution for this problem is u( x, y ) = 1 + x + sin πx ⋅ sin πy .

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:

64
Nd

∑ (w
k =1
xx
i ,k + wiyy,k )u ik = −2π 2 sin πx ⋅ sin πy (2.32)

where subscript i represent the reference node, Nd denotes the number of supporting

points (including reference node itself) and subscript k represents the kth support point of

node i. wixx,k denotes the derivative coefficients for the second-order derivative with

respect to x coordinate at the kth support point of node i, and so for the wiyy,k . 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 ----------------------

65
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

66
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

67
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

68
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

69
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:

N 2
∑ u num − u exact
i =1
Relative L2 error norm: (2.33)
N 2
∑ u exact
i =1

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

LSFD W0 -2.7108 -3.5219 -3.8770 -4.1289 -4.4831 -4.7345

W1 -2.8275 -3.6385 -3.9941 -4.2455 -4.5999 -4.8515


--
W2 -2.7237 -3.5346 -3.8902 -4.1416 -4.4958
4.7472
W3 -2.8073 -3.6182 -3.9741 -4.2253 -4.5795 -4.8311

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

Table 2.2 shows the relative L2 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 W1 weighting function gives slightly superior

performance. Figure 2.3 shows the decay of relative L2 error of the numerical solutions

with respect to the grid spacing for the weighing function W0, W1, W2, W3, W4,

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

71
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.

-4.4
O W0
A W1
B W2
C W3
D W4
O
B
-4.5
log10(err)

C
D
-4.6 A

-2.225 -2.2 -2.175 -2.15 -2.125


log10(h)

Figure 2.3 Convergence curves of LSFD with different weighting functions

72
O W0 O
-3 A W1 A
W2
W3
W4
-3.5 F CD O F
A
log10(err)

O
-4 A
O F
A

-4.5 O F
A
O F
A
-5
F

-2.25 -2 -1.75 -1.5


log10(h)

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

2.4 Sample Applications of LSFD to Flow Problems

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

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

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

Figure 2.5 Configuration of Natural Convection in A Square Cavity

73
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:

∂ω ∂ω ∂ω  ∂ 2ω ∂ 2ω  ∂T
+u +v = Pr  2 + 2  + Ra Pr (2.34)
∂t ∂x ∂y  ∂x ∂y  ∂x

∂ 2ψ ∂ 2ψ
+ =ω (2.35)
∂x 2 ∂y 2

∂T ∂T ∂T ∂ 2T ∂ 2T
+u +v = + (2.36)
∂t ∂x ∂y ∂x 2 ∂y 2

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

∂ψ ∂ψ
u= , v=− (2.37)
∂y ∂x

Equations (2.34)-(2.36) are subjected to the initial conditions

ω = ψ = T = u = v = 0 , 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)

74
∂T
ψ = = 0 , T=0, at y=0,1, 0<x<1. (2.41)
∂y

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:

dωi ni ni  ni ni 
= u i ∑ ci(,1kx ) ∆ωik + vi ∑ ci(,1ky ) ∆ωik = Pr  ∑ ci(,2kx ) ∆ωik + ∑ ci(,2k y ) ∆ωik 
dt k =1 k =1  k =1 k =1  (2.42)
ni
+ Ra Pr ∑ ci(,1kx ) ∆Ti k
k =1

ni ni
∑ c i ,k ∆ψ i + ∑ c i ,k ∆ψ i = ω i
(2 x) k (2 y) k
(2.43)
k =1 k =1

ni ni ni ni
dTi
= ui ∑ ci(,1kx ) ∆Ti k + vi ∑ ci(,1ky ) ∆Ti k = ∑ ci(,2k x ) ∆Ti k + ∑ ci(,2k y ) ∆Ti k (2.44)
dt k =1 k =1 k =1 k =1

ni ni

∑ ci(,1ky ) ∆ψ ik and vi = ∑ ci ,k ∆ψ i
(1 x ) k
ui = (2.45)
k =1 k =1

where ∆Fi k = Fi k − Fi , Fi represents the unknown value at node i, Fik represents the

unknown value at the kth supporting point for the node i. ci(,1kx ) , ci(,1ky ) , ci(,2k x ) and

ci(,2k y ) 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

75
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.

76
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.

Locally orthogonal grid


Random knot distribution

w+2

w+1

Wall
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

77
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: ψ i = 0 at all boundary nodes, (2.46)

Temperature: Ti = 0 , at x=0, 0≤y≤1,

Ti = 1 , at x=1, 0≤y≤1, (2.47)

4Tw+1 − Tw+2
Tw = , at y=0,1, 0<x<1 (second-order FD scheme)
3

3ψ w+1 1
Vorticity: ωw = − ω w+1 (second-order FD scheme) (2.48)
h2 2

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=104 and 105 are illustrated in Fig.

2.8.

78
Figure 2.7 Locally orthogonal grid and random node distribution

(a) Isotherms of Ra=104 (b) Streamlines of Ra=104

79
(c) Isotherms of Ra=105 (d) Isotherms of Ra=105

Figure 2.8 Isotherms and Streamlines of Ra=104, 105 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

80
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

81
1.7 2 1 3

1.6 1.9 2.5

1.5 1.8 0 2

1.4 1.7 1.5

1.3 1.6 -1 1
CD1

CD2

CL1

CL2
1.2 1.5 0.5

1.1 1.4 -2 0

1 1.3 -0.5
CD1
0.9 CD2 1.2 -3 CL1 -1
CL2
0.8 1.1 -1.5

0.7 1 -4 -2
150 160 170 180 150 160 170 180
time time

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.

82
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(hd+1) where h is the density of

the collocation points and d is the spatial dimension; (2) furthermore, in the context of

83
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

84
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 ϕ ( x − x j ) , is a continuous spline which depends on


2

the separation distances of a subset of scattered points x ∈ Ω ⊂ ℜ d , d =1, 2, or 3 denotes

the spatial dimension. The “radial” is named due to RBFs’ spherical symmetry about the

centre point x j . 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): ϕ(r ) = r 2 + c 2 (3.1a)

Thin-plate splines (TPS): ϕ(r ) = r 2 log(r ) (3.1b)

2
Gaussians: ϕ(r ) = e − cr (3.1c)

1
Inverse multiquadrics: ϕ(r ) = (3.1d)
r 2 + c2

where r = x − x j and shape parameter c is a positive constant. Among above popular


2

radial basis functions, the Gaussian and the inverse MQ are positive definite functions,

while the TPS and the MQ are conditionally positive definite functions.

85
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 x ∈ Ω ⊂ ℜ d , the

approximation of f(x) can be written as a linear combination of N radial basis functions,

N
f ( x) ≅ ∑ λ j ϕ ( x − x j ) + ψ ( x) (3.2)
2
j =1

where N is the number of centers or sometimes called knots x, x = ( x1 , x 2 , ..., x d ) ,

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 Ψqd denotes the space of d-variate polynomials of order not exceeding q, and letting the

polynomials P1, …, Pm be the basis of Ψqd in ℜd , then the polynomial ψ (x ) , in equation

(3.2), is usually written in the following form:

m
ψ ( x ) = ∑ ζ i Pi ( x ) (3.3)
i =1

where m=(q-1+d)!/(d!(q-1)!). To determine the coefficients (λ1 , ..., λ N ) and

(ζ 1 , ..., ζ m ) , 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

∑ λ P (x
j =1
j i j )=0 i=1, …, m (3.4)

The matrix formulation of equations (3.2) and (3.4) can be expressed as Ax = b with the

known function value on the scattered points as the components of vector b, and

86
ϕ Pm 
A =  T 
 Pm 0 
(3.5)

x = (λ,ζ) T

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 c 2 >> r 2 . How to choose the optimal

87
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

yj

xi

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

88
of a function with respect to x at a mesh point ( xi , y j ) (represented by the symbol ) by

all the functional values along the mesh line of y = y j (represented by the symbol ),

and the derivative of the function with respect to y by all the functional values along the

mesh line of x = xi (represented by the symbol ). Mathematically, the DQ

approximation of the nth order derivative with respect to x, f x(n ) , and the mth order

derivative with respect to y, f y(m ) , at ( xi , y j ) can be written as

N
f x( n ) ( xi , y j ) = ∑ wi(,nk) f ( x k , y j ) (3.6a)
k =1

M
f y( m ) ( xi , y j ) = ∑ w j(,mk ) f ( xi , y k ) (3.6b)
k =1

where N, M are respectively the number of mesh points in the x and y direction, wi(,nk) ,

w j(,mk ) are the DQ weighting coefficients in the x and y directions. As shown by Shu

(2000), wi(,nk) depends on the approximation of the one-dimensional function f ( x, y j ) (x

is the variable), while w j(,mk ) depends on the approximation of the one-dimensional

function f ( xi , y ) (y is the variable). When f ( x, y j ) or f ( xi , y ) is approximated by a

high order polynomial, Shu and Richards (1992) derived a simple algebraic formulation

and a recurrence relationship to compute wi(,nk) and w j(,mk ) . 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

89
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

k = (i − 1) M + j , i = 1,2,..., N ; j = 1,2,..., M . Clearly, when i is changed from 1 to N and j

is changed from 1 to M, k is changed from 1 to NM = N × M . The new DQ

approximation for the mth order derivative with respect to x, f x(m ) , and the nth order

derivative with respect to y, f y(n ) , at ( x k , y k ) can be written as

NM
f x( m ) ( x k , y k ) = ∑ wk( m,k)1 f ( x k1 , y k1 ) (3.7a)
k 1=1

NM
f y( n ) ( x k , y k ) = ∑ wk(,nk)1 f ( x k1 , y k1 ) (3.7b)
k 1=1

90
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.

91
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

N
f ( x, y ) = ∑λ j ( x − x j ) 2 + ( y − y j ) 2 + c 2j + λ N +1 (3.8)
j =1

To make the problem be well-posed, one more equation is required. From equation (3.4),

we have

N N
∑λ j = 0 ⇒ λi = − ∑λ j (3.9)
j =1 j =1, j ≠ i

Substituting equation (3.9) into equation (3.8) gives

N
f ( x, y ) = ∑ λ j g j ( x, y) + λ N +1 (3.10)
j =1, j ≠i

where g j ( x, y ) = ( x − x j ) 2 + ( y − y j ) 2 + c 2j − ( x − xi ) 2 + ( y − yi ) 2 + ci2 (3.11)

The number of unknowns in equation (3.8) is N. As no confusion rises, λ N +1 can be

replaced by λ i , and equation (3.8) can be written as

N
f ( x, y ) = ∑ λ j g j ( x, y ) + λ i (3.12)
j =1, j ≠ i

It is easy to see that f ( x, y ) in equation (3.12) constitutes N-dimensional linear vector

space V N with respect to the operation of addition and multiplication. From the concept

92
of linear independence, the bases of a vector space can be considered as linearly

independent subset that spans the entire space. In the space V N , one set of base vectors is

g i ( x, y ) = 1 , and g j ( x, y ) , j = 1,..., N but j ≠ i 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 V N represented by equation (3.12).

There is an interesting feature. From equation (3.12), while all the base functions are

given, the function f ( x, y ) is still unknown since the coefficients λi are unknown.

However, when all the base functions satisfy equation (3.7), we can guarantee that

f ( x, y ) 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
0= ∑ wi(,mk) (3.13a)
k =1

∂ m g j ( xi , y i ) N
m
= ∑ wi(,mk) g j ( xk , y k ) , j = 1,2,..., N , but j ≠ i (3.13b)
∂x k =1

93
For the given i, equation system (3.13) has N unknowns with N equations. So, solving

this equation system can obtain the weighting coefficients wi(,mk) . From equation (3.11),

one can easily obtain the first order derivative of g j ( x, y ) as

∂g j ( x, y ) x− xj x − xi
= −
∂x ( x − x j ) 2 + ( y − y j ) 2 + c 2j ( x − xi ) 2 + ( y − yi ) 2 + ci2

In the matrix form, the weighting coefficient matrix of the x-derivative can then be

determined by

[G ][W n ]T = {Gx } (3.14)

where [W n ]T is the transpose of the weighting coefficient matrix [W n ] , and

 w1(,n1) w1(,n2) L w1(,nN)   1 1 L 1 


 (n) (n)  
w w2( n, 2) L w2, N  g ( x , y ) g1 ( x2 , y2 ) L g1 ( xN , y N ) 
[W n ] =  2,1 , [G ] =  1 1 1
 M M O M   M M O M 
 (n)   
 wN ,1 wN( n,)2 (n)
L wN , N   g N ( x1 , y1 ) g N ( x2 , y2 ) L g N ( xN , y N )

 0 0 L 0 
 g n (1,1) n
g x (1,2) L g (1, N ) 
n

[Gx ] =  x x

 M M O M 
 n n n 
 g x ( N ,1) g x ( N ,2) L g x ( N , N )

With the known matrices [G] and [Gx], the weighting coefficient matrix [W n ] 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.

94
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

95
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

x y
x= , y= (3.15)
Di Di

96
where ( x, y ) represents the coordinates of supporting region in the physical space, ( x , y )

denotes the coordinates in the unit square, Di 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
 x   y 
ϕ =  x − i  +  y − i  + c 2 , i = 1,..., N , (3.16)
 Di   Di 

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 c Di . 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

df df dx 1 df 1 N N w (j1x )
= = =
dx dx dx Di dx Di
∑ w (j1x ) fj =∑
Di
fj (3.17)
j =1 j =1

where w (j1x ) are the weighting coefficients computed in the unit square, w (j1x ) / Di are

the actual weighting coefficients in the physical domain. Clearly, when Di 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.

97
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

98
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

99
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

100
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 ( 0 ≤ x ≤ 1, 0 ≤ y ≤ 1 ),

∂ 2u ∂ 2u
+ = g ( x, y ) (3.18)
∂x 2 ∂y 2

Suppose that the exact solution is given as

5
+ cos(5.4 y )
u ( x, y ) = 4 (3.19)
6 + 6(3x − 1) 2

101
Equation (3.19) will be used to provide the Dirichlet condition on the boundary, the

function g ( x, y ) , and to validate the numerical solution. The L2 norm of relative error is

taken to measure the accuracy of numerical results, which is defined as

2
N  unumerical − uanalytical 
∑  u −8


i =1  analytical + 10 
L2 norm of relative error: (3.20)
N

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

102
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 L2 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.

103
10 points
16 points
-1.5 22 points
28 points
Log10(Relative L2 error norm)

-2

-2.5

-3

-3.5

-4
0 10 20
shape parameter c2

Figure 3.3 Log10(error) vs c 2 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,

∂ 2u ∂ 2u  ∂u ∂u 
+ 2 + u  +  = q( x, y ) (3.21)
∂x 2
∂y  ∂x ∂y 

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 q ( x, y ) and the boundary

104
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

Log10(L2 norm of relative error)


2
Shape parameter 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-

105
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

u inner _ wall = u outer _ wall = 0 , v inner _ wall = v outer _ wall = 0 (3.22)

ψ inner _ wall
= constant , ψ outer _ wall
=0 (3.23)

T inner _ wall = 1 , T outer _ wall = 0 (3.24)

106
Y

L
(0,0)
X

ε ϕ0
R
( x0 , y 0 )

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 c 2 is selected as

3.1. The numerical results for the cases with ϕ 0 = 45 0 , Ra = 3 × 105 and

( rr = 2.6 rr = L /(2 R ) ) 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

107
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

108
ε =0.95

Figure 3.5 Streamlines and isotherms for Ra = 3 × 105 , rr = 2.6 , and ϕ 0 = 450

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).

109
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).

110
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

111
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.

112
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.

113
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

114
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 ci = ciα , i = 1,L,6 ,

the index α = 1,2 scanning the spatial dimensions (see Fig. 4.2).

Figure 4.2 The FHP hexagonal lattice

115
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 ∆r = c i δ t and ruled by the exclusion principle. In a time cycle δ t , the

particles hop to the nearest neighbor pointed by the corresponding discrete vector c i .

All particles have the same mass m = 1. The particle occupation is defined by an

occupation number ni (r, t ) (a set of Boolean variables) and

ni (r, t ) = 0 particle absence at node r and time t


(4.1)
ni (r, t ) = 1 particle presence at node r and time t

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 2 6 N discrete states. The evolution

equation of the FHP LGCA is as follows:

ni (r + ∆r, t + δ t ) = ni (r, t ) + Ω i (ni (r, t ), nieq (r, t )) i = 1,L ,6 (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. nieq (r, t ) is the

local equilibrium distribution and expressed by a Fermi-Dirac distribution (Frisch et al

1987):

ρ /b
nieq (r, t ) = (4.3)
1 + e Φi

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:

Φ i = A + Bciα uα (4.4)

116
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 Ma = U / c s ( U = u and c s is the sound speed) and we have the following

truncated equilibrium distributions:

ρ ρ c iα uα ρ Qiαβ uα u β
nieq (r, t ) = + + G( ρ ) + O(u 3 ) (4.5)
b b c s2 b 2c s4

with

b − 2ρ
G( ρ ) = (4.6)
b−ρ

Qiαβ = ciα ciβ − c s2δ αβ (4.7)

c
cs = (4.8)
D

where D is the dimension. The density ρ and velocity uγ are defined as

ρ = ∑ ni (r, t ) (4.9)
i

ρu γ = ∑ c i γ n i ( r , t ) (4.10)
i

Note that ciα u β and Qiαβ uα u β 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.

117
⇒ 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.

118
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 f (r, c, t ) and written as

∂f ∂f ∂f
+c +F = Q( f ) (4.11)
∂t ∂r ∂c

where c is the particle velocity and F is the body force. Q( f ) is the collision integral

describing the two-particle collision and written as

Q( f ( f1 , f 2 )) = ∫ dc 2 ∫ σ (Ω) c1 − c 2 [ f1' f 2' − f1 f 2 ]dΩ (4.12)

σ (Ω) is the differential collision cross section for the two particle collision which

transforms the velocities from {c1 , c 2 } (incoming) into {c1' , c '2 } (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 ( Q( f ) = 0 ) and leads to the so-called detailed

balance condition:

f1' f 2' = f1 f 2 (4.13)

119
which means that any direct/inverse collision is dynamically balanced by an

inverse/direct partner. Taking logarithms of Eq. (4.13) yields:

ln f1' + ln f 2' = ln f1 + ln f 2 (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, ln f must be a function of dynamic

elementary collision invariants ψ (c) ≡ [1, c, c 2 / 2] (proportional to mass, momentum

and kinetic energy) alone. Therefore the equilibrium distribution functions are all of

the form:

1
f eq (c) = exp( A + B ⋅ c + Cc 2 ) (4.15)
2

where A, B and C are Lagrangian parameters carrying the functional dependence on

the conjugate hydrodynamic fields ρ , u, e (internal energy). The Maxwell distribution

function can be written as:

 (c − u )2 
f (r, c, t ) = ρ (2πRT )
−D / 2
eq
exp −  (4.16)
 2 RT 

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 Q( f ) . 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:

120
f − f eq
QBGK ( f ) = − (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 ni and the collision term by the continuum particle distribution function

f i and the BGK approximation, respectively.

Lattice Boltzmann equation (LBE) with BGK approximation

The lattice Boltzmann equation (LBE) with BGK models can be written as:

f i (r + e iδ t , t + δ t ) = f i (r, t ) −
1
τ
( f (r, t ) − f
i i
eq
(r, t )) (i = 0,1, L , M ) (4.18)

121
where f i is the density distribution function, which depends on position r in the

physical space, the particle discrete velocity e i and time t; f i eq 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 f i :

M M
ρ = ∑ fi ρu = ∑ f i e i (4.19)
i =1 i =1

The equation of state and kinematic viscosity are defined as (Wolf-Gladrow 2000):

P = ρc s2 (4.20)

1
υ = c s2 (τ − )δ t (4.21)
2

where υ is the kinematic viscosity and c s 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

∂f (c, r , t )
∂t
+ c ⋅ ∇f (c, r , t ) = −
1
τb
[ ]
f (c, r , t ) − f eq (c, r , t ) (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 {e i } without affecting the

conservation laws. In the discrete velocity space, the Boltzmann equation becomes

122
∂f i (r , t )
∂t
+ e i ⋅ ∇f i (r , t ) = −
1
[
f (r , t ) − f i eq (r , t )
τb i
] (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

δt
f i (r + e iδ t , t + δ t ) − f i (r, t ) = −
τb
( f i (r, t ) − f i eq (r, t )) (i = 0,1, L , M ) (4.24)

Clearly, τ in equation (4.18) is the same as τ b / δ t 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

 (c − u )2 
f eq (r, c, t ) = ρ (2πRT )− D exp −
/2

 2 RT 
 c 2 − 2c ⋅ u + u 2 
= ρ (2πRT )− D / 2 exp − 
 2 RT 
 c2   2c ⋅ u − u 2 
= ρ (2πRT )− D / 2 exp −  exp   (4.25)
 2 RT   2 RT 
 c 2  c ⋅ u (c ⋅ u) 2 u2 
= ρ (2πRT )− D / 2 exp − 
 1 + + −  + O(u 3 )
 2 RT  RT 2( RT ) 2
2 RT 
 c ⋅ u (c ⋅ u) 2 u2 
= w(c) ρ 1 + + −  + O(u 3 )
 RT 2( RT ) 2
2 RT 

From the equation of state (4.20), we know that

cs2 = RT . Therefore, along the discrete velocity direction e i , we get

123
 e ⋅ u (e ⋅ u) 2 − c 2 u 2 
= wi ρ 1 + i 2 + 
eq i s
fi (4.26)
 cs 4
2c s 
 

where wi are constants. The values of wi and c s depend on the specific choice of the

discrete velocities e i . Equation (4.26) can also be put in a tensor form

 eiα uα eiα eiβ uα u β − cs2u 2 


fi eq
= wi ρ 1 + 2 +  (4.27)
 c 2 c 4 
 s s 

Note that the repeated indexes α , β mean summation over the space dimension. The

constants wi can be defined by mass and momentum conservation, as well as isotropy:

∑ wi = 1 (4.28a)
i

∑we
i
i i =0 ═► ∑weα = 0
i
i i (4.28b)

∑ w ((e ∑ w e α uβ e β uα = c u
2
i i ⋅ u) 2 - cs2 u ) = 0 ═► i i i
2
s
2
(4.28c)
i i

∑ wi e i ⋅ e j = c s2δ ij (4.28d)
i

∑ w e ((e
2
i i j ⋅ u) 2 - cs2 u ) = 0 (4.28e)
i

Using equation (4.28) and Chapman- Enskog expansion to recover the Navier-

Stokes (N-S) equation, the constants wi 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.

124
Table 4.1 Main parameters of some DnQm DV models

Models ei wi cs2
(0) 6/12 ( i =0)
D1Q5 ( ± 1) 2/12 ( i = 1,2) 1
(± 2) 1/12 ( i = 3,4)
(0,0) 6/12 ( i =0)
D2Q7 1/12 ( i = 1,L ,6) 1/4
( ± 1,0) ,( ± 1 2 ,± 3 2 )
(0,0) 16/36 ( i=0 )
D2Q9 ( ± 1,0) ,( 0,±1) 4/36( i = 2l + 1, l = 0,L ,3) 1/3
( ± 1,±1 ) 1/36( i = 2l , l = 1,L ,4)
(0,0,0) 16/72( i = 0 )
D3Q15 ( ± 1,0,0) ,( 0,±1,0) ,( 0,±1,0) 8/72( i = 1,L ,6) 1/3
( ± 1,±1,±1 ) 1/72( i = 7,L ,14)
(0,0,0)
12/36( i = 0 )
( ± 1,0,0) ,( 0,±1,0) ,( 0,±1,0)
D3Q19 2/36( i = 1,L ,6) 1/3
( ± 1,±1,0 ),( ± 1,0,±1, ),
1/36( i = 7,L ,18)
( 0,±1,±1 )

(a) D1Q5

3
3 2 4 2

0
4 1 0
5 1

5 6 6 8
7

(b) D2Q7 (c) D2Q9

125
■ e=0
■ e=0 ● e=1
● e=1
♦ e= 2
♦ e= 3

(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

Lα1α 2 ...α n = ∑ eiα1 eiα 2 ...eiα n


i

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

Lα = ∑ eiα
i

Lαβ = ∑ eiα eiβ


i

Lαβγ = ∑ eiα eiβ eiγ


i

Lαβγζ = ∑ eiα eiβ eiγ eiζ


i

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).

126
¾ An isotropic tensor of rank 2 is proportional to δ αβ .

¾ An isotropic tensor of rank 3 is proportional to ε αβγ with ε 123 = ε 231 = ε 312 = 1,

ε 132 = ε 213 = ε 321 = −1, and zero others.

¾ There are three different (linear independent) tensors of rank 4

δ αβ δ γζ , δ αγ δ βζ , δ αζ δ βγ

which can be combined to the most general form

Lαβγζ = aδ αβ δ γζ + bδ αγ δ βζ + c δ αζ δ βγ

where a, b and c are arbitrary constants.

Generalized lattice tensors for multi-speed models

The nth rank generalized lattice tensor is defined as

Tα1α 2 ...α n = ∑ wi eiα1 eiα 2 ...eiα n


i

where wi 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 Kn = λ / L ,

namely the ratio between the molecular mean free path λ and the characteristic length

L at which macroscopic variations can be appreciated.

127
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 O( Ma 2 )

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 ( L / λ = ε −1 ).

The following multi-scale expansion will be introduced in the Chapman-Enskog

expansion

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

1
∂ t = ∑ ε j +1∂ t j (4.30)
j =0

∇ r = ε 1∇ r1 (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

∂ δ ∂ 1
( + e i ⋅ ∇) f i + t ( + e i ⋅ ∇) 2 f i + ( f − f i eq ) + O(δ t3 ) = 0 (4.32)
∂t 2 ∂t τδ t i

Using relationships (4.29-4.31) in expansion (4.32), one can obtain

Ei( 0) + εEi(1) + ε 2 Ei( 2) = 0 (4.33)

where

− f i ) /(τδ t )
(0) eq
Ei( 0) = ( f i (4.34)

128
(
Ei(1) = ∂ t0 + ei ⋅ ∇1 f i (0 ) + ) 1
τδ t
f i (1) (4.35)

δt
(
Ei(2 ) = ∂ t1 f i (0 ) + ∂ t0 + ei ⋅ ∇1 f i (1) + ) 2
(∂ t0 )( )
+ ei ⋅ ∇1 ∂ t0 + ei ⋅ ∇1 f i (0 ) +
1
τδ t
f i (2 )
(4.36)
= ∂ t1 f i (0 )
(  1 
)
+ ∂ t0 + ei ⋅ ∇1 1 −  f i (1) +
1 (2 )
fi
 2τ  τδ t

The distribution function f i is constrained by the following relationships

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

M M M M
∑ f i (j) = 0 , ∑ f i ( j) e i = 0 , ∑ ∑ f i ( 2)e i = 0
(2)
fi = 0, (4.38)
i =0 i =0 i =0 i =0

Mass Conservation

Summation of equation (4.35) over i leads to


M
∂ M (0) M
1 M (1)
∑ ∑ f i + ∇1 ⋅ ∑ e i f i + ∑f
(0)
Ei(1) = (4.39)
i =0 ∂t0 i =0 i =0 τδ t i =0 i

which can be further reduced to


ρ + ∇1 ⋅ ρu = 0 (4.40)
∂t 0

Similarly, Summation of equation (4.36) over i gives

M
∂ M M
(1)  1  1 M

∑ Ei( 2) = ∑ + ∑ ( ∂ t 0 + e i ⋅ ∇1 ) f i  1 −  + ∑f
(0) (2)
fi i , (4.41)
i =0 ∂t1 i =0 i =0  2τ  τδt i =0

Again using constraints (4.37) and (4.38), we have


ρ =0. (4.42)
∂t1

Combining Eq. (4.40) with Eq. (4.42) leads to the continuum equation


ρ + ∇ ⋅ ρu = 0 (4.43)
∂t

129
Momentum Conservation

Now consider the second moment of Eq. (4.35). For the second moment of (4.35) it is

obtained:

M M
∂ (0) n
1 M

∑ Ei(1)e i =∑ f i e i + ∑ (e i ⋅ ∇ ) f i e i + ∑f
(0) (1)
ei (4.44)
i =0 i =0 ∂t 0 i =0 τδ t i =0
i

Using equations (4.37-4.38), one can get

∂ M
ρu + ∇ ⋅ ∑ e i e i f i ( 0 ) = 0 (4.45a)
∂t 0 i =0

or in the following form


ρu + ∇ ⋅ Π ( 0) = 0 (4.45b)
∂t 0

where Π (0) is the zeroth-order momentum flux tensor,

M
Π α ,β = ∑ ei ,α ei ,β f i ( 0 )
(0)
(4.46)
i =0

For the second moment of (4.36), using Eq. (4.35), it is obtained

M M
∂ (0)  1  M ∂ (1) M 
∑ Ei(2) ei = ∑ ∂t1
f i e i + 1 −
 2τ
 ∑
 i=0 ∂t 0
f i e i + ∑ (e i ⋅ ∇) f i (1) e i  +
i =0 i =0 i =0  (4.47)
M
1
τδ t
∑ fi (2)
ei
i =0

Again using equations (4.37-4.38), we get

∂  1  M
ρu + 1 − ∇ ⋅ ∑ e i e i f i (1) = 0 (4.48a)
∂t1  2τ  i =0

or in a form

∂  1 
ρu + 1 − ∇ ⋅ Π (1) = 0 (4.48b)
∂t1  2τ 

where Π (1) is the first-order momentum flux tensor,

130
M
Π α ,β = ∑ ei ,α ei ,β f i (1)
(1)
(4.49)
i =0

To evaluate the zeroth- and first-order momentum flux tensors in Eqs. (4.45) and

(q )
(4.48), the following tensor E of order q is defined

M
= ∑ wi ei , j ei ,k ...ei ,q , j , k ,..., q =1…3
(q)
E jk ..q (4.50)
i =1

where e i , j is the projection of e i on j -axis ( j = x 1 , x 2 , or x 3 ). It can be shown that

(q )
for the D2Q9 model, E can be written as

M
= ∑ wi ei , j = 0
(1)
Ej
i =0

M
E jk (2) = ∑ wi ei , j ei ,k = c s2δ jk (4.51)
i =0

M
E jkl (3) = ∑ wi ei , j ei ,k ei ,l = 0 (4.52)
i =0

M
E jklm (4) = ∑ wi ei , j ei ,k ei ,l ei ,m = c s4 ∆ jklm (4.53)
i =0

where ∆ jklm = δ jk δ lm + δ jl δ km + δ jm δ kl ; δ jk and δ jklm are Kronecker delta with

two and four indices respectively.

(q )
Using these properties of tensor E and Eq. (4.27), it follows for zeroth- and first-

order momentum flux tensor

M
Π jk (0) = ∑ ei , j ei ,k f i (0) = c s2 ρδ jk + ρu j u k (4.54)
i =0

 eiα uα eiα eiβ uα u β − cs2u 2 


since fi = fi
0 eq
= wi ρ 1 + 2 + 
 c 2 c 4 
 s s 

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

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

131
M M
= ∑ ei , j ei ,k f i = −τδ t ∑ ei , j ei ,k Dt0 f i
(1) (1) (0)
Π jk
i =0 i =0
(4.55a)
 ∂ M

= −τδ t  Π jk + ∇1 ⋅ ∑ ei , j ei ,k ei ,l f i ( 0) 
(0)

 ∂t 0 i =0 

Since

M M
1
∇1 ⋅ ∑ ei , j ei ,k ei ,l f i ( 0)
= 2 ∇1 ⋅ ρ ∑ wi ei , j ei ,k ei ,l ei ,m u m
i =0 cs i =0

= c ∇1 ⋅ ρ∆ jklm u m = cs2 ∂ xl ( ρδ jk δ lm + ρδ jl δ km + ρδ jmδ kl )u m


2
s

∂u j ∂u k ∂ρ ∂ρ ∂ρ
= ρcs2 (δ jk ∇1 ⋅ u + + ) + cs2δ jk u m + cs2 (u j + uk )
∂xk ∂x j ∂xm ∂xk ∂x j

∂ ( 0) ∂
∏ jk = ( ρcs2δ jk + ρu j u k )
∂t0 ∂t0
∂ ∂ ∂ ∂
= cs2δ jk ρ + uj ( ρu k ) + u k ( ρu j ) − u j u k ρ
∂t 0 ∂t 0 ∂t 0 ∂t0
∂ ∂ ∂ ∂ ∂
= (cs2δ jk − u j u k ) ρ + u j [− ( ρcs2 ) − ( ρu k u m )] + u k [− ( ρcs2 ) − ( ρu j u m )]
∂t 0 ∂xk ∂xm ∂x j ∂xm
∂ ∂ρ ∂ρ ∂ ∂ ∂
= cs2δ jk ρ − cs2 (u j + uk )− ( ρu j uk u m ) − u j u k [ ρ+ ( ρu m )]
∂t 0 ∂xk ∂x j ∂xm ∂t0 ∂xm
∂ ∂ρ ∂ρ ∂
= cs2δ jk ρ − cs2 (u j + uk )− ( ρu j uk u m )
∂t 0 ∂xk ∂x j ∂xm
∂ ∂ρ ∂ρ ∂
= −cs2δ jk ( ρu m ) − cs2 (u j + uk )− ( ρu j u k u m )
∂xm ∂xk ∂x j ∂xm
∂ ∂ρ ∂ρ ∂
= − ρcs2δ jk ∇1 ⋅ u - cs2δ jk u m ρ − cs2 (u j + uk )− ( ρu j u k u m )
∂xm ∂xk ∂x j ∂xm

therefore, we have

 1  M M
1 − Π jk = ∑ ei , j ei ,k f i = −τδ t ∑ ei , j ei ,k Dt0 f i
(1) (1) (0)

 2τ  i =0 i =0

 1   ∂u ∂u j  
 − ∂ ( ρu j u k u m ) + O( Ma 2 )
= −τδ t 1 −  cs2 ρ  k + (4.55b)
 2τ    ∂x 
 j ∂xk  ∂xm 
 1   ∂u ∂u j 
≈ −cs2 ρτδ t 1 −   k +  + O( Ma )
2

 2τ   ∂x j ∂xk 

(Note that ∂ ( ρu j u k u m ) / ∂xm is considered very small, and is ignored)

Combining Eqs. (4.45) with (4.48), we can get:

132
∂ρu
+ ∇( ρuu) = −∇P + ρν∇ 2 u (4.56)
∂t

where ν is kinematic viscosity given by

2τ − 1
ν= δt (4.57)
6

and c s = 1 / 3 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

∇ ⋅u = 0 (4.58)

∂u 1
+ u ⋅ ∇u = − ∇P + ν ∇ 2 u (4.59)
∂t ρ

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.

f i〉


f i〈
Fluid Domain

Figure 4.4 Sketch of boundary condition

133
Generally, formulating boundary conditions in the LBM consists of finding an

appropriate relation between the incoming (unknown) distribution functions (denoted

as f i 〈 ) and the outgoing (known) ones (denoted as f i〉 ). 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

e i ⋅ n > 0 and e i ⋅ n < 0 , (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:

f i 〈 ( x ) = ∑∑ Π ij ( x − y ) f j〉 ( y ) (4.61)
y j

where the kernel Π ij (x − y ) 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.

134
4 3 2
0 U
5 1
4 3 2
4 3 2
0 6 7 8
5 1 0
Flow direction 5 1
6 7 8 4 3 2
6 7 8
Y 0
5 1

X 6 7 8

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:

f i 〈 ( B1 ) = f j〉 ( B2 ) (4.62a)

f i 〈 ( B2 ) = f j〉 ( B1 ) (4.62b)

where B1 and B2 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:

i (〈, B1 ) = {1, 2, 8} j (〉 , B2 ) = {1, 2, 8} (4.63a)

j (〈, B2 ) = {4, 5, 6} i (〉, B1 ) = {4, 5, 6} (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-

135
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:

f i 〈 ( B) = f j〉 ( B) (4.64)

Here e i = −e j . 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)):

 f 2〈   1 0 0   f 6〉 
 〈   〉 
 f 3  =  0 1 0  f 7  (4.65)
 f 〈   0 0 1  f 〉 
 4   8 

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:

1 1 1   f 6〈   ρ   1 1 1  f 0  1 1 1   f 2〉 
  〈         〉 
 − 1 0 1   f 7  =  ρu x  −  0 1 − 1 f1  − 1 0 − 1  f 3  (4.66)
 − 1 − 1 − 1  f 〈   ρu   0 0 0  f  1 1 1   f 〉 
  8   y    5    4 

136
Initially the tangential momentum conservation is ensured by setting f1 = f5 and the

distributions f0, f1, f5 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:

f i = f i eq ( ρ in , u in ) (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:

f i ( Boutlet ) = 2 f i ( B1 ) − f i ( B2 ) (4.68)

where B1 and B2 represent the first and second rows next to the outlet boundary Boutlet.

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.

137
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

u=U v=0

u=0 u=0
v=0 v=0

u=0 v=0

Figure 4.6 Sketch of Lid-driven cavity flow

u = u / c, ( x , y ) = ( x / L, y / L ) , ρ = ρ / ρ0 , t = tc / ∆ x (4.69)

where c = ∆ x / ∆t 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:

138
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

xi , j = (i − 1) /(Imax− 1)
y i , j = ( j − 1) /(Imax− 1)

then

δ t = ∆x = ∆y = 1 /(Imax− 1) ───────── Time step

2. Set basic computational parameters

Kp=8 ───────── Particle velocity number of D2Q9 model with particle

velocity:

0 α =0

eα = (cos[(α − 1)π / 2], sin[(α − 1)π / 2]) α = 1,2,3,4

 2 (cos[(α − 5)π / 2 + π / 4], sin[(α − 5)π / 2 + π / 4]) α = 5,6,7,8

Re=100 ───────── Reynolds number (flow parameter)

U=0.1 ───────── Lid velocity

Then

1 6 Re
τ= ( + 1) ───────── Relxation parameter (L = 1)
2 Uδ t

c s2 = 1 / 3

3. Set Initial Field

t=0

(i = 1, Imax; j = 1, Imax)

ρ i , j = 1 ───────── Initial density ρ

u(u,v)i , j ( j ≠ Imax) = 0 ; u i ,imax = U , vi ,imax = 0 ───── Initail velocity field

Then assuming

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

with

 eα ⋅ u i,j eα ⋅ u i,j ( )2 u i,j 


2
fαeq
(i, j , t = 0) = wα ρ 1 + + − 2
 c s2 2c s4 2c s 

(for value of wα , see Table 4.1)

4. Iteration procedure

t = t + δt

¾ Streaming:

α = 0: f 0 (i, j , t + δ t ) = f 0 (i, j , t ) (i = 1, Imax; j = 1, Imax-1);

α = 1: f1 (i, j , t + δ t ) = f1 (i − 1, j , t ) (i = 2, Imax; j = 1, Imax-1);

α = 2: f 2 (i, j , t + δ t ) = f 2 (i, j − 1, t ) (i = 1, Imax; j = 2, Imax-1);

α = 3: f 3 (i, j , t + δ t ) = f 3 (i + 1, j , t ) (i = Imax-1, 1; j = 1, Imax-1);

α = 4: f 4 (i, j , t + δ t ) = f 4 (i, j + 1, t ) (i = 1, Imax; j = Imax-1, 1);

α = 5: f 5 (i, j , t + δ t ) = f 5 (i − 1, j − 1, t ) (i = 2, Imax; j = 2, Imax-1);

α = 6: f 6 (i, j , t + δ t ) = f 6 (i + 1, j − 1, t ) (i = Imax-1; 1, j = 2, Imax-1);

α = 7: f 7 (i, j , t + δ t ) = f 7 (i + 1, j + 1, t ) (i = Imax-1; 1, j = Imax-1, 1);

α = 8: f 8 (i, j , t + δ t ) = f 8 (i − 1, j + 1, t ) (i = 2, Imax; j =Imax-1, 1);

¾ Collision:

1
f α (i, j , t + δ t ) = f α (i, j , t + δ t ) − ( f α (i, j , t + δ t ) − f αeq (i, j , t + δ t ))
τ

( α = 0,L , Kp ; i = 1, Imax; j = 1, Imax-1);

Note that the collision is made at the same time level.

140
¾ Boundary Condition (Fig. 4.7):

f α =0L9 (i, imax) = f αeq=0L9 (i, ima

f6 f2 f5 = f7 f 6 = f8 f2 f5

f3 f1 = f 3 f1
f3 = f

f7 f4 f8 = f 6
f7 = f5 f4 f8

f 6 = f 6eq f 2 = f 4f 5 = f 7 f 6 = f8 f 2 = f 4 f 5 = f 7 f 6 = f 8 f 2 = f 4f 5 = f 5eq

f1 = f 3 f3 f1 f 3 = f1 f1
f3
f8
f7 f4 f 8 = f 8eq f7 f4 f8 f 7 = f 7eq f 4

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

j = Imax: f α (i, j , t + δ t ) = f αeq (i, j , t = 0) , ( α = 0L 8 ; i = 1, Imax )

f 5 (i, j , t + δ t ) = f 7 (i, j , t + δ t )
j = 1: f 2 (i, j , t + δ t ) = f 4 (i, j , t + δ t ) ( i = 2, I max − 1 )
f 6 (i, j , t + δ t ) = f 8 (i, j , t + δ t )

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

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

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

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

¾ Calculating macroscopic variables:

Kp
ρ i , j = ∑ f α (i, j , t + δ t )
α =0
Kp
u i , j = ∑ f α (i, j , t + δ t )eα , x / ρ
α =0 (i = 1,Imax; j = 1,Imax-1)
Kp
vi , j = ∑ f α (i, j , t + δ t )eα , y / ρ
α =0

Pi , j = ρ i , j c s2

and

ρ i ,Imax = 1
u i ,Imax = U
(i = 1,Imax)
vi ,Imax = 0
Pi ,Imax = c s2

¾ Calculating new equilibrium:

 eα ⋅ u i,j eα ⋅ u i,j ( )2 u i,j 


2
fαeq
(i, j , t + δ t ) = wα ρ 1 + 2
+ − 2
 cs 2c s4 2c s 

(i = 1,Imax; j = 1,Imax-1); (value of wα refers to Table 4.1)

142
¾ Set convergent critiria:

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


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

(i = 1,Imax; j = 1,Imax-1)

If Error > 10 −6 , 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:

vi , j / U for i=1, Imax and j=(Imax-1)/2+1

u i , j / U for i=(Imax-1)/2+1 and j=1,Imax

Normalized stream function in the flow field:

1 ui, j 1 vi , j
ψ i, j = ∫ dy or −∫ dx (i = 1,Imax; j = 1,Imax)
0 U 0 U

Normalized vorticity function in the flow field:

 ∂u   ∂v 
ωi , j =   −   (i = 1,Imax; j = 2,Jmax)
 ∂y  i , j  ∂x  i , j

The following Figs. 4.8-4.9 are typical results obtained by the LBM and their

comparison with the Navier-Stokes solution.

143
1 0.6
Ghia's data
0.8 0.4
Present
0.2 result
0.6
0
0.4 Ghia's data
-0.2
Present
0.2 result -0.4

0 -0.6
-0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
U-Y X-V

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”, 3rd

Edn., Cambridge University Press, 1990.

144
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.

145
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).

146
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

147
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

148
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,

∂fα ∂fα ∂fα fαeq ( x, y, t ) − fα ( x, y, t )


+ eαx + eαy = (5.1)
∂t ∂x ∂y τ ⋅δt

[ ]
{recall f α ( x + eαxδt , y + eαyδt , t + δt ) = f α ( x, y , t ) + f αeq ( x, y , t ) − f α ( x, y , t ) / τ }

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.

149
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

∂f α ( x + δx, y + δy, t + δ t ) ∂f ( x + δx, y + δy, t + δ t )


f α ( x + δx, y + δy, t + δ t ) + (eαxδ t − δx ) + (eαyδ t − δy ) α
∂x ∂y
1 ∂ 2 f α ( x + δx, y + δy, t + δ t ) 1 2 ∂ f α ( x + δx, y + δy , t + δ t )
2 (5.2)
+ (eαxδ t − δx ) 2 + ( e δ
αy t − δy )
2 ∂x 2 2 ∂y 2
∂ 2 f α ( x + δx, y + δy, t + δ t )
+ (eαxδ t − δx )(eαyδ t − δy )
∂x∂y
[ ]
= f α ( x, y, t ) + f αeq ( x, y, t ) − f α ( x, y, t ) / τ

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 ( x A , y A , t ) , point A' represent the position

( x A + eαxδ t , y A + eαy δ t , t + δ t ) , and point P represent the position ( x P , y P , t + δ t )

with x P = x A + δx, y P = y A + δy . According to LBE, we have

150
[ ]
f α ( A' , t + δ t ) = f α ( A, t ) + f αeq ( A, t ) − f α ( A, t ) / τ (5.3)

[ ]
{recall f α ( x + eαxδt , y + eαyδt , t + δt ) = f α ( x, y , t ) + f αeq ( x, y , t ) − f α ( x, y , t ) / τ }

C' E'

C B' E P'

B P
A' D'

A D

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,

f α ( A' , t + δ t ) can be approximated by the corresponding function and its derivatives at

the mesh point P as

∂fα ( P, t + δ t ) ∂f ( P, t + δ t )
fα ( A' , t + δ t ) = fα ( P, t + δ t ) + ∆x A + ∆y A α + O[(∆x A ) 2 , (∆y A ) 2 ]
∂x ∂y

(5.4)
where ∆x A = x A + eαx δ t − x P , ∆y A = y A + eαy δ t − y P . Note that the above approximation

has a truncation error of the second order. Substituting equation (5.4) into equation (5.3)

gives

∂f α ( P, t + δ t ) ∂f ( P, t + δ t ) f eq ( A, t ) − f α ( A, t )
f α ( P, t + δ t ) + ∆x A + ∆y A α = f α ( A, t ) + α
∂x ∂y τ
(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, ∆x A = ∆y A = 0 ,

equation (5.5) is reduced to the standard LBE. Solving equation (5.5) can provide the

151
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:

du
= f (u, t ), u = u0 , when t = 0 (5.6)
dt

Taylor series method:

n n n
 du  h 2  d 2u  h 3  d 3u 
u n +1
= u + h  +  2  +  3  + .... , h = ∆t
n
(5.7)
 dt  2  dt  6  dt 

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

152
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 P, B at the time

level t will stream to the new positions P' , B' at the time level t + δ t . The distribution

functions at these new positions can be computed through the standard LBE, which are

given below

[ ]
f α ( P' , t + δ t ) = f α ( P, t ) + f αeq ( P, t ) − f α ( P, t ) / τ (5.8)

[ ]
f α ( B' , t + δ t ) = f α ( B, t ) + f αeq ( B, t ) − f α ( B, t ) / τ (5.9)

Using Taylor series expansion with truncation to the first order derivative

terms, f α ( P' , t + δ t ) , f α ( B' , t + δ t ) 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

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

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

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

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

Equations (5.5), (5.10) and (5.11) form a system to solve for three unknowns.

The solution of this system gives

f α ( P, t + δ t ) = ∆ P / ∆ (5.12)

where ∆ = ∆x A ∆y B − ∆x B ∆y A + ∆x B ∆y P − ∆x P ∆y B + ∆x P ∆y A − ∆x A ∆y P

∆ P = (∆x A ∆y B − ∆x B ∆y A ) gα , P + (∆x B ∆y P − ∆x P ∆y B ) gα , A + (∆x P ∆y A − ∆x A ∆y P ) gα , B

[ ]
gα , P = fα ( P, t ) + fαeq ( P, t ) − fα ( P, t ) / τ

[ ]
gα , A = fα ( A, t ) + fαeq ( A, t ) − fα ( A, t ) / τ

[ ]
gα , B = fα ( B, t ) + fαeq ( B, t ) − fα ( B, t ) / τ

It should be noted that gα ,P , gα , A and gα ,B 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 P, A, B, C , D, E at the time level t will

stream to positions P ' , A' , B ' , C ' , D' , E ' at the time level t + δ t . The distribution

functions at these new positions can be computed through the standard LBE. Then by

154
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
g α :i = {sα :i }T {Vα } = ∑ sα :i , jVα : j i = P, A, B, C , D, E (5.13)
j =1

where

( )
gα :i = fα ( xi , yi ,t ) + fαeq ( xi , yi ,t ) − fα ( xi , yi ,t ) / τ

{sα :i }T = {1, ∆xi , ∆yi , (∆xi ) 2 / 2, (∆yi ) 2 / 2, ∆xi ∆yi }

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

gα :i is the post-collision state of the distribution function fα at the ith point and the

time level t, {sα :i }T 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, sα :i , j is the jth element of the vector {sα :i }T and Vα : j is the

jth element of the vector {Vα } . Our target is to find its first element

Vα :1 = f α ( P, t + δ t ) . Equation system (5.13) can be put into the following matrix form

[ Sα ]{Vα } = {gα } (5.14)

where {gα } = {gα :P , gα : A , gα :B , gα :C , gα :D , gα :E }T

{sα :P }T  1 ∆x P ∆y P (∆x P ) 2 / 2 (∆y P ) 2 / 2 ∆x P ∆y P 


 T   
{sα : A }  1 ∆x A ∆y A (∆x A ) 2 / 2 (∆y A ) 2 / 2 ∆x A ∆y A 
{sα :B }T  1 ∆x B ∆y B (∆x B ) 2 / 2 (∆y B ) 2 / 2 ∆x B ∆y B 
[ Sα ] = [ sα :i , j ] =  T 
= 
{sα :C }  1 ∆xC ∆y C (∆xC ) 2 / 2 (∆y C ) 2 / 2 ∆xC ∆y C 
{s }T  1 ∆x D ∆y D (∆x D ) 2 / 2 (∆y D ) 2 / 2 ∆x D ∆y D 
 α :D T   
{sα :E }  1 ∆x E ∆y E (∆x E ) 2 / 2 (∆y E ) 2 / 2 ∆x E ∆y E 

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

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

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

The expressions of ∆x P , ∆y P , ∆x A , ∆y A , ∆x B , ∆y B 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 i = 0 , and its

adjacent points be represented by index i = 1,2,..., N , 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
errα :i = g α :i − ∑ sα :i , jVα : j i = 0,1,2,..., N (5.15)
j =1

The square sum of all the errors is defined as

156
2
N  N 6 
Eα = ∑ err = ∑  g α :i − ∑ sα :i , jVα : j 
2
α :i (5.16)
i =0 i =0  j =1 

To minimize the error Eα, we need to set ∂Eα / ∂Vα : j = 0, j = 1,2,...,6 , which leads to

[ Sα ]T [ Sα ]{Vα } = [ Sα ]T {gα } (5.17)

where [Sα] is a ( N + 1) × 6 dimensional matrix, which is given as

 1 ∆x0 ∆y 0 (∆x0 ) 2 / 2 ∆x0 ∆y 0 


(∆y 0 ) 2 / 2
 
 1 ∆x1 ∆y1 (∆x1 ) / 2 (∆y1 ) / 2 ∆x1 ∆y1 
2 2

− − − − − − 
[ Sα ] =  
− − − − − − 
− − − − − − 
 
 1 ∆x N ∆y N (∆x N ) 2 / 2 (∆y N ) 2 / 2 ∆x N ∆y N  ( N +1)×6

and {gα } = {gα :0 , gα :1 ,..., gα :N }T

The ∆x and ∆y values in the matrix [Sα] are given as

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

∆xi = xi + eαx δ t − x0 ∆y i = y i + eαy δ t − y 0 i = 1,2,..., N (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
{Vα } = [ Sα ]T [ Sα ] [ Sα ]T {g α } = [ Aα ]{g α } (5.19)

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

N +1
f α ( x0 , y 0 , t + δ t ) = Vα :1 = ∑ aα :1, j g α : j −1 (5.20)
j =1

157
where aα :1, j 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

f αeq (x, t ) − f α ( x, t )
f α ( x + eα δ t , t + δ t ) = f α (x, t ) + (5.21)
τ

Using Taylor series expansion, we have

∂f α ∂f δ ∂ 2 f α (eα δ t ) 2 ∂ 2 f α
2

f α ( x + eα δ t , t + δ t ) = f α ( x, t ) + δ t
+ eα δ t α + t + +
∂t ∂x 2 ∂t 2 2 ∂x 2
∂ 2 fα δ t  ∂ 3 fα 3 ∂ fα 
3
∂3 f ∂ 3 fα 3
eα δ t
2
+  3 + 3eα 2 α + 3eα2 + e  + ...
6  ∂t ∂x 3 
α
∂t∂x ∂t ∂x ∂t∂x 2

(5.22)

With equation (5.22), the standard LBE is equivalent to

∂f α δ t  ∂ 2 f α 2 ∂ fα 
2
∂f α ∂ 2 fα 2
f αeq − f α
δt + eα δ t +  + 2eα + eα  = + O( δ t )
3

∂t ∂x 
2  ∂t 2
∂t∂x 2 
∂x  τ

158
(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

∂f α (eα δ t − δx ) ∂ 2 f α f αeq ( x, t ) − f α ( x, t )
2

f α ( x + δx, t + δ t ) + (eα δ t − δx ) + = f α ( x , t ) +
∂x 2 ∂x 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 xi is considered. The three equations can

be obtained by applying the Taylor series expansion at the three positions streamed

respectively from mesh points xi −1 , xi , xi +1 . Solving the three equations, we can get the

solution as

f α ( xi , t + δ t ) = aα :i g α :i (t ) + aα :i −1 g α :i −1 (t ) + aα :i +1 g α :i +1 (t ) (5.25)

f αeq ( xi , t ) − f α ( xi , t )
where g α :i (t ) = f α ( xi , t ) +
τ

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

ri = ( xi − xi −1 ) /(eα δ t ) , ri +1 = ( xi +1 − xi ) /(eα δ t )

Using the second order Taylor series expansion, equation (5.25) can be reduced to

∂f α δ t2 ∂ 2 f α ∂g i (eα δ t ) 2 ∂ 2 g i
f α ( xi , t ) + δ t + = g i (t ) − e δ
α t + + O[δ t3 ] (5.26)
∂t 2 ∂t 2 ∂x 2 ∂x 2

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

159
f αeq ( xi , t ) − f α ( xi , t )
g i (t ) = f α ( xi , t ) + = f α ( xi + eα δ t , t + δ t )
τ (5.27)
∂f ∂f
= f α ( xi , t ) + δ t α + eα δ t α + O(δ t2 )
∂t ∂x

Differentiating equation (5.27) with respect to x gives

∂g i ∂f ∂ 2 fα ∂ 2 fα
eα δ t = eα δ t α + eα δ t2 + (eα δ t ) 2 + O(δ t3 ) (5.28a)
∂x ∂x ∂t∂x ∂x 2

∂ 2 gi 2 ∂ fα
2
(eα δ t ) 2
= (eα δ t ) + O(δ t3 ) (5.28b)
∂x 2
∂x 2

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

(eα δ t )3
− [ri (1 + ri +1 ) − ri +1 ] (5.29)
6

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 ( ri ≠ ri +1 ) 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 xi 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

160
points xi −1 , xi , xi +1 . To apply the least squares approach, the Taylor series expansion is

applied at four positions, which are streamed respectively from four mesh

points xi −1 , xi , xi +1 , xi −2 . 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 
 4 a b  f α ( xi , t + δ t )
 ∑ g α :i + k −3 
 2    k =1 
 a 1  ∂f α ( xi , t + δ t )   4 
b c eα δ t =  ∑ δ k g α :i + k −3  (5.30)
 2  ∂x 
  4 
k =1
1 1 1  ∂ 2
f ( x , t + δ )
 b c d  (eα δ t ) 2 α i t
  ∑ δ k g α :i + k −3 
 2
2 2 4  ∂x 2   k =1 

4 4 4 4
where a = ∑ δ k , b = ∑ δ k2 , c = ∑ δ k3 , d = ∑ δ k4
k =1 k =1 k =1 k =1

eα δ t − ( xi − xi − 2 ) eα δ t − ( xi − xi −1 )
δ1 = = 1 − ri − ri −1 , δ2 = = 1 − ri
eα δ t eα δ t

eα δ t eα δt − ( xi − xi +1 )
δ3 = = 1, δ4 = = 1 + ri +1
eα δ t eα δt

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

f α ( xi , t + δ t ) =
1 4
[
∑ (bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) gα :i+k −3
∆ k =1
] (5.31)

where ∆ = (bc − ad )(4b − a 2 ) − (b 2 − ac)(4c − ab) . Using Taylor series expansion,

g i+k −3 can be expressed as

∂g α :i ( xi + k −3 − xi ) 2 ∂ 2 g α :i ( xi + k −3 − xi ) 3 ∂ 3 g α :i
g α :i + k −3 = g α :i + ( xi + k −3 − xi ) + +
∂x 2 ∂x 2 6 ∂x 3
∂g (δ − 1) 2 ∂ 2 g α :i (δ k − 1) 3 3 ∂ g α :i
3
= g α :i + (δ k − 1)eα δ t α :i + k (eα δ t ) 2 + ( e δ
α t )
∂x 2 ∂x 2 6 ∂x 3

(5.32)

161
By substituting equation (5.32) into equation (5.31), we obtain

∂gα :i (e δ ) 2 ∂ 2 gα :i (eα δ t ) 3 ∂ 3 gα :i
f α ( xi , t + δ t ) = s1 gα :i + s 2 eα δ t + s3 α t + s 4 (5.33)
∂x 2 ∂x 2 2 ∂x 3

where s1 =
1 4

∆ k =1
[(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) ]

s2 =
1 4

∆ k =1
[ ]
(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) (δ k − 1)

s3 =
1 4

∆ k =1
[ ]
(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) (δ k − 1) 2

s4 =
1 4

∆ k =1
[ ]
(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) (δ k − 1) 3

Furthermore, from the definition of a, b, c, d , we have

1 4 4

s1 = 
∆
(bc − ad ) ∑
k =1
(b − a δ k ) − (b 2
− ac ) ∑
k =1
(c − aδ k2 )
 (5.34a)
1
[
= (bc − ad )(4b − a 2 ) − (b 2 − ac)(4c − ab) = 1

]

1 4 4

s2 = 
∆
(bc − ad ) ∑
k =1
( −b + (b + a )δ k − aδ 2
k ) − (b 2
− ac ) ∑
k =1
(cδ k − c − a(δ k3 − δ k2 )

=
1

[
(bc − ad )(−4b + (b + a)a − ab) − (b 2 − ac)(ac − 4c − a(c − b)) = −1 ]

(5.34b)

1 4
s3 =
∆ 
(bc − ad ) ∑
k =1
{b(δ k2 − 2δ k + 1) − a(δ k3 − 2δ k2 + δ k )} −

4

(b 2 − ac)∑ {c(δ k2 − 2δ k + 1) − a(δ k4 − 2δ k3 + δ k2 )}
k =1 
=
1

[
(bc − ad ){b(b − 2a + 4) − a (c − 2b + a )} − (b 2 − ac){c(b − 2a + 4) − a(d − 2c + b)} = 1 ]
(5.34c)

162
1 4
s4 = 
∆
(bc − ad ) ∑
k =1
{b(δ k2 − 2δ k + 1) − a (δ k4 − 2δ k3 + δ k2 )} −

4

(b 2 − ac)∑ {c(δ k2 − 2δ k + 1) − a (δ k5 − 2δ k4 + δ k3 )} (5.34d)
k =1 
1 4

= −1 + 
∆
(bc − ad ) 2
− (b 2
− ac )( c 2
− a ∑
k =1
δ k5 )

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 = U ∞ D / υ ), 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 D /( 2U ∞ ) , is

equal to 0.00375, and the maximum grid stretch ratio rmax (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

163
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

u = u / c, ( x, y ) = ( x / R, y / R ) , ρ = ρ / ρ0 , t = tc / ∆ rmin (5.35)

In the application, M is taken as 8 for convenience. As shown in Fig. 5.6, for an

internal mesh point (i, j ) , 8 neighboring points are taken as (i − 1, j − 1) ; (i − 1, j ) ;

(i − 1, j + 1) ; (i, j − 1) ; (i, j + 1) , (i + 1, j − 1) ; (i + 1, j ) ; (i + 1, j + 1) . Therefore, at each

mesh point, we only need to store 9 coefficients a1,k , k = 1,2,...,9 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 ( α = 1,2,...,8 ).

U∞ θ Periodic BC

x
R

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

164
Figure 5.5 Computational mesh for flow around a circular cylinder

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

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

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

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

xi , j = r cos(2πξ )
y i , j = −r sin( 2πξ )

with

165
 1 
r = r0 + ( r∞ − r0 )1 − tan −1 [(1 − η ) tan( χ )]
 χ 

ξ = (i − 1) /(Imax− 1)
η = ( j − 2) /(Jmax − 2)

where r0=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

δ t = δ rmin = rη =1 /(Jmax −1) − r0 ───── 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:

0 α =0

eα = (cos[(α − 1)π / 2], sin[(α − 1)π / 2]) α = 1,2,3,4

 2 (cos[(α − 5)π / 2 + π / 4], sin[(α − 5)π / 2 + π / 4]) α = 5,6,7,8

Re=20 ───── Reynolds number (flow parameter)

U=0.15 ───── Flow velocity

Then

1 6 Re
τ= ( + 1) ───── Relxation parameter(D = 2)
2 UDδ t

c s2 = 1 / 3

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)

166
c ********* Variable illustrations*****************************
c am(6,9)---------------------------------Matrix [Sα ]
c amt(6,9)--------------------------------Transpose of Matrix [Sα ] , that is [Sα ]T
c dmt(6,6)-------------------------------- Multiplication and inverse of Matrix
c [Sα ] and [Sα ]T , that are [Sα ]T [Sα ] and
c ([S α ]T [Sα ])
−1
, 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 f α ( x0 , y 0 , t + δ t )
c af(9),bf(9)------------------------------Variables of ∆x0 and ∆y 0 , respectively
c x(241,181),y(241,181)---------------Cartesian coordinates of xi , j , y i , j
c uc(8),vc(8)-----------------------------partcle discrete velocity components
c eαx , eαy for α = 1,L ,8
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)

167
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 [Sα ]T
do 4 n=1,6
amt(n,m)=am(m,n)
4 continue
c---------------------------------------------------------
5 continue
c --------Multiplication of Matrix [Sα ] and [Sα ]T , that is [Sα ]T [Sα ]
call abmt(amt,am,dmt)
(
c------Computing the inverse of the Matrix dmt(6,6), that is [Sα ]T [Sα ] )−1

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 [Sα ]T
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

168
c ( )−1
[Aα ] and [Aα ] = [Sα ]T [Sα ] [Sα ]T
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 ( )
[Sα ]T [Sα ]
−1

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

169
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 ρ

ρ i, j = 1

Initail velocity field

170
u(u,v)i , j =2 = 0 ;

u i , j ( j > 2 ) = U , vi , j ( j > 2 ) = 0

Then assuming

f α (i, j , t = 0) = f αeq (i, j , t = 0) ( α = 0L 8 ;i = 1, Imax; j = 2, Imax)

f1 (i,1, t = 0) = f 3 (i,3, t = 0)
f 2 (i,1, t = 0) = f 4 (i,3, t = 0)
f 3 (i,1, t = 0) = f1 (i,3, t = 0)
f 4 (i,1, t = 0) = f 2 (i,3, t = 0)
( α = 0L 8 ;i = 1, Imax)
f 5 (i,1, t = 0) = f 7 (i,3, t = 0)
f 6 (i,1, t = 0) = f 8 (i,3, t = 0)
f 7 (i,1, t = 0) = f 5 (i,3, t = 0)
f 8 (i,1, t = 0) = f 7 (i,3, t = 0)

 eα ⋅ u i,j eα ⋅ u i,j ( )2 u i,j 


2
fαeq
(i, j , t = 0) = wα ρ 1 + + − 2
 c s2 2c s4 2c s 

(value of wα refers to Table 4.1)

Computational sequence

Flow Chart of Computation


Input ρ, U , Re, eα M +1
fα ( x0 , y0 , t + δt ) = ∑ a1,k gk −1
k =1

Calculating Geometric Parameter


and physical parameters
( a 1 , k , τ N=0 ) M M
ρU = ∑ fα eα
ρ = ∑ fα
α =0 α =0

N=N+1 No
Convergence ?

YES
Calculating fαeq
OUTPUT

Figure 5.7 Flow Chart

171
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 Cd around the circular cylinder ( C d = 2F ⋅ X /( ρU 2 D) and

F = ∫ [− pI + ρυ (∇ U + U ∇ )] ⋅ n dl ; n is the normal vector of the cylinder

surface)

Normalized stream function in the flow field:

r∞ u r (i, j )
ψ i, j = ∫ dr u r = u cos(2π ξ ) − v sin( 2πξ )
r0 U

(i = 1,Imax; j = 2,Jmax)

Normalized vorticity function in the flow field:

 ∂u   ∂v 
ωi , j =   −   (i = 1,Imax; j = 2,Jmax)
 ∂y  i , j  ∂x  i , j

Some typical results of TLLBM are shown in Figs. 5.8-5.9.

5
L
4
Re=40
3

1 Re=20

0
0 4 8 t 12 16 20 24

Figure 5.8 Time evolution of the wake length for different Reynolds numbers (♦

Experimental data by Coutanceu & Bouard (1977 a,b); — TLLBM results)

172
(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.

173
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).

174
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

175
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.

176
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 eq
∂ t f + (e • ∇ ) f = − +F (6.1)
τv

g − g eq
∂ t g + (e • ∇ )g = − − f (e − u ) • [∂ t u + (u • ∇ )u] (6.2)
τc

G • (e − u ) eq
where F = f and G is the external force acting on the unit mass.
RT

By adopting second-order integration for the above two equations, we can get

f α ( x + eα δ t , t + δ t ) − f α ( x, t ) = −
δt
τ v + 0.5δ t
[f α ( x, t ) − fαeq ( x, t )] + τ v Fα δ t
τ v + 0.5δ t
(6.3)

g α ( x + eα δ t , t + δ t ) − g α ( x, t ) = −
δt
[g α ( x, t ) − gα eq ( x, t )] − τ c fα ( x, t )qα δ t
τ c + 0.5δ t τ c + 0.5δ t

(6.4)

where

δt δ
f α = fα +
2τ v
( fα − fαeq ) − t Fα
2

δt δ
g α = gα +
2τ c
(gα − gαeq ) + t fα qα
2

τ ν fα + 0.5δ t fαeq + 0.5δ tτ ν Fα


fα =
τ ν + 0.5δ t

177
1 
qα = (eα − u ) •  (− ∇p + ∇ • Π ) + (eα − u ) • ∇u
ρ 

∏ = ρυ (∇u + u∇ )

G • (eα − u ) eq
Fα = fα
RT

When D2Q9 DV model is used, the equilibrium distribution functions for the density

and internal energy density distributions are given as:

 3e • u 9(e • u )2 3u 2 
fαeq = wα ρ 1 + α 2 + α 4 − 2 (6.5)
 c 2c 2c 

where w0 = 4 / 9 , wα = 1 / 9 for α =1,2,3,4, wα = 1 / 36 for α =5,6,7,8

2 ρε u 2
g 0eq = − (6.6a)
3 c2

g1eq, 2,3, 4 =
ρε 
1 . 5 + 1 . 5
eα • u
+ 4 . 5
(eα • u ) − 1.5 u 2 
2
(6.6b)
 
9  c2 c4 c2 

=
ρε  eα • u (eα • u ) − 1.5 u 2 
2

3 + 6 2 + 4.5
eq
g 5.6.7.8  (6.6c)
36  c c4 c2 

where ε = RT

Then the macroscopic density, velocity and temperature are calculated by

ρ =∑fα (6.7a)
α

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

δt
ρε = ∑ gα − ∑ fα qα (6.7c)
α 2 α

The kinetic viscosity and thermal conductivity are determined from

υ = τ v RT α = 2τ c RT (6.8)

178
Using the Chapman-Enskog expansion, the IEDDF thermal model can recover the

correct continuity, momentum and energy equations at the NS level:

∂ t ρ + ∇ • (ρ u ) = 0 (6.9a)

ρ [∂ t u + (u • ∇ )u] = −∇p + ∇ • ∏ (6.9b)

∂ t (ρε ) + ∇ • (ρ uε ) = ∇ • (ρχ∇ε ) + ∏ : ∇u− p∇ • u (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, ( x + eα δ t ) 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

M
fα ( x0 , t + δ t ) = W1 = ∑ a1,k f k −1
'
(6.10a)
k =1

M
gα ( x0 , t + δ t ) = W '1 = ∑ a1,k g k −1
' '
(6.10b)
k =1

where

 δt  δt τ Fδ
f ' k = 1 −  fα ( x k , eα , t ) + fαeq ( x k , eα , t ) + v α t
 τ v + 0.5δ t  τ v + 0.5δ t τ v + 0.5δ t

 δt  δt τ f qδ
g ' k = 1 −  gα ( x k , eα , t ) + gαeq ( x k , eα , t ) − c α α t
 τ c + 0.5δ t  τ c + 0.5δ t τ c + 0.5δ t

{W ' } = {g α , ∂g α / ∂x, ∂g α / ∂y, ∂ 2 g α / ∂x 2 , ∂ 2 g α / ∂ 2 y, ∂ 2 g α / ∂x∂y}T

179
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:

neq , iso neq , iso


fα = fβ , ( f αneq = f α − f αeq ) (6.11a)

where eα and e β have opposite directions. For the thermal problems, the internal

energy density distribution at the boundary satisfies:


neq
− eα fα
2 neq ,iso
(
= − gβ
neq 2
− eβ f β
neq ,iso
) (6.11b)

( g αneq = g α − g αeq )

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 f neq , iso in the boundary condition, Eq. (6.11b) for the internal

energy density distribution. The velocity of the wall is used when f eq for the boundary

nodes are calculated in order to enforce the no-slip boundary condition. The

temperature of the wall is also used when g eq 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.

180
6 2 5
fluid

3 1

7 4 8

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:

∂T
4Ti , 2 − Ti ,3 − 2∆
∂y
Ti ,1 = i ,1
(6.12)
3

where Ti ,1 is the approximate temperature on the wall; Ti , 2 and Ti ,3 are the temperatures

∂T
inside the flow domain near the wall; is the given heat flux on the wall. The
∂y i ,1

iteration is needed in order to get accurate values of the temperature on the boundary

when Neumann type boundary condition is implemented.

181
At corner points, special treatment is needed. Take the left-bottom corner point

as an example, which is shown in Figure 6.2.

6 2 5
fluid

3 1

7 4 8

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.

4 f 62, 2 − f 63,3
f 61,1 = (6.13a)
3

4 g 62, 2 − g 63,3
g 16,1 = (6.13b)
3

182
4 f 82, 2 − f 83,3
f 8
1,1
= (6.13c)
3

4 g 82, 2 − g 83,3
g 81,1 = (6.13d)
3

where fαi , j or gαi , j mean the density distribution or internal energy density distribution

for the particle velocity direction α at the position x (i, j ) .

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.

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

u=0 u=0
v=0 v=0
T=T1 T=T0

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

Figure 6.3 Configuration of natural convection in a square cavity

183
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,

ρ G = ρ βg 0 (T − Tm ) j (6.14)

where β is the thermal expansion coefficient, g 0 is the acceleration due to gravity,

Tm =
(T1 + T0 ) is the average temperature, and j is the vertical direction opposite to that
2

of gravity.

The dynamical similarity depends on two dimensionless parameters: Prandtl

number Pr and Rayleigh number Ra,

Pr = υ Ra =
βg 0 ∆TL3 (6.15)
α υα

To ensure the code working properly in the near-incompressible regime, we carefully

choose the value of βg 0 ∆TL . Once βg 0 ∆TL 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 x = x0 can be defined by

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

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

184
where q x (x, y ) = uT ( x, y ) − α ∂ ( ∂x)T (x, y ) 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

max (ui2, j + vi2, j ) n+1 − (ui2, j + vi2, j ) n ≤ 10 −8 , max Ti ,nj+1 − Ti ,nj ≤ 10 −8 (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

185
Fix the value of βg 0 ∆TL 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 t = 0

Initial density field ρ i , j = 1

Initial velocity field ui, j = 0

Initial temperature field Ti, j = T0

Then assuming

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

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

5. Iteration

t = t + δt

5.1 Calculating the buoyancy force

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

5.2 Collision: computing post-collision functions

f α ( x, t + δ t ) = f α ( x, t ) −
δt
τ v + 0.5δ t
[f α ( x, t ) − fαeq ( x, t )] + τ v Fα δ t
τ v + 0.5δ t

g α ( x, t + δ t ) = g α ( x, t ) −
δt
[g α ( x, t ) − gα eq ( x, t )] − τ c fα ( x, t )qα δ t
τ c + 0.5δ t τ c + 0.5δ t

5.3 Streaming: application of TLLBM formulations

186
M +1
fα ( x0 , t + δ t ) = W1 = ∑a
'
1,k f k −1
k =1

M +1
gα ( x0 , t + δ t ) = W '1 = ∑a
' '
1,k g k −1
k =1

5.4 Boundary condition

Apply the boundary condition as shown in Section 6.4.

5.5 Calculating macroscopic variables

ρ =∑fα
α

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

δt
ρε = ∑ gα − ∑ fα qα
α 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

187
Grid generation Calculating f eq and g eq .

Calculation of τ υ and τ c M +1

based on β g 0 ∆TL , Ra and f α ( x 0 , t + δ t ) = W1 = ∑a


'
1, k f k −1
k =1
Pr. M +1
g α ( x 0 , t + δ t ) = W1' = ∑ a1,k g k −1
'

k =1

Calculating geometric Boundary condition


parameter a1,k

ρ = ∑α f α

N=0 initial field of density, ρ Gδ t


velocity and temperature
ρu = ∑α eα f α +
2
δt
ρε = ∑α g α −
2
∑α f α qα
No
Yes
N=N+1 Convergence?

Output

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=106

188
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.

189
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.

190

You might also like