190
1 Notes on Advanced Computational Fluid Dynamics (ME5361) Part2 Dr C. Shu Office: E2-03-07 Tel. 6874 6476 e-mail: [email protected] Department of Mechanical Engineering National University of Singapore

Advanced Computational Fluid(Shu Chang)

  • Upload
    lc82001

  • View
    521

  • Download
    5

Embed Size (px)

DESCRIPTION

Edit by Shu ChangAbout LBM et al.

Citation preview

Page 1: Advanced Computational Fluid(Shu Chang)

1

Notes on

Advanced Computational Fluid

Dynamics (ME5361)

Part2

Dr C. Shu Office: E2-03-07

Tel. 6874 6476

e-mail: [email protected]

Department of Mechanical Engineering

National University of Singapore

Page 2: Advanced Computational Fluid(Shu Chang)

2

Table of Contents

1. Domain-free Discretization (DFD) Method

1.1 Introduction

1.2 Domain-free discretization (DFD) method

1.3 Sample Applications of DFD Method

1.4 Application of DFD Method to Solve Navier-Stokes Equations

2. Least Square-based Finite Difference (LSFD) Method

2.1 Introduction

2.2 LSFD Method

2.3 Numerical Analysis of Convergence Rate

2.4 Sample Applications of LSFD to Flow Problems

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

Method

3.1 Introduction

3.2 Radial Basis Functions (RBFs) and Function Approximation

3.3 Differential Quadrature (DQ) Method for Derivative

Approximation

3.4 Global Radial Basis Function-based Differential Quadrature

(RBF-DQ) Method

3.5 Local RBF-DQ Method

3.6 Sample Applications of Local RBF-DQ Method

3.7 Application of Local RBF-DQ Method to Flow Problems

4. Standard Lattice Boltzmann Method (LBM)

4.1 Introduction

Page 3: Advanced Computational Fluid(Shu Chang)

3

4.2 Lattice Gas Cellular Automata (LGCA)

4.3 Kinetic theory

4.4 Lattice Boltzmann Method (LBM)

4.5 Practical Implementation of LBM for Lid-Driven Square

Cavity Flows

5. Taylor Series Expansion- and Least Square- based Lattice

Boltzmann Method (TLLBM)

5.1 Introduction

5.2 Conventional models for problems with complex geometry

5.3 Taylor Series Expansion- and Least Square-based Lattice

Boltzmann Method (TLLBM)

5.4 Accuracy Analysis of TLLBM

5.5 Practical Implementation of TLLBM for Flow around a

Circular Cylinder

6. Application of TLLBM to Simulate Thermal Flows

6.1 Introduction

6.2 Internal Energy Density Distribution Function (IEDDF)

Thermal Model

6.3 Application of IEDDF thermal model on arbitrary mesh by

using TLLBM

6.4 Boundary conditions

6.5 Practical implementation of IEDDF thermal model for natural

convection in a square cavity using the technique of TLLBM

Page 4: Advanced Computational Fluid(Shu Chang)

4

1. Domain-Free Discretization (DFD) method

1.1 Introduction

Most engineering problems are governed by a set of partial differential equations (PDEs).

For example, the Newtonian viscous flow can be modeled by Navier-Stokes equations.

How to efficiently solve PDEs has a significant meaning to engineering applications.

Basically, there are two ways to obtain the solution of a PDE. The first way is to pursue

an analytical expression for the solution. This way is also called the analytical method,

and the resulting solution is termed analytical solution. The analytical solution is exact at

any location in a solution domain. The other way is to pursue an approximate solution for

a given PDE. Usually, the approximate solution is defined by the functional values at

discrete points obtained by a numerical technique. So, this way is also called the

numerical method, and the approximate solution is noted as numerical solution. It is

indicated that the numerical method is usually applied when the analytical solution of a

PDE is difficult to be obtained. Although the analytical and numerical methods can both

give the solution of a PDE, they involve quite different solution procedures.

For the analytical method, the PDE and its boundary conditions are dealt with separately.

In other words, the analytical solution is usually obtained by two steps. In the first step,

we only consider the PDE and obtain its general solution. Then in the second step, the

expression of the general solution is substituted into the boundary conditions to determine

the unknown coefficients in the general solution. Clearly, the first step does not involve

Page 5: Advanced Computational Fluid(Shu Chang)

5

the solution domain. The solution domain (geometry of the problem) is only involved in

the second step when the boundary condition is implemented. So, the analytical method

can be well applied to both regular and irregular domain problems.

In contrast, the numerical method solves the PDE by directly coupling it with the

boundary condition. In other words, the numerical solution is obtained in just one step. In

this step, the PDE is discretized on the solution domain with proper implementation of

the boundary condition. We can see clearly that the numerical discretization of the PDE

by a numerical method is problem-dependent. Due to this feature, some numerical

methods can only be applied to regular domain problems. Examples are the finite

difference method and the global method of differential quadrature (DQ), which is more

efficient by using just a few grid points to obtain accurate numerical results. These

methods discretize the derivatives in a PDE along a straight mesh line. Thus, they require

the computational domain to be rectangular or a combination of rectangular sub-domains.

When a problem with complex geometry is considered, the curved boundary of the

problem may not coincide with the straight mesh line. To apply the finite difference and

DQ methods, one has to do the coordinate transformation, which maps the irregular

physical domain to a regular domain in the computational space. In general, the

coordinate transformation can be made by numerical grid generation technique. In the

computational space, the finite difference schemes and the DQ method can be directly

applied since in this space, the solution domain is regular. To do numerical calculation in

the computational space, we need to transform the governing PDEs and their boundary

conditions into the relevant forms in the computational space. This process is very

Page 6: Advanced Computational Fluid(Shu Chang)

6

complicated, and problem-dependent. In addition, it may bring additional errors into the

numerical computation. For many years, researchers expect to develop an efficient

numerical method, which can avoid the complicated coordinate transformation process.

On the other hand, we note that the need of coordinate transformation for irregular

domain problems is actually due to the coupling of numerical discretization of a PDE

with the boundary condition associated with the solution domain. We can see clearly that

if numerical discretization of the PDE by a numerical method is not restricted by the

solution domain, then the complicated coordinate transformation technique can be

avoided, and the numerical computation for regular and irregular domain problems can

be efficiently done in the Cartesian coordinate system or the cylindrical coordinate

system. Here, we may ask whether such a numerical method exists or not. If the idea of

developing this numerical method is correct, then the second question is how to develop

the method. The answer towards these questions leads to the development of domain-free

discretization (DFD) method.

To answer the first question, we can get the inspiration from the analytical method. As

discussed previously, the analytical solution for a particular problem is obtained by two

steps. In the first step, the general solution of the PDE is obtained which involves some

constants. These constants are then determined by the boundary condition in the second

step, and as a result, the particular solution is obtained for a given problem. In general,

the implementation of the boundary condition is associated with geometry of the

problem. So, we can see that the geometry of the problem is only related to the particular

Page 7: Advanced Computational Fluid(Shu Chang)

7

solution. The PDE itself has no connection to the solution domain. The obvious fact is

that once the particular solution is obtained, it exactly satisfies the PDE not only for the

points inside the solution domain but also for the points outside the solution domain. In

the following, we will illustrate this feature by some examples. The first example is the

determination of a straight line. It is well known that two points A and B can uniquely

determine a straight line represented by a line equation. This line equation is applicable

for all the points along the straight line including the points in the interval between A and

B and the points outside the interval between A and B. Another example is the solution of

a one-dimensional boundary value problem. Suppose that the governing differential

equation is

xudx

ud−=2

2

(1.1)

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

by

1)1( ,0)0( 1 +−== −eeuu (1.2)

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

xececu xx ++= −21 (1.3)

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

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

1 ,1 21 −== cc

Thus, the particular solution for the problem is

xeeu xx +−= − (1.4)

Page 8: Advanced Computational Fluid(Shu Chang)

8

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

only in the solution domain 10 ≤≤ x , but also in the whole one-dimensional field

∞<<∞− x .

Inspiration from analytical method:

the PDE and its solution domain can be treated separately;

the solution obtained satisfies the PDE for both the points inside the domain and

the points outside the domain (the solution obtained can be used to calculate the

exact function values of the problem anywhere as long as the solution is smooth,

no matter whether the position is inside the domain or not)

Now, it is supposed that the differential equation (1.1) is approximated by the second

order central difference scheme, which has the following discrete form

iiiii xu

xuuu

−=∆

+− +−2

11

)(2

(1.5)

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

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

discretization. Obviously, in the solution domain 10 ≤≤ x , the solution form (1.4)

accurately satisfies the discrete equation (1.5). Here, it is interesting to show that for

points outside the solution domain 10 ≤≤ x , equation (1.4) also satisfies equation (1.5)

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

equation (1.4), we can get

942537208156.9=iu , 574363258230.81 =−iu , 151437134843.101 =+iu

Page 9: Advanced Computational Fluid(Shu Chang)

9

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

get

2597675984.7)(

22

11 =∆

+− +−

xuuu iii

(1.6a)

942537208156.7=− ii xu (1.6b)

Obviously, the difference of the two sides in equation (1.5) is in the order of 2)( x∆ . This

example gives us an important hint. That is, the discrete form of a PDE resulted from

numerical discretization is not restricted by the geometry of the problem. It can involve

some points outside the solution domain. This is a very important feature.

From the inspiration of the analytical method, a new discretization method, the domain-

free discretization method is presented. The basic idea of the domain-free discretization

method is that the discrete form of the given differential equation is irrelevant of solution

domain. In other words, the discrete form of PDEs can involve some points outside the

solution domain. Therefore, the complicated coordinate transformation technique can be

avoided, and the numerical computation for regular and irregular domain problems can

be efficiently done in the standard coordinate system, such as Cartesian, cylindrical

coordinate system.

1.2 Domain-free Discretization Method

As shown in the introduction, the discrete form of the differential equation resulted from

the numerical discretization can be applied to the points inside the solution domain and

Page 10: Advanced Computational Fluid(Shu Chang)

10

the points outside the solution domain. When the form is applied to the points outside the

solution domain, it involves the computation of the functional values at these points.

From the example shown in the introduction, the functional values at the points outside

the solution domain can be given from the analytical expression of the solution for a

specific problem. However, it is impossible to give the analytical solution in practice.

On the other hand, we note that although the analytical expression of the solution for the

whole domain is difficult to be given, we may be able to find the approximate form of the

solution in part of the whole domain. An example is to find the approximate form of the

solution along a line. Consider a two-dimensional problem and suppose that its analytical

expression of the solution is represented by ),( yxu . Along a vertical line of ixx = , the

analytical solution is given by ),( yxu i . Clearly, ),( yxu i is only the function of the

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

given, then ),( yxu i can be approximated by some interpolation schemes. Once the

approximate form of the solution along a vertical line is found, it can be applied for all

the points along that line including the points inside and outside the solution domain. The

above idea is the essence of the Domain-Free Discretization method.

Consider a two-dimensional domain as shown in Figure 1.1. The boundaries of this

domain can be represented by two curves )(xyt and )(xyb with bxa ≤≤ .

Page 11: Advanced Computational Fluid(Shu Chang)

11

y

yt(x)

yb(x)

xa bxkxi

AA' A''

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

For the numerical computation, we first descompose the whole domain into several

subdomains by vertical lines ixx = , Ni ,...,2,1= , where N is the number of vertical lines.

Along each vertical line, the solution is only the function of y. The domain-free

discretization method first discretizes all the derivatives of a PDE in the x direction, and

reduces the PDE into a set of ordinary differential equations (ODEs). Note that along

each vertical line, the solution is governed by an ordinary differential equation (ODE).

Then, mesh nodes are distributed along each vertical line. The functional values at all

mesh nodes are the numerical (approximate) solutions of the PDE. Generally, the number

of mesh nodes on different vertical lines may be different. As shown in Figure 1.1, iM ,

the number of mesh nodes on the vertical line of ixx = may not be equal to kM which is

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

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

Page 12: Advanced Computational Fluid(Shu Chang)

12

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

used in the whole domain can be computed by ∑=

N

iiM

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.

Page 13: Advanced Computational Fluid(Shu Chang)

13

It should be noticed here that the mesh nodes are always distributed inside the physical

domain though the DFD may involve the points outside the domain. To clarify, by “mesh

node” or “node”, we mean those specific points inside the physical domain at which the

numerical solution is defined; by “point” we mean a position in a certain coordinate

system, which may be either inside or outside of the physical domain.

Take the two-dimensional Poisson equation as an example to illustrate the procedure of

domain-free discretization method. The Poisson equation in the Cartesian coordinate

system can be written as

),(2

2

2

2

yxfyx

=∂∂

+∂∂ ψψ

(1.7)

Numerical Discretization

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

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

coordinate Mjy j ,...,2,1, = . If the vertical lines are distributed, the derivatives in the x

direction should be discretized first. Otherwise, the derivatives in the y direction are

discretized first. Suppose that the vertical lines are distributed in the physical domain, as

shown in Figure 1.1, we need to discretize the derivatives in the x direction. We can use

either the second order central difference scheme or the DQ method to discretize these

derivatives. When the central difference scheme is applied, equation (1.7) can be reduced

to

Page 14: Advanced Computational Fluid(Shu Chang)

14

),()()()(2)(

2

2

211 yxf

dyyd

xyyy

iiiii =+

+− +− ψψψψ, Ni ,...,2,1=

(1.8)

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

),()(

)( 2

2

1, yxf

dyyd

yb ii

N

kkki =+∑

=

ψψ , Ni ,...,2,1=

(1.9)

where kib , 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 ij Mjy ,...,2,1, = along a vertical line of ixx = , equation

(1.8) can be discretized by the DQ method as

),()()()(2)(

1,2

11jik

M

kikj

jijiji yxfybx

yyy i

=+∆

+−∑=

+− ψψψψ

, Ni ,...,2,1= (1.10)

where iM is the number of mesh points along the line of ixx = , and kjb , is the

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

Page 15: Advanced Computational Fluid(Shu Chang)

15

weighting coefficient kjb , on different vertical lines may be different. Equation (1.10) is

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

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

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

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

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

),()()(1

,1

, ji

M

kkikj

N

kjkki yxfybyb

i

=+∑∑==

ψψ , iMj ,...,2,1= (1.11)

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

functional value at the position jy 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 kxx = . On this line, there are kM grid nodes. Suppose that the

functional values at kM 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

Page 16: Advanced Computational Fluid(Shu Chang)

16

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

approximated by

∑=

=kM

llklkk yyyxLagy

1)(),,()( ψψ

(1.12)

where

∏≠= −

−=

kM

lllll lll

lllk yy

yyyyxLag

)(1

),,( (1.13)

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

∑=

=kM

llkjlkjk yyyxLagy

1)(),,()( ψψ

(1.14)

where ),,( jlk yyxLag is given from

∏≠= −

−=

kM

lllll lll

lljjlk yy

yyyyxLag

)(1

),,( (1.15)

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

),()(

)(),,()(2)(),,(1

1

11

111

12

11

ji

M

kkijk

li

M

ljlijili

M

ljli

yxfyb

yyyxLagyyyyxLagx

i

ii

=+

+−

∑∑

=

+=

+−=

+−

ψ

ψψψ

(1.16)

Similarly, substituting equation (1.14) into equation (1.11) gives

),()()(),,(1

,1 1

, ji

M

kkikj

N

klk

M

ljlkki yxfybyyyxLagb

ik

=+∑∑ ∑== =

ψψ (1.17)

Now, the original partial differential equation (1.7) is reduced to an algebraic equation

system (1.16) or (1.17), which can be solved by using any standard solver. It is noted that

during the above process, the geometry of the physical domain is not directly involved in

the discretization and no coordinate transformation is introduced. Therefore, the method

can be applied to any irregular domain problem. That is why we call it Domain Free

Discretization method.

Page 17: Advanced Computational Fluid(Shu Chang)

17

Note that equation (1.14) can be applied to a point inside the physical domain or a point

outside the physical domain. When the position jy is inside the physical domain, the use

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

position jy 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

),,( jlk yyxLag 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 < )( kb xy , the extrapolation is given by

3,2,3,1,3,

2,1,

2,1,2,3,2,

1,3,1,

3,1,2,1,

3,2,

))(())((

))(())((

))(())((

)(

kkkkk

kk

kkkkk

kkk

kkkk

kkk

yyyyyyyy

yyyyyyyy

yyyyyyyy

y

ψ

ψψψ

−−

−−

+−−

−−+

−−

−−=

(1.18)

and when y > )( kt xy , the local extrapolation becomes

))(())((

))(())((

))(())((

)(

,1,2,1,

1,,2,

,2,1,2,

2,,1,

2,,1,,

,2,1,

kkkk

kkk

kkkk

kkk

kkkk

kkk

MkMkMkMk

MkMkMk

MkMkMkMk

MkMkMk

MkMkMkMk

MkMkMkk

yyyyyyyy

yyyyyyyy

yyyyyyyy

y

−−

−−+

−−

−−+

−−

−−=

−−−

−−

−−−

−−

−−

−−

ψ

ψψψ

(1.19)

Page 18: Advanced Computational Fluid(Shu Chang)

18

2) Radial basis function approximation

Radial basis function is a recent tool for interpolating data. Due to the favourable

properties of the RBF (that is, high accuracy and absence of the notorious “snaking”

property for polynomial-based interpolation scheme), the RBF interpolation scheme is

used as the interpolation/extrapolation technique in the DFD.

Because Radial Basis Function (RBF) approximation is applied to the interpolation and

extrapolation in the y direction. Therefore, we only consider one-dimensional

interpolation by RBF. The vector TMkkkk k

yyy )(,),(),( 21 ψψψ L=Ψ represents all the

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

approximation for the real function )(ykψ is:

∑=

=kM

llkklk yyy

1

),()( ϕλψ (1.20)

where ),( lk yyϕ is a radial basis function, klλ is the coefficient for ),( lk yyϕ

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

we choose the multi-quadric RBF (MQ)

22)(),( cyyyy llk +−=ϕ (1.21)

where c is the shape parameter for MQ.

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

Page 19: Advanced Computational Fluid(Shu Chang)

19

k

M

lljkkljk Mjyyy

k

,,2,1,),()(1

L== ∑=

ϕλψ (1.22)

There are N equations for N unknowns, so the problem is well-posed. Eq. (1.22) can be

written in the form of matrix as follows,

kk Aλψvv = (1.23)

where

=

)(

)()(

2

1

kMk

k

k

k

y

yy

ψ

ψψ

ψM

v ,

=

kkM

k

k

k

λ

λλ

λM

v 2

1

,

+−+−

+−+−

+−+−

=

ccyycyy

cyyccyy

cyycyyc

A

kk

k

k

MM

M

M

L

MOMM

L

L

222

221

222

2212

221

2221

)()(

)()(

)()(

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

can be obtained by,

kk A ψλ vv 1−= (1.24)

As kλv

is known, we can get the function value of )( ykψ 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

ψψϕψ vvvv )()()( 1 yyy RA == − (1.25)

where )(yRv

is defined by

1)()( −= AyyR ϕvv

(1.26)

Page 20: Advanced Computational Fluid(Shu Chang)

20

We will use Eq. (1.25) instead of Eq. (1.20) for interpolation and extrapolation.

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

),()(

)(),,()(2)(),,(1

1

11

111

12

11

ji

M

kkijk

li

M

ljlijili

M

ljli

yxfyb

yyyxRyyyyxRx

i

ii

=+

+−

∑∑

=

+=

+−=

+−

ψ

ψψψ

(1.27)

Similarly, substituting equation (1.14) into equation (1.11) gives

),()()(),,(1

,1 1

, ji

M

kkikj

N

klk

M

ljlkki yxfybyyyxRb

ik

=+∑∑ ∑== =

ψψ (1.28)

It should be noted that the RBF approximation used here is a global approximation, as it

uses all the mesh nodes along the radial line to constitute the approximation scheme.

Therefore, the extrapolation implemented with RBF is also the global approximation. For

convenience, we will use the same value of the shape parameter c at all the points along a

certain vertical line for both interpolation and extrapolation. It is found from practice that

c=0.815*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 )(xyt and )(xyb 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

Page 21: Advanced Computational Fluid(Shu Chang)

21

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

between the two curves )(xyt and )(xyb 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

Page 22: Advanced Computational Fluid(Shu Chang)

22

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

computational cost can be reduced.

CC'

xixk

x

y

Figure 1.2 Unstructured grid

1.3 Sample Applications of DFD Method

In this section, we will validate the domain-free discretization method by applying it to

solve the sample linear and nonlinear differential equations. In particular, the

performances of all-nodes (Lagrange interpolated polynomial) and 3-nodes (local low

order polynomial) extrapolation are studied. To effectively validate the accuracy of

numerical results and show the efficiency of the method for solving irregular domain

problems, the inverse problems are considered in this section. In other words, the

differential equation and its exact solution are given and fixed in advance. Here, the exact

solution is used in two aspects. One is to compare with the numerical results. The other is

used to specify the boundary condition for different irregular domains. Since the exact

Page 23: Advanced Computational Fluid(Shu Chang)

23

solution is fixed, it is interesting to check whether the same numerical results can be

achieved when the DFD method is applied to different solution domains.

Linear Differential Equation

We take the following two-dimensional Poisson equation

42

2

2

2

=∂∂

+∂∂

yxψψ (1.29)

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

122 =+ yx , 11 ≤≤− x (1.30)

or by two curves

−−=

−=2

2

1)(

1)(

xxy

xxy

b

t (1.31)

To apply the DFD method, the circular domain is decomposed by 21 vertical lines. Then

on each vertical line, we distribute certain number of mesh nodes. The numbers of mesh

nodes on 21 vertical lines are respectively 1,3,5,...,19,21,19,...,5,3,1=iM , Ni ,...,2,1= .

Note that the number of mesh nodes on the first and last vertical lines is just 1. This is

because for the circular domain, there is only one node on these two lines.

Page 24: Advanced Computational Fluid(Shu Chang)

24

For numerical discretization, all the derivatives are discretized by the DQ method. As

shown in Fig. 1.1, the resultant algebraic equations involve the computation of the

functional values at points inside and outside the circular domain. For the internal points,

we can simply apply the Lagrange interpolation, while for the external points, we can use

both the all-nodes and 3-nodes extrapolation. The resultant algebraic equations are solved

by the SOR iteration method. Once the numerical result at each mesh node is obtained,

we can compute the relative error, ),( ji yxerr , defined by

exact

exactnumericalji yxerr

ψψψ −

=),(

Then, on each vertical line, a maximum relative error can be found. Table 1.1 shows the

maximum relative errors on different vertical lines obtained by the all-nodes

extrapolation and the 3-nodes extrapolation. Due to the symmetry of the problem, only

the results on the right half of the circular domain are listed.

Table 1.1 Comparison of Maximum Relative Errors on Different Lines for a Circular

Domain ( 21=N )

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

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

All-nodes Extrapolation

1.97379 1.8389 1.6219 1.2093 0.7355 0.3742 0.1743 0.0799 0.0713 0.0114 0.0

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

Page 25: Advanced Computational Fluid(Shu Chang)

25

It can be seen from Table 1.1 that when the all-nodes extrapolation is used, the maximum

relative errors on some vertical lines are very big. In fact, the maximum relative error

occurs on the vertical line of 11xx = , 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 11xx = , the

maximum relative error is reduced from 1.97379 by the all-nodes extrapolation to 0.0491

by the 3-nodes extrapolation. The maximum relative errors by the 3-nodes extrapolation

on other vertical lines are also very small, showing that an accurate numerical result is

obtained.

We have also applied the DFD method to solve the model differential equation on the

following domains: elliptic, trapezoidal and expansion channel. The boundary of the

elliptic domain is given by

−−=

−=

2

2

18.0)(

18.0)(

xxy

xxy

b

t , 11 ≤≤− x (1.32)

and the boundary of the trapezoidal domain is represented by

Page 26: Advanced Computational Fluid(Shu Chang)

26

=

⋅+=

0)(30tan1)( 0

xyxxy

b

t , 20 ≤≤ x (1.33)

For the expansion channel, its boundary is denoted by

[ ]

−−=

=

)2tanh()32tanh(21)(

1)(

xxy

xy

b

t, 3/100 ≤≤ x

(1.34)

It was found that when the DFD method is applied to above domains, both the all-nodes

extrapolation and the 3-nodes extrapolation can give reasonable numerical results. The

maximum relative errors in the whole solution domains are listed in Table 1.2. It can be

seen from Table 1.2 that for the trapezoidal domain and expansion channel, the accuracy

of numerical results is much higher than that for the circular and elliptic domains. The

reason is that more nodes for extrapolation in a resulting algebraic equation are needed

for the circular and elliptic domains. The large extrapolation coefficients could affect the

accuracy of numerical results.

Table 1.2 Comparison of Maximum Relative Errors on Different Physical Domains for A

Linear Problem

Physical Domains 3-nodes Extrapolation All-nodes Extrapolation

Circular 0.07777 1.9738

Elliptic 0.03535 0.07146

Trapezoidal 0.0001205 0.00000177

Expansion Channel 0.0000866 0.0000198

Page 27: Advanced Computational Fluid(Shu Chang)

27

It should be indicated that when the DFD method is applied, it is easy to consider

different solution domains in the program. We just need to change the statements for the

expression of )(xyt and )(xyb .

Nonlinear Differential Equation

The DFD method is further validated by its application to solve a sample nonlinear

differential equation. Again, we consider an inverse problem. The differential equation is

given by

)1(24 222

2

2

2−++=

∂∂

+∂∂

+∂∂ yxx

xyxψψψψ

(1.35)

and the exact solution is fixed as 122 −+= yxψ 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

Page 28: Advanced Computational Fluid(Shu Chang)

28

circular and elliptic domains remain the same, but the accuracy of the results for the

trapezoidal domain and the expansion channel is slightly reduced.

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

Nonlinear Problem

Physical Domains 3-nodes Extrapolation

Circular 0.07828

Elliptic 0.03538

Trapezoidal 0.001813

Expansion Channel 0.001055

1.4 Application of DFD Method to Solve Navier-Stokes Equations

As an example, DFD method is applied to simulate incompressible flow in a smooth

expansion channel. This problem was first proposed by Roache (1981), and was chosen by a

workshop of International Association for Hydraulic Research (IAHR) Working Group

(Napolitano et al, 1985) as a suitable test case for assessing various numerical methods.

Page 29: Advanced Computational Fluid(Shu Chang)

29

Description of the Problem

Inlet

Symmetric Line yt (x)=1

Solid wall yb (x)

(0,1)

(0, 0)

y

x

(Re/3,1)

Outlet

Figure 1.3 Geometry of the expansion channel

The half of the expansion channel is shown in Figure 1.3. It is noted that when different

Reynolds number is considered, the physical domain is also different. The boundary of

the expansion channel can be analytically expressed by

3Re/0for )],2tanh()Re302[tanh(

21)( =≤≤−−= outb xxxxy

(1.36)

on the lower boundary (solid wall), and

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

Page 30: Advanced Computational Fluid(Shu Chang)

30

)(Re1

2

2

2

2

yxyv

xu

∂∂

+∂∂

=∂∂

+∂∂ ωωωω

(1.38)

ωψψ=

∂∂

+∂∂

2

2

2

2

yx

(1.39)

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

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

the stream function by

∂∂

−=

∂∂

=

xv

yu

ψ

ψ

(1.40)

Boundary Conditions

The boundary conditions of the problem are given as follows. At inlet, the fully

developed velocity profile is given, which is then converted to the stream function

distribution

0at ,0

)3(21 32

=

=

−=x

yy

ψ (1.41)

At outlet, the natural boundary condition

3Re/at ,00

=

==

xx

x

ωψ

(1.42)

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

implemented, which is written as

Page 31: Advanced Computational Fluid(Shu Chang)

31

)(at ,0/

0xyy

n b=

=∂∂=ψ

ψ (1.43)

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

)(at ,01

xyy t=

==

ωψ

(1.44)

is applied on the upper boundary (symmetry line).

The boundary condition for vorticity at inlet and lower boundary can be given from

equation (1.39). Since the lower boundary is curved, when equation (1.39) is discretized

in the Cartesian coordinate system, its discrete form will involve some points outside the

physical domain. The functional value at points outside the physical domain needs to use

the extrapolation form of the solution. However, the implementation of the boundary

condition directly or indirectly involves the use of the extrapolation form of the solution

which can influence accuracy of the algorithms and stability of the computation greatly.

Therefore, in DFD method, we always make the implementation of boundary condition

(especially for Neumann boundary condition) as accurate as possible. Thus, to meet this

requirement, we adopt the transformed form of equation (1.39) to implement the

boundary condition for vorticity on the lower boundary. According to Shu et al (1994), in

the Curvilinear coordinate system, we have

++

+=

∂ξ∂ψ

∂η∂ψ

∂η∂

∂η∂ψ

∂ξ∂ψ

∂ξ∂ω BC

JBA

J11

(1.45)

In the Curvilinear coordinate system, the lower boundary is defined as 0=η , and on this

boundary, we have 0/ =∂∂ ξψ and 0/ =∂∂ ηψ . Using these conditions, equation (1.45)

can be simplified on the lower boundary as

Page 32: Advanced Computational Fluid(Shu Chang)

32

2

2

∂ηψ∂ω

JC

= (1.46)

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

)(1 22ξξ yx

JC +=

(1.47)

ξηηξ yxyxJ −= (1.48)

Re/3/ xxx out ==ξ (1.49)

y

xyyxyxy

xyy b

bt

b

∆−

=−

−=

)()()(

)(η

(1.50)

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

2

2

42 )]Re302[cosh(Re

2251yx ∂

−+=

ψω

(1.51)

Equation (1.51) can be directly discretized (in the Cartesian coordinate system) along a

vertical line by using the DQ method. Note that its discrete form does not involve any

point outside the physical domain.

Discretization of Governing Equations

For numerical discretization of Navier-Stokes equations, the derivatives with respect to

the y coordinate are approximated by the DQ method, whereas the derivatives with

respect to the x coordinate can be discretized by the second order FD scheme or DQ

method. The difference between using the FD scheme and the DQ method in the x

direction will be discussed in the following.

Page 33: Advanced Computational Fluid(Shu Chang)

33

As shown in the previous section, the DFD method first decomposes the physical domain

by a series of vertical or horizontal lines. For the former as an example, the derivatives in

the x direction should be discretized either by DQ method or by the 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

=+

+=+

∑∑

∑ ∑ ∑ ∑

==

= = = =

ij

M

kikjk

N

kkjik

N

k

M

k

N

k

M

kikjkkjikikjkijkjikij

i

i i

bb

bbavau

ωψψ

ωωωω

11

1 1 1 1)(

Re1

(1.52)

Page 34: Advanced Computational Fluid(Shu Chang)

34

for Ni ,...,2,1= and iMj ,...,2,1= . where N is the grid number in the x direction

(number of vertical lines) and iM is the number of grid nodes on the line of ixx = . ika

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

x direction; similarly, jka and jkb 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, x∂

∂ψ at point ),( jiB is approximated by

∑=

=∂∂ N

kkjik

B

ax 1

ψψ (1.53)

Clearly, Bx∂

∂ψ is related to the functional values at point 321 ,, AAA ,…, which are outside

the domain and need extrapolation, and the values at points 1B , 2B ,…, which are inside

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

Page 35: Advanced Computational Fluid(Shu Chang)

35

the boundary, the higher the accuracy of extrapolation. As shown in Figure 1.4, point 3A

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

numerical error into the computation of Bx∂

∂ψ . For this case, although the program can

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

discretization form of x∂

∂ψ at point B involving the extrapolation as less as possible. For

the approximation of x∂

∂ψ at point B, if we only consider two neighboring points 1A and

1B , the discretization technique becomes the second order FD scheme which will be

discussed in the following.

2) Discretizing derivatives by FD method

In this part, the derivatives in the x direction are discretized by the second order FD

scheme, whereas the derivatives in the y direction are still discretized by the DQ method.

After numerical discretization, the discrete form of equations (1.38)-(1.39) is

=+∆

+−

+∆

+−=+

∑∑

=

−+

=

−+

=

−+

ij

M

kikjk

jijiji

M

kikjk

jijijiM

kikjkij

jijiij

i

ii

bx

bx

avx

u

ωψψψψ

ωωωω

ωωω

12

,1,,1

12

,1,,1

1

,1,1

2

)2

(Re1

2

(1.54)

where jka and jkb are the DQ weighting coefficients of the first and second order

derivatives in the y direction. Note that the position jy on the line of 1−= ixx or 1+= ixx

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.

Page 36: Advanced Computational Fluid(Shu Chang)

36

A1 B B1

xi

B( i, j)

interpolationextrapolation xi-1 xi+1

Figure 1.5 Extrapolation when FD method is used

As shown in Figure 1.5, the point 1A 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 1A on the line of 1−= ixx . The point 1B is an inner point. The

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

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

equation (1.54), ji ,1+ω and ji ,1+ψ are obtained by interpolation on the line of 1+= ixx

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

Page 37: Advanced Computational Fluid(Shu Chang)

37

−=

−=

)1(3

)3(21

11

21

211

jj

jjj

y

yy

ω

ψ

(1.55)

where 1,...,2 1 −= Mj , and 1M is the number of grid nodes on the line of 1xx = .

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

iteration process by equation

j

jjj

j xvy

xv

yu

11

111 )1(3

∂∂

−−=∂∂

−∂∂

=ω (1.56)

jxv

1∂∂ can be obtained by the following method.

By using Taylor series expansion, we have

∆⋅∂∂

+∆⋅∂∂

+=

∆⋅∂∂

+∆⋅∂∂

+=

2

12

2

113

2

12

2

112

421)2(

21

xxvx

xvvv

xxvx

xvvv

jjjj

jjjj

(1.57)

Solving above equations, we obtain

x

vvvxv jjj

j ∆

−−=

∂∂

234 132

1

(1.58)

At the inlet, we have 01 =jv . Substituting this condition into above equation gives

xvv

xv jj

j ∆−

=∂∂

24 32

1

(1.59)

where jv2 and jv3 are velocity components on the lines of 2xx = and 3xx =

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

Page 38: Advanced Computational Fluid(Shu Chang)

38

The velocity components at the inlet can be written as

=

−=

0

)2(23

1

2111

j

jjj

v

yyu

(1.60)

Along symmetry line

Along the symmetry line, the discretized boundary condition is

=

=

011

i

i

iM

MiM

ω

ψψ

(1.61)

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

Using equation (1.40), the velocity component u , v on the symmetry line can be given as

=

ψ= ∑=

01

i

i

ii

iM

M

kikkMiM

v

au

(1.62)

Note that the DQ method has been used to discretize the first order derivative in equation

(1.62).

At outlet

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

approximated by

Page 39: Advanced Computational Fluid(Shu Chang)

39

−=

−=

−−

−−

34

34

,2,1

,2,1

jNjNNj

jNjNNj

ωωω

ψψψ

(1.63)

where 1,...,2 −= NMj , and NM is the number of mesh nodes on the line of Nxx = .

Similarly, the velocity components at outlet can be computed by

=

ψ= ∑=

01

Nj

M

kNkjkNj

v

auN

(1.64)

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

On the solid wall

Along the wall, the boundary condition of vorticity is discretized by the DQ method in the

y direction. The discretized boundary condition is

−+=

=

∑=

iM

kikk

ii

i

bx 1

142

1

111

)]Re

302[cosh(Re

2251 ψω

ψψ

(1.65)

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

For the velocity components at the solid wall, we have

==

00

1

1

i

i

vu

(1.66)

Page 40: Advanced Computational Fluid(Shu Chang)

40

Some Numerical Results

The numerical results obtained by the DFD method are compared well with available data

in the literature. This can be observed from Figure 1.6, which displays the vorticity

distribution along the wall for Re=10. The present results are obtained by a mesh size of

41×15. Also included in Fig. 1.6 are the results of Shu et al (1994) using the DQ method

with coordinate transformation and the benchmark solution of IAHR workshop given by

Cliffe et al using a finite element method with results being grid-independent. Note that

the results of Cliffe et al are shown in the paper of Napolitano et al. (1985). It is seen from

the figure that the present results agree very well with the benchmark solution of the

problem.

Wall Vorticity Distribution for Re=10

-1.0

0.0

1.0

2.0

3.0

-0.2 0.0 0.2 0.4 0.6 0.8 1.0

x/xout

Vor

ticity

BenchmarkShu et al present

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

The flow in the expansion channel has a feature that a quasi-self-similar solution can be

obtained when Reynolds number is much larger than 1. This feature has been confirmed

Page 41: Advanced Computational Fluid(Shu Chang)

41

in Figure 1.7, which displays the wall vorticity distribution for different Reynolds

numbers obtained by the DFD method. Clearly, as Reynolds number increases to the

value of much larger than 1, the solution takes on a quasi-self-similar form, i.e. the wall

vorticity becomes independent of Re when plotted against x/xout.

Wall Vorticity Distribution

-1.0

0.0

1.0

2.0

3.0

0.0 0.2 0.4 0.6 0.8 1.0

x/xout

Vor

ticity

Re=10Re=100Re=200

Figure 1.7 Wall vorticity distribution for different Reynolds numbers

(mesh size: 41×21)

References

Napolitano, M. and Orlandi, P. (1985), “Laminar Flow In A Complex Geometry: A

Comparison”, Int. J. Numer. Methods Fluids, 5, 667-683

Page 42: Advanced Computational Fluid(Shu Chang)

42

Roache, P., (1981), "Scaling of High Reynolds Number Weakly Separated Channel

Flows", Symposium on Numerical and Physical Aspects of Aerodynamic Flows,

1981.

Shu C. (2000), Differential Quadrature and Its Application in Engineering, Springer-

Verlag, London.

Shu C., Chew Y. T., Khoo, B. C. and Yeo, K. S. (1994), “A Global Method For Solving

Incompressible Navier-Stokes Equations in General Coordinate System”, in

Advances in Computational Methods in Fluid Dynamics, Proceedings of ASME

Fluids Engineering Summer Meeting, Hyatt Regency Lake Tahoe, U.S.A., 381-386.

Shu,C. and Fan, L. F.(2001): A new discretization method and its application to solve

incompressible Navier-Stokes equation, Computational Mechanics 27:292-301.

Shu C., Wu Y.L. (2002): Domain-free discretization method for doubly connected

domain and its application to simulate natural convection in eccentric annuli,

Comput. Methods Appl. Mech. Engrg. 191 (2002):1827–1841

Wu Y.L., Shu C. (2002): Development of RBF-DQ method for derivative approximation

and its application to simulate natural convection in concentric annuli,

Computational Mechanics 29 (2002): 477-485

Wu Y.L., Shu C., Qiu J and Tani J (2003): Implementing Multi-Grid approach in

Domain-Free Discretization method to speed up convergence, Computer Methods

in Applied Mechanics and Engineering 192 (2003): 2425-2438

Page 43: Advanced Computational Fluid(Shu Chang)

43

2. Least Square-based Finite Difference Method

2.1 Introduction

Nowadays, numerical solution of the fluid mechanics equations on the computer has been

developed into an important subject of fluid dynamics, i.e., computational fluid dynamics

(CFD). The core of CFD is to construct a numerical approximation that simulates the

behavior of dependent variables in the governing equations. The function or derivative

approximation, which is also named discretization method, is then employed to discretize

the governing equations. As a result, a system of algebraic equations or difference

equations are then obtained, which can be solved on a computer. A powerful

discretization method must be simple, efficient, and robust. The most popular

discretization methods used in CFD to date are the finite difference method (FDM), finite

element method (FEM) and finite volume method (FVM). Many other methods are

originated from the above three methods, or have the similar formulations. Therefore,

these three numerical methods are also regarded as standard/traditional numerical

methods in computational fluid dynamics. A brief review of these methods is given

below:

The fundamental idea of FD method is to approximate/interpolate the unknown functions

by a local Taylor series expansion at grid points in the adopted mesh system (we can also

use a local low order polynomial approximation). However, FD method is further

simplified in the practical implementations. It essentially approximates the derivatives in

Page 44: Advanced Computational Fluid(Shu Chang)

44

the governing equations by a linear combination of values of dependent variables at a

finite number of grid points. The most suitable computational domain for FD method is

the rectangular type, where it is accurate, efficient and simple to implement. However, it

does not adapt well to problems with complex geometry without appropriate coordinate

transformation. As compared with FD method, FE and FV methods are much more

powerful for the problems with geometrical complexity. It is due to the fact that they can

be applied on the unstructured mesh. The distinguishing feature of FEM is that it solves

the weak form of the partial differential equations. The solution domain is divided into a

set of finite elements, which are generally unstructured to fit the complex geometry. After

its initial development from an engineering background, FEM has been formulated by

mathematicians into a very elegant and strict framework, in which precise mathematical

conditions for the existence of solution and convergence criteria and error bounds were

well established. To fully understand the aspects of finite element discretization,

appropriate mathematical background is needed for the end-users, such as functional

analysis. The greater complexity of the FEM method makes them cost more

computational efforts than the FDM. The FVM is similar to the FEM in many ways,

except that the FVM uses the integral form of the conservation equations as its starting

point. Since all terms that need be approximated in the FVM have physical meaning, it is

very popular with engineers. As compared with FDM, the disadvantage of FVM appears

in the three-dimensional applications, in which it is difficult for FVM to develop an

approach with order higher than second. One common point of these standard numerical

methods is that they all are mesh-using methods, i.e., before the start of computation,

they need to build up large data structure to store detailed elemental information

Page 45: Advanced Computational Fluid(Shu Chang)

45

comprising all node-based and element-based connectivity and hierarchical data about the

computational mesh. As a consequence, the obtained numerical results depend strongly

on the mesh properties. Due to their good performance, these three methods are widely

used in process, mechanical, chemical, civil, and environment engineering.

However, despite of the popularity of traditional methods (such as FD, FE, and FV) in the

field of flow simulations, a lot of new numerical schemes occurred in the past two

decades. One may wonder why the search for new methods continues. The reason lies in

fluid mechanics itself, i.e., dynamic and geometrical complexity of flow problems.

Dynamic complexity of flow problems

Fluid mechanics consists of flow problems with very different characters. From the point

of view of the disparities of the length, time and velocity scales spurred by flow

mechanism, it encompasses laminar, turbulent, incompressible, compressible, transonic,

and supersonic flows, with single or multiple components. From the point of view of

fluid characteristics, it encompasses inertia dominated, viscosity dominated, surface

tension dominated, heat conduction dominated, potential, advection-dominated flows.

Moreover, many combinations of them are usually considered. This is the so-called

dynamic complexity of flow problems. It is impossible to develop a numerical scheme

that can handle all of these situations. In general, one numerical method can only be

applied to a narrow scope of flow problems more efficiently and successful than the other

methods. Many important complex problems still cannot be treated reliably and

efficiently with standard numerical schemes.

Page 46: Advanced Computational Fluid(Shu Chang)

46

Geometrical complexity of flow problems

In addition to the various flow patterns, many flow problems involve complex

geometries, for example, multi-domain configuration, large deformation, moving

boundaries and bodies with complex shapes. These represent another main difficulty

confronted in the computational fluid dynamics, i.e., geometrical complexity. To deal

with the geometrical complexity, standard numerical schemes like FDM, FEM and FVM

employ different kinds of meshes. FDM is mainly applied to flow problems with regular

domain such as rectangular regions, or circular, concentric, and sectorial regions, so that

Cartesian or cylindrical meshes can be employed. The geometry flexibility of FD method

can be enhanced by means of the coordinate transformation techniques, which map a

complex physical domain into a regular computational domain. However, the

construction of body-fitting meshes and transformation of governing equations are not

only tedious and problem-dependent, but also introduce additional geometrical error into

the scheme and degrade the accuracy of the solution. Although some preliminary

successes were achieved, the flexibility of irregular geometry is still a major deterrence in

the broad application of FD method.

To remove the difficulties arising from the complex geometries, FV and FE method use

unstructured mesh to fit the shape of physical domain. Usually, the unstructured mesh is

triangular mesh in two-dimension and pyramid mesh in three-dimension. However,

unstructured mesh generation is not a trivial job. In many cases, mesh generation even

absorbs far more time and costs more than the numerical solution itself. For example, the

Page 47: Advanced Computational Fluid(Shu Chang)

47

generation of a mesh for the simulation of airflow past an aircraft may require several

months, while the solution computations may take only a few hours on a supercomputer.

The generation of three-dimensional unstructured meshes for FE and FV method, despite

of recent advances in this field, is certainly the bottleneck in most industrial

computations. Another difficulty appears in the simulation of moving boundary

problems. With the moving of boundaries, successive re-meshing of the domain may be

required to avoid the break down of the computation due to excessive mesh distortion if

standard schemes are employed. Therefore, we need to map the solution between

different meshes. This interpolation process not only subsequently increases the cost of

the simulation, but also leads to a degradation of accuracy and possible unstable

computation.

In spite of the great success standard numerical methods achieved, these drawbacks

impair their computational efficiency and even limit their applicability to applications.

That is why the search for better numerical methods continues.

Concept of mesh-free

In recent years, many new numerical schemes have been proposed to avoid the weakness

of the standard numerical methods described previously, especially on the geometrical

complexity. Among the new developed numerical schemes, a group of so-called meshless

or mesh-free methods especially attracted the attention of engineers, physicists and

mathematicians. As its name implies, mesh-free methods are deliberately designed to be

absent from the dependence on the mesh. The terms meshless and mesh-free refer to the

Page 48: Advanced Computational Fluid(Shu Chang)

48

ability of the method to construct functional approximation or interpolation entirely from

the information at a set of nodes, without any pre-specified connectivity or relationships

among the nodes. A method is considered mesh-free if the discretization of governing

equations of flow problems does not depend on the availability of a well-generated mesh.

Some mesh-free methods do have a weak dependence on background meshes to carry out

numerical quadrature calculations. Such methods are still regarded as mesh-free because

there is no fixed connection among the nodes, but not “truly” mesh-free method due to

the background meshes.

One of the key advantages of mesh-free method as compared to the standard methods is

the saving of time and human-labor on the mesh construction when complex geometry is

involved. Instead of mesh generation, mesh-free methods use node generation. From the

point of view of computational efforts, node generation is seen as an easier and faster job.

Another advantage of mesh-free method is easily construction of high-order schemes.

The construction of higher-order schemes on unstructured grids by standard schemes has

encountered severe obstacles in the areas of stability and storage. Most programs are still

based on linear elements, or, equivalently linear function reconstruction. The use of

mesh-free schemes can facilitate the construction of higher-order discretization. From the

use of mesh-free methods, we also can enjoy the computational ease of adding and

subtracting nodes from the pre-existing nodes. This property is highly appreciated in the

flow problems with large deformation or moving boundaries.

Page 49: Advanced Computational Fluid(Shu Chang)

49

It is known that any discretization method requires an approximation/interpolation

scheme based on a linear combination of a set of basis functions. The approximation/

interpolation scheme is usually referred as approximation kernel. Mesh-free methods are

not the exceptions. However, their approximation kernels are not constructed on meshes

but on a cloud of scattered nodes instead.

Currently, most of mesh-free methods are designed to solve the weak form of partial

differential equations. In fact, they are developed from the FE method. The least square-

based finite difference (LSFD) method introduced in this chapter and the radial basis

function-based differential quadrature (RBF-DQ) method introduced in the next chapter

are developed from the FD method and its equivalent, the DQ method. They are used to

solve the strong form of partial differential equations.

2.2 Least Square-based Finite Difference (LSFD) Method

One Dimensional Taylor Series Formulation and Conventional FD Scheme

o oo1 2 3

x x

Figure 2.1 Configuration for One-dimensional FD scheme

Page 50: Advanced Computational Fluid(Shu Chang)

50

Let us consider the one-dimensional grid points shown in Figure 2.1. For grid point 2,

located in the middle between grid points 1 and 3 such that 2312 xxxxx −=−=∆ , the

Taylor series expansions around point 2 give

( ) ...21

22

22

221 −

φ∆+

φ

∆−φ=φdxdx

dxdx (2.1a)

( ) ...21

22

22

223 +

φ∆+

φ

∆+φ=φdxdx

dxdx (2.1b)

Truncating the series just after the third term, and adding and subtracting the two

equations, we obtain the following second-order finite-difference approximations for the

first and second order derivatives:

)(2

213

2

xOxdx

d∆+

∆φ−φ

=

φ (2.2a)

)()(

22

321

22

2

xOxdx

d∆+

∆φ+φ−φ

=

φ (2.2b)

The substitution of such expression into the differential equation leads to the finite

difference equation.

FD’s limitation in complex geometry

Conventional FD scheme is very popular in the industrial CFD applications in regular

domain and has shown very good performance, especially when efficiency and accuracy

is regarded. However, it confronts difficulties while applied to multi-dimensional

problems involved with complex geometries. In general, to deal with multi-dimensional

problems, convectional FD scheme usually uses fractional techniques and treats them as

multi- one-dimensional problems. In other words, it must be applied along a mesh line.

Page 51: Advanced Computational Fluid(Shu Chang)

51

For the domain of simple geometry such as rectangle or circle, mesh lines can be

generated according to Cartesian or cylindrical coordinates, and therefore we can solve

the related flow problem easily. For domains of greater complexity, coordinate

transformation techniques must be implemented to locate the computational mesh points

on the domain boundaries. Body-fitted meshes are then generated by solving partial

differential equations. However, it must be noted that the grid generation for highly

irregular domains is problem-dependent and not an easy task, sometime even a mission

impossible. In addition, coordinate transformation technique not only brings complexity

into the computation, but also introduces additional numerical error into the scheme. To

circumvent the difficulties confronted by conventional FD scheme in the complex

geometries, one solution resorts to removing the dependence of traditional FD scheme on

meshes, i.e., the mesh-free scheme.

Motivation of constructing FD-like mesh-free method

One mesh-free idea can be naturally inspired from the construction of conventional FD

scheme. As well-known, one-dimensional (1D) Taylor series expansion is used in the

development of the conventional FD schemes, in which only the derivatives in one spatial

direction are involved and considered as unknowns. To solve for these unknown

derivatives, one needs to apply the 1D Taylor series expansion at some collocation points

along the respective spatial direction. In like manner, this procedure can be extended to

the two-dimensional (2D) case, in which the 2D Taylor series expansion is applied. We

call this procedure as two-dimensional Taylor series formulation. Since the formulation

only requires the information about the relative positions of the supporting nodes to the

Page 52: Advanced Computational Fluid(Shu Chang)

52

reference node, the constructed scheme can be considered as a mesh-free approach. The

details will be described below.

Two-Dimensional Taylor Series Formulation

In the two-dimensional Taylor series formulation, Taylor series expansion is employed to

approximate the unknown function within a local support of reference node. As shown in

Figure 2.2, the functional value near a reference node o can be approximated by the

functional value and its derivatives at the node o by,

( ) ( ) ( )( )

( ) ( ) ( ) ( ) ( )( ) ...21

21

61

61

21

21

02

22

02

22

03

23

03

23

0

2

02

22

02

22

000

+

∂∂φ∂

∆∆+

∂∂φ∂

∆∆+

∂φ∂

∆+

∂φ∂

∆+

∂∂φ∂

∆∆+

∂φ∂

∆+

∂φ∂

∆+

∂φ∂

∆+

∂φ∂

∆+φ=φ

yxyx

yxyx

yy

xx

yxyx

yy

xx

yy

xx

(2.3)

Figure 2.2 Supporting knots around a reference knot

Suppose that equation (2.3) is truncated to the third order derivatives. Then it has 9

unknowns. Among them, 2 are the first order derivatives, 3 are the second order

derivatives, and 4 are the third order derivatives. Like the conventional FD scheme, we

Reference knot

Supporting knots

Non-supporting knots

Page 53: Advanced Computational Fluid(Shu Chang)

53

need 9 equations to solve for these 9 unknowns. This can be achieved by applying

equation (2.3) at 9 neighbouring points. Suppose that all the 9 points are within a circular

sub-domain oD of radius od about node o. Application of equation (2.3) at 9

neighbouring points gives

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

where

( ) ( ) ( )( ) ( )

( ) ( ) ( ) ( )( ) ∆∆∆∆∆

∆∆∆∆∆∆∆=

223

322

21,

21,

61

,61,,

21,

21,,

jjjjj

jjjjjjjTj

yxyxy

xyxyxyxs

∂∂φ∂

∂∂φ∂

∂φ∂

∂φ∂

∂∂φ∂

∂φ∂

∂φ∂

∂φ∂

∂φ∂

=

02

3

02

3

03

3

03

3

0

2

02

2

02

2

00

T

,,,

,,,,,

yxyxyx

yxyxyxdφ

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 oD . j j ox x x∆ = − and

j j oy y y∆ = − , where ( , )j jx y denotes the Cartesian coordinates of node j. It is noted that

in this development, we truncated the Taylor series expansion after the third order

derivatives. This allows us to approximate the second-order derivatives to the second-

order accuracy and the first-order derivatives to the third-order accuracy.

Furthermore, by defining

[ ]0901T ...,, φ−φφ−φ=∆φ (2.5)

[ ] 9991T ...,, ×= ssS (2.6)

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

Page 54: Advanced Computational Fluid(Shu Chang)

54

= Sd∆ϕ ϕ (2.7)

The square matrix S contains all the geometric information about the distribution of the

supporting nodes. If the matrix S is non-singular, the derivative vector dϕ can be

obtained as

1−= ∆d Sϕ ϕ (2.8)

Application of equation (2.8) to discretize derivatives in the differential equations yields

the requisite system of finite-difference equations. Up to this point, the development is

similar to that of the conventional finite-difference scheme. The only difference is that we

have used 9 supporting nodes surrounding the reference node in the present two-

dimensional formulation.

Studying the structure of matrix S, it is clear that the distribution of the supporting nodes

will determine whether it is singular; or it is ill-conditioned for inversion. Assuming the

matrix to be non-singular so that an inverse exists, we observed that the matrix tends to

become ill-conditioned numerically when one or more of the supporting nodes are very

close to the reference node, i.e. ( , ) 0j jx y∆ ∆ ≈ for some j. Secondly, it is noted that the

matrix may become ill-conditioned or singular when some supporting nodes are very

close to each other.

Local Distance Scaling

To overcome the first difficulty, the radius od of the support domain is used to scale the

local distance ( )jj yx ∆∆ , ,

Page 55: Advanced Computational Fluid(Shu Chang)

55

o

jj d

xx

∆=∆ ,

o

jj d

yy

∆=∆ (2.9)

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

After Scaling Before scaling

Grid spacing h N/A 0.1 0.01 0.001 0.0001

Condition number 8.7246 9.0321 58.027 550.95 5480.5

An experiment has been carried out to test the effect of scaling, and the results are shown

in Table 2.1. It can be clearly observed that the condition number of resultant matrix

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

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

),( yx ∆∆ . The derivative vector then leaves,

∆φDSdφ 1−= (2.10)

where the scaling matrix D is the diagonal matrix,

=

3

3

3

3

2

2

2

1

1

o

o

o

o

o

o

o

o

o

dd

dd

dd

dd

d

D (2.11)

Page 56: Advanced Computational Fluid(Shu Chang)

56

However, the second difficulty is not so easy to resolve. This is because little is known

about the effects of node distribution on the conditioning of the matrix, except for a few

special cases, such as when all the supporting nodes are located on a straight line. For

numerical implementation, we would hence have to check and ensure that the matrix S is

well-conditioned at every node of the computational domain. This can be done by a trial-

and-error process. However, the process greatly increases the computational cost. In the

following, we will provide an alternative, which comes in the form of least-squares

technique to optimize the approximation of the vector dϕ . The least-squares technique

allows an optimal approximation to be derived from an over-determined set of equations.

It allows the use of a great number of nodes to bypass the problem of singularity.

Least-Square technique

Suppose that the optimal approximation of the derivative vector at the node o is b.

Similar to equation (2.4), the functional value at its neighbouring point can be

approximated by

bs ⋅=− Tjoj φφ , j=1, 2,…, n (2.12)

Equation (2.12) is applied at n ( 9≥n ) supporting points in the domain oD . 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

jjjE

1

20 bsb Tφφ (2.13)

To minimize the error, we need to set

Page 57: Advanced Computational Fluid(Shu Chang)

57

0=

∂∂

=dφbbE (2.14)

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

( ) 02 ,1

9

1,0 =−

−φ−φ∑ ∑

= =mj

n

j kkkjj SbS for m = 1,…,9 (2.15)

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

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

simplified as,

( ) mj

n

j kkkj

n

jjmj SbSS ,

1

9

1,

10, ∑ ∑∑

= ==

=φ−φ for m = 1,…,9 (2.16)

Noticing that ( ) ( )Tjmmj SS ,, = , equation (2.16) can be rewritten in the form of matrix,

bSS∆φS TT = (2.17)

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

square technique as

( ) ∆φSSSdφ TT 1−==b (2.18)

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

independent.

Proof: If the columns of S are linearly independent, then 00 ≠⇒≠ Sxx and therefore

00 2

2>=⇒≠ SxSxSxx TT . Hence SST is positive definite.

Page 58: Advanced Computational Fluid(Shu Chang)

58

As we have discussed above, the column vectors are prone to be linearly dependent when

we use the same number of supporting points as that of determined derivatives. It

depends on how the supporting points disperse in the sub-domain. In general, since they

are randomly generated, we cannot guarantee that we can have the “perfect” pattern of

supporting point at every node without additional check and adjustment. However, this

situation can be improved by using more supporting points than the number of

approximated derivatives. As a result, with the increasing of the number of supporting

points, the dimension of the column vectors increase correspondingly. At the same time,

the possibility of linear-independence for the column vectors increase greatly as well.

They will finally become linearly independent if we continuously adopt more and more

supporting points. Thus, we can say that the matrix SST is symmetric and positive-

definite. This conclusion can be applicable to most of the “grid” or point distributions

except for some unreasonable ones. For example, ]2[]1[ columncolumn α= , 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

Page 59: Advanced Computational Fluid(Shu Chang)

59

the optimal. Therefore, further improvement can be made to get better distribution of

approximation errors. That is the reason for the introduction of the weighting function.

The least square approximation (2.13) assumes the square errors to be uniformly

distributed across the supporting points. For a given amount of total error, one would

normally prefer the approximation error to be small in the crucial central region around

the reference node, where the derivatives are evaluated, and be willing to tolerate higher

errors for points further out, since the latter is expected to have smaller influence on the

desired derivatives. The redistribution of errors can be achieved by introducing a

distance-related weighting function that assigns greater weightage to points near the

reference node. Such weighting functions typically have the following properties:

• They are positive within the support domain;

• Their values decrease with increasing distance from the reference node.

Five different weighting functions are examined in the present study. All the four

functions have the properties described above.

1) 10 =iW (equivalent to no weighting) (2.19a)

2) 42 )1(/41 ii rW −π= (2.19b)

3) ii rW /12 = (2.19c)

4) 432 38613 iiii rrrW −+−= (2.19d)

5) 4/14 ii rW = (2.19e)

Page 60: Advanced Computational Fluid(Shu Chang)

60

where o

iii d

yxr

22 ∆+∆= , the index i is the ith supporting point, and od denotes the

radius of support domain, 10 ≤≤ ir . The adoption of weighting function actually serves

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

( ) ∆φWSWSSdφ TT 1−= (2.20)

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

points,

=

nW

W

0

01

OW (2.21)

Using scaling and define C= ( ) WSSWS TT 1− , equation (2.20) gives

∆φDCdφ = (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,

Page 61: Advanced Computational Fluid(Shu Chang)

61

at each node the coefficient matrix remains unchanged for a fixed set of supporting points

and its inverse matrix needs to be calculated only once. The increase in computational

cost is acceptable as compared to the traditional FDM but the new scheme gives the

flexibility for complex problems. Furthermore, the derivatives given by equation (2.22)

are independent of the governing equations, and can be used repeatedly for other

problems with the same distribution of supporting points.

Theoretical Analysis of Discretization Error

Although we are interested in the accuracy of LSFD method, it seems better to begin by

investigating the error incurred in the discretization of derivatives. For simplicity, the

error analysis in this section is carried out on a uniform mesh with a grid spacing h. In

this development, since we have truncated the Taylor series expansion after the third

order derivatives, the truncation error for equation (2.12) can be written as:

( )44 )(,)( iii yxOe ∆∆= , i=1, …, n (2.23)

Specifically, since a uniform mesh is chosen for analysis, we can see that ix∆ and iy∆

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

( )4hOei = , i=1, …, n (2.24)

Equation (2.4) can be rewritten as:

[ ] ( ) [ ] [ ] 11991 ×××× += nexactnn edφS∆φ (2.25)

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

that its entries represent the exact values of derivatives.

Page 62: Advanced Computational Fluid(Shu Chang)

62

In order to get the explicit expression of discretization error for the derivative vector dφ

achieved by least-square technique, we substitute equation (2.25) into equation (2.18).

Then, we have,

( ) dφSSedφSS TT =+exact (2.26)

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

substituting it into equation (2.26), we have,

eSESS TT = (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.,

HSS = (2.28)

where

93

3

3

3222

3

3111

)(

)(

)(

×

∆∆∆

∆∆∆

∆∆∆

=

n

nnn

hy

hy

hx

hy

hy

hx

hy

hy

hx

L

MMMM

L

L

S and

993

2

×

=

h

hh

h

O

H

hxi∆ and

hyi∆ are constants for a uniform mesh since the set of supporting points for the

center point is fixed as long as they are chosen. Therefore, we can see that matrix S is

only concerned with the point-distribution in the domain and matrix H is related to the

influence of the mesh refinement.

Substituting equation (2.28) into equation (2.27) and simplifying the expression gives,

( ) eSSSHE TT1 1−−= (2.29)

Page 63: Advanced Computational Fluid(Shu Chang)

63

Since the matrix SST is symmetric, positive and definite, it implies the existence and

boundness of ( ) 1−SST . Observing that matrix ( ) TT SSS 1− does not have information of

grid spacing h, we can say that the entries of the resultant vector ( ) eSSS TT 1− remain the

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

discretization error vector E:

=

)()()()()()()()()(

2

2

2

3

3

hOhOhOhOhOhOhOhOhO

E (2.30)

which indicates that the LSFD scheme allows us to approximate the second-order

derivatives to the second-order accuracy and the first-order derivatives to the third-order

accuracy. This is very encouraging conclusion, which shows that the use of least-square

technique does not degrade the order of accuracy of finite-difference approximation.

Though the above analysis of discretization error of the scheme is made on the uniformly

distributed points, it can also be extended to other kinds of point distributions such as

scattered point distribution. The difference only lies on the choice of local distance

scaling or the so-called “mesh” size h. The order of discretization error remains the same.

From the analysis above, it can also be seen that the number of supporting points has no

effect on the order of discretization error, which is determined by the order of truncated

Page 64: Advanced Computational Fluid(Shu Chang)

64

Taylor series expansion instead. However, it can influence the accuracy of LSFD scheme

in another way. As discussed in the previous section, large number of supporting points

mainly contributes to convertibility of coefficient matrix, but also expands the local

support of reference node. In other words, the radius of local support or the “mesh” size h

will become larger with the increasing of supporting points. That will slightly lower the

accuracy of spatial discretization by LSFD method.

2.3 Numerical Analysis of Convergence Rate

In this section, numerical examples are performed on a Poisson solver to investigate the

numerical characteristics of the LSFD method, such as the role of weighting function in

the scheme, and analysis of discretization error, etc.

Consider the problem of a two-dimensional Poisson equation in a square domain

( 10,10 ≤≤≤≤ yx ). The governing equation and boundary condition are defined by

yxyu

xu πππ sinsin2 2

2

2

2

2

⋅−=∂∂

+∂∂ for 0<x<1, 0<y<1, (2.31)

Boundary condition: xu += 1 on Ω∂ ,

The analytical solution for this problem is yxxyxu ππ sinsin1),( ⋅++= .

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:

Page 65: Advanced Computational Fluid(Shu Chang)

65

yxuwwdN

k

ki

yyki

xxki π⋅ππ−=+∑

=

sinsin2)( 2

1,, (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. xxkiw , 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 yykiw , . 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 ----------------------

Page 66: Advanced Computational Fluid(Shu Chang)

66

scaling=0.d0 do i=1,np dx=pxy(i,1)-xy(1) dy=pxy(i,2)-xy(2) scaling=dmax1(scaling,dsqrt(dx*dx+dy*dy)) enddo scaling=scaling*1.2d0 c----------------------------------------------------------------------------------- do i=1,np dx=(pxy(i,1)-xy(1))/scaling dy=(pxy(i,2)-xy(2))/scaling A(i,1)=dx A(i,2)=dy A(i,3)=dx*dx*0.5d0 A(i,4)=dy*dy*0.5d0 A(i,5)=dx*dy A(i,6)=(dx**3)/6.d0 A(i,7)=(dy**3)/6.d0 A(i,8)=0.5d0*dx*dx*dy A(i,9)=0.5d0*dx*dy*dy enddo do ip=1,np do jp=1,np if(ip.eq.jp)then dx=pxy(ip,1)-xy(1) dy=pxy(ip,2)-xy(2) dxy=dsqrt(dx*dx+dy*dy)/scaling if(iw.eq.0)wi(ip,ip)=1.d0 if(iw.eq.1)wi(ip,ip)=dsqrt(4.d0/pi)*(1.d0-dxy*dxy)**4.d0 if(iw.eq.2)wi(ip,ip)=1.d0/dxy if(iw.eq.4)wi(ip,ip)=1.d0/(dxy**4.d0) if(iw.eq.3)wi(ip,ip)=1.-6.d0*dxy*dxy+8.d0*dxy**3.d0-3.d0*dxy**4.d0 else wi(ip,jp)=0.d0 endif enddo enddo do ik1=1,idim do ik2=1,np b(ik1,ik2)=A(ik2,ik1) enddo enddo

Page 67: Advanced Computational Fluid(Shu Chang)

67

call brmul(b,wi,idim,np,np,d) call brmul(d,a,idim,np,idim,e) do ik1=1,idim do ik2=1,idim et(ik1,ik2)=e(ik1,ik2) enddo enddo call brinv(e,idim,l) call brmul(e,et,idim,idim,idim,unite) c------------------- Check the computed inverse of coefficient matrix -------------------- c---- if AA-1 .ne. I or has larger error more than the tolerance, stop the program c---- which indicates the large condition number. erre=0.d0 do ik1=1,idim do ik2=1,idim if(ik1.eq.ik2)then erre=dmax1(erre,dabs(1.d0-unity(ik1,ik2))) else erre=dmax1(erre,dabs(unity(ik1,ik2))) endif enddo enddo if(erre.gt.error_tolerance)then write(*,*)'too large inverse error',erre write(*,*)xy(1),xy(2) stop endif c--------------------------------------------------------------------------------------------------------- call brmul(e,d,idim,idim,np,r) do ik1=1,idim do ik2=1,np vd_temp(ik1,ik2)=r(ik1,ik2) enddo enddo do ik1=1,idim do ik2=1,np vd_temp(ik1,nd)=vd_temp(ik1,nd)-vd_temp(ik1,ik2) enddo

Page 68: Advanced Computational Fluid(Shu Chang)

68

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

c---------- Subroutine used to calculate the product of matrix multiplication subroutine brmul(a,b,m,n,k,c) dimension a(m,n),b(n,k),c(m,k) double precision a,b,c do 175 i=1,m do 175 j=1,k c(i,j)=0.0 do 171 l=1,n c(i,j)=c(i,j)+a(i,l)*b(l,j) 171 continue 175 continue return end c------- subroutine to numerically compute the inverse of an nxn matrix A. c------- The inverse of A will replace A as a return parameter after computation. subroutine brinv(a,n,l) dimension a(9,9),is(9),js(9) double precision a,t,d l=1 do 100 k=1,n d=0.0 do 10 i=k,n do 10 j=k,n if (abs(a(i,j)).gt.d) then d=abs(a(i,j)) is(k)=i js(k)=j

Page 69: Advanced Computational Fluid(Shu Chang)

69

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

Page 70: Advanced Computational Fluid(Shu Chang)

70

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

After the numerical discretization, the corresponding algebraic equations are solved by

the Gaussian-Seidel iterative method. The computed results are then compared with the

analytical solutions. Convergence is measured by the following relative error norm:

Relative L2 error norm: ∑

∑ −

=

=

N

iexact

N

iexactnum

u

uu

1

2

1

2

(2.33)

The effect of five weighting functions as shown in equation (2.19) on the convergence

and accuracy of the solution is investigated. In order to study the difference between the

accuracy achieved by conventional FD scheme and LSFD method, the central-difference

FD scheme is also used to solve this Poisson equation on the same mesh.

Table 2.2 Comparison of Log10(err) for the solution of Poisson equation with different

weighting functions

Grid spacing 0.0500 0.0200 0.0133 0.0100 0.0067 0.005

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

LSFD

W3 -2.8073 -3.6182 -3.9741 -4.2253 -4.5795 -4.8311

Page 71: Advanced Computational Fluid(Shu Chang)

71

W4 -2.8207 -3.6312 -3.9873 -4.2382 -4.5925 -4.8441

Conventional Central FDM -3.3208 -4.1175 -4.4703 -4.7208 -5.0750 -5.3277

Table 2.2 shows the relative 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

Page 72: Advanced Computational Fluid(Shu Chang)

72

convergence rate should be 2 theoretically. As shown in Figure 2.4, its convergence line

is in parallel with those of LSFD schemes. It is noted that the central-difference FD

scheme produces the most accurate solution among the six schemes. The reason may be

due to the fact that the radius of supporting points in the LSFD method is actually larger

than the grid spacing h. In general, more supporting points are needed in the LSFD

scheme than in the conventional FD scheme.

O

A

B

CD

log10(h)

log10(err)

-2.225 -2.2 -2.175 -2.15 -2.125

-4.6

-4.5

-4.4

W0W1W2W3W4

OABCD

Figure 2.3 Convergence curves of LSFD with different weighting functions

Page 73: Advanced Computational Fluid(Shu Chang)

73

O

O

O

O

O

O

A

A

A

A

A

A

F

F

F

F

F

log10(h)

log10(err)

-2.25 -2 -1.75 -1.5

-5

-4.5

-4

-3.5

-3W0W1W2W3W4CD

OA

F

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

2.4 Sample Applications of LSFD to Flow Problems

u=0v=0T=1

u=0v=0T=0

u Ty

= = =0 0 0, ,v ∂∂

u Ty

= = =0 0 0, ,v ∂∂

Figure 2.5 Configuration of Natural Convection in A Square Cavity

Page 74: Advanced Computational Fluid(Shu Chang)

74

The problem being considered is a two-dimensional buoyancy-driven flow of a

Boussinesq fluid in a square cavity, as shown schematically in Figure 2.5. The horizontal

walls of the cavity are insulated while the vertical walls are kept at different

temperatures. This problem has been studied by many researchers, and can serve as a

good model for testing and validating new numerical methods. The flow and heat transfer

in the cavity are governed by the following non-dimensional equations in terms of stream

function ψ , vorticity ω and temperature T:

xTRa

yxyv

xu

t ∂∂

+

∂∂

+∂∂

=∂∂

+∂∂

+∂∂ PrPr 2

2

2

2 ωωωωω (2.34)

ωψψ=

∂∂

+∂∂

2

2

2

2

yx (2.35)

2

2

2

2

yT

xT

yTv

xTu

tT

∂∂

+∂∂

=∂∂

+∂∂

+∂∂ (2.36)

where Pr and Ra are the Prandtl and Rayleigh numbers respectively. The Prandtl number

of Pr=0.71 is taken for the model problem. The u, v denote the components of velocity in

the x and y direction, which can be calculated from the stream function

yu

∂∂

=ψ ,

xv

∂ψ∂

−= (2.37)

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

0===== vuTψω , 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)

Page 75: Advanced Computational Fluid(Shu Chang)

75

0=∂∂

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

No explicit mesh is required by the LSFD method. The discretization of the

computational domain thus comprises merely a set of points at which dependent field

variables are defined. Only a single nodal index i is required to enumerate the nodal

points for problems in two or three space dimensions. At a general nodal point of index i,

the LSFD approximations of the governing equations (2.34-2.36) give:

∑ ∑ ∑∑

=

= = ==

∆+

ω∆+ω∆=ω∆+ω∆=

ω

i

i i ii

n

k

ki

xki

n

k

n

k

n

k

ki

yki

ki

xki

ki

yki

n

ki

ki

xkii

i

TcRa

cccvcudt

d

1

)1(,

1 1 1

)2(,

)2(,

)1(,

1

)1(,

Pr

Pr (2.42)

∑ ∑ =∆+∆= =

i in

k

n

ki

ki

yki

ki

xki cc

1 1

)2(,

)2(, ωψψ (2.43)

∑ ∑ ∑∑= = ==

∆+∆=∆+∆=i i ii n

k

n

k

n

k

ki

yki

ki

xki

ki

yki

n

ki

ki

xkii

i TcTcTcvTcudtdT

1 1 1

)2(,

)2(,

)1(,

1

)1(, (2.44)

∑=

∆=in

k

ki

ykii cu

1

)1(, ψ and ∑

=

∆=in

k

ki

xkii cv

1

)1(, ψ (2.45)

where ik

ik

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

unknown value at the kth supporting point for the node i. )1(,

xkic , )1(

,y

kic , )2(,

xkic and

)2(,

ykic 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

Page 76: Advanced Computational Fluid(Shu Chang)

76

other boundary points. So, when it is applied to implement the Neumann boundary

condition (derivative condition), it is very difficult to get an explicit formulation to

update the functional value at the boundary point. This difficulty can be easily removed

by using the conventional one-sided finite difference scheme. The strategy will be

addressed in the following.

For the practical applications of mesh-free method, there are some other things worthy of

attentions in addition to the spatial discretization. For example, for many flow

applications the solution may need different resolutions for different regions. High

resolution is typically required for regions near boundaries if incompressible flow is

considered. Thus, when we use either mesh-based or point-based methods, the density of

mesh/point distribution should reflect that need. In such circumstances, the distribution of

the nodes or points in domain must be generated either adaptively or by using known

information about the specific physical problem. Both of them can be implemented in the

mesh-free method as we can freely add or delete nodes instead of re-meshing. For

incompressible flow and heat transfer in practical applications involving complex

geometry, rapid variations of physical variables usually occur in the boundary layer.

Thus, we would like to be able to control the point distribution in these areas to ensure

that the boundary phenomena are captured. This requirement leads to the adoption of

locally orthogonal grids near the boundary. The locally orthogonal grid generation can be

made by the algebraic formulation or by the fast hyperbolic method. Another advantage

of this method is that user can explicitly give/determine the grid spacing in the normal

direction of the boundary. This feature is very attractive in the viscous flow simulations.

Page 77: Advanced Computational Fluid(Shu Chang)

77

It should be emphasized that as only several layers of grids are concerned here, the

problem of grid shock formation in hyperbolic grid generation over strong concave

surface is completely avoided. Another important benefit of having locally orthogonal

grid at the boundary is to facilitate the efficient implementation of Neumann-type

boundary condition. As it can be seen from Fig. 2.6, the derivatives in Neumann-type

boundary condition can be easily discretized by the one-side finite difference schemes

and expressed in terms of the function values at the wall and interior knots.

Figure 2.6 Locally orthogonal grids near the boundary

As shown in Figure 2.6, three layers of structured points are distributed at and near the

boundary. Note that this special arrangement of points is only used to implement the

derivative condition. As for discretization of governing equation, at any interior point

including the point on the three layers, any spatial derivative is discretized by the LSFD

scheme. Clearly, this strategy separates the discretization of governing equations done at

the interior points by the LSFD schemes and the implementation of Neumann boundary

Wall

w

w+1

w+2

Random knot distributionLocally orthogonal grid

Page 78: Advanced Computational Fluid(Shu Chang)

78

condition done at the boundary points by conventional FD schemes. In other words, our

strategy combines the advantages of the conventional FD schemes for easy

implementation of boundary conditions and the LSFD schemes for flexibility to complex

geometry. As shown in Fig. 2.6, the use of one-side FD scheme at the boundary point

gives,

Stream function: 0=iψ at all boundary nodes, (2.46)

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

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

3

4 21 ++ −= ww

wTTT , at y=0,1, 0<x<1 (second-order FD scheme)

Vorticity: 121

213

++ −= w

ww h

ωψω (second-order FD scheme) (2.48)

where w denotes a point on the wall, w+1 and w+2 denote the first and second adjacent

points in the flow field from the wall. Our numerical simulations of this problem are

performed on a composite node distribution, which includes locally orthogonal grids near

the boundary and random points filled at the rest as shown in Fig. 2.7.

After numerical discretization by the LSFD method, the resultant algebraic equations are

solved by the SOR iteration method. The numerical results are visualized by isotherms

and streamlines. The results for the problems with Ra=104 and 105 are illustrated in Fig.

2.8.

Page 79: Advanced Computational Fluid(Shu Chang)

79

Figure 2.7 Locally orthogonal grid and random node distribution

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

Page 80: Advanced Computational Fluid(Shu Chang)

80

(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

Page 81: Advanced Computational Fluid(Shu Chang)

81

middle of two cylinders there is an invisible line which forms the border of the two

systems. Then, the sets of nodes generated from the local polar-cylindrical grid are

truncated by the outer boundary – a rectangle. The node distribution generated for the

flow past two circular cylinders in staggered arrangement is shown in Fig 2.9.

............................................................................................................................................................................................................................

............................................................................................................................................................................................................................

........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.......................................................................................................................................................................................................................

........................................................................................................................................................................................................................

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.......................................................................................................................................................................................................................

......................................................................................................................................................................................................................

.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........................................................................................................................................................................................................................

...................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

..........................................................................................................................................................

..............................................................................

........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

......................................................................................................................................................................................................................

.........................................................................................................................................................

.............................................................................

.......................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

......................................................................................................................................................

....................................................................

...........................................................................................................................................................................................................................

...................................................................................................................................................................................................................................

........................................................................................................................................................................................................................

.....................................................................................................................................................

...........................................................................

..........................................................................................................................................................................................................................

...................................................................................................................................................

......................................................................

..........................................................................................................................................................................................................................

..................................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

...................................................................................................................................................

.......................................................................

........................................................................................................................................................................................................................

...................

.........................................................................................................................................................................................................

..................

................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

...............................................................................................................................................................................................................................

............................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

................

..........................................................

.......................................................................................................................................

..............

.........................................................

.................................................................................................................................

............

.........................................................

.................................................................................................................................

...............

.................................................

..............................................................................................................................

............

...................................................

................................................................................................................................

....................

.....................................

............................................................................................................................

...............

..........................................

........................................................................................................................

...........

...............................................

.....................................................................................................................

...........

................................................

....................................................................................................................

.........

................................................

................................................................................................................

.........

...................

..............................

.................................................

...................................

................

.........

..............................................

...............................................

.................................

.............

.........

.............................................

..............................................

..............................

..........

.........

............................................

.............................................

...........................

..........

.........

.........................................

............................................

.........................

..........

.........

......................................

..........................................

........................

.......

.........

.......................................

..........................................

......................

.......

.........

.....................................

........................................

......................

.......

.........

...................................

................ ... . .. .. .. .. ...........

....................

.......

............

.............................

........... .. .. . . . . . . . . . . . . . . .. .......

...................

.......

............

............................

.......... . . . . . . . . . . . . . . . . . . . . . . ... ...

..................

.......

.............

.........................

..... .. . . . . . . . . . . . . . . . . . . . . . . . . .. . . ..

.................

.......

...............

.....................

... . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

................

........

..................................

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . ..............

........

................................

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . ............

.........

..............................

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. .........

.........

............................

. . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .......

.........

...........................

. . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .. ....

.........

..........................

. . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .

. . . .. . .. . .. ..

.........

........................

. . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .. . .. .

..........

......................

. . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .. . ..

...................

. . . . . . . . . . . . . . . .. . . .

. . .. . .. . ..

.........

. . . . . . . . .. . . .

. . .. . ..

...

. . . . . .. . .. . ..

. . .. . .. .

. . .. .. . .

..

....................................................................................................................................................................................................................................................................

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........................................................................................................................................................................................................................

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........................................................................................................................................................................................................................

.....................................................................................................................................................................................................................

............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.......................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

...................................................................................................................................................................................................................

......................................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

.......................................................................................................................................................................................................................

........................................................................................................................................................

..................................................................

...................................................................................................................................................................................................................................

........................................................................................................................................................................................................................

......................................................................................................................................................

....................................................................

...........................................................................................................................................................................................................................

...................................................................................................................................................................................................................................

..............................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

...........................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

..................................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

...................................................................................................................................................

......................................................................

.........................................................................................................................................................................................................................

...................

.........................................................................................................................................................................................................

..................

................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

...............................................................................................................................................................................................................................

............................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

................

..........................................................................................................................................................................................................

..............

..............................................................................................................................................................................................................

..............

...............................................................................................................................................................................................................

..............

..............................................................................................................................................................................................................

............

.................................................................................................................................................................................................................

............

..................................................................................................................................................................................................................

................

.........................................................................................................................................................................................................

...........

...............................................................................................................................................................................................................

...........

...........................................................................................................................................

......................................................................

.........

.......................................................................

...............................................................................................................................

.........

..................

...................................................

............................................................

..............................................................

........

.............

......................................................

........................................................

.................................................................

.........

..............................................................

......................................................

...................................................................

.........

..........................................................

....................................................

...................................................................

.........

........................................................

..................................................

.....................................................................

.........

.....................................................

.................................................................................................................

.........

....................................................

..............................................

..................................

.....................

........

...............

.......................................

............................................

..............................

..................

........

...............

......................................

................... ... .. .. .. . .. ............

...........................

...............

.......

.............

.......................................

.............. ... . .. . . . . . . . . . .. . . .. .......

........................

............

.......

..........

..........................................

............. . . . . . . . . . . . . . . . . . . . . . . .. ....

......................

.........

......

.........

............................................

.......... . . . . . . . . . . . . . . . . . . . . . . . . ... . ..

....................

......

......

.......

...............................................

...... . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

.. .................

......

......

.........

...........................................

... . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . ................

......

......

.........

.........................................

.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . ..............

......

......

.........

................................

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. ...........

......

.......

...........................

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . ........

......

.......

.................

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .. .....

......

...................

. . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .. ....

......

.............

. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .. . .. .

......

.......

. . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . . .. . .. . ..

...........

. . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

. . .. . .. . .. .

.....

. . . . . . . . . . . . . . . . . . . . . . . .. . . .

. . .. . .. . .. .

.

. . . . . . . . . . . . . . . . . . . . . . . .. . . .

. . .. . .. . ..

. . . . . . . . . . . . . . . . . . . . . . .. . . .

. . .. . .. . .

. . . . . . . . . . . . . . . . . . . . . . .. . . .

. . .. . .

. .

. . . . . . . . . .. . .

. . .. . .

. . . . .. . .

. . .

. . .. . .. . .

..

............................................................................................................................................................................................................................

.....................................................................................................................................................................................................................................

...................

.........................

........

........

......

......

.....

.....

.....

.....

....

....

...

...

....

....

...

...

...

...

...

...

...

...

...

...

...

...

..

..

..

..

..

..

..

..

..

..

..

..

..

..

.

.

..

..

.

.

..

..

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

..

.

.

.....

.................

........................

.............................

...............................

...............................

..............................

...............

......

.......

..

.... . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . .

.

...........

. . . . . . . . . . . . . . . . . . . . . . . .. . .

..............

. . . . . . . . . . . . . . . . . . . . . . . . .. . . .

.................

. . . . . . . . . . . . . . . . . . . . . . . .. . . .

...................

. . . . . . . . . . . . . . . . . . . . . . . .. . . .

..................

. . . . . . . . . . . . . . . . .. .

.................

. . . . . . . . .

............

.

.....

............... ....................... .....

......................

. . . . . . . . . .

..........

....................

. . . . . . . . . . . . . .

.........

......................

. . . . . . . . . . . . . .. . .

.......

.........................

. . . . . . . . . . . . .. . . .

. .

......

..........

...........

. . . . . . . . . . . . .. . . .

. . . .

......

............

. . . . . . . . . . . . .. . . .

. . . ..

......

.....

. . . . . . . .. . . .

. . .. . ..

.....

.....

. . . .. . .

. . .. . .

....

.....

. . . .. . .

. . .. .

....

.....

. . .. . .

. .. .

....

....

. . .. .. .. .

....

...

. .. .. .. .

....

...

. .. .. .. .

....

..

. .. .. ..

....

..

. .. .. ..

....

..

. .. .. ..

....

.

. .. .. .

....

.

. .. ..

....

.

. .. ..

....

. .. ..

...

..

. .. .

.....

. .. ..

....

. ....

....

....

....

....

....

...

...

....

....

....

...

...

....

....

...

...

....

...

...

...

...

....

..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.......................................................................................................................................................................................................................

..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

....................................................................................................................................................................................................................

............................................................................................................................................................................................................................

......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

........................................................................................................................................................................................................................

........................................................................................................................................................................................................................

..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.....................................................................................................................................................................................................................

.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

.....................................................................................................................................................................................................................

..........................................................................................................................................................................................................................................

...................................................................................................................................................................................................................

............................................................................................................................................................................................................................

........................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

...................................................................................................................................................................................................................................

........................................................................................................................................................................................................................

...........................................................................................................................................................................................................................

......................................................................................................................................................................................

......................

......................................................................................................................................................

................................

.......................

...............................................................................................................................................................................

...............

.................................................................................................................................................................................

...............

....................................................................................................................................................

.........................

................

........................................................................................................................................................................

.................

...................................................................................................................................................................

.................

.................................................................................................................................................................

.................

..............................................................................................................................................................

......................

......................................................................................................................................................

..........................................................................................................................................................................

........................................................................................................................................................................

......................................................................................................................................................................

....................................................................................................................................................................

..................................................................................................................................................................

................................................................................................................................................................

..............................................................................................................................................................

......................................................................

..............................................................................

................................................................

.........................................................................

............................................................

.....................................................................

.........................................................

..................................................................

.......................................................

................................................................

....................................................

.............................................................

..................................................

..........................................................

................................................

.........................................................

..............................................

.......................................................

............................................

.....................................................

..........................................

...................................................

.........................................

..................................................

.......................................

...............................................

.

......................................

.............................................

..

....................................

............................................

.

...................................

...........................................

.

..................................

...........................................

.................................

..........................................

................................

........................................

..............................

......................................

.

..............................

......................................

.

............................

................ .. ....... ............

...........................

............. .. .. .. . .. .. .. ..........

...........................

.......... .. . . . . . . . . . . . . . . .. .. ......

.........................

..... .. . . . . . . . . . . . . . . . . . . . . . . ... ..

.........................

.... . .. . . . . . . . . . . . . . . . . . . . . . ... .. .

........................

. . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . .

.......................

. . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .

......................

. . . . . . . . . . . . . . ..

......................

. . . . . . . .

..........

. .

........

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

...........................................................................................................................................................................................................................

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

...................................................................................................................................................................................................................

...........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

...........................................................................................................................................................................................................................

....................................................................................................................................................................................................................

....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

............................................................................................................................................................................................................................

.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

......................................................................................................................................................................................................................

.........................................................................................................................................................................................................................

........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................................

....................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

........................................................................................................................................................................................................................

..........................................................................................................................................................................................................................

.......................................................................................................................................................................................................................

...................................................................................................................................................................................................................................

.......................................................................................................................................

.........................................................................

...................................................................

...........................................................................................................................................

..........................................................

.......................................................................................................................................

.........................................................

..................................................................................................................................

..........................................................

...........................................................................................................................

.............................................................

..............................................................................................................................

.......................................................

..........................................................................................................................

........................................................

....................................................................................................................

...........................................................

..................................................................................................................

...........................................................

.......................................................................................................................

...................................................

....................................................................................................................

....................................................

..................................................................................................................

....................................................

..................................................................................................................

..................................................

.............................................................................................................

......................................................

..........................................................................................................

..................

.....................................

............................................................................................................

...................................................

................................................................................................................

.............................................

.............................................................................................................

..............................................

............................................................................................................

...............................................

........................................................................................................

................

.................................

.......................................................................................................

...............

.................................

....................................................................................................

..............

....................................

......................................................................................................

...............

................................

.....................................................................................................

..............

................................

.....................................................................................................

..............

................................

.......................................................................................................

..................

........................

.....................................................................................................

.............

...............................

..................................................................................................

...........

..................................

...............................................................................................

.........

......................................

..............................................................................................

.........

......................................

...............................

..............................................................

.........

..................

.....................

.............................

.................................................................

.........

.....................................

.............................

.................................................................

.........

....................................

............................

...................................................................

.........

..................................

............................

...................................................................

.........

.................................

...............................................................................................

.........

................................

..........................

....................................................................

.........

.................................

.........................

....................................................................

........

..............

....................

........................

....................................................................

........

..............

....................

... .. ........ ...........

...................................................................

.......

...........

........................

. .. .. .. . .. .. .. ..........

...................................... .............................

.......

..........

.........................

. . . . . . . . . . . . . .. .. ......

.................................................................

......

........

..............................

. . . . . . . . . . . . . . . . . ......

...................................... ...........................

......

........

..............................

. . . . . . . . . . . . . . . . ... .. .

................................................................

......

.......

..........

......................

. . . . . . . . . . . . . . . .. . . . .

.. ..............................................................

......

......

..........

.......................

. . . . . . . . . . . . . . . .. . . . .

. . ..................................... ............................

......

.......

..............

. . . . . . . . . . . . . . . .. . . . .

. . . .................................... ............................

......

.......

.....

. . . . . . . . . . . . . . .. . . . .

. . . .. . ..............................................................

......

.......

. . . . . .. . . .

. . . .. .................................................................

......

..

. . . . .. . . .

. . .. ................................ ................................

......

. . . .. . .. . .. ............................... ................................

....

. . .. . .. . .. ...........................................................

....

. . .. . .. .. ............................ .............................

....

. . .. . .. .. .......................................................

....

. . .. .. .. .......................... ...........................

....

. . .. .. .. ...................................................

....

. .. .. .. ........................ .........................

...

. .. .. .................................................

....

. .. .. .. ...................... .........................

..

. .. .. ...............................................

..

. .. .. ...................... .......................

..

. .. .. ...........................................

..

. .. .. .........................................

..

. .. .. .......................................

...

. .. .........................................

.

. .. .. ......................................

.

. .. ........................................

. .. ......................................

. .......................................

.......................................

.....................................

.....................................

...................................

...................................

.................................

................................

...............................

..............................

...............

.......

.........

...

....

.

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

Some numerical results are shown in Figs 2.10-2.11. In Fig.2.10, drag and lift coefficient

of flow past a pair of side-by-side cylinders with Reynolds number of Re=100 are

illustrated, while the instantaneous vorticity contours and streamlines are shown in

Fig.2.11. It can be clearly observed that the anti-symmetric (in-phase) synchronized

Karman vortex streets have been successfully simulated.

Page 82: Advanced Computational Fluid(Shu Chang)

82

time

CD1

CD2

150 160 170 1800.7

0.8

0.9

1

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9

2

CD1CD2

time

CL1

CL2

150 160 170 180-4

-3

-2

-1

0

1

-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

2.5

3

CL1CL2

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.

Page 83: Advanced Computational Fluid(Shu Chang)

83

3. Radial Basis Function-based Differential

Quadrature (RBF-DQ) Method

3.1 Introduction

In this chapter, we present another mesh-free method, which combines the derivative

approximation by the differential quadrature (DQ) method, and the function

approximation by the radial basis functions (RBFs). As a result, the method can be used

to directly approximate the derivatives of dependent variables on a scattered set of nodes.

Radial basis functions (RBFs) have been under intensive research as a technique for

multivariate data and function interpolation in the past decades, especially in multi-

dimensional applications. Their performance demonstrates that RBFs constitute a

powerful framework for interpolating or approximating data on non-uniform grids. RBFs

are attractive for pre-wavelet construction due to their exceptional rates of convergence

and infinite differentiability. Since RBFs have excellent performance for function

approximation, many researchers turn to explore their ability for solving PDEs. The first

trial of such exploration was made by Kansa (1990). As shown by Kansa (1990), using

RBFs as a meshless collocation method to solve PDEs possesses the following

advantages: (1) first of all, it is a truly mesh-free method, and is independent of spatial

dimension in the sense that the convergence order is of O(hd+1) where h is the density of

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

Page 84: Advanced Computational Fluid(Shu Chang)

84

scattered data interpolation, it is known that some RBFs have spectral convergence. In

other words, as the spatial dimension of the problem increases, the convergence order

also increases, and hence, much fewer scattered collocation points will be needed to

maintain the same accuracy as compared with conventional finite difference, finite

element and finite volume methods. This shows the applicability of the RBFs for solving

high-dimensional problems. It should be indicated that although some excellent results

were obtained, all previous works related to the application of RBFs for the numerical

solution of PDEs are actually based on the function approximation instead of derivative

approximation. In other words, these works directly substitute the expression of function

approximation by RBFs into a PDE, and then change the dependent variables into the

coefficients of function approximation. The process is very complicated, especially for

non-linear problems. For the nonlinear case, some special techniques such as numerical

continuation and bifurcation approach have to be used to solve the resultant nonlinear

equations. Since the techniques are very complicated, it is not easy to apply them for

solving practical problems such as fluid dynamics, which usually require a large number

of mesh points for accurate solution.

Differential quadrature (DQ) method is a global approach for derivative approximation. It

can obtain very accurate numerical results by using a considerably small number of grid

points. The advantages of the DQ approximation and RBFs can be combined to provide

an efficient discretization method, which is a derivative approximation approach and is

mesh-free. In our method, the RBFs are taken as the test functions in the DQ

approximation to compute the weighting coefficients. Once the weighting coefficients are

Page 85: Advanced Computational Fluid(Shu Chang)

85

computed, the solution process for a PDE is exactly the same as the conventional DQ

method and finite difference schemes. Moreover, the method can be consistently well

applied to linear and nonlinear problems.

3.2 Radial Basis Functions (RBFs) and Function Approximation

A radial basis function, denoted by )(2jxx −ϕ , is a continuous spline which depends on

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

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

centre point jx . 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): 22)( crr +=ϕ (3.1a)

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

Gaussians:2

)( crer −=ϕ (3.1c)

Inverse multiquadrics:22

1)(cr

r+

=ϕ (3.1d)

where 2jr xx −= and shape parameter c is a positive constant. Among above popular

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

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

Page 86: Advanced Computational Fluid(Shu Chang)

86

In recent years, the theory of radial basis function has undergone intensive research and

enjoyed considerable success as a technique for interpolating multivariable data and

functions. Simply, the RBF interpolation technique can be described as following: if the

function values of a function f(x) are known on a set of scattered points dℜ⊂Ω∈x , the

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

)()()(1

2xxxx ψϕλ +−≅ ∑

=

N

jjjf (3.2)

where N is the number of centers or sometimes called knots x, )...,,,( 21 dxxx=x ,

d is the dimension of the problem, λ ’s are coefficients to be determined and ϕ is the

radial basis function. Equation (3.2) can be written without the additional polynomial ψ .

If dqΨ denotes the space of d-variate polynomials of order not exceeding q, and letting the

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

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

∑=

=m

iii P

1

)()( xx ζψ (3.3)

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

( )mζζ ...,,1 , extra m equations are required in addition to the N equations resulting

from the collocating equation (3.2) at the N knots. This is insured by the m conditions for

equation (3.2), viz

∑=

=N

jjij P

1

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

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

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

Page 87: Advanced Computational Fluid(Shu Chang)

87

=

0Tm

m

PPϕ

A

T),( ζλ=x

(3.5)

It has been proven that for a case when the nodes are all distinct, the matrix resulting

from the above radial basis function interpolation is always nonsingular. In 1982, Franke

published a review article evaluating the interpolation methods for scattered data

available at that time. Among the methods tested, RBFs outperformed all the other

methods regarding accuracy, stability, efficiency, memory requirement, and simplicity of

implementation. Among the RBFs tested by Franke, Hardy’s multiquadrics (MQ) were

ranked the best in accuracy, followed by thin plate splines (TPS).

Though TPS radial basis functions have been considered as optimal functions for

multivariate data interpolation, they do only converge linearly. Comparatively, the MQ

functions converge exponentially and always produce a minimal semi-norm error.

However, despite MQ’s excellent performance, it contains a shape parameter c, which is

given by end-user to control the surface shape of basis functions. When value of shape

parameter c is small, the resulting interpolating surface forms a cone-like basis functions.

As value of shape parameter c increases, the peak of the cone gradually flattens. The

choice of the value of c can greatly affect the accuracy of the approximation. It was found

that by increasing c, the root-mean-square error of the goodness-of-fit dropped to a

minimum value and then grew rapidly thereafter. This is due to the fact that the MQ

coefficient matrix becomes ill-conditioned when 22 rc >> . How to choose the optimal

Page 88: Advanced Computational Fluid(Shu Chang)

88

shape parameter remains an open problem. No mathematical theory has been developed

so far to determine such an optimal value. Similar difficulties are also encountered in

choosing the shape parameter for the inverse MQ and Gaussian radial basis functions.

3.3 Differential Quadrature (DQ) Method for Derivative Approximation

xi

yj

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

Page 89: Advanced Computational Fluid(Shu Chang)

89

of a function with respect to x at a mesh point ),( ji yx (represented by the symbol ) by

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

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

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

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

derivative with respect to y, )(myf , at ),( ji yx can be written as

),(),(1

)(,

)(jk

N

k

nkiji

nx yxfwyxf ∑

=

= (3.6a)

),(),(1

)(,

)(ki

M

k

mkjji

my yxfwyxf ∑

=

= (3.6b)

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

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

(2000), )(,nkiw depends on the approximation of the one-dimensional function ),( jyxf (x

is the variable), while )(,mkjw depends on the approximation of the one-dimensional

function ),( yxf i (y is the variable). When ),( jyxf or ),( yxf i is approximated by a

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

and a recurrence relationship to compute )(,nkiw and )(

,mkjw . 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

Page 90: Advanced Computational Fluid(Shu Chang)

90

geometry, the above scheme cannot be applied directly. The coordinate transformation

technique must be introduced. To remove this drawback, we need to develop a more

efficient approach.

It is noted that the basic idea of the DQ method is that any derivative can be

approximated by a linear weighted sum of functional values at some mesh points. We can

keep this idea but release the choice of functional values along a mesh line in the

conventional DQ approximation. In other words, for a two-dimensional problem shown

in Fig. 2.1, any spatial derivative is approximated by a linear weighted sum of all the

functional values in the whole two-dimensional domain. In this approximation, a mesh

point in the two-dimensional domain is represented by one index, k, while in the

conventional DQ approximation like equation (3.6), the mesh point is represented by two

indexes i, j. If the mesh is structured, it is easy to establish the relationship between i, j

and k. For the example shown in Fig. 2.1, k can be written as

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

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

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

derivative with respect to y, )(nyf , at ),( kk yx can be written as

),(),( 1111

)(1,

)(kk

NM

k

mkkkk

mx yxfwyxf ∑

=

= (3.7a)

),(),( 1111

)(1,

)(kk

NM

k

nkkkk

ny yxfwyxf ∑

=

= (3.7b)

Page 91: Advanced Computational Fluid(Shu Chang)

91

In the following, we will show that the weighting coefficients in equation (3.7) can be

determined by the function approximation of RBFs and the analysis of a linear vector

space.

3.4 Global Radial Basis Function-based Differential Quadrature (RBF-

DQ) Method

In this section, we will show in detail the global radial basis function-based differential

quadrature method. The development of this method is motivated by our desire to design

a numerical scheme that is as simple to implement as traditional finite difference schemes

while at the same time keeping the “truly” mesh-free nature. In the following, we will

show the details of global RBF-DQ method step by step.

Among above four RBFs, MQ, which was first presented by Hardy, is used extensively.

Franke did a comprehensive study on various RBFs, and found that MQ generally

performs better for the interpolation of 2D scattered data. Therefore, we will concentrate

on MQ radial basis functions.

The MQ RBFs are used as basis functions to determine the weighting coefficients in the

DQ approximation of derivatives for a two-dimensional problem. However, the method

can be easily extended to the case with other RBFs as basis functions or three-

dimensional problems.

Page 92: Advanced Computational Fluid(Shu Chang)

92

Consider a two-dimensional problem. There are N knots randomly distributed in the

whole computational domain. Suppose that the solution of a partial differential equation

is continuous, which can be approximated by MQ RBFs, and only a constant is included

in the polynomial term )(xψ . Then, the function in the domain can be approximated by

MQ RBFs as

11

222 )()(),( +=

λ++−+−λ= ∑ NN

jjjjj cyyxxyxf (3.8)

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

we have

∑ ∑= ≠=

λ−=λ⇒=λN

j

N

ijjjij

1 ,10 (3.9)

Substituting equation (3.9) into equation (3.8) gives

1,1

),(),( +≠=

λ+λ= ∑ NN

ijjjj yxgyxf (3.10)

where 222222 )()()()(),( iiijjjj cyyxxcyyxxyxg +−+−−+−+−= (3.11)

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

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

iN

ijjjj yxgyxf λ+λ= ∑

≠= ,1),(),( (3.12)

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

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

Page 93: Advanced Computational Fluid(Shu Chang)

93

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

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

1),( =yxgi , and ),( yxg j , ijNj ≠= but,...,1 given by equation (3.11).

From the property of a linear vector space, if all the base functions satisfy the linear

equation (3.7), so does any function in the space NV represented by equation (3.12).

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

given, the function ),( yxf is still unknown since the coefficients iλ are unknown.

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

),( yxf also satisfies equation (3.7). In other words, we can guarantee that the solution of

a partial differential equation approximated by the radial basis function satisfies equation

(3.7). Thus, when the weighting coefficients of DQ approximation are determined by all

the base functions, they can be used to discretize the derivatives in a partial differential

equation. That is the essence of the RBF-DQ method.

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

∑=

=N

k

mkiw

1

)(,0 (3.13a)

∑=

=∂

∂ N

kkkj

mkim

iijm

yxgwx

yxg

1

)(, ),(

),(, ijNj ≠= but ,,...,2,1 (3.13b)

Page 94: Advanced Computational Fluid(Shu Chang)

94

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

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

one can easily obtain the first order derivative of ),( yxg j as

222222 )()()()(

),(

iii

i

jjj

jj

cyyxx

xx

cyyxx

xxx

yxg

+−+−

−−

+−+−

−=

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

determined by

]][[ xTn GWG = (3.14)

where TnW ][ is the transpose of the weighting coefficient matrix ][ nW , and

=

)(,

)(2,

)(1,

)(,2

)(2,2

)(1,2

)(,1

)(2,1

)(1,1

][

nNN

nN

nN

nN

nn

nN

nn

n

www

wwwwww

W

L

MOMM

L

L

,

=

),(),(),(

),(),(),(111

][

2211

1221111

NNNNN

NN

yxgyxgyxg

yxgyxgyxgG

L

MOMM

L

L

=

),()2,()1,(

),1()2,1()1,1(000

][

NNgNgNg

NgggG

nx

nx

nx

nx

nx

nx

x

L

MOMM

L

L

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

Page 95: Advanced Computational Fluid(Shu Chang)

95

One of the most attractive properties in above method is that the weighting coefficients

are only related to the basis functions and the position of the knots. That character is very

appealing when we deal with the nonlinear problems. Since the derivatives are directly

discretized, the method can be consistently well applied to linear and nonlinear problems.

Another attractive property of RBF-DQ method is that it is naturally mesh-free, i.e., all

the information required about the knots in the domain is nothing but their positions.

3.5 Local RBF-DQ Method

The RBF-DQ method presented in the last section is a global approach. In other words,

the function approximation form (3.12) uses all the knots in the computational domain.

When the number of knots, N, is large, the matrix [G] may be ill-conditioned. This limits

its application. To improve it, we developed the local RBF-DQ method. To do this, at

every knot in the domain, we construct a local support region. The local support in this

method has the same configuration as that discussed in the LSFD method. As shown in

Fig. 2.2, at any knot, there is a supporting region, in which there are N knots randomly

distributed. So, equation (3.12) is applied in the local support. That is the only difference

between the local RBF-DQ method and the global RBF-DQ method. All the related

formulations are the same for these two versions of RBF-DQ method.

As shown in the previous section, the MQ approximation of the function contains a shape

parameter c that could be knot-dependent and must be determined by the user. It is well

known that the value of c strongly influences the accuracy of MQ approximation, which

Page 96: Advanced Computational Fluid(Shu Chang)

96

is used to approximate the solution of PDEs. Thus, there exists a problem of how to select

a “good” value of c so that the numerical solution of PDEs can achieve satisfactory

accuracy. In general, there are three main factors that could affect the optimal shape

parameter c for giving the most accurate results. These three factors are the scale of

supporting region, the number of supporting knots, and the distribution of supporting

knots. Among the three factors, the effect of knot distribution is the most difficult to be

studied since there are infinite kinds of distribution. In this section, we will mainly

discuss how to minimize the effect of two factors, that is, the scale of supporting region

and the number of supporting knots, on the shape parameter c.

In the local MQ-DQ method, the number of supporting knots is usually fixed for an

application. Since the knots are randomly generated, the scale of supporting region for

each reference knot could be different, and the optimal shape parameter c for accurate

numerical results may also be different. Usually, it is very difficult to assign different

values of c at different knots. However, this difficulty can be removed from the

normalization of scale in the supporting region. The idea is actually motivated from the

finite element method, where each element is usually mapped into a regular shape in the

computational space. The essence of this idea is to transform the local support to a unit

square for the two dimensional case or a unit box for the three dimensional case. So, the

discussion about the optimal shape parameter is now confined to the MQ test functions in

the unit square or box. The coordinate transformation has the form

iDxx = ,

iDyy = (3.15)

Page 97: Advanced Computational Fluid(Shu Chang)

97

where ),( yx represents the coordinates of supporting region in the physical space, ),( yx

denotes the coordinates in the unit square, iD 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

222

cDy

yDx

xi

i

i

i +

−+

−=ϕ , Ni ,...,1= , (3.16)

where N is the total number of the knots in the support. Compared with traditional MQ-

RBF, we can find that the shape parameter c is equivalent to iDc . The coordinate

transformation (3.15) also changes the formulation of the weighting coefficients in the

local MQ-DQ approximation. For example, by using the differential chain rule, the first

order partial derivative with respect to x can be written as

∑∑==

====N

jj

i

xj

N

jj

xj

iif

Dw

fwDxd

dfDdx

xdxd

dfdxdf

1

)1(

1

)1(11 (3.17)

where )1( xjw are the weighting coefficients computed in the unit square, i

xj Dw /)1( are

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

Page 98: Advanced Computational Fluid(Shu Chang)

98

c------------------------------------------------------------------------------------------------- c---- This program is used to calculate the derivative coefficients in the Local MQ-DQ c---- method. c---- INPUT: pxy, xy, c c---- OUTPUT: r c---- pxy: store the positions of the supporting points c---- xy: store the position of the reference node c---- c: shape parameter for the MQ radial basis function c---- r: vector of computed derivative coefficients c---- Some important symbols and variables c---- np: the number of supporting points c---- A: coefficient matrix constructed from the basis functions c---- b: derivative vectors of the basis functions c------------------------------------------------------------------------------------------------- subroutine MQRBF(pxy,xy,c,r) parameter(np=12,nd=np+1) implicit real*8(a-h,o-z) dimension pxy(np,2),xy(2),r(nd,5),pn(nd,2) dimension a(nd,nd),b(nd,5)) do 20 i=1,nd if(i.ne.nd)then pn(i,1)=pxy(i,1) pn(i,2)=pxy(i,2) else pn(i,1)=xy(1) pn(i,2)=xy(2) endif 20 continue scaling=0.d0 do i=1,np dx=pxy(i,1)-xy(1) dy=pxy(i,2)-xy(2) scaling=dmax1(scaling,dsqrt(dx*dx+dy*dy)) enddo scaling=scaling*2.0 do j=1,nd a(nd,j)=1.d0 enddo do 19 i=1,nd-1

Page 99: Advanced Computational Fluid(Shu Chang)

99

do 19 j=1,nd dx=(pn(j,1)-pn(i,1))/scaling dy=(pn(j,2)-pn(i,2))/scaling dxk=(pn(j,1)-pn(nd,1))/scaling dyk=(pn(j,2)-pn(nd,2))/scaling a(i,j)=dsqrt(dx*dx+dy*dy+c)-dsqrt(dxk*dxk+dyk*dyk+c) 19 continue do 23 i=1,nd-1 dx=(-pn(i,1)+pn(nd,1))/scaling dy=(-pn(i,2)+pn(nd,2))/scaling ffunc=dsqrt(dx*dx+dy*dy+c) b(i,1)=dx/ffunc b(i,2)=dy/ffunc b(i,3)=(dy*dy+c)/(ffunc**3.)-1.d0/dsqrt(c) b(i,5)=-dx*dy/(ffunc**3.) b(i,4)=(dx*dx+c)/(ffunc**3.)-1.d0/dsqrt(c) 23 continue b(nd,1)=0. b(nd,2)=0. b(nd,3)=0. b(nd,4)=0. b(nd,5)=0. do i=1,nd do j=1,5 r(i,j)=b(i,j) enddo enddo call agjdn(a,r,nd,5,l) c---- Recover the derivative coefficients from the scaling ----- do ik1=1,5 do ik2=1,nd if(ik1.eq.1 .or. ik1.eq.2)then r(ik2,ik1)=r(ik2,ik1)/scaling elseif(ik1.eq.3 .or. ik1.eq.4 .or. ik1.eq.5)then r(ik2,ik1)=r(ik2,ik1)/scaling/scaling endif enddo enddo return end c-------This subroutine to numerically solve a linear problem Ax=b, in which A is a

Page 100: Advanced Computational Fluid(Shu Chang)

100

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

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

Page 101: Advanced Computational Fluid(Shu Chang)

101

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

3.6 Sample Applications of Local RBF-DQ Method

Poisson equation

The optimal shape parameter is also related to the number of supporting knots. We will

study this effect through a sample problem. Consider the two-dimensional Poisson

equation in a square domain ( 10,10 ≤≤≤≤ yx ),

),(2

2

2

2

yxgyu

xu

=∂∂

+∂∂ (3.18)

Suppose that the exact solution is given as

2)13(66

)4.5cos(45

),(−+

+=

x

yyxu (3.19)

Page 102: Advanced Computational Fluid(Shu Chang)

102

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

function ),( yxg , 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

L2 norm of relative error:N

u

uuN

i analytical

analyticalnumerical2

1810

∑=

+

(3.20)

To conduct numerical experiments, the knot distribution in the square domain is fixed,

which is shown in Fig. 3.2. In total, there are 673 knots in the domain. The accuracy of

numerical results in terms of L2 norm of relative error is studied by changing the shape

parameter c and the number of knots in the supporting region. In this study, four

different support sizes (numbers of supporting knots) are used for discretization, and they

are 10, 16, 22 and 28.

Figure 3.2 Irregular knot distribution for solution of sample PDEs

Page 103: Advanced Computational Fluid(Shu Chang)

103

Fig. 3.3 illustrates the variation of accuracy with different shape parameter and support

size (number of supporting knots). It can be seen from Fig. 3.3 that the 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.

Page 104: Advanced Computational Fluid(Shu Chang)

104

shape parameter c2

Log10(RelativeL2errornorm)

0 10 20

-4

-3.5

-3

-2.5

-2

-1.5

10 points16 points22 points28 points

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

Advection-diffusion equation

The discretization of the derivatives by local RBF-DQ method in the nonlinear PDEs

follows the same way as that in the linear PDEs. It is interesting to see whether the effect

of shape parameter c on the accuracy of numerical solution for a nonlinear equation

behaves in the same way or a similar way to the linear equation. To study this, we

consider the following nonlinear equation,

),(2

2

2

2

yxqyu

xuu

yu

xu

=

∂∂

+∂∂

+∂∂

+∂∂ (3.21)

For simplicity, we suppose that the exact solution of equation (3.21) is also given by

equation (3.19), which is used to determine the function ),( yxq and the boundary

Page 105: Advanced Computational Fluid(Shu Chang)

105

condition. It was found that when the same conditions such as knot distribution, shape

parameter, and the number of supporting knots are used, the accuracy of numerical

results for equation (3.21) is very close to the accuracy for equation (3.18). This can be

clearly observed in Table 3.1, which compares the accuracy of results for linear and

nonlinear equations with the use of 22 supporting knots. This observation is very

interesting. It may imply that the choice of shape parameter is operator-independent.

From this point of view, we can first study the sample problem in details, and get an

optimal shape parameter c . Then this optimal value is used to solve incompressible

Navier-Stokes (N-S) equations. It is indeed that our computation of incompressible flow

problems follows this process.

Table 3.1 Comparison of accuracy for linear and nonlinear equations with using 22

supporting knots

Log10(L2 norm of relative error)

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

Page 106: Advanced Computational Fluid(Shu Chang)

106

receivers, insulation and flooding protection for buried pipes used for district heating and

cooling, cooling systems in nuclear reactors, etc. The purpose of this section is to

investigate how the mesh-free methods behave in the solution of the natural convection

problem with complex geometry. A schematic view of a horizontal eccentric annulus

between a square outer cylinder and a heated circular inner cylinder is shown in Fig. 3.4.

Heat is generated uniformly within the circular inner cylinder, which is placed

concentrically or eccentrically within the cold square cylinder. From the non-slip

condition, the velocities u and v on both the inner and outer cylinder walls are zero. For

an eccentric annulus, the stream function values on the inner and outer cylinders are

different and a global circulation flow along the inner cylinder exists. The stream

function value on the outer cylinder wall is set to zero. The boundary condition can be

written as

0,0____

====wallouterwallinnerwallouterwallinner

vvuu (3.22)

0,constant__

==wallouterwallinner

ψψ (3.23)

0,1__

==wallouterwallinner

TT (3.24)

Page 107: Advanced Computational Fluid(Shu Chang)

107

X

Y

ε

),( 00 yx

)0,0(L

R

Figure 3.4 Sketch of physical domain of natural convection between a square outer

cylinder and a circular inner cylinder

The governing equations for this problem are the same as equations (2.34)-(2.36). The

derivatives in the governing equations are discretized by the local MQ-DQ method, and

the Neumann boundary conditions are approximated by the conventional FD schemes.

The number of supporting knots is taken as 17, and the shape parameter 2c is selected as

3.1. The numerical results for the cases with 00 45=ϕ , 5103×=Ra and

( 6.2=rr )2/( RLrr = ) 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

Page 108: Advanced Computational Fluid(Shu Chang)

108

eccentricity allows larger space for the eddy on the RHS, but the increasing eddy on the

left hand side limits the space for the eddy on the RHS. It is the balance between the two

eddies that make the thermal plumes above the top of the inner cylinder shifts from the

vertical line to the left.

ε =0.25

ε =0.50

ε =0.75

Page 109: Advanced Computational Fluid(Shu Chang)

109

ε =0.95

Figure 3.5 Streamlines and isotherms for 5103×=Ra , 6.2=rr , and 00 45=ϕ

References

R.L. Hardy, Multiquadric equations of topography and other irregular surfaces, Journal of

Geophysical Research, 76, pp1905-1915 (1971).

R. Franke, “Scattered data interpolation: tests of some methods”, Math. Comp., 38, pp.

181-199, (1982).

E. J. Kansa. “Multiquadrics – A scattered data approximation scheme with applications to

computational fluid-dynamics –I. Surface approximations and partial derivative

estimates”, Computers Math. Applic., 19, No (6-8) pp127-145 (1990).

E. J. Kansa. “Multiquadrics – A scattered data approximation scheme with applications to

computational fluid-dynamics –II. Solutions to parabolic, hyperbolic, and elliptic

partial differential equations”, Computers Math. Applic., 19, No (6-8) pp147-161

(1990).

Page 110: Advanced Computational Fluid(Shu Chang)

110

R. E. Bellman, B. G. Kashef, and J. Casti, “Differential quadrature: A technique for the

rapid solution of nonlinear partial differential equations,” J. Comput. Phys. 10, 40-

52 (1972).

C. Shu, Differential quadrature and its application in engineering, Springer-Verlag,

London, 2000.

C. Shu and B. E. Richards, “Application of generalized differential quadrature to solve

two-dimensional incompressible Navier-Stokes equations,” Int. J. Numer. Methods

Fluids. 15, 791-798 (1992).

C. Shu and Y. T. Chew, “Fourier expansion-based differential quadrature and its

application to Helmholtz eigenvalue problems,” Commun. Numer. Methods Eng.

13, 643-653 (1997).

C. Shu, H. Ding, K. S. Yeo, ‘Local Radial Basis Function-based Differential Quadrature

Method and Its Application to Solve Two-dimensional Incompressible Navier-

Stokes Equations’, Computer Methods in Applied Mechanics and Engineering, Vol.

192, 941-954 (2003).

Page 111: Advanced Computational Fluid(Shu Chang)

111

4. Standard Lattice Boltzmann Method (LBM)

4.1 Introduction

The natural phenomenon can be described at three levels: macroscopic,

mesoscopic and microscopic, see Fig. 4.1. Unlike conventional numerical methods,

which are based on discretization of macroscopic continuum equations, and unlike

molecular dynamics methods, which are based on atomic representation with

complicated molecule collision rules, the lattice Boltzmann method (LBM) is based

both on microscopic models and mesoscopic kinetic equations. Here the fluid is

imagined as a set of basic “fluid particles” evolving in fictional world, reacting with

simplified and relevant rules. Although this representation is far from the richness of

reality, it has been shown to be good enough to recover complex features of the natural

phenomenon. As an alternative computational fluid dynamics (CFD) approach, the

LBM has achieved great progress since the 90’s in the last century.

Figure 4.1 Three levels of natural phenomenon description

Page 112: Advanced Computational Fluid(Shu Chang)

112

The Basic Idea of LBM

The fundamental idea of LBM is to construct simplified kinetic models that

incorporate the essential physics of microscopic or mesoscopic processes so that the

macroscopic averaged properties of the LBM obey the desired macroscopic

hydrodynamics. The basic premise of using these simplified kinetic-type methods for

macroscopic fluid flows is that the macroscopic dynamics of a fluid is the result of the

collective behavior of many microscopic particles in the system and the macroscopic

dynamics is not sensitive to the underlying details in microscopic physics.

The kinetic nature of the LBM distinguishes it from other numerical methods

mainly in three aspects. First, the convection operator of the LBM is linear in velocity

space. The nonlinear effects in macroscopic level are represented in the collision term

of the LBM. Since no nonlinear terms are included in the LBM, computational efforts

are greatly reduced as compared to those of some macroscopic CFD methods such as

the Navier-Stokes equation solvers. Second, the pressure of the LBM can be directly

calculated using an equation of state, unlike the direct numerical simulation of the

incompressible Navier-Stokes equations, in which the pressure must be obtained from

the Poisson equation. In general, solving this equation for pressure often produces

numerical difficulties which require special treatments. Third, the LBM utilizes a

minimal set of velocities in phase space. In contrast, the phase space of the traditional

Boltzmann equation with Maxwell equilibrium distribution is a complete functional

space. The average process involves information from the whole velocity space.

Therefore, the transformation relating the microscopic distribution function and

macroscopic quantities is greatly simplified.

Page 113: Advanced Computational Fluid(Shu Chang)

113

Origination of LBM

The LBM originated from the lattice gas cellular automata (LGCA), which was

first introduced in 1973 by Hardy et al. The LGCA is constructed as a simplified,

fictitious molecular dynamic model in which space, time and particle velocities are all

discrete. The evolution of the LGCA consists of two sequential steps: streaming and

collision. In streaming, each particle moves to the nearest node in the direction of its

velocity. When particles arrive at a node, collision occurs and makes their velocity

change directions according to scatter rules. In 1986, Frisch, Hasslacher and Pomeau

showed that LGCA with collisions that conserve mass and momentum, in the

macroscopic limit, leads to the Navier-Stokes equations when the underlying lattice

guarantees the isotropy. This allows the LGCA to be a new scheme in the field of

CFD, especially suitable for parallel computing.

However, LGCA suffers some drawbacks such as large statistical noise, non-

Galilean invariance, an unphysical velocity-dependent pressure and large numerical

viscosities. These shortcomings have greatly hampered its development as a good

model in practical applications.

To overcome the above shortcomings, several lattice Boltzmann equation

(LBE) models had been developed and the most historically important of them are the

following four models:

1. In 1987, Frisch, d’Humières and Hasslacher used LBE at the cradle of LGCA to

calculate the viscosity of LGCA.

2. In 1988, McNamara and Zanetti introduced a LBE model, which eliminates the

statistical noise by using a single particle distribution function instead of the

Boolean function. Fermi-Dirac distributions were used as equilibrium functions.

Page 114: Advanced Computational Fluid(Shu Chang)

114

3. In 1989, Higuera and Jimènez presented a LBE with a linearized collision operator,

which improved the numerical efficiency of the previous LBE.

4. The collision operator, which is based on the rules of LGCA, was further

simplified by using the Bhatnagar-Gross-Krook (BGK) (1954) relaxation

approximation (Koelman 1991 and Qian et al. 1992) in the classic kinetic theory.

This is the current widely used LBE with BGK models in the LBM. The

introduction of the BGK models eliminates the Galilean invariance and velocity-

dependence of pressure in the LGCA. Moreover, it also allows the easy tuning of

numerical viscosities by the relaxation parameters, thus making simulations of

flows with high Reynolds number possible.

The LBE with BGK models in the LBM are based on gas-kinetic

representations of fluid flow in a strongly reduced “particle” velocity space, in which

flow is described through the evolution of the discrete particle distribution functions on

uniform lattices. Hydrodynamic variables are computed at the lattice nodes as

moments of the discrete distribution functions. Under Taylor and Chapman-Enskog

expansions, the incompressible unsteady Navier-Stokes equations can be recovered

with second-order of accuracy for the low Knudsen number in space and time. Because

the kinetic form of the LBE is the same as that of the LGCA, the locality in the kinetic

approach is retained. Therefore, the LBM still keeps the merits of easy implementation

of boundary conditions, full parallelism and clear physical pictures of the LGCA.

4.2 Lattice Gas Cellular Automata (LGCA)

The first lattice gas cellular automaton (LGCA) was proposed in 1973 by

Hardy, Pomeau and de Pazzis. Although the HPP (named from the initials of the three

Page 115: Advanced Computational Fluid(Shu Chang)

115

authors) model used in their work conserves the mass and moment, it does not yield

the desired Navier-Stokes equations in the macroscopic limit. In 1986, Frisch,

Hasslacher and Pomeau discovered that a LGCA model over a lattice with somewhat

higher symmetry than for the HPP square lattice model leads to the Navier-Stokes

equations in the macroscopic limit. This model with hexagonal symmetry is named

FHP according to the initials of the three authors. The discovery of the symmetry

constraint caused great excitement in the fluid dynamics community and become a

start point for a rapid development of the LGCA methods. The theoretical foundations

of LGCA were worked out by Wolfram (1986) and by Frisch et al. (1987).

Consider a regular lattice with hexagonal symmetry such that each lattice node

is surrounded by six neighbors identified by six connecting vectors 6,,1, L== icii αc ,

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

Figure 4.2 The FHP hexagonal lattice

Page 116: Advanced Computational Fluid(Shu Chang)

116

Each lattice node hosts up to six cells and each cell occupies with one particle. The

particles can move only along one of the six directions defined by the discrete

displacements tiδcr =∆ and ruled by the exclusion principle. In a time cycle tδ , the

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

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

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

ttnttn

i

i

timeandnodeatpresenceparticle1),(timeandnodeatabsenceparticle0),(

rrrr

==

(4.1)

Obviously, the collection of the occupation numbers over the entire lattice with N

nodes defines 6N-dimensional time-dependent Boolean field whose evolution takes

place in a Boolean phase-space consisting of N62 discrete states. The evolution

equation of the FHP LGCA is as follows:

)),(),,((),(),( tntntntn eqiiiiti rrrrr Ω+=+∆+ δ 6,,1L=i (4.2)

where the second term on the R.H.S. of Eq. (4.2) represents the collision which means

that, once arriving at the same node, the particles interact and reshuffle their

momentums so as to exchange mass and momentum among the different directions

allowed by the lattice. The collision rule of FHP is shown in Fig. 4.2. ),( tneqi r is the

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

1987):

iebtneq

i Φ+=

1/),( ρr (4.3)

where b(=6) is the number of the discrete speeds, ρ is the density and iΦ is a linear

combination of the mass, momentum and energy and for isothermal ideal fluids:

ααuBcA ii +=Φ (4.4)

Page 117: Advanced Computational Fluid(Shu Chang)

117

where A and B are free Lagrange parameters to be adjusted in order to secure mass and

momentum conservation and αu is the macroscopic velocity vector. The Lagrange

parameters A and B can be calculated by an expansion of Eq. (4.3) for small Mach

numbers scUMa /= ( u=U and sc is the sound speed) and we have the following

truncated equilibrium distributions:

)(2

)(),( 342 uO

c

uuQG

bcuc

bbtn

s

i

s

ieqi +++= βααβαα ρρρρr (4.5)

with

ρρρ

−−

=b

bG 2)( (4.6)

αββααβ δ2siii cccQ −= (4.7)

Dccs = (4.8)

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

∑=i

i tn ),(rρ (4.9)

∑=i

ii tncu ),(rγγρ (4.10)

Note that βαuci and βααβ uuQi 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.

Page 118: Advanced Computational Fluid(Shu Chang)

118

⇒ At each node and each link to the nearest neighbor there is a cell which may

be empty or occupied by at most one particle (exclusion principle).

⇒ The lattice is symmetric.

⇒ All particles have the same mass and are indistinguishable.

⇒ The states are updated simultaneously at discrete time level by the particle

evolutions

⇒ The evolution is split in two steps which are called collision and streaming.

In the collision, each cell is assigned new values based on the values of the

cells in a local neighborhood. In the streaming, the state of each cell is

propagated by the particle to a neighboring cell.

⇒ The evolution rules are uniform in space and time.

Main disadvantages of LGCA

Lack of Galilean invariance

This is due to improper choice of collision model.

Statistical noise

The statistical noise LGCA suffered comes from the Boolean system.

Unphysical solution

Pressure depends on the velocity.

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

developed.

Page 119: Advanced Computational Fluid(Shu Chang)

119

4.3 Kinetic theory

Kinetic theory is the branch of statistic physics dealing with the dynamics of

non-equilibrium processes and their relaxation to thermodynamic equilibrium. The aim

of this section is to provide a minimal yet helpful theoretical introduction to the LBM

in the context of classical kinetic theory.

Continuum Boltzmann equation and Maxwell distribution

As shown in Fig. 4.1, the motion of a fluid can be described on various levels

and the continuum Boltzmann equation gives a description on a microscopic level. The

classic continuum Boltzmann equation is an intergro-differential equation for a single

particle distribution function ),,( tf cr and written as

)( fQfftf

=∂∂

+∂∂

+∂∂

cF

rc (4.11)

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

describing the two-particle collision and written as

∫ ∫ Ω−−Ω= dffffdfffQ ][)()),(( 21'

2'

121221 ccc σ (4.12)

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

transforms the velocities from , 21 cc (incoming) into , '2

'1 cc (outgoing).

Central to the purpose of recovering hydrodynamic behaviors from the continuum

Boltzmann equation is the notion of local equilibrium. Mathematically, this requires

that the collision term is annihilated ( 0)( =fQ ) and leads to the so-called detailed

balance condition:

21'

2'

1 ffff = (4.13)

Page 120: Advanced Computational Fluid(Shu Chang)

120

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

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

21'

2'

1 lnlnlnln ffff +=+ (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, fln must be a function of dynamic

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

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

the form:

)21exp()( 2ccBc CAf eq +⋅+= (4.15)

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

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

function can be written as:

( ) ( )

−−= −

RTRTtf Deq

2ucexp2),c,r(

22/πρ (4.16)

where R is the gas constant, D is spatial dimension and T is the temperature.

Bhatnagar-Gross-Krook Approximation

One of the major problems when dealing with the Boltzmann equation is the

complicated nature of the collision integral )( fQ . 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:

Page 121: Advanced Computational Fluid(Shu Chang)

121

τ

eqfffQ −−=)(BGK (4.17)

which was proposed by Bhatnagar, Gross and Krook in 1954. In Eq. (4.17),τ is a

typical relaxation time associated with collision relaxation to the local equilibrium.

In principle, the relaxation time τ is a complicated function of the distribution

function f. The drastic simplification associated with BGK is the assumption of a

constant value for the relaxation scale, which is equivalent to lump the whole spectrum

of relaxation scales into a single value.

4.4 Lattice Boltzmann Method (LBM)

As already indicated in Section 4.2, the Boolean particle distribution and the

Fermi-Dirac equilibrium distribution are used in the LGCA. Therefore two major

drawbacks of the LGCA are the statistical noise and lack of Galilean invariant. On the

other hand, the collision term in the LGCA is also complicated and any efforts to seek

the numerical solutions of the LGCA are difficult. To overcome the above drawbacks,

the LBM is proposed and the main feature of LBM is to replace the Boolean particle

distribution in and the collision term by the continuum particle distribution function

if and the BGK approximation, respectively.

Lattice Boltzmann equation (LBE) with BGK approximation

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

( ) ( ) ( ) ( )( ) ( )Mitftftftf eqiiittii ,,1,0,,1,, L=−−=++ rrrer

τδδ (4.18)

Page 122: Advanced Computational Fluid(Shu Chang)

122

where if is the density distribution function, which depends on position r in the

physical space, the particle discrete velocity ie and time t; eqif 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 if :

∑∑==

==M

iii

M

ii ff

11euρρ (4.19)

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

2scP ρ= (4.20)

tsc δτυ )21(2 −= (4.21)

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

( ) ( ) ( ) ( )[ ]tftftft

tf eq

b,,,,1,,,, rcrcrccrc

−−=∇⋅+∂

∂τ

(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 ie without affecting the

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

Page 123: Advanced Computational Fluid(Shu Chang)

123

( ) ( ) ( ) ( )[ ]tftftft

tf eqii

bii

i ,,1,, rrrer−−=∇⋅+

∂∂

τ (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 tt δ+ with the second order of accuracy gives

( ) ( ) ( ) ( )( ) ( )Mitftftftf eqii

b

tittii ,,1,0,r,r,r,er L=−−=−++

τδδδ (4.24)

Clearly, τ in equation (4.18) is the same as tb δτ / in equation (4.24).

Equilibrium distribution function and discrete velocity models

Since the collision term in the LBE is described by the BGK approximation,

the local equilibrium is therefore from the Maxwell form. Using Taylor series

expansion, the Maxwell distribution function can be expanded in the small Mach

number limit as

( ) ( )

( )

( )

( )

)(2)(2

1)(

)(2)(2

12

exp2

22exp

2exp2

22exp2

2exp2),,(

2

22/

22/

2/

22/

322

3222

2

22

uuu)(cuc

uuu)(cucc

uucc

uucc

uccr

ORTRTRT

cw

ORTRTRTRT

RT

RTRTRT

RTRT

RTRTtf

D

D

D

Deq

+

⋅+

⋅+=

+

⋅+

⋅+

−=

−⋅

−=

+⋅−−=

−−=

ρ

πρ

πρ

πρ

πρ

(4.25)

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

RTcs =2 . Therefore, along the discrete velocity direction ie , we get

Page 124: Advanced Computational Fluid(Shu Chang)

124

−⋅+

⋅+= 4

222

2 2)(

1s

si

s

ii

eqi c

cc

wfuueue

ρ (4.26)

where iw are constants. The values of iw and sc depend on the specific choice of the

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

−++= 4

22

2 21

s

sii

s

ii

eqi c

ucuueecuewf βαβαααρ (4.27)

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

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

1=∑i

iw (4.28a)

0e =∑i

iiw 0=∑i

iiew α (4.28b)

0)u-u)e(( 222 =⋅∑ si

ii cw 22ucueuew sii

ii =∑ αββα (4.28c)

ijsji

ii cw δ2=⋅∑ ee (4.28d)

0)u-u)e((e 222 =⋅∑ si

jii cw (4.28e)

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

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

Page 125: Advanced Computational Fluid(Shu Chang)

125

Table 4.1 Main parameters of some DnQm DV models

Models ie iw 2sc

D1Q5 (0) ( 1± ) ( 2± )

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

1

D2Q7 (0,0) ( )0,1± ,( 23,21 ±± )

6/12 ( i =0) 1/12 ( )6,,1L=i 1/4

D2Q9 (0,0) ( )0,1± ,( )1,0 ± ( 1,1 ±± )

16/36 ( 0=i ) 4/36( )3,,0,12 L=+= lli 1/36( )4,,1,2 L== lli

1/3

D3Q15 (0,0,0) ( )0,0,1± ,( )0,1,0 ± ,( )0,1,0 ± ( 1,1,1 ±±± )

16/72( 0=i ) 8/72( )6,,1L=i 1/72( )14,,7 L=i

1/3

D3Q19

(0,0,0) ( )0,0,1± ,( )0,1,0 ± ,( )0,1,0 ± ( 0,1,1 ±± ),( ,1,0,1 ±± ), ( 1,1,0 ±± )

12/36( 0=i ) 2/36( )6,,1L=i 1/36( )18,,7 L=i

1/3

(a) D1Q5

(b) D2Q7 (c) D2Q9

65

4

3 2

0 1 0

1

2 3

4

5

67

8

Page 126: Advanced Computational Fluid(Shu Chang)

126

(d) D3Q15 (e) D3Q19

Figure 4.3 Sketches of the DnQm discrete velocity models

Lattice Tensors and Isotropic Tensors

Te lattice velocity can form lattice tensors with different ranks. The nth rank lattice

tensor is defined as

∑=i

iii nneeeL αααααα ...

2121 ...

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

∑=i

ieL αα

∑=i

ii eeL βααβ

∑=i

iii eeeL γβααβγ

∑=i

iiii eeeeL ζγβααβγζ

A tensor of nth rank is called isotropic if it is invariant with respect to arbitrary

orthogonal transformations (rotations and reflections). The most general isotropic

tensors up to 4th rank are provided by the following theorem.

There are no isotropic tensors of rank 1 (vectors).

e=0 e=1 ♦ e= 3

e=0 e=1 ♦ e= 2

Page 127: Advanced Computational Fluid(Shu Chang)

127

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

An isotropic tensor of rank 3 is proportional to αβγε with ,1312231123 === εεε

,1321213132 −=== εεε and zero others.

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

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

which can be combined to the most general form

βγαζβζαγγζαβαβγζ δδδδδδ cbaL ++=

where a, b and c are arbitrary constants.

Generalized lattice tensors for multi-speed models

The nth rank generalized lattice tensor is defined as

∑=i

iiii nneeewT αααααα ...

2121 ...

where iw 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 LKn /λ= ,

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

L at which macroscopic variations can be appreciated.

Page 128: Advanced Computational Fluid(Shu Chang)

128

In the following, the Chapman-Enskog expansion is employed to derive

incompressible Navier-Stokes equation based on the D2Q9 model. Theoretically the

LBE simulates the compressible Navier-Stokes equation instead of incompressible

one, because the spatial density variation is not zero in LBE simulations. In order to

correctly simulate incompressible Navier-Stokes equation in practice, one must ensure

that the Mach number is low and the density fluctuation (δρ ) is of the order )( 2MaO

In the macroscopic level, the flow encounters the 3 basic time scales. The collision

happens very fast; the convection happens slower in the scale of 1−ε ; and the diffusion

happens much slower in the scale of 2−ε . In the space, the collision happens in the

scale of λ, while the convection and diffusion happen in the scale of L ( 1/ −= ελL ).

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

expansion

∑=

=2

0

)(

j

ji

ji ff ε (4.29)

∑=

+ ∂=∂1

0

1

jt

jt j

ε (4.30)

11

rr ∇=∇ ε (4.31)

where ε is a small number, and tδ is in the same order of ε .

The second order Taylor series expansion of L.H.S. of the LBE (4.18) yields

0)()(1)e(2

)e( 32 =+−+∇⋅+∂∂

+∇⋅+∂∂

teq

iit

iit

ii Offft

ft

δτδ

δ (4.32)

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

0)2(2)1()0( =++ iii EEE εε (4.33)

where

)/()( )0()0(t

eqiii ffE τδ−= (4.34)

Page 129: Advanced Computational Fluid(Shu Chang)

129

( ) ( ) ( ) ( )101

1 10 i

tiiti ffeE

τδ+∇⋅+∂= (4.35)

( ) ( ) ( ) ( ) ( )( ) ( ) ( )

( ) ( ) ( ) ( )211

0

2011

11

02

1211

12

01

0001

it

iitit

it

iititt

iititi

ffef

ffeefefE

τδτ

τδδ

+

−∇⋅+∂+∂=

+∇⋅+∂∇⋅+∂+∇⋅+∂+∂=

(4.36)

The distribution function if is constrained by the following relationships

ρ=∑=

M

iif

0

(0) , ue ρ=∑=

M

iiif

0

(0) (4.37)

00

(j) =∑=

M

iif , 0

0

)j( =∑=

M

iiif e , 0

0

(2) =∑=

M

iif , 0

0

)2( =∑=

M

iiif e (4.38)

Mass Conservation

Summation of equation (4.35) over i leads to

∑∑∑∑====

+⋅∇+∂∂

=M

ii

t

M

iii

M

ii

M

ii fff

tE

0

(1)

0

(0)1

0

(0)

00

)1( 1eτδ

(4.39)

which can be further reduced to

010

=⋅∇+∂∂ uρρt

(4.40)

Similarly, Summation of equation (4.36) over i gives

∑∑∑∑==== τδ

+

τ−∇⋅+∂+

∂∂

=M

ii

t

M

iiit

M

ii

M

ii fff

tE

0

(2)

0

(1)1

0

(0)

10

)2( 1211)(

0e , (4.41)

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

0=∂∂ ρ

1t. (4.42)

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

0=⋅∇+∂∂ uρρt

(4.43)

Page 130: Advanced Computational Fluid(Shu Chang)

130

Momentum Conservation

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

obtained:

∑∑∑∑====

+∇⋅+∂∂

=M

iii

t

n

iiii

M

iii

M

iii fff

tE

0

(1)

0

(0)

0

(0)

00

)1( e1e)e(eτδ

e (4.44)

Using equations (4.37-4.38), one can get

0eeu0

)0(

0

=⋅∇+∂∂ ∑

=

M

iiii f

tρ (4.45a)

or in the following form

0)0(

0=Π⋅∇+

∂∂ uρt

(4.45b)

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

∑=

=ΠM

iiii fee

0

)0(,,

)0(, βαβα

(4.46)

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

∑∑∑∑

=

====

+

∇⋅+

∂∂

−+

∂∂

=

M

iii

t

M

iiii

M

iii

M

iii

M

iii

f

fft

ft

eE

0

(2)

0

(1)

0

(1)

00

(0)

10

)2(

1

)(211

e

eeee

τδ

τ (4.47)

Again using equations (4.37-4.38), we get

0211

0

(1)

1=⋅∇

−+

∂∂ ∑

=

M

iiii f

teeu

τρ (4.48a)

or in a form

0211 )1(

1=Π⋅∇

−+

∂∂

τρu

t (4.48b)

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

Page 131: Advanced Computational Fluid(Shu Chang)

131

∑=

=ΠM

iiii fee

0

)1(,,

)1(, βαβα (4.49)

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

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

∑=

=M

iiiii

qqjk eeewE

1q,k,j,

)(.. ... , qkj ,...,, =1…3 (4.50)

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

for the D2Q9 model, )(qE can be written as

00

,(1) == ∑

=

M

ijiij ewE

jkski

M

ijiijk ceewE δ2

,0

,(2) == ∑

=

(4.51)

00

,,,(3) == ∑

=

M

ilikijiijkl eeewE (4.52)

jklms

M

imilikijiijklm ceeeewE ∆== ∑

=

4

0,,,,

(4) (4.53)

where kljmkmjllmjkjklm δδδδδδ ++=∆ ; jkδ and jklmδ are Kronecker delta with

two and four indices respectively.

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

order momentum flux tensor

kjjks

M

iikijijk uucfee ρρδ +==Π ∑

=

2

0

(0),,

(0) (4.54)

since

−++== 4

22

20

21

s

sii

s

ii

eqii c

ucuueecuewff βαβαααρ

kljmkmjllmjkjklm δδδδδδ ++=∆

kjjkmlkljmkmjllmjkmljklm uuuuuuu 2)( 2 +=++=∆ δδδδδδδ

Page 132: Advanced Computational Fluid(Shu Chang)

132

⋅∇+Π

∂∂

−=

−==Π

∑∑

=

==

M

iilikijijkt

M

iitkijit

M

iikijijk

feeet

fDeefee

0

)0(,,,1

(0)

0

0

(0),,

0

(1),,

(1)0

τδ

τδ (4.55a)

Since

)()(

)(

1

221

2

21

2

0,,,,12

0

)0(,,,1

jk

kjs

mmjks

j

k

k

jjks

mkljmkmjllmjkxsmjklms

M

immilikijii

s

M

iilikiji

xu

xuc

xuc

xu

xu

c

ucuc

ueeeewc

feee

l

∂∂

+∂∂

+∂∂

+∂∂

+∂

∂+⋅∇=

++∂=∆⋅∇=

⋅∇=⋅∇ ∑∑==

ρρρδδρ

δρδδρδδρδρ

ρ

u

)()(

)()()(

)()(

)]([)()(

)]()([)]()([)(

)()(

)(

221

2

22

2

0

2

0

2

0

2

22

0

2

0000

2

2

0

)0(

0

mkjmj

kk

jsm

mjksjks

mkjmj

kk

jsmm

jks

mkjmj

kk

jsjks

mm

kjmkjmj

kk

jsjks

mjm

sj

kmkm

sk

jkjjks

kjjkkjjks

kjjksjk

uuuxx

ux

ucx

ucc

uuuxx

ux

ucux

c

uuuxx

ux

uct

c

uxt

uuuuuxx

ux

uct

c

uux

cx

uuux

cx

ut

uuc

tuuu

tuu

tu

tc

uuctt

ρρρρδδρ

ρρρρδ

ρρρρδ

ρρρρρρδ

ρρρρρδ

ρρρρδ

ρδρ

∂∂

−∂∂

+∂∂

−∂∂

⋅∇−=

∂∂

−∂∂

+∂∂

−∂∂

−=

∂∂

−∂∂

+∂∂

−∂∂

=

∂∂

+∂∂

−∂∂

−∂∂

+∂∂

−∂∂

=

∂∂

−∂∂

−+∂∂

−∂∂

−+∂∂

−=

∂∂

−∂∂

+∂∂

+∂∂

=

+∂∂

=∏∂∂

-u

therefore, we have

)(211

)()(211

211

22

22

0

(0),,

0

(1),,

(1)0

MaOxu

xuc

MaOuuuxx

uxuc

fDeefee

k

j

j

kts

mkjmk

j

j

kst

M

iitkijit

M

iikijijk

+

∂+

∂∂

−−≈

+

∂∂

∂+

∂∂

−−=

−==Π

− ∑∑

==

τρτδ

ρρτ

τδ

τδτ

(4.55b)

(Note that mmkj xuuu ∂∂ /)(ρ is considered very small, and is ignored)

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

Page 133: Advanced Computational Fluid(Shu Chang)

133

uuuu 2)( ∇+−∇=∇+∂∂ ρνρρ P

t (4.56)

where ν is kinematic viscosity given by

tδτν6

12 −= (4.57)

and 3/1=sc for the D2Q9 model.

In the small Mach number limit, the density variation can be negligible. Thus one can

further obtain the incompressible Navier-Stokes equations

0=⋅∇ u (4.58)

uuuu 21∇+∇−=∇⋅+

∂∂ ν

ρP

t (4.59)

Boundary Conditions

Boundary conditions are an essential issue since they determine solutions

which are compatible with external constraints. Mathematically, reasonable treatments

on boundaries should be able to accommodate both Dirichlet and Neumann boundary

conditions as well as be as simple as possible in treating complicated boundaries.

Figure 4.4 Sketch of boundary condition

Fluid Domain

⟩if

n

⟨if

Ω

Page 134: Advanced Computational Fluid(Shu Chang)

134

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

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

as ⟨if ) and the outgoing (known) ones (denoted as ⟩

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

ne 0>⋅i and ne 0<⋅i , (4.60)

respectively. The n is the outward normal vector of the boundary element centered in x.

In mathematical terms, the relation can be expressed as a linear integral equation:

∑∑ ⟩⟨ −Π=y

yyxxj

jiji ff )()()( (4.61)

where the kernel )( yx −Π ij of the boundary operator generally extends over a finite

range of values y inside the fluid domain. This boundary operator reflects the

interaction between the fluid molecules and the boundary. Consistent with this

molecular picture, boundary conditions can be viewed as special collisions between the

molecules and the boundary.

With the above knowledge, there have been many kinds of boundary treatments

introduced. Here we only focus on four classes of boundary conditions because they

are often encountered. The four classes of boundary conditions are: periodic, no-slip,

sliding walls and open inlet/outlet.

Page 135: Advanced Computational Fluid(Shu Chang)

135

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

Periodic Boundary Conditions

Periodic boundary conditions are the simplest instance of boundary conditions.

The practical implementation of them can be expressed as follows:

)()( 21 BfBf ji⟩⟨ = (4.62a)

)()( 12 BfBf ji⟩⟨ = (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:

8,2,1),( 1 =⟨ Bi 8,2,1),( 2 =⟩ Bj (4.63a)

6,5,4),( 2 =⟨ Bj 6,5,4),( 1 =⟩ Bi (4.63b)

No-slip Boundary Conditions

The so-called ‘no-slip’ boundary condition physically means that there is no

flow motion at the boundaries. Here we take a case of the physical boundary lying

exactly on a grid line as an example because this situation is easy for practical

applications. An implementation of the boundary conditions is the so-called bounce-

Flow direction

20

34

5

6 7 8

1

20

34

5

6 7 8

1

X

Y

20

34

5

6 7 8

12

034

5

6 7 8

1

U

Page 136: Advanced Computational Fluid(Shu Chang)

136

back scheme of the distribution function. The bounce back means when a particle

streams to the boundaries, it just scatters back to the point it comes from:

)()( BfBf ji⟩⟨ = (4.64)

Here ji ee −= . For the D2Q9 DV model and considering the direction along the y axis,

on the bottom wall (Fig. 4.5) we can rewrite equation (4.64) in terms of the boundary

kernel (Eq. (4.61)):

=

8

7

6

4

3

2

100010001

fff

fff

(4.65)

This complete reflection guarantees that both tangential and normal components of the

wall fluid speed vanish identically.

Sliding Walls

In the literature, there have been several ways to treat this kind of boundary

conditions. The most popular one is the use of equilibrium distribution boundary

condition (EDBC) (Hou et al. 1995) and the hydrodynamic boundary condition (HBC)

(Nobel et al. 1995). The EDBC is to set an equilibrium state on the boundaries

provided that the density is equal to the equilibrium value. This boundary treatment is

easy to be implemented.

In the HBC, the incoming distributions and density can be defined by solving

the conservation relations (density, momentum, mass flux or energy) on the wall.

Considering the D2Q9 DV model on the top wall (Fig. 4.5), we have:

−−

−−

=

−−−−

4

3

2

5

1

0

8

7

6

111101

111

000110

111

111101111

fff

fff

uu

fff

y

x

ρρρ

(4.66)

Page 137: Advanced Computational Fluid(Shu Chang)

137

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:

),( inineq

ii uff ρ= (4.67)

At the outlet, the zero-gradient condition can be directly imposed by simply

extrapolating the information from the fluid field nearby the outlet to the outlet

boundary. However, one must guarantee that the outlet is placed far enough

downstream so as to allow the flow to settle down to the zero-gradient profile. The

formulation can be written as:

)()(2)( 21 BfBfBf iioutleti −= (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.

Page 138: Advanced Computational Fluid(Shu Chang)

138

4.5 Practical Implementation of LBM for Lid-Driven Square Cavity

Flows

To show the application of LBM explicitly, in this part we choose a two-

dimensional steady flow in a square cavity as a numerical example because this

problem is industrially important and usually is taken as one of the standard cases to

test new computational schemes. For this problem (Fig. 4.6), the flow in the cavity is

driven by the top lid moving from left to right with a constant velocity U. Here we

only study the flow with Re = 100 (Re = UL/υ is the Reynolds number based on the lid

velocity and the length of the square cavity) and adopt the D2Q9 DV model for the

LBM. For convenience, all variables used in this section are dimensionless and they

are defined as

Figure 4.6 Sketch of Lid-driven cavity flow

xcttLyLxyxc ∆==== /,/,)/,/(),(,/ 0ρρρuu (4.69)

where txc ∆∆= / is the lattice velocity, x is the dimensionless variable while x is the

dimensional variable. This definition is applied to other variables.

The procedure is described as follows:

u = 0 v = 0

u = 0 v = 0

u = 0 v = 0

u = U v = 0

Page 139: Advanced Computational Fluid(Shu Chang)

139

1. Discretized the flow domain

Square domain is discretized by a uniform lattice with points of Imax×Imax, then

the Cartesian coordinates in the domain are

)1/(Imax)1(

)1/(Imax)1(

,

,

−−=

−−=

jy

ix

ji

ji

then

)1/(Imax1 −=∆=∆= yxtδ Time step

2. Set basic computational parameters

Kp=8 Particle velocity number of D2Q9 model with particle

velocity:

( )[ ] ( )[ ]( )( )[ ] ( )[ ]( )

=+−+−

=−−=

=

8,7,6,54/2/5sin,4/2/5cos2

4,3,2,12/1sin,2/1cos00

αππαππα

απαπαα

αe

Re=100 Reynolds number (flow parameter)

U=0.1 Lid velocity

Then

)1Re6(21

+=tUδ

τ Relxation parameter (L = 1)

3/12 =sc

3. Set Initial Field

t = 0

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

1, =jiρ Initial density ρ

0Imax)(, =≠jji(u,v)u ; 0, ,imax,imax == ii vUu Initail velocity field

Then assuming

Page 140: Advanced Computational Fluid(Shu Chang)

140

)0,,()0,,( === tjiftjif eqαα

with

( )

⋅+

⋅+== 2

2

4

2

2 221)0,,(

s

i,j

s

i,j

s

i,jeq

cccwtjif

uueue αααα ρ

(for value of αw , see Table 4.1)

4. Iteration procedure

ttt δ+=

Streaming:

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

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

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

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

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

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

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

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

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

Collision:

)),,(),,((1),,(),,( teq

ttt tjiftjiftjiftjif δδτ

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

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

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

Page 141: Advanced Computational Fluid(Shu Chang)

141

Boundary Condition (Fig. 4.7):

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

j = Imax: )0,,(),,( ==+ tjiftjif eqt αα δ , ( 80L=α ; Imax,1=i )

j = 1: ),,(),,(),,(),,(),,(),,(

86

42

75

tt

tt

tt

tjiftjiftjiftjiftjiftjif

δδδδδδ

+=++=++=+

( 1maxI,2 −=i )

i = 1: ),,(),,(),,(),,(),,(),,(

68

31

75

tt

tt

tt

tjiftjiftjiftjiftjiftjif

δδδδδδ

+=++=++=+

( 1Imax,2 −=j )

i = Imax: ),,(),,(),,(),,(),,(),,(

57

13

86

tt

tt

tt

tjiftjiftjiftjiftjiftjif

δδδδδδ

+=++=++=+

( 1Imax,2 −=j )

31 ff =

75 ff =

68 ff =

2f6f

3f

7f 4f

ima,(imax),( 9090 ifif eqLL == = αα

1f

eqff 55 =

8f

42 ff =86 ff =

13 ff =

eqff 77 = 4f

1f

75 ff =

8f

42 ff =86 ff =

3f

7f 4f

31 ff =

75 ff =

eqff 88 =

42 ff =eqff 66 =

3f

7f 4f

1f

5f

8f

2f

86 ff =

3 ff =

57 ff = 4f

Page 142: Advanced Computational Fluid(Shu Chang)

142

i = 1, j = 1:

),,(),,(

),,(),,(

),,(),,(),,(),,(),,(),,(

88

66

42

31

75

tjiftjif

tjiftjif

tjiftjiftjiftjiftjiftjif

eqt

eqt

tt

tt

tt

=+

=+

+=++=++=+

δ

δ

δδδδδδ

i = Imax, j = 1:

),,(),,(

),,(),,(

),,(),,(),,(),,(),,(),,(

77

55

13

86

42

tjiftjif

tjiftjif

tjiftjiftjiftjiftjiftjif

eqt

eqt

tt

tt

tt

=+

=+

+=++=++=+

δ

δ

δδδδδδ

Calculating macroscopic variables:

2,,

Kp

0α,,

Kp

0α,,

Kp

0α,

/),,(

/),,(

),,(

sjiji

ytji

xtji

tji

cP

etjifv

etjifu

tjif

ρ

ρδ

ρδ

δρ

αα

αα

α

=

+=

+=

+=

=

=

=

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

and

2Imax,

Imax,

Imax,

Imax,

0

1

si

i

i

i

cP

vUu

=

=

=

(i = 1,Imax)

Calculating new equilibrium:

( )

⋅+

⋅+=+ 2

2

4

2

2 221),,(

s

i,j

s

i,j

s

i,jt

eq

cccwtjif

uueue αααα ρδ

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

Page 143: Advanced Computational Fluid(Shu Chang)

143

Set convergent critiria:

∑+++

−++−+=

ji tt

tt

tjivtjiu

tjivtjivtjiutjiuError

, 22

22

)],,([)],,([

)],,(),,([)],,(),,([

δδ

δδ

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

If 610−>Error , repeat above steps. Otherwise go to next step for output

necessary information in the flow field .

5. Output information in the flow fied

The following flow information is usually required:

Normalized velocity along horizontal and vertical center lines of the cavity:

Uv ji /, for i=1, Imax and j=(Imax-1)/2+1

Uu ji /, for i=(Imax-1)/2+1 and j=1,Imax

Normalized stream function in the flow field:

∫∫ −=1

0

,1

0

,, dx

Uv

ordyU

u jijijiψ (i = 1,Imax; j = 1,Imax)

Normalized vorticity function in the flow field:

jijiji x

vyu

,,,

∂∂

∂∂

=ω (i = 1,Imax; j = 2,Jmax)

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

comparison with the Navier-Stokes solution.

Page 144: Advanced Computational Fluid(Shu Chang)

144

0

0.2

0.4

0.6

0.8

1

-0.4 -0.2 0 0.2 0.4 0.6 0.8 1

U-Y

Ghia's data

Presentresult

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0 0.2 0.4 0.6 0.8 1

X-V

Ghia's data

Presentresult

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.

Page 145: Advanced Computational Fluid(Shu Chang)

145

Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid

Mech. 30, 329 (1998).

Chen S, Martinez D and Mei R, “On boundary conditions in lattice Boltzmann

methods”, Phys. Fluids, 8, p2527, 1996.

Frisch U, Hasslacher B and Pomeau Y, “Lattice-gas automata for the Navier-Stokes

equations”, Phys. Rev. Lett., 56, p1505, 1986.

Frisch U, d'Humiéres D, Hasslacher B, Lallemand P, Pomeau Y and Rivet JP, “Lattice-

gas hydrodynamics in two and three dimensions”, Complex Syst., 1, p649, 1987.

Ghia U, Ghia KN and Shin CT, “High-resolution for incompressible flow using the

Navier-Stokes equations and a multigrid method”, J. Comp. Phys., 48, p387, 1982.

Hardy J, Pomeau Y and de Pazzis O, “Time evolution of a two-dimensional classical

lattice system”, Phys. Rev. Lett., 31, p276, 1973.

Hou S, Zou Q, Chen S, Doolen GD, and Cogley AC, “Simulation of cavity flow by

the lattice Boltzmann method”, J. Comp. Phys., 118, p329, 1995.

Koelman JMVA, “A simple lattice Boltzmann scheme for Navier-Stokes fluid flow”,

Europhys. Lett., 15, p603, 1991.

Luo L. S., Unified theory of the lattice Boltzmann models for nonideal gases, Phys.

Rev. Lett. 81(8): 1618-1621, 1998.

Maier RS, Bernard RS and Grunau DW, “Boundary conditions for lattice Boltzmann

method”, Phys. Fluids, 8, p1788, 1996.

Noble DR, Chen S, Georgiadis JG and Buckius RO, “A consistent hydrodynamic

boundary condition for the lattice Boltzmann method”, Phys. Fluids, 7, p203,

1995.

Qian YH, d’Humières D and Lallemand P, “Lattice BGK models Navier-Stokes

equation”, Europhys. Lett., 17, p479, 1992.

Page 146: Advanced Computational Fluid(Shu Chang)

146

Qian YH, Succi S and Orszag SA, “Recent advances in lattice Boltzmann computing”,

Annu. Rev. Comp. Phys., 3, p195, 1995.

Succi S, “The Lattice Boltzmann Equation for Fluid Dynamics and Beyond”,

Clarendon Press, Oxford, UK, 2001.

Wolfram S, “Cellular automaton fluids. 1: Basic theory”, J. Stat. Phys., 45, p471,

1986.

Wolf-Gladrow, D. A., Lattice-Gas Cellular Automata and Lattice Boltzmann Models:

An Introduction, Lecture Notes in Mathematics 1725, Springer-Verlag, Germany

(2000).

Page 147: Advanced Computational Fluid(Shu Chang)

147

5. Taylor Series Expansion- and Least Square-

based Lattice Boltzmann Method (TLLBM)

5.1 Introduction

Despite its huge success in many practical applications, the conventional LBM

introduced in Chapter 4 is still plagued with restriction of lattice-uniformity in physical

space, which makes the scheme macroscopically similar to a uniform Cartesian-grid

solver. This limits its application. This can be seen clearly in Fig. 5.1.

Mesh points

Positions from streaming

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

Page 148: Advanced Computational Fluid(Shu Chang)

148

For many practical problems, an irregular grid or a meshless structure is always

preferred due to the fact that curved boundaries can be described more accurately and

that computational resources can be used more efficiently with it.

Theoretically, the feature of lattice-uniformity is not necessary to be kept because the

distribution functions are continuous in physical space. In order to implement the LBE

more efficiently for flows with arbitrary geometry, we introduce in this part a new

version of LBM (Shu et al 2001, 2002, Niu et al 2002), which is based on the

conventional LBM, the well-known Taylor series expansion, the idea of developing

Runge-Kutta method and the least squares approach. The final form of our method is

an algebraic formulation, in which the coefficients only depend on the coordinates of

mesh points and lattice velocity, and are computed in advance. The new method is also

free of lattice models.

5.2 Conventional models for problems with complex geometry

To remove the difficulty of standard LBM for the application to flow problems with

complex geometry and the use of non-uniform mesh, a few versions of LBM were

presented. Basically, they can be classified into two categories: interpolation-

supplemented LBM (ISLBM) and differential LBM.

Interpolation-Supplemented LBM (ISLBM)

This method was proposed by He et al. in 1996. The basic idea of ISLBM is

that all the particles are streamed to positions in the flow field first, which may not

coincide with the mesh points. Then, in the second step, interpolation is performed in

Page 149: Advanced Computational Fluid(Shu Chang)

149

the whole domain. As compared with the standard LBM, ISLBM requires much more

computational effort as interpolation is performed at every time step. For stable

computation, upwind interpolation is usually needed. The process of ISLBM is shown

in Fig. 5.2.

Mesh points

Positions from streaming

Fig. 5.2 Configuration of ISLBM

Differential LBM

Applying the first order Taylor series expansion to the standard LBE in time

and space, we can obtain the following two-dimensional equation,

t

eq

yxtyxftyxf

yfe

xfe

tf

δτααα

αα

αα

⋅−

=∂∂

+∂∂

+∂∂ ),,(),,( (5.1)

recall [ ] τδδδ αααααα /),,(),,(),,(),,( tyxftyxftyxfttteytexf eqyx −+=+++

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.

Page 150: Advanced Computational Fluid(Shu Chang)

150

Note that when the FD scheme is applied, the coordinate transformation has to be

adopted for complex domain. In general, the upwind scheme is needed to get the stable

solution.

Two major drawbacks of this method are

• Artificial viscosity is too large, especially at high Re

• Lose primary advantage of standard LBM

It was found that the large artificial viscosity of differential LBM is actually due to the

first order Taylor series expansion, and the expansion in time is not necessary. So,

applying the second order Taylor series expansion in space, Chew et al. (2002) gives

[ ] τδδδδδδδ

δδδδδ

δδδδδ

δδδδδ

δδδδδδδδ

αααα

αα

αα

αα

αα

ααα

/),,(),,(),,(),,())((

),,()(21),,()(

21

),,()(),,()(),,(

2

2

22

2

22

tyxftyxftyxfyx

tyyxxfyexe

ytyyxxfye

xtyyxxfxe

ytyyxxfye

xtyyxxfxetyyxxf

eqttytx

tty

ttx

tty

ttxt

−+=∂∂

+++∂−−+

∂+++∂

−+∂

+++∂−+

∂+++∂

−+∂

+++∂−++++

(5.2)

The above equation can be used to simulate viscous flows at high Reynolds number.

But its computational efficiency is very low.

5.3 Taylor Series Expansion- and Least Square-based Lattice

Boltzmann Method (TLLBM)

We consider a two-dimensional (2D) case. As shown in Fig. 5.3, for simplicity, we let

point A represent the grid point ),,( tyx AA , point 'A represent the position

),,( ttyAtxA teyex δδδ αα +++ , and point P represent the position ),,( tPP tyx δ+

with yyyxxx APAP δδ +=+= , . According to LBE, we have

Page 151: Advanced Computational Fluid(Shu Chang)

151

[ ] τδ αααα /),(),(),(),'( tAftAftAftAf eqt −+=+ (5.3)

recall [ ] τδδδ αααααα /),,(),,(),,(),,( tyxftyxftyxfttteytexf eqyx −+=+++

P

A

B

C

D

E

A'

B'

C'

D'

P'

E'

Figure 5.3 Configuration of particle movement along the α direction

For the general case, 'A may not coincide with the mesh point P. We first consider the

Taylor series expansion with truncation to the first order derivative terms. Then,

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

the mesh point P as

])(,)[(),(),(

),(),'( 22AA

tA

tAtt yxO

ytPf

yxtPf

xtPftAf ∆∆+∂+∂

∆+∂+∂

∆++=+δδ

δδ αααα

(5.4)

where PtxAA xexx −+=∆ δα , PtyAA yeyy −+=∆ δα . Note that the above approximation

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

gives

τδδ

δ ααα

ααα

),(),(),(

),(),(),(

tAftAftAf

ytPf

yxtPf

xtPfeq

tA

tAt

−+=

∂+∂

∆+∂+∂

∆++

(5.5)

It is indicated that equation (5.5) is a first order differential equation, which

only involves two mesh points A and P. When a uniform grid is used, 0=∆=∆ AA yx ,

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

Page 152: Advanced Computational Fluid(Shu Chang)

152

density distribution functions at all the mesh points. In this work, we try to develop an

explicit formulation to update the distribution function. In fact, our new development

is inspired by the Runge-Kutta method.

Idea of Runge-Kutta method

ODE:

),,( tufdtdu

= 0uu = , when 0=t (5.6)

Taylor series method:

....62 3

33

2

221 +

+

+

+=+

nnnnn

dtudh

dtudh

dtduhuu , th ∆= (5.7)

Expressions of the second and higher order derivatives are obtained by

successive differentiation of equation (5.6)

Runge-Kutta method:

Choose some points between time level n and n+1, and apply Taylor series

expansion at the time level n+1 and these points to form an equation system so

that the second and higher order derivatives can be eliminated from the

equation system.

As we know, the Runge-Kutta method is developed to improve the Taylor series

method in the solution of ordinary differential equations (ODEs). As shown above,

Taylor series method involves evaluation of different orders of derivatives to update

the functional value at the next time level. For a given ODE with a complicated

expression, this application is very difficult. To improve the Taylor series method, the

Runge-Kutta method evaluates the functional values at some intermediate points and

Page 153: Advanced Computational Fluid(Shu Chang)

153

then combines them (through the Taylor series expansion) to form a scheme with the

same order of accuracy.

Taylor series expansion-based LBM

With this idea in mind, we look at equation (5.5). We know that at the time level

tt δ+ , 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 BP, at the time

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

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

given below

[ ] τδ αααα /),(),(),(),'( tPftPftPftPf eqt −+=+ (5.8)

[ ] τδ αααα /),(),(),(),'( tBftBftBftBf eqt −+=+ (5.9)

Using Taylor series expansion with truncation to the first order derivative

terms, ),'( ttPf δα + , ),'( ttBf δα + 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

τδδ

δ ααα

ααα

),(),(),(

),(),(),(

tPftPftPf

ytPf

yxtPf

xtPfeq

tP

tPt

−+=

∂+∂

∆+∂+∂

∆++

(5.10)

τδδ

δ ααα

ααα

),(),(),(

),(),(),(

tBftBftBf

ytPf

yxtPf

xtPfeq

tB

tBt

−+=

∂+∂

∆+∂+∂

∆++

(5.11)

Page 154: Advanced Computational Fluid(Shu Chang)

154

where txP ex δα=∆ , tyP ey δα=∆

PtxBB xexx −+=∆ δα , PtyBB yeyy −+=∆ δα

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

The solution of this system gives

∆∆=+ /),( PttPf δα (5.12)

where PAAPBPPBABBA yxyxyxyxyxyx ∆∆−∆∆+∆∆−∆∆+∆∆−∆∆=∆

BPAAPABPPBPABBAP gyxyxgyxyxgyxyx ,,, )()()( ααα ∆∆−∆∆+∆∆−∆∆+∆∆−∆∆=∆

[ ] ταααα /),(),(),(, tPftPftPfg eqP −+=

[ ] ταααα /),(),(),(, tAftAftAfg eqA −+=

[ ] ταααα /),(),(),(, tBftBftBfg eqB −+=

It should be noted that AP gg ,, , αα and Bg ,α 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 tt δ+ , 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 EDCBAP ,,,,, at the time level t will

stream to positions ',',',',',' EDCBAP at the time level tt δ+ . The distribution

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

Page 155: Advanced Computational Fluid(Shu Chang)

155

using the second order Taylor series expansion at these new positions in terms of the

distribution function and its derivatives at the mesh point P, we can obtain the following

equation system

∑=

==6

1:,:::

jjji

Tii VsVsg ααααα EDCBAPi ,,,,,= (5.13)

where

( ) ταααα /),,(),,(),,(: tyxtyxeq

tyxi iiiiiifffg −+=

,2/)(,2/)(,,,1 22: iiiiii

Ti yxyxyxs ∆∆∆∆∆∆=α

TyxfyfxfyfxffV /,/,/,/,/, 22222 ∂∂∂∂∂∂∂∂∂∂∂= ααααααα

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

time level t, Tis :α 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 tt δ+ ,

which also has six elements, jis ,:α is the jth element of the vector Tis :α and jV :α is the

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

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

][ ααα gVS = (5.14)

where TEDCBAP ggggggg ,,,,, :::::: ααααααα =

∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆∆

=

==

EEEEEE

DDDDDD

CCCCCC

BBBBBB

AAAAAA

PPPPPP

TE

TD

TC

TB

TA

TP

ji

yxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyx

ssssss

sS

2/)(2/)(12/)(2/)(12/)(2/)(12/)(2/)(12/)(2/)(12/)(2/)(1

][][

22

22

22

22

22

22

:

:

:

:

:

:

,:

α

α

α

α

α

α

αα

PtxCC xexx −+=∆ δα , PtyCC yeyy −+=∆ δα

Page 156: Advanced Computational Fluid(Shu Chang)

156

PtxDD xexx −+=∆ δα , PtyDD yeyy −+=∆ δα

PtxEE xexx −+=∆ δα , PtyEE yeyy −+=∆ δα

The expressions of BBAAPP yxyxyx ∆∆∆∆∆∆ ,,,,, have been given previously. Since

[Sα] is a 6×6 dimensional matrix, it is very difficult to obtain an analytical expression

for the solution of equation system (5.14). We need to use a numerical algorithm to

obtain the solution. Note that the matrix [Sα] only depends on the coordinates of mesh

points, which can be computed once and stored for the application of equation (5.14) at

all time levels.

Improvement by least square method

In practical applications, it was found that the matrix [Sα] might be singular or

ill-conditioned. To overcome this difficulty and ensure that the method is more

general, we introduce the least squares approach to optimize the approximation by

equation (5.13). Equation (5.13) has 6 unknowns (elements of the vector Vα). If

equation (5.13) is applied at more than 6 mesh points, then the system is over-

determined. For this case, the unknown vector can be decided from the least squares

method. For simplicity, let the mesh point P be represented by the index 0=i , and its

adjacent points be represented by index Ni ,...,2,1= , where N is the number of

neighbouring points around P and it should be larger than 5. At each point, we can

define an error in terms of equation (5.13), that is,

∑=

−=6

1:,:::

jjjiii Vsgerr αααα Ni ,...,2,1,0= (5.15)

The square sum of all the errors is defined as

Page 157: Advanced Computational Fluid(Shu Chang)

157

∑ ∑∑= ==

−==

N

i jjjii

N

ii VsgerrE

0

26

1:,::

0

2: ααααα (5.16)

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

][][][ ααααα gSVSS TT = (5.17)

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

6)1(22

112

12

111

002

02

000

2/)(2/)(1

2/)(2/)(12/)(2/)(1

][

×+

∆∆∆∆∆∆−−−−−−−−−−−−−−−−−−∆∆∆∆∆∆∆∆∆∆∆∆

=

NNNNNNN yxyxyx

yxyxyxyxyxyx

and TNgggg ,...,, :1:0: αααα =

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

txex δα=∆ 0 tyey δα=∆ 0 (5.18a)

0xexx txii −+=∆ δα 0yeyy tyii −+=∆ δα Ni ,...,2,1= (5.18b)

Clearly, when the coordinates of mesh points are given, and the particle velocity and

time step size are specified, the matrix [Sα] is determined. Then from equation (5.17),

we obtain

( ) ][][][][ 1ααααααα gAgSSSV TT ==

− (5.19)

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

1:

1

1,1:1:00 ),,( −

+

=∑==+ j

N

jjt gaVtyxf αααα δ (5.20)

Page 158: Advanced Computational Fluid(Shu Chang)

158

where ja ,1:α are the elements of the first row of the matrix [Aα], which are pre-

computed before the LBM is applied. Therefore, little computational effort is

introduced as compared with the standard LBE. Note that the function g is evaluated at

the time level t. So, equation (5.20) is actually an explicit form to update the

distribution function at the time level tt δ+ 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

( ) ( ) ( ) ( )τ

δδ ααααα

txftxftxftexf

eq

tt,,

,,−

+=++ (5.21)

Using Taylor series expansion, we have

( ) ( )

...336

2)(

2,,

3

33

2

32

2

3

3

3322

2

22

2

22

+

∂∂

+∂∂

∂+

∂∂∂

+∂∂

+∂∂

+∂∂

+∂∂

+∂∂

+∂∂

+=++

xf

extf

ext

fe

tf

xtf

e

xfe

tf

xf

et

ftxftexf

tt

tttttt

αα

αα

αα

ααα

ααααα

αααα

δδ

δδδδδδ

(5.22)

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

)(Off

xf

ext

fe

tf

xf

et

ft

eqt

tt3

2

22

2

2

22

22

δτ

δδδ ααα

αα

ααα

αα +

−=

∂∂

+∂∂

∂+

∂∂

+∂∂

+∂∂

Page 159: Advanced Computational Fluid(Shu Chang)

159

(5.23)

Equation (5.23) will be used to analyze the TLLBM. We start with the Taylor series

expansion that truncates to the second order derivative terms. With Taylor series

expansion, equation (5.21) can be written as

( ) ( ) ( ) ( ) ( ) ( )τ

δδδδδδ αα

αααα

ααtxftxf

txfxfxe

xf

xetxxfeq

ttt

,,,

2, 2

22 −+=

∂∂−

+∂∂

−+++

(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 ix is considered. The three equations can

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

respectively from mesh points 11 ,, +− iii xxx . Solving the three equations, we can get the

solution as

( ) )()()(, 1:1:1:1::: tgatgatgatxf iiiiiiti ++−− ++=+ ααααααα δ (5.25)

where ( ) ( ) ( )τ

αααα

txftxftxftg ii

eq

ii,,

,)(:−

+=

1

1:

)1)(1(

+

++−−=

ii

iii rr

rraα ,

)()1(

1

11:

iii

ii rrr

ra

++

=+

+−α ,

)()1(

11

11:

iii

ii rrr

ra

+−

=++

++α

)/()( 1 tiii exxr δα−−= , )/()( 11 tiii exxr δα−= ++

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

][2

)()(

2),( 3

2

22

2

22

titi

tit

ti Oxge

xg

etgtf

tf

txf δδ

δδ

δ αα

ααα +

∂∂

+∂∂

−=∂∂

+∂∂

+ (5.26)

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

Page 160: Advanced Computational Fluid(Shu Chang)

160

)(),(

),(),(),(

),()(

2ttti

ttiii

eq

ii

Oxf

et

ftxf

texftxftxf

txftg

δδδ

δδτα

αα

α

αααα

α

+∂∂

+∂∂

+=

++=−

+= (5.27)

Differentiating equation (5.27) with respect to x gives

)()( 32

22

22

tttti

t Oxf

ext

fe

xf

exg

e δδδδδ αα

αα

ααα +

∂∂

+∂∂

∂+

∂∂

=∂∂

(5.28a)

)()()( 32

22

2

22

tti

t Oxf

exg

e δδδ ααα +

∂∂

=∂∂

(5.28b)

Finally, by substituting equation (5.28) into equation (5.26), we obtain the same

differential equation as equation (5.23) and the truncation error has the following form

( ) ( )[ ]11

3

16 ++ −+− iii

t rrre δα (5.29)

As shown by Qian et al. (1992) and Wolf-Gladrow (2000), when Chapman-

Enskog expansion is applied to equation (5.23) with two time scales, the Navier-Stokes

equations can be recovered with second order of accuracy. This indicates that our

Taylor series expansion form can recover the Navier-Stokes equations with second

order of accuracy even when a non-uniform mesh ( 1+≠ ii rr ) 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 ix and the time level tt δ+ . 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

Page 161: Advanced Computational Fluid(Shu Chang)

161

points 11 ,, +− iii xxx . To apply the least squares approach, the Taylor series expansion is

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

points 211 ,,, −+− iiii xxxx . 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

13:

2

4

13:

4

13:

2

22 ,

)(

,,

41

21

21

21214

kkik

kkik

kki

tit

tit

ti

g

g

g

xtxf

e

xtxf

e

txf

dcb

cba

ba

α

α

α

αα

αα

α

δ

δ

δδ

δδ

δ

(5.30)

where ∑=

=4

1kka δ , ∑

=

=4

1

2

kkb δ , ∑

=

=4

1

3

kkc δ , ∑

=

=4

1

4

kkd δ

12

1 1)(−

− −−=−−

= iit

iit rre

xxeδ

δδ

α

α , it

iit re

xxe−=

−−= − 1)( 1

2 δδ

δα

α

13 ==t

t

eeδδ

δα

α , 11

4 1)(+

+ +=−−

= iii r

texxte

δδ

δα

α

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

[ ]∑=

−+−−−−−∆

=+4

13:

22 ))(())((1),(k

kikkti gacacbabadbctxf αα δδδ (5.31)

where )4)(()4)(( 22 abcacbabadbc −−−−−=∆ . Using Taylor series expansion,

3−+kig can be expressed as

3:

33

3

2:

22

2:

:

3:

333

2:

223:

3:3:

)(6

)1()(2

)1()1(

6)(

2)(

)(

xge

xge

xgeg

xgxx

xgxx

xg

xxgg

it

kit

kitki

iikiiikiiikiiki

∂∂−

+∂∂−

+∂∂

−+=

∂∂−

+∂∂−

+∂∂

−+= −+−+−+−+

αα

αα

ααα

ααααα

δδ

δδ

δδ

(5.32)

Page 162: Advanced Computational Fluid(Shu Chang)

162

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

3:

33

42:

22

3:

2:1 2)(

2)(),(

xges

xges

xgesgstxf ititi

titi ∂∂

+∂∂

+∂∂

+=+ αααααααα

δδδδ (5.33)

where [ ]∑=

−−−−−∆

=4

1

221 ))(())((1

kkk acacbabadbcs δδ

[ ]∑=

−−−−−−∆

=4

1

222 )1())(())((1

kkkk acacbabadbcs δδδ

[ ]∑=

−−−−−−∆

=4

1

2223 )1())(())((1

kkkk acacbabadbcs δδδ

[ ]∑=

−−−−−−∆

=4

1

3224 )1())(())((1

kkkk acacbabadbcs δδδ

Furthermore, from the definition of dcba ,,, , we have

[ ] 1)4)(()4)((1

)()()()(1

22

4

1

224

11

=−−−−−∆

=

−−−−−

∆= ∑∑

==

abcacbabadbc

acacbabadbcsk

kk

k

δδ (5.34a)

[ ] 1))(4)(())(4)((1

)(()())(()(1

2

4

1

2324

1

22

−=−−−−−−++−−∆

=

−−−−−−++−−

∆= ∑∑

==

bcacacacbabaabbadbc

accacbaabbadbcsk

kkkk

kk

δδδδδ

(5.34b)

[ ] 1)2()42()()2()42()(1

)2()12()(

)2()12()(1

2

4

1

23422

4

1

2323

=+−−+−−−+−−+−−∆

=

+−−+−−

−+−−+−−

∆=

=

=

bcdaabcacbabcaabbadbc

acacb

abadbcs

kkkkkk

kkkkkk

δδδδδ

δδδδδ

(5.34c)

Page 163: Advanced Computational Fluid(Shu Chang)

163

−−−−

∆+−=

+−−+−−

−+−−+−−

∆=

=

=

=

))(()(11

)2()12()(

)2()12()(1

4

1

5222

4

1

34522

4

1

23424

kk

kkkkkk

kkkkkk

acacbadbc

acacb

abadbcs

δ

δδδδδ

δδδδδ

(5.34d)

The above results show that equation (5.33) can be reduced to exactly the same

form as equation (5.26). Equation (5.26) can recover the Navier-Stokes equations with

second order of accuracy. This means that our least square-based form can also recover

the Navier-Stokes equations with the second order of accuracy, no matter whether the

mesh is uniform or non-uniform.

5.5 Practical Implementation of TLLBM for Flow around a Circular

Cylinder

To show the efficiency of the TLLBM for the problem with complex geometry, we

consider a flow around an impulsively started circular cylinder at a low Reynolds

number. This problem is sketched as in Fig. 5.4. In this part, the Reynolds number

( υ/Re DU∞= ), based on the upstream velocity ∞U and the diameter of the cylinder

D , is selected to be 20 and 40. The far field boundary is set at 50.5 diameters away

from the center of the cylinder and a 241×181 O-type grid is used (a typical mesh is

shown in Fig. 5.5). With this grid distribution, the time step, in units of 2/( )D U∞ , is

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

Page 164: Advanced Computational Fluid(Shu Chang)

164

condition; one is at central line (cut line) in the wake, where the periodic boundary

condition is imposed; the other is at far field r∞, where the infinite flow field is

approximated and the density distribution function is always set at its equilibrium

state. Initially, the flow field is assumed to be irrotational and potential. The free

stream velocity U is set to be 0.15. For convenience, all variables used in this section

are dimensionless and they are defined as

min0 /,/,)/,/(),(,/ rcttRyRxyxc ∆==== ρρρuu (5.35)

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

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

)1,1( +− ji ; )1,( −ji ; )1,( +ji , )1,1( −+ ji ; ),1( ji + ; )1,1( ++ ji . Therefore, at each

mesh point, we only need to store 9 coefficients 9,...,2,1,,1 =ka k before Eq. (5.20) is

applied. Note that the configuration of 9 mesh points as shown in Fig. 5.6 is applied in

all lattice directions ( 8,...,2,1=α ).

Periodic BC

y

x

θ

R

U∞

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

Page 165: Advanced Computational Fluid(Shu Chang)

165

Figure 5.5 Computational mesh for flow around a circular cylinder

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

1,i j−

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

1,i j+,i j

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

The procedure is described as follows:

Discretize the flow domain

The Flow domain is discretized by an O-type ireegular lattice with points of

Imax×Jmax, then the Cartesian coordinates in the domain are

)2sin(

)2cos(

,

,

πξ

πξ

ry

rx

ji

ji

−=

=

with

Page 166: Advanced Computational Fluid(Shu Chang)

166

[ ]

−−−+= −∞ )tan()1(tan11)( 1

00 χηχ

rrrr

)2/(Jmax)2()1/(Imax)1(

−−=−−=

ji

ηξ

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

0)1/(Jmax1min rrrt −== −=ηδδ Time step

It is indicated here that we introduced a grid layer inside the boundary of the

circular cylinder for the ease of the boundry treatment and calculation.

Set basic computational parameters

Kp=8 Particle velocity number of D2Q9 model with particle

velocity:

( )[ ] ( )[ ]( )( )[ ] ( )[ ]( )

=+−+−

=−−=

=

8,7,6,54/2/5sin,4/2/5cos2

4,3,2,12/1sin,2/1cos00

αππαππα

απαπαα

αe

Re=20 Reynolds number (flow parameter)

U=0.15 Flow velocity

Then

)1Re6(21

+=tUDδ

τ Relxation parameter(D = 2)

3/12 =sc

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)

Page 167: Advanced Computational Fluid(Shu Chang)

167

c ********* Variable illustrations***************************** c am(6,9)---------------------------------Matrix [ ]αS

c amt(6,9)--------------------------------Transpose of Matrix [ ]αS , that is [ ]TSα c dmt(6,6)-------------------------------- Multiplication and inverse of Matrix c [ ]αS and [ ]TSα , that are [ ] [ ]αα SS T and

c [ ] [ ]( ) 1−αα SS T , respectvely

c cmm(9,241,181,8)--------------------Elements of the first row of Matrix [ ]αA c ima(9), jma(9)-------------------------Index of the collection points used for c calculation of ),,( 00 ttyxf δα + c af(9),bf(9)------------------------------Variables of 0x∆ and 0y∆ , respectively c x(241,181),y(241,181)---------------Cartesian coordinates of jiji yx ,, , c uc(8),vc(8)-----------------------------partcle discrete velocity components c yx ee αα , for 8,,1L=α 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)

Page 168: Advanced Computational Fluid(Shu Chang)

168

sx=x(ik,jk)-x(i,j) sy=y(ik,jk)-y(i,j) cx=uc(k)*dt cy=vc(k)*dt af(m)=sx+cx bf(m)=sy+cy am(m,1)=1. am(m,2)=af(m) am(m,3)=bf(m) am(m,4)=0.5*af(m)**2 am(m,5)=0.5*bf(m)**2 am(m,6)=af(m)*bf(m) c---------Transpose of Matrix [ ]αS , that is [ ]TSα do 4 n=1,6 amt(n,m)=am(m,n) 4 continue c--------------------------------------------------------- 5 continue c --------Multiplication of Matrix [ ]αS and [ ]TSα , that is [ ] [ ]αα SS T call abmt(amt,am,dmt)

c------Computing the inverse of the Matrix dmt(6,6), that is [ ] [ ]( ) 1−αα SS T

call invam(dmt) c -----Computing the elements of Matrix [ ]αA call mtve(i,j,k,dmt,amt) 6 continue return end subroutine abmt(amt,am,dmt) c----------------------------------------------------------------------------------------- c This subroutine is programed to carry out the multiplication of c Matrix [ ]αS and [ ]TSα 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

Page 169: Advanced Computational Fluid(Shu Chang)

169

c [ ]αA and [ ] [ ] [ ]( ) [ ]TT SSSA αααα1−

= c------------------------------------------------------------------------------------------ dimension dmt(6,6),amt(6,9) dimension cmm(9,241,181,8) do 2 m=1,9 cmm(m,i,j,k)=0.0 do 2 l=1,6 cmm(m,i,j,k)=cmm(m,i,j,k)+dmt(1,l)*amt(l,m) 2 continue return end subroutine invam(dmt) c----------------------------------------------------------------------------------------- c This subroutine is programed to compute the inversion of Matrix, that is

c [ ] [ ]( ) 1−αα SS T

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

Page 170: Advanced Computational Fluid(Shu Chang)

170

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

Set Initial Field

t = 0

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

Initial density ρ

1, =jiρ

Initail velocity field

Page 171: Advanced Computational Fluid(Shu Chang)

171

02, ==ji(u,v)u ;

0), 2(,)2(, == >> jjijji vUu

Then assuming

)0,,()0,,( === tjiftjif eqαα ( 80L=α ;i = 1, Imax; j = 2, Imax)

)0,3,()0,1,(

)0,3,()0,1,(

)0,3,()0,1,(

)0,3,()0,1,(

)0,3,()0,1,(

)0,3,()0,1,(

)0,3,()0,1,(

)0,3,()0,1,(

78

57

86

75

24

13

42

31

===

===

===

===

===

===

===

===

tiftif

tiftif

tiftif

tiftif

tiftif

tiftif

tiftif

tiftif

( 80L=α ;i = 1, Imax)

( )

⋅+

⋅+== 2

2

4

2

2 221)0,,(

s

i,j

s

i,j

s

i,jeq

cccwtjif

uueue αααα ρ

(value of αw refers to Table 4.1)

Computational sequence

Flow Chart of ComputationFlow Chart of Computation

Input

Calculating Geometric Parameterand physical parameters

( N=0 )

Calculating eqfα

τ,,1 ka

N=N+1

1

1

1,100 ),,( −

+

=∑=+ k

M

kk gattyxf δα

∑==

Mf

0ααρ α

ααρ eU ∑=

=

Mf

0

Convergence ?

No

OUTPUT

YES

αρ eU Re,,,

Figure 5.7 Flow Chart

Page 172: Advanced Computational Fluid(Shu Chang)

172

Output information in the flow fied

The following flow information is usually required:

Time evolution of the wake length L , separation angle sθ and the drag

coefficient dC around the circular cylinder ( )/(2 2 DUCd ρXF ⋅= and

F [ ( U U )] npI dlρυ= − + ∇ + ∇ ⋅∫ ;n is the normal vector of the cylinder

surface)

Normalized stream function in the flow field:

)2sin()2cos(),(0

, πξξπψ vuudrU

jiur

r

rr

ji −== ∫∞

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

Normalized vorticity function in the flow field:

jijiji x

vyu

,,,

∂∂

∂∂

=ω (i = 1,Imax; j = 2,Jmax)

Some typical results of TLLBM are shown in Figs. 5.8-5.9.

0

1

2

3

4

5

0 4 8 12 16 20 24t

L

Re=20

Re=40

Figure 5.8 Time evolution of the wake length for different Reynolds numbers (♦

Experimental data by Coutanceu & Bouard (1977 a,b); —TLLBM results)

Page 173: Advanced Computational Fluid(Shu Chang)

173

(a) Re=20

(b) Re=40

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

References

Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid

Mech. 30, 329 (1998).

Y. T. Chew, C. Shu, X. D. Niu, A New Differential Lattice Boltzmann Equation and

Its Application to Simulate Incompressible Flows on Non-Uniform Grids,

Journal of Statistical Physics, Vol. 107, 329-342, 2002.

Coutanceau M and Bouard R, “Experimental determination of the main features of the

viscous flow in the wake of a circular cylinder in uniform translation. Part 1:

Steady flow”, J. Fluid Mech., 79, p231, 1977a.

Page 174: Advanced Computational Fluid(Shu Chang)

174

Coutanceau M and Bouard R, “Experimental determination of the main features of the

viscous flow in the wake of a circular cylinder in uniform translation. Part 2:

Unsteady flow”, J. Fluid Mech., 79, p257, 1977b.

He X., Luo L-S and Dembo M., J. Comp. Phys., 129, p357, 1996.

Niu X. D., Chew Y. T. and Shu C., “Simulation of Flows around An Impulsively

Started Circular Cylinder by Taylor Series Expansion and Least Squares-based

Lattice Boltzmann Method”, J. Comp. Phys., 188(1), p176, 2003.

Qian YH, d’Humières D and Lallemand P, “Lattice BGK models Navier-Stokes

equation”, Europhys. Lett., 17, p479, 1992.

Shu C., Chew Y. T. and Niu X. D., “Least square-based LBM: A meshless Approach

for simulation of flows with complex geometry”, Phys. Rev. E., 64, P045701-1,

2001.

Shu C., Niu X.D. and Chew Y. T., “Taylor series expansion- and least square-based

lattice Boltzmann method: two-dimensional formulation and its applications”,

Phys. Rev. E., 65, P036708-1, 2002.

Succi S, “The Lattice Boltzmann Equation for Fluid Dynamics and Beyond”,

Clarendon Press, Oxford, UK, 2001.

Wolf-Gladrow, D. A., Lattice-Gas Cellular Automata and Lattice Boltzmann Models:

An Introduction, Lecture Notes in Mathematics 1725, Springer-Verlag, Germany

(2000).

Page 175: Advanced Computational Fluid(Shu Chang)

175

6. Application of TLLBM to

Simulate Thermal Flows

6.1 Introduction

The LBE discussed so far does not address the issue of a self-consistent coupling

between temperature dynamics and heat transfer within the fluid flow. Fully thermo-

hydrodynamic LBE schemes represent a standing challenge to LBE research. Despite

several brilliant attempts, to date, a consistent thermodynamic LBE scheme working

over a wide range of temperatures is still lack. The difficulty is that heat and

temperature dynamics require more kinetic momentum and consequently they probe

the discrete space-time ‘fabric’ of the lattice more keenly than isothermal flows. So

this is one of the most challenging issues left with LBE research.

The current thermal models fall into the following categories. The first is the

multi-speed approach. This approach is a straightforward extension of the LBE

isothermal models in which only the density distribution function is used. To obtain

the temperature evolution equation at the macroscopic level, additional particle speeds

are necessary and the equilibrium distribution functions must include the higher-order

velocity terms. Although this approach has been shown to be theoretically possible,

previous models suffer severe numerical instability and the temperature variation is

limited to a narrow range. Some recent works may provide new directions for this type

of approach. The second is the passive-scalar approach. It utilizes the fact that the

macroscopic temperature satisfies the same evolution equation as a passive scalar if the

viscous heat dissipation and compression work done by the pressure are negligible. In

Page 176: Advanced Computational Fluid(Shu Chang)

176

a passive-scalar-based LBE thermal model, the temperature is simulated by a new

density distribution function. The main advantage of this scheme over the multi-speed

counterpart is the enhancement of the numerical stability. The third is Luo’s scheme

(Luo 1998). He suggested that the difficulty of solving thermal problems could be

overcome by going back to the Boltzmann equation for dense gases, the time-honored

Enskog equation. Its practical value remains to be demonstrated because so far no

simulation result has been available. Attempts are also taken from a different way by

using higher isotropy of lattice. Pavol et al. (1998) proposed the non-space filling

lattices, typically octagons, which offer a higher degree of isotropy, to solve the

thermal problems. They have proposed the octagonal lattices in 2D and 3D. Some

preliminary simulations for 2D jet flow between plane boundaries held at constant

temperatures were reported. Another proposal to construct an energy-conserving LBE

model is to use a hybrid scheme in which the LBE flow simulation is decoupled from

the solution of the temperature equation. The temperature is simulated by the

conventional energy equation. The last category is the novel thermal model called the

internal energy density distribution function (IEDDF) model proposed by He et al.

(1998). This new scheme is based on the recent discovery that the LBE isothermal

models can be directly derived by properly discretizing the continuous Boltzmann

equation in temporal, spatial and the particle velocity spaces. Following the same

procedure, an LBE thermal model can be derived by discretizing the continuous

evolution equation for the internal energy density distribution. This IEDDF thermal

model has proven itself to be a stable and simple thermal model, so it is widely used

currently.

Page 177: Advanced Computational Fluid(Shu Chang)

177

6.2 Internal Energy Density Distribution Function (IEDDF) Thermal

Model

The IEDDF thermal model introduces an internal energy density distribution function

to simulate the temperature field. The macroscopic density and velocity fields are still

simulated using the density distribution function.

The density distribution and internal energy density distribution functions satisfy

the following equations respectively:

( ) Fffffv

eq

t +−

−=∇•+∂τ

e (6.1)

( ) ( ) ( )[ ]uuuuee ∇•+∂•−−−

−=∇•+∂ tc

eq

t fggggτ

(6.2)

where ( ) eqfRT

F ueG −•=

and G is the external force acting on the unit mass.

By adopting second-order integration for the above two equations, we can get

( ) ( ) ( ) ( )[ ]tv

tveq

tv

ttt

Ftftftftfδτ

δτδτ

δδδ αααααα 5.0

,,5.0

,,+

+−+

−=−++ xxxex (6.3)

( ) ( ) ( ) ( )[ ] ( )tc

tceq

tc

ttt

qtftgtgtgtgδτδτ

δτδδδ αα

ααααα 5.0,,,

5.0,,

+−−

+−=−++

xxxxex

(6.4)

where

( ) αααααδ

τδ Fffff teq

v

t

22−−+=

( ) ααααααδ

τδ qfgggg teq

c

t

22+−+=

t

teq

t Ffffδτ

τδδτ

ν

αναανα 5.0

5.05.0+

++=

Page 178: Advanced Computational Fluid(Shu Chang)

178

( ) ( ) ( )

∇•−+Π•∇+∇−•−= uueue ααα ρ

pq 1

( )∇+∇=∏ uuυρ

( ) eqfRT

F αα

αueG −•

=

When D2Q9 DV model is used, the equilibrium distribution functions for the density

and internal energy density distributions are given as:

( )

•+

•+= 2

2

4

2

2 23

2931

cccwf eq uueue αααα ρ (6.5)

where 9/40 =w , 9/1=αw for α =1,2,3,4, 36/1=αw for α =5,6,7,8

2

2

0 32

cg eq uρε

−= (6.6a)

( )

•+

•+= 2

2

4

2

24,3,2,1 5.15.45.15.19 ccc

g eq uueue ααερ (6.6b)

( )

•+

•+= 2

2

4

2

28.7.6.5 5.15.46336 ccc

g eq uueue ααερ (6.6c)

where RT=ε

Then the macroscopic density, velocity and temperature are calculated by

∑=α

αρ f

(6.7a)

2tf δρρ

ααα

Geu += ∑

(6.7b)

∑∑ −=α

ααα

αδερ qfg t

2 (6.7c)

The kinetic viscosity and thermal conductivity are determined from

RTvτυ = RTcτα 2= (6.8)

Page 179: Advanced Computational Fluid(Shu Chang)

179

Using the Chapman-Enskog expansion, the IEDDF thermal model can recover the

correct continuity, momentum and energy equations at the NS level:

( ) 0=•∇+∂ uρρt (6.9a)

( )[ ] ∏•∇+−∇=∇•+∂ pt uuuρ (6.9b)

( ) ( ) ( ) uu:u •∇−∇∏+∇•∇=•∇+∂ pt ερχερρε (6.9c)

6.3 Application of IEDDF thermal model on arbitrary mesh by using

TLLBM

When equations (6.3) and (6.4) are used on an arbitrary mesh, )( tδαex + is

usually not at the grid point )( xx δ+ . To solve this problem, the TLLBM technique

(Shu et al. 2001, 2002) introduced in the previous chapter can be applied to equations

(6.3) and (6.4) following the same procedure as shown in Chapter 5 for the isothermal

flows, which results in

'1

1,110 ),( −

=∑==+ k

M

kkt faWtf δα x (6.10a)

'1

1

',11

'0 ),( −

=∑==+ k

M

kkt gaWtg δα x (6.10b)

where

tv

tvk

eq

tv

tk

tv

tk

Ftftffδτ

δτδτ

δδτ

δ ααααα 5.0

),,(5.0

),,(5.0

1'

++

++

+

−= exex

tc

tck

eq

tc

tk

tc

tk

qftgtggδτδτ

δτδ

δτδ αα

αααα 5.0),,(

5.0),,(

5.01'

+−

++

+

−= exex

TyxgygxgygxggW /,/,/,/,/, 22222' ∂∂∂∂∂∂∂∂∂∂∂= αααααα

Page 180: Advanced Computational Fluid(Shu Chang)

180

When the same particle velocity models are chosen for the density and internal

energy density distributions, the geometric matrix A and 'A are the same, which can

save both the computational time and storage space.

6.4 Boundary conditions

The bounce-back rule of the non-equilibrium distribution proposed by Zou and

He (1997) is used. For the isothermal problems, the density distribution at the

boundary should satisfy the following condition:

isoneqisoneq ff ,,βα = , ( eqneq fff ααα −= ) (6.11a)

where αe and βe have opposite directions. For the thermal problems, the internal

energy density distribution at the boundary satisfies:

( )isoneqneqisoneqneq fgfg ,2,2βββααα ee −−=−

(6.11b)

( eqneq ggg ααα −= )

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 isoneqf , in the boundary condition, Eq. (6.11b) for the internal

energy density distribution. The velocity of the wall is used when eqf for the boundary

nodes are calculated in order to enforce the no-slip boundary condition. The

temperature of the wall is also used when eqg 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.

Page 181: Advanced Computational Fluid(Shu Chang)

181

Figure 6.1 Schematic plot of velocity directions

The schematic plot of velocity directions of the nine-bit model is shown in Figure 6.1.

The density distribution and internal energy density distribution at directions 1, 3, 7, 4,

and 8 are determined by the calculation using equations (6.10a) and (6.10b). And the

rest distributions at directions 5, 2, and 6 are determined by the bounce back rule for

the non-equilibrium distributions through equations (6.11a) and (6.11b). However, for

Neumann type boundary condition, when using equation (6.11b), the temperature on

the bottom wall is unknown. We transfer it to the Dirichlet type boundary condition.

When the heat flux (temperature gradient) is given, the temperature on the boundary

can be approximated by:

3

241,

3,2,

1,i

ii

i

yTTT

T∂∂

∆−−

= (6.12)

where 1,iT is the approximate temperature on the wall; 2,iT and 3,iT

are the temperatures

inside the flow domain near the wall; 1,iy

T∂∂

is the given heat flux on the wall. The

iteration is needed in order to get accurate values of the temperature on the boundary

when Neumann type boundary condition is implemented.

fluid

1

5

847

3

6 2

Page 182: Advanced Computational Fluid(Shu Chang)

182

At corner points, special treatment is needed. Take the left-bottom corner point

as an example, which is shown in Figure 6.2.

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

The density distribution and internal energy density distribution at directions 3, 4, and

7 are determined by the calculation using equations (6.10a) and (6.10b). The

distributions at directions 1, 2, and 5 are determined by the bounce back rule for the

non-equilibrium distributions through equations (6.11a) and (6.11b). For the direction

6 and direction 8, the values for these two directions have little influence on the results

of the numerical simulation using the standard LBM, because they do not contribute

any information into the interior parts. But for the TLLBM scheme, these values will

be used when calculating the interior points at these two directions. So the values at

these two directions should be correctly given. The second order extrapolation scheme

is used in our work to determine these values.

34 3,3

62,2

61,16

fff −= (6.13a)

34 3,3

62,2

61,16

ggg −= (6.13b)

fluid

1

5

847

3

6 2

Page 183: Advanced Computational Fluid(Shu Chang)

183

34 3,3

82,2

81,18

fff −= (6.13c)

34 3,3

82,2

81,18

ggg −= (6.13d)

where jif ,α or jig ,

α mean the density distribution or internal energy density distribution

for the particle velocity direction α at the position ),( jix .

6.5 Practical implementation of IEDDF thermal model for natural

convection in a square cavity using the technique of TLLBM

The problem definition and boundary conditions are displayed in Figure 6.3. The two

sidewalls are maintained at different temperatures. The temperature difference between

the walls introduces a temperature gradient in a fluid, and the consequent density

difference induces a fluid motion, that is, convection. The top and bottom walls are

adiabatic.

Figure 6.3 Configuration of natural convection in a square cavity

u=0, v=0, 0Ty

∂=

u=0, v=0, 0Ty

∂=

u=0

v=0

T=T0

u=0

v=0

T=T1

Page 184: Advanced Computational Fluid(Shu Chang)

184

Buoyancy force and dimensionless parameters

The Boussinesq approximation is applied to the buoyancy force term. This means

that the properties β and υ

are considered as constants, the density ρ

is constant, and

the buoyancy force term is assumed to depend linearly on the temperature,

( ) jG mTTg −= 0βρρ (6.14)

where β is the thermal expansion coefficient, 0g is the acceleration due to gravity,

( )2

01 TTTm+

= is the average temperature, and j is the vertical direction opposite to that

of gravity.

The dynamical similarity depends on two dimensionless parameters: Prandtl

number Pr and Rayleigh number Ra,

υαβ

αυ

30Pr TLgRa ∆== (6.15)

To ensure the code working properly in the near-incompressible regime, we carefully

choose the value of TLg ∆0β . Once TLg ∆0β is determined, the kinetic viscosity and

thermal conductivity are determined through the two dimensionless numbers, Pr and

Ra. By using equation (6.8), two relaxation times υτ and cτ are determined.

Nusselt number Nu is one of the most important dimensionless parameters in

describing the convective heat transport. Its average in the whole flow domain and

along the vertical line of 0xx = can be defined by

( )∫ ∫∆=

L L

x dxdyyxqLT

LNu0 02 ,1

α (6.16a)

( )∫∆=

L

x dyyxqLT

LNu0 0 ,1

α (6.16b)

Page 185: Advanced Computational Fluid(Shu Chang)

185

where ( ) ( ) ( ) ( )yxTxyxuTyxqx ,,, ∂∂−= α is the local heat flux in the horizontal x

direction.

Non-uniform grid and convergence criterion

A typical non-uniform grid as shown in Figure 6.4 is used. It can be seen clearly

from Figure 6.4 that mesh points are stretched near the wall to capture the thin

boundary layer. In the middle part of the flow field, the mesh is relatively coarse since

the velocity and temperature gradients are not very large in this region.

Figure 6.4 A Typical non-uniform mesh in a square cavity

The convergence criterion is set to

8,

1,

82,

2,

12,

2, 10max,10)()(max −+−+ ≤−≤+−+ n

jinji

njiji

njiji TTvuvu (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

Page 186: Advanced Computational Fluid(Shu Chang)

186

Fix the value of TLg ∆0β based on the Rayleigh number. It is usually chosen to

be 0.1 for low Rayleigh number and 0.15 for high Rayleigh number. Then the

value of υτ and cτ can be determined by equation (6.15).

3. Computing Matrix Coefficients of [Aα]

This has been shown in Chapter 5.

4. Set Initial Field at 0=t

Initial density field 1, =jiρ

Initial velocity field 0=ji,u

Initial temperature field 0TT =ji,

Then assuming

)0,,()0,,( === tjiftjif eqαα

)0,,()0,,( === tjigtjig eqαα

5. Iteration

ttt δ+=

5.1 Calculating the buoyancy force

( ) jG mTTg −= 0βρρ

5.2 Collision: computing post-collision functions

( ) ( ) ( ) ( )[ ]tv

tveq

tv

tt

Ftftftftfδτ

δτδτ

δδ ααααα 5.0

,,5.0

,,+

+−+

−=+ xxxx

( ) ( ) ( ) ( )[ ] ( )tc

tceq

tc

tt

qtftgtgtgtgδτδτ

δτδδ αα

αααα 5.0,,,

5.0,,

+−−

+−=+

xxxxx

5.3 Streaming: application of TLLBM formulations

Page 187: Advanced Computational Fluid(Shu Chang)

187

'1

1

1,110 ),( −

+

=∑==+ k

M

kkt faWtf δα x

'1

1

1

',11

'0 ),( −

+

=∑==+ k

M

kkt gaWtg δα x

5.4 Boundary condition

Apply the boundary condition as shown in Section 6.4.

5.5 Calculating macroscopic variables

∑=α

αρ f

2tf δρρ

ααα

Geu += ∑

∑∑ −=α

ααα

αδερ qfg t

2

5.6 Calculating the new equilibrium distribution functions for the density

distribution and internal energy density distribution.

5.7 Checking the convergent criteria. If it is satisfied, move to step 6. If not,

repeat 5.1-5.7 until the convergent criteria is satisfied.

6. Output needed information in the flow field

Page 188: Advanced Computational Fluid(Shu Chang)

188

Fig. 6.5 Flow Chart of Computation

The following Figure 6.6 is one of the typical results obtained by the IEDDF thermal

model using the technique of TLLBM.

Figure 6.6 Temperature contours and streamlines for Ra=106

N=0 initial field of density, velocity and temperature

Calculating eqf and eqg . Grid generation

Calculation of υτ and cτ based on TLg ∆0β , Ra and

Pr.

Calculating geometric parameter ka ,1

Yes

'1

1

1,110 ),( −

+

=∑==+ k

M

kkt faWtf δα x

'1

1

1,1

'10 ),( −

+

=∑==+ k

M

kkt gaWtg δα x

Output

Convergence?

∑=α

αρ f

2tf δρρ

ααα

Geu += ∑

∑∑ −=α

ααα

αδερ qfg t

2

Boundary condition

N=N+1

No

Page 189: Advanced Computational Fluid(Shu Chang)

189

We have also extended the IEDDF thermal model to be used on the three

dimensions. [Peng et al., J. Comp. Phys. 193, p260-274, 2003]. For the incompressible

flows, we proposed the simplified IEDDF thermal model which makes the

implementation easier and quicker. [Peng et al., Phys. Rev. E. 68, 026701, 2003].

References

Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid

Mech. 30, 329 (1998).

He X., S. Chen, and G. D. Doolen, A novel thermal model for the lattice Boltzmann

method in incompressible limit, J. Comput. Phys. 146:282-300, 1998.

Luo L. S., Unified theory of the lattice Boltzmann models for nonideal gases, Phys.

Rev. Lett. 81(8): 1618-1621, 1998.

Pavlo P., G. Vahala and L. Vahala, Higher-order isotropic velocity grids in lattice

methods, Phys. Rev. Lett. 80 (18): 3960, 1998.

Y. Peng, C. Shu and Y. T. Chew, A Three-dimensional incompressible thermal lattice

Boltzmann model and its application to simulate natural convection in a cubic

cavity', Journal of Computational Physics, 193, 260-274, 2003.

Y. Peng, C. Shu, Y. T. Chew, Simplified thermal lattice Boltzmann model for

incompressible thermal flows’, Physical Review E, Vol. 68, 026701, 2003.

Shu C., Chew Y. T. and Niu X. D., “Least square-based LBM: A meshless Approach

for simulation of flows with complex geometry”, Phys. Rev. E., 64, P045701-1,

2001.

Page 190: Advanced Computational Fluid(Shu Chang)

190

Shu C., Niu X.D. and Chew Y. T., “Taylor series expansion- and least square-based

lattice Boltzmann method: two-dimensional formulation and its applications”,

Phys. Rev. E., 65, P036708-1, 2002.

Shu C., Y. T. Chew and Y. Peng, “Simulation of natural convection in a square cavity

by Taylor series expansion- and least square- based lattice Boltzmann method”, Int.

J. Mod. Phys. C, Vol. 13(10): 1399-1414, 2002

Wolf-Gladrow, D. A., Lattice-Gas Cellular Automata and Lattice Boltzmann Models:

An Introduction, Lecture Notes in Mathematics 1725, Springer-Verlag, Germany

(2000).

Zou Q and He X, “On pressure and velocity boundary conditions for the lattice

Boltzmann BGK model”, Phys. Fluids, 9, p1591, 1997.