Professional Documents
Culture Documents
Dr C. Shu
Office: E2-03-07
Tel. 6874 6476
e-mail: mpeshuc@nus.edu.sg
1
Table of Contents
2
4.2 Lattice Gas Cellular Automata (LGCA)
4.3 Kinetic theory
4.4 Lattice Boltzmann Method (LBM)
4.5 Practical Implementation of LBM for Lid-Driven Square
Cavity Flows
5. Taylor Series Expansion- and Least Square- based Lattice
Boltzmann Method (TLLBM)
5.1 Introduction
5.2 Conventional models for problems with complex geometry
5.3 Taylor Series Expansion- and Least Square-based Lattice
Boltzmann Method (TLLBM)
5.4 Accuracy Analysis of TLLBM
5.5 Practical Implementation of TLLBM for Flow around a
Circular Cylinder
6. Application of TLLBM to Simulate Thermal Flows
6.1 Introduction
6.2 Internal Energy Density Distribution Function (IEDDF)
Thermal Model
6.3 Application of IEDDF thermal model on arbitrary mesh by
using TLLBM
6.4 Boundary conditions
6.5 Practical implementation of IEDDF thermal model for natural
convection in a square cavity using the technique of TLLBM
3
1. Domain-Free Discretization (DFD) method
1.1 Introduction
Most engineering problems are governed by a set of partial differential equations (PDEs).
For example, the Newtonian viscous flow can be modeled by Navier-Stokes equations.
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
indicated that the numerical method is usually applied when the analytical solution of a
PDE is difficult to be obtained. Although the analytical and numerical methods can both
give the solution of a PDE, they involve quite different solution procedures.
For the analytical method, the PDE and its boundary conditions are dealt with separately.
In other words, the analytical solution is usually obtained by two steps. In the first step,
we only consider the PDE and obtain its general solution. Then in the second step, the
expression of the general solution is substituted into the boundary conditions to determine
the unknown coefficients in the general solution. Clearly, the first step does not involve
4
the solution domain. The solution domain (geometry of the problem) is only involved in
the second step when the boundary condition is implemented. So, the analytical method
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
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
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
computational space, the finite difference schemes and the DQ method can be directly
applied since in this space, the solution domain is regular. To do numerical calculation in
the computational space, we need to transform the governing PDEs and their boundary
conditions into the relevant forms in the computational space. This process is very
5
complicated, and problem-dependent. In addition, it may bring additional errors into the
numerical method, which can avoid the complicated coordinate transformation process.
On the other hand, we note that the need of coordinate transformation for irregular
with the boundary condition associated with the solution domain. We can see clearly that
avoided, and the numerical computation for regular and irregular domain problems can
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
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,
problem. So, we can see that the geometry of the problem is only related to the particular
6
solution. The PDE itself has no connection to the solution domain. The obvious fact is
that once the particular solution is obtained, it exactly satisfies the PDE not only for the
points inside the solution domain but also for the points outside the solution domain. In
the following, we will illustrate this feature by some examples. The first example is the
determination of a straight line. It is well known that two points A and B can uniquely
determine a straight line represented by a line equation. This line equation is applicable
for all the points along the straight line including the points in the interval between A and
B and the points outside the interval between A and B. Another example is the solution of
equation is
d 2u (1.1)
=u−x
dx 2
and the solution domain is 0 ≤ x ≤ 1 . The boundary condition for equation (1.1) is given
by
u = c1e x + c 2 e − x + x (1.3)
In the second step, we substitute the boundary condition (equation (1.2)) into equation
c1 = 1, c 2 = −1
u = e x − e−x + x (1.4)
7
It is easy to prove that the solution form (1.4) satisfies the differential equation (1.1) not
only in the solution domain 0 ≤ x ≤ 1 , but also in the whole one-dimensional field
−∞ < x < ∞.
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,
Now, it is supposed that the differential equation (1.1) is approximated by the second
order central difference scheme, which has the following discrete form
u i −1 − 2u i + u i +1 (1.5)
2
= u i − xi
(∆x)
The error between equation (1.5) and equation (1.1) is in the order of (∆x) 2 . Note that
equation (1.5) gives a set of algebraic equations which are resulted from the numerical
accurately satisfies the discrete equation (1.5). Here, it is interesting to show that for
points outside the solution domain 0 ≤ x ≤ 1 , equation (1.4) also satisfies equation (1.5)
with second order of accuracy. Consider a point xi = 2 and take ∆x as 0.1. From
8
Substituting above values into the left and right sides of equation (1.5) respectively, we
get
u i −1 − 2u i + u i +1 (1.6a)
2
= 7.2597675984
( ∆x )
u i − xi = 7.253720815694 (1.6b)
Obviously, the difference of the two sides in equation (1.5) is in the order of (∆x) 2 . This
example gives us an important hint. That is, the discrete form of a PDE resulted from
numerical discretization is not restricted by the geometry of the problem. It can involve
some points outside the solution domain. This is a very important feature.
From the inspiration of the analytical method, a new discretization method, the domain-
free discretization method is presented. The basic idea of the domain-free discretization
method is that the discrete form of the given differential equation is irrelevant of solution
domain. In other words, the discrete form of PDEs can involve some points outside the
avoided, and the numerical computation for regular and irregular domain problems can
coordinate system.
As shown in the introduction, the discrete form of the differential equation resulted from
the numerical discretization can be applied to the points inside the solution domain and
9
the points outside the solution domain. When the form is applied to the points outside the
solution domain, it involves the computation of the functional values at these points.
From the example shown in the introduction, the functional values at the points outside
the solution domain can be given from the analytical expression of the solution for a
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
variable y. If along this vertical line, the functional values at certain mesh nodes are
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
10
y
yt(x)
A A''
A'
yb(x)
a xi xk b x
Figure 1.1 Mesh point distribution used by the domain-free discretization method
For the numerical computation, we first descompose the whole domain into several
Along each vertical line, the solution is only the function of y. The domain-free
discretization method first discretizes all the derivatives of a PDE in the x direction, and
reduces the PDE into a set of ordinary differential equations (ODEs). Note that along
each vertical line, the solution is governed by an ordinary differential equation (ODE).
Then, mesh nodes are distributed along each vertical line. The functional values at all
mesh nodes are the numerical (approximate) solutions of the PDE. Generally, the number
of mesh nodes on different vertical lines may be different. As shown in Figure 1.1, M i ,
the number of mesh nodes on the vertical line of x = xi may not be equal to M k which is
the number of mesh nodes on the vertical line of x = x k . Furthermore, the y coordinates
of relevant mesh nodes on these two lines may not be the same. Clearly, there is no
11
structure for the grid node distribution in the whole domain. The number of mesh nodes
N
used in the whole domain can be computed by ∑Mi .
i =1
With the mesh nodes distributed along each vertical line, the domain-free discretization
method further discretizes the resultant ODEs and gives a set of algebraic equations. In
other words, the derivatives in the y direction for an ODE along a specific vertical line
are further discretized by a numerical method. It should be emphasized that the mesh
nodes used to further discretize the ODE along a vertical line are always within the
solution domain. However, since all the ODEs are coupled, the resulting algebraic
equations may involve some points on neighboring lines, which are possibly not the mesh
nodes of these lines, and can be inside the solution domain or outside of the solution
domain. An example is shown in Figure 1.1. When the resultant ODE is discretized at a
mesh node A, the resulting algebraic equation involves points A′ and A″ on two
neighboring lines. Obviously, A′ and A″ are not the mesh nodes on relevant lines with A′
being outside of the solution domain and A″ being inside the solution domain. The
functional values at these points have to be determined from the approximate form of the
solution along the relevant line. In DFD method, the functional values are calculated by
using interpolation technique for points inside the solution domain, and extrapolation
technique for points outside the solution domain. In general, Domain-Free Discretization
method involves two aspects. One is the derivative discretization by some numerical
interpolation/extrapolation technique.
12
It should be noticed here that the mesh nodes are always distributed inside the physical
domain though the DFD may involve the points outside the domain. To clarify, by “mesh
node” or “node”, we mean those specific points inside the physical domain at which the
∂ 2ψ ∂ 2ψ (1.7)
+ = f ( x, y )
∂x 2 ∂y 2
Numerical Discretization
Before the numerical discretization is conducted, we need to distribute N vertical lines in
coordinate y j , j = 1,2,..., M . If the vertical lines are distributed, the derivatives in the x
direction should be discretized first. Otherwise, the derivatives in the y direction are
discretized first. Suppose that the vertical lines are distributed in the physical domain, as
shown in Figure 1.1, we need to discretize the derivatives in the x direction. We can use
either the second order central difference scheme or the DQ method to discretize these
derivatives. When the central difference scheme is applied, equation (1.7) can be reduced
to
13
ψ i −1 ( y ) − 2ψ i ( y ) + ψ i +1 ( y ) d 2ψ i ( y ) (1.8)
2
+ 2
= f ( xi , y ) , i = 1,2,..., N
∆x dy
N
d 2ψ i ( y ) (1.9)
∑ bi,kψ k ( y) + dy 2
= f ( xi , y ) , i = 1,2,..., N
k =1
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
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
ψ i −1 ( y j ) − 2ψ i ( y j ) + ψ i +1 ( y j ) Mi (1.10)
2
+ ∑ b j ,kψ i ( y k ) = f ( xi , y j ) , i = 1,2,..., N
∆x k =1
where M i is the number of mesh points along the line of x = xi , and b j ,k is the
weighting coefficient of the second order derivative in the y direction. Note that the
14
weighting coefficient b j ,k on different vertical lines may be different. Equation (1.10) is
an algebraic equation system. It is indicated that the position y j on the vertical lines of
x = xi −1 and x = xi +1 may not be the mesh node, which may also be outside the physical
domain. We will show in the following that the values of ψ i −1 ( y j ) and ψ i +1 ( y j ) can be
N Mi (1.11)
∑ bi,kψ k ( y j ) + ∑ b j ,kψ i ( y k ) = f ( xi , y j ) , j = 1,2,..., M i
k =1 k =1
functional value at the position y j on all the vertical lines. Again, this value can be given
from the approximate form of the solution along each vertical line.
functional values at M k grid nodes are known. It is well known that the functional value
such as the spline function, the radial basis function approximation, the low order
15
discretization. Using Lagrange interpolated polynomial, the solution on the line can be
approximated by
Mk (1.12)
ψ k ( y ) = ∑ Lag ( x k , yl , y )ψ k ( yl )
l =1
where
Mk
y − yll (1.13)
Lag ( x k , yl , y ) = ∏ yl − yll
ll =1
(l ≠ll )
Using equation (1.12), the functional value at the position y j can be computed by
Mk (1.14)
ψ k ( y j ) = ∑ Lag ( x k , yl , y j )ψ k ( yl )
l =1
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
can be applied to any irregular domain problem. That is why we call it Domain Free
Discretization method.
16
Note that equation (1.14) can be applied to a point inside the physical domain or a point
outside the physical domain. When the position y j is inside the physical domain, the use
of equation (1.14) is usually called the Lagrange interpolation. In contrast, when the
position y j is outside the physical domain, the use of equation (1.14) is called the
Lagrange extrapolation. It is found that the Lagrange interpolation can give very accurate
results, but the Lagrange extrapolation may cause a large numerical error, especially for a
Lag ( x k , y l , y j ) are very large, especially for the case in which the high order Lagrange
interpolated polynomial is involved, and the extrapolation point is far away from the
physical domain. The large extrapolation coefficients may introduce a large round-off
error, which can eventually lead the computation to diverge. To seek more appropriate
other words, we will use three local nodes to constitute a second order polynomial to do
( y − y k , 2 )( y − y k ,3 ) ( y − y k ,3 )( y − y k ,1 ) (1.18)
ψ k ( y) = ψ k ,1 + ψ k ,2 +
( y k ,1 − y k , 2 )( y k ,1 − y k ,3 ) ( y k , 2 − y k ,3 )( y k , 2 − y k ,1 )
( y − y k ,1 )( y − y k , 2 )
ψ k ,3
( y k ,3 − y k ,1 )( y k ,3 − y k , 2 )
and when y > y t ( x k ) , the local extrapolation becomes
( y − y k ,M k −1 )( y − y k , M k − 2 )ψ k ,M k ( y − y k ,M k −1 )( y − y k , M k )ψ k ,M k − 2
ψ k ( y) = +
( y k , M k − y k , M k −1 )( y k , M k − y k , M k − 2 ) ( y k , M k − 2 − y k , M k −1 )( y k ,M k − 2 − y k ,M k )
(1.19)
( y − y k , M k − 2 )( y − y k , M k )ψ k ,M k −1
+
( y k ,M k −1 − y k , M k − 2 )( y k ,M k −1 − y k , M k )
17
2) Radial basis function approximation
Radial basis function is a recent tool for interpolating data. Due to the favourable
properties of the RBF (that is, high accuracy and absence of the notorious “snaking”
Because Radial Basis Function (RBF) approximation is applied to the interpolation and
nodal variables at the N nodes on the kth line along the y direction. The RBF
Mk (1.20)
ψ k ( y ) = ∑ λ kl ϕ k ( y, y l )
l =1
corresponding to the approximated point. Due to its good performance for many cases,
ϕ k ( y, y l ) = ( y − y l ) 2 + c 2 (1.21)
18
Mk (1.22)
ψ k ( y j ) = ∑ λ kl ϕ k ( y j , y l ) , j = 1,2, L , M k
l =1
There are N equations for N unknowns, so the problem is well-posed. Eq. (1.22) can be
ψ k ( y1 ) λ k 1
ψ ( y ) v λ
v
where ψ k= , λ = k2 ,
k 2
M k M
ψ k ( y M k ) λ kM k
c ( y1 − y 2 ) 2 + c 2 L ( y1 − y M k ) 2 + c 2
( y 2 − y1 ) 2 + c 2 c L ( y2 − yM k ) 2 + c 2
A=
M M O M
( y M − y1 ) 2 + c 2 ( yM k − y2 ) + c 2 2
L c
k
v
Because the non-singularity of A is guaranteed, therefore, this equation is solvable. λ k
v
As λ k is known, we can get the function value of ψ k ( y ) at any position on the kth line
19
We will use Eq. (1.25) instead of Eq. (1.20) for interpolation and extrapolation.
1 M i −1 M i +1
(1.27)
2 ∑
∆x l =1
R ( x i −1 , y l , y j ψ
) i −1 ( y l ) − 2ψ i ( y j ) + ∑ R ( xi +1 , y l , y j )ψ i +1 ( y l )
l =1
Mi
+ ∑ b jkψ i ( y k ) = f ( xi , y j )
k =1
Similarly, substituting equation (1.14) into equation (1.11) gives
N Mk Mi (1.28)
∑ bi,k ∑ R( xk , yl , y j )ψ k ( yl ) + ∑ b j ,kψ i ( y k ) = f ( xi , y j )
k =1 l =1 k =1
It should be noted that the RBF approximation used here is a global approximation, as it
uses all the mesh nodes along the radial line to constitute the approximation scheme.
Therefore, the extrapolation implemented with RBF is also the global approximation. For
convenience, we will use the same value of the shape parameter c at all the points along a
certain vertical line for both interpolation and extrapolation. It is found from practice that
c=0.815*dSi/Mi
for the ith vertical line (where dSi refers to the computational domain for the ith vertical
line, i.e., the distance between two curves yt (x) and y b (x) along that line; and Mi is the
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
problems. It has been found that the distribution of weighting coefficients of the global
method, such as the DQ method) exhibits clearly oscillatory behavior. The amplitude of
20
the oscillation becomes larger and larger when the domain is decreased (such as the gap
between the two curves yt (x) and y b (x) along the vertical line decreases). The
magnitude is even increased in orders and the “snaking” problem becomes more serious.
It introduces more and more high frequency errors into the computation and eventually
leads to a very oscillatory behavior. On the contrary, the radial basis function-based
approximation scheme does not encounter the problem of “snaking”. Therefore, the
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
The resultant algebraic equation systems (1.16) and (1.17), (1.27) and (1.28), can be
In DFD method, because the number of nodes along the y direction can be arbitrary, and
the y coordinates of relevant mesh nodes on adjacent lines may not be the same,
therefore, there is no requirement for structured mesh. The flexibility of the DFD method
on grid structure makes it possible to design more reasonable grid for some irregular
physical domain problems to reduce the unnecessary computer cost. For example, as
shown in Figure 1.2, in the y direction, through properly control on the number of nodes
distributed at different vertical lines, the rigid structured grid can be replaced by a
21
relatively reasonable unstructured grid with less nodes. Eventually, the unnecessary
C' C
xk xi
solve the sample linear and nonlinear differential equations. In particular, the
numerical results and show the efficiency of the method for solving irregular domain
problems, the inverse problems are considered in this section. In other words, the
differential equation and its exact solution are given and fixed in advance. Here, the exact
solution is used in two aspects. One is to compare with the numerical results. The other is
used to specify the boundary condition for different irregular domains. Since the exact
22
solution is fixed, it is interesting to check whether the same numerical results can be
∂ 2ψ ∂ 2ψ
+ =4 (1.29)
∂x 2 ∂y 2
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
x2 + y2 = 1, −1 ≤ x ≤ 1 (1.30)
or by two curves
y ( x) = 1 − x 2 (1.31)
t
y b ( x) = − 1 − x 2
To apply the DFD method, the circular domain is decomposed by 21 vertical lines. Then
on each vertical line, we distribute certain number of mesh nodes. The numbers of mesh
Note that the number of mesh nodes on the first and last vertical lines is just 1. This is
because for the circular domain, there is only one node on these two lines.
23
For numerical discretization, all the derivatives are discretized by the DQ method. As
shown in Fig. 1.1, the resultant algebraic equations involve the computation of the
functional values at points inside and outside the circular domain. For the internal points,
we can simply apply the Lagrange interpolation, while for the external points, we can use
both the all-nodes and 3-nodes extrapolation. The resultant algebraic equations are solved
by the SOR iteration method. Once the numerical result at each mesh node is obtained,
ψ numerical − ψ exact
err ( xi , y j ) =
ψ exact
Then, on each vertical line, a maximum relative error can be found. Table 1.1 shows the
extrapolation and the 3-nodes extrapolation. Due to the symmetry of the problem, only
the results on the right half of the circular domain are listed.
Table 1.1 Comparison of Maximum Relative Errors on Different Lines for a Circular
Domain ( N = 21 )
i 11 12 13 14 15 16 17 18 19 20 21
xi 0 0.1495 0.2956 0.4351 0.5649 0.6821 0.7840 0.8685 0.9335 0.9777 1.0
All-nodes
1.97379 1.8389 1.6219 1.2093 0.7355 0.3742 0.1743 0.0799 0.0713 0.0114 0.0
Extrapolation
3 nodes
0.0491 0.0509 0.0596 0.0693 0.0774 0.0778 0.0750 0.0646 0.0728 0.0114 0.0
Extrapolation
24
It can be seen from Table 1.1 that when the all-nodes extrapolation is used, the maximum
relative errors on some vertical lines are very big. In fact, the maximum relative error
occurs on the vertical line of x = x11 , which passes through the center of the circular
domain. The reason is that when the numerical discretization is applied at the mesh nodes
near the boundary on this line, the resultant algebraic equations involve extrapolation
almost on every vertical line and some extrapolation coefficients are very large. So, a
large numerical error is introduced. It can also be observed from Table 1.1 that when the
numerical results is greatly improved. For example, on the vertical line of x = x11 , the
maximum relative error is reduced from 1.97379 by the all-nodes extrapolation to 0.0491
by the 3-nodes extrapolation. The maximum relative errors by the 3-nodes extrapolation
on other vertical lines are also very small, showing that an accurate numerical result is
obtained.
We have also applied the DFD method to solve the model differential equation on the
following domains: elliptic, trapezoidal and expansion channel. The boundary of the
y ( x) = 0.8 1 − x 2 (1.32)
t
, −1 ≤ x ≤ 1
yb ( x) = −0.8 1 − x 2
25
y ( x) = 1 + x ⋅ tan 30 0 (1.33)
t , 0≤ x≤2
yb ( x) = 0
yt ( x) = 1 (1.34)
1 , 0 ≤ x ≤ 10 / 3
y b ( x ) = [tanh( 2 − 3 x ) − tanh( 2) ]
2
It was found that when the DFD method is applied to above domains, both the all-nodes
extrapolation and the 3-nodes extrapolation can give reasonable numerical results. The
maximum relative errors in the whole solution domains are listed in Table 1.2. It can be
seen from Table 1.2 that for the trapezoidal domain and expansion channel, the accuracy
of numerical results is much higher than that for the circular and elliptic domains. The
reason is that more nodes for extrapolation in a resulting algebraic equation are needed
for the circular and elliptic domains. The large extrapolation coefficients could affect the
Table 1.2 Comparison of Maximum Relative Errors on Different Physical Domains for A
Linear Problem
26
It should be indicated that when the DFD method is applied, it is easy to consider
different solution domains in the program. We just need to change the statements for the
The DFD method is further validated by its application to solve a sample nonlinear
given by
∂ 2ψ ∂ 2ψ ∂ψ (1.35)
+ 2 +ψ = 4 + 2 x( x 2 + y 2 − 1)
∂x 2
∂y ∂x
and the exact solution is fixed as ψ = x 2 + y 2 − 1 when different domains are considered.
Like the linear case, equation (1.35) is also solved on the circular, elliptic, trapezoidal
domains and the expansion channel. It was found that when the all-nodes extrapolation is
applied, the numerical computation on the above 4 domains could not lead to a converged
solution. However, when the 3-nodes extrapolation is used, accurate numerical results
can be obtained for all the domains. This indicates that the large extrapolation
coefficients have more effect on the nonlinear differential equation than on the linear
differential equation. From our numerical experiments, it is suggested that for a nonlinear
differential equation, the 3-nodes or other local extrapolation can be used to get a
converged and accurate numerical result. For the model nonlinear differential equation
solved by the DFD method on 4 respective domains, the maximum relative errors in the
whole solution domain are listed in Table 1.3. As compared to the linear case, it can be
seen from Table 1.3 that for the nonlinear case, the accuracy of numerical results for the
27
circular and elliptic domains remain the same, but the accuracy of the results for the
Table 1.3 Comparison of Maximum Relative Errors on Different Physical Domains for A
Nonlinear Problem
expansion channel. This problem was first proposed by Roache (1981), and was chosen by a
(Napolitano et al, 1985) as a suitable test case for assessing various numerical methods.
28
Description of the Problem
Inlet
Outlet
x
(0, 0)
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
1 30 x (1.36)
y b ( x) = [tanh(2 − ) − tanh(2)], for 0 ≤ x ≤ xout = Re/ 3
2 Re
yt ( x) = 1 (1.37)
Governing Equations
governing equations for the problem. In the Cartesian coordinate system, the version of
29
∂ω ∂ω 1 ∂ 2ω ∂ 2ω (1.38)
u +v = ( + )
∂x ∂y Re ∂x 2 ∂y 2
∂ 2ψ ∂ 2ψ (1.39)
+ =ω
∂x 2 ∂y 2
∂ψ (1.40)
u = ∂ y
v = − ∂ψ
∂x
Boundary Conditions
The boundary conditions of the problem are given as follows. At inlet, the fully
developed velocity profile is given, which is then converted to the stream function
distribution
1 (1.41)
ψ = (3 y − y )
2 3
2 , at x = 0
ψ x = 0
ψ x = 0 (1.42)
, at x = Re/ 3
ω x = 0
is applied. On the lower boundary (solid wall), the no-slip boundary condition is
30
ψ = 0 (1.43)
, at y = y b ( x )
∂ψ / ∂n = 0
where n is the unit length in the normal direction. The symmetric boundary condition
ψ = 1 (1.44)
, at y = y t ( x)
ω = 0
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.
(especially for Neumann boundary condition) as accurate as possible. Thus, to meet this
boundary condition for vorticity on the lower boundary. According to Shu et al (1994), in
1 ∂ ∂ψ ∂ψ 1 ∂ ∂ψ ∂ψ (1.45)
ω= A +B + C +B
J ∂ξ ∂ξ ∂η J ∂η ∂η ∂ξ
In the Curvilinear coordinate system, the lower boundary is defined as η = 0 , and on this
31
C ∂ 2ψ (1.46)
ω=
J ∂η 2
1 2 (1.47)
C= ( xξ + yξ2 )
J
J = xξ yη − xη yξ (1.48)
ξ = x / xout = 3 x / Re (1.49)
y − yb ( x) y − yb ( x) (1.50)
η= =
yt ( x) − yb ( x) ∆y
(1.51)
225 ∂ 2ψ
ω = 1 + 2
Re 2 [cosh(2 − 30 x )]4 ∂y
Re
Equation (1.51) can be directly discretized (in the Cartesian coordinate system) along a
vertical line by using the DQ method. Note that its discrete form does not involve any
the y coordinate are approximated by the DQ method, whereas the derivatives with
method. The difference between using the FD scheme and the DQ method in the x
32
As shown in the previous section, the DFD method first decomposes the physical domain
by a series of vertical or horizontal lines. For the former as an example, the derivatives in
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
From the previous section, as to extrapolation approximation, for polynomial based DFD
has to give up the global approximation and shifts to use the three local nodes to
Using the DQ method to discretize all the spatial derivatives, equations (1.38)-(1.39) are
reduced to
N Mi
1 N Mi (1.52)
ij ∑ ik kj
u a ω + v ij ∑ jk ik
a ω = ( ∑ ik kj ∑
b ω + b jk ω ik )
k =1 k =1 Re k =1 k =1
N Mi
b ψ + b ψ =ω
∑
k =1
ik kj ∑
k =1
jk ik ij
33
for i = 1,2,..., N and j = 1,2,..., M i . where N is the grid number in the x direction
(number of vertical lines) and M i is the number of grid nodes on the line of x = xi . a ik
and bik are the DQ weighting coefficients of the first and second order derivatives in the
x direction; similarly, a jk and b jk are the DQ weighting coefficients of the first and
second order derivatives in the y direction. Equation (1.52) involves many points which
A3 A2 A1 B B1 B2
When the DQ method is used, the derivative at a point is expressed by the weighted sum
of functional values at the points that are located in the same line as this point. For
∂ψ
example, as shown in Figure 1.4, at point B(i, j ) is approximated by
∂x
∂ψ N (1.53)
= ∑ aikψ kj
∂x B k =1
∂ψ
Clearly, is related to the functional values at point A1 , A2 , A3 ,…, which are outside
∂x B
the domain and need extrapolation, and the values at points B1 , B2 ,…, which are inside
the domain and need interpolation. In general, the nearer the extrapolation points from
34
the boundary, the higher the accuracy of extrapolation. As shown in Figure 1.4, point A3
is far away from the boundary, thus the extrapolation for this point will bring a large
∂ψ
numerical error into the computation of . For this case, although the program can
∂x B
run, the obtained results are not accurate. To improve this, we should try to make the
∂ψ
discretization form of at point B involving the extrapolation as less as possible. For
∂x
∂ψ
the approximation of at point B, if we only consider two neighboring points A1 and
∂x
B1 , the discretization technique becomes the second order FD scheme which will be
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.
ω i +1, j − ω i −1, j Mi
1 ω i +1, j − 2ω i , j + ω i −1, j M i (1.54)
u
ij + v ij ∑ jk ik
a ω = ( + ∑ b jk ω ik )
2∆x k =1 Re ∆x 2 k =1
ψ
i +1, j − 2ψ + ψ Mi
+ ∑ b jkψ ik = ω ij
i, j i −1, j
∆x 2
k =1
where a jk and b jk are the DQ weighting coefficients of the first and second order
may not be the mesh nodes. For the general case, both interpolation and extrapolation
have to be carried out since the geometry is irregular and no coordinate transformation is
introduced.
35
B( i, j)
A1 B B1
As shown in Figure 1.5, the point A1 is outside the physical domain. The functional value
at this point is obtained by the 3-nodes polynomial local extrapolation. The three nodes
are those that are nearest to A1 on the line of x = xi −1 . The point B1 is an inner point. The
functional value at this point is obtained by global interpolation of all mesh nodes on the
equation (1.54), ω i +1, j and ψ i +1, j are obtained by interpolation on the line of x = xi +1
while ω i −1, j and ψ i −1, j are obtained by extrapolation on the line of x = xi −1 . The resultant
At inlet
The discretized form of the boundary condition at inlet can be easily written as
36
1 (1.55)
ψ 1 j = (3 y1 j − y1 j )
2 2
2
ω1 j = 3(1 − y1 j )
Equation ω 1 j = 3(1 − y1 j ) is just used as an initial condition. It must be updated with the
∂u ∂v ∂v (1.56)
ω1 j = − = 3(1 − y1 j ) −
∂y 1 j ∂x 1 j ∂x 1 j
∂v
can be obtained by the following method.
∂x 1 j
∂v 1 ∂ 2v (1.57)
v2 j = v1 j + ⋅ ∆x + ⋅ ∆x 2
∂x 1 j 2 ∂x 1 j
2
v = v + ∂v ⋅ (2∆x) + 1 ∂ v ⋅ 4∆x 2
2
3j 1j
∂x 1 j 2 ∂x 2 1 j
At the inlet, we have v1 j = 0 . Substituting this condition into above equation gives
∂v 4v − v (1.59)
= 2j 3j
∂x 1 j 2 ∆x
37
The velocity components at the inlet can be written as
3 2 (1.60)
u1 j = (2 y1 j − y1 j )
2
v1 j = 0
ψ iM i = ψ 1M 1 (1.61)
ω iM i = 0
Using equation (1.40), the velocity component u , v on the symmetry line can be given as
Mi (1.62)
u iM i = ∑ a M i k ψ ik
k =1
v = 0
iM i
Note that the DQ method has been used to discretize the first order derivative in equation
(1.62).
At outlet
By using Taylor series expansion, the natural boundary condition at outlet can be
approximated by
38
4ψ N −1, j − ψ N − 2, j (1.63)
ψ Nj =
3
ω = 4ω N −1, j − ω N − 2 , j
Nj
3
MN (1.64)
u Nj = ∑ a jk ψ Nk
k =1
v = 0
Nj
Along the wall, the boundary condition of vorticity is discretized by the DQ method in the
ψ i1 = ψ 11 (1.65)
225 Mi
30 xi 4 ∑
ω
i1 = 1 + b1kψ ik
Re [cosh(2 −
2
)] k =1
Re
u i1 = 0 (1.66)
vi1 = 0
39
Some Numerical Results
The numerical results obtained by the DFD method are compared well with available data
in the literature. This can be observed from Figure 1.6, which displays the vorticity
distribution along the wall for Re=10. The present results are obtained by a mesh size of
41×15. Also included in Fig. 1.6 are the results of Shu et al (1994) using the DQ method
with coordinate transformation and the benchmark solution of IAHR workshop given by
Cliffe et al using a finite element method with results being grid-independent. Note that
the results of Cliffe et al are shown in the paper of Napolitano et al. (1985). It is seen from
the figure that the present results agree very well with the benchmark solution of the
problem.
3.0
2.0 Benchmark
Shu et al
Vorticity
present
1.0
0.0
-0.2 0.0 0.2 0.4 0.6 0.8 1.0
-1.0
x/xout
The flow in the expansion channel has a feature that a quasi-self-similar solution can be
obtained when Reynolds number is much larger than 1. This feature has been confirmed
40
in Figure 1.7, which displays the wall vorticity distribution for different Reynolds
numbers obtained by the DFD method. Clearly, as Reynolds number increases to the
value of much larger than 1, the solution takes on a quasi-self-similar form, i.e. the wall
3.0
Re=10
2.0 Re=100
Re=200
Vorticity
1.0
0.0
0.0 0.2 0.4 0.6 0.8 1.0
-1.0
x/xout
References
41
Roache, P., (1981), "Scaling of High Reynolds Number Weakly Separated Channel
1981.
Verlag, London.
Shu C., Chew Y. T., Khoo, B. C. and Yeo, K. S. (1994), “A Global Method For Solving
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
Shu C., Wu Y.L. (2002): Domain-free discretization method for doubly connected
Wu Y.L., Shu C., Qiu J and Tani J (2003): Implementing Multi-Grid approach in
42
2. Least Square-based Finite Difference Method
2.1 Introduction
Nowadays, numerical solution of the fluid mechanics equations on the computer has been
developed into an important subject of fluid dynamics, i.e., computational fluid dynamics
(CFD). The core of CFD is to construct a numerical approximation that simulates the
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,
below:
by a local Taylor series expansion at grid points in the adopted mesh system (we can also
43
the governing equations by a linear combination of values of dependent variables at a
finite number of grid points. The most suitable computational domain for FD method is
the rectangular type, where it is accurate, efficient and simple to implement. However, it
does not adapt well to problems with complex geometry without appropriate coordinate
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
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
approach with order higher than second. One common point of these standard numerical
methods is that they all are mesh-using methods, i.e., before the start of computation,
they need to build up large data structure to store detailed elemental information
44
comprising all node-based and element-based connectivity and hierarchical data about the
on the mesh properties. Due to their good performance, these three methods are widely
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.
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
and supersonic flows, with single or multiple components. From the point of view of
Moreover, many combinations of them are usually considered. This is the so-called
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
45
Geometrical complexity of flow problems
In addition to the various flow patterns, many flow problems involve complex
boundaries and bodies with complex shapes. These represent another main difficulty
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
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
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
unstructured mesh generation is not a trivial job. In many cases, mesh generation even
absorbs far more time and costs more than the numerical solution itself. For example, the
46
generation of a mesh for the simulation of airflow past an aircraft may require several
months, while the solution computations may take only a few hours on a supercomputer.
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.
Concept of mesh-free
In recent years, many new numerical schemes have been proposed to avoid the weakness
complexity. Among the new developed numerical schemes, a group of so-called meshless
absent from the dependence on the mesh. The terms meshless and mesh-free refer to the
47
ability of the method to construct functional approximation or interpolation entirely from
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
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.
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
48
It is known that any discretization method requires an approximation/interpolation
not the exceptions. However, their approximation kernels are not constructed on meshes
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
are developed from the FD method and its equivalent, the DQ method. They are used to
1 2 3
o o o
x x
49
Let us consider the one-dimensional grid points shown in Figure 2.1. For grid point 2,
located in the middle between grid points 1 and 3 such that ∆x = x 2 − x1 = x3 − x 2 , the
dφ 2 d φ
2
1
φ1 = φ 2 − ∆x + (∆x ) 2 − ... (2.1a)
dx 2 2 dx 2
dφ 1 d 2φ
φ 3 = φ 2 + ∆x + (∆x )2 2 + ... (2.1b)
dx 2 2 dx 2
Truncating the series just after the third term, and adding and subtracting the two
dφ φ − φ1
= 3 + O ( ∆x 2 ) (2.2a)
dx 2 2∆x
d 2φ φ − 2φ 2 + φ 3
2 = 1 + O ( ∆x ) (2.2b)
dx 2 ( ∆x ) 2
The substitution of such expression into the differential equation leads to the finite
difference equation.
domain and has shown very good performance, especially when efficiency and accuracy
problems, convectional FD scheme usually uses fractional techniques and treats them as
multi- one-dimensional problems. In other words, it must be applied along a mesh line.
50
For the domain of simple geometry such as rectangle or circle, mesh lines can be
the related flow problem easily. For domains of greater complexity, coordinate
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
into the computation, but also introduces additional numerical error into the scheme. To
One mesh-free idea can be naturally inspired from the construction of conventional FD
development of the conventional FD schemes, in which only the derivatives in one spatial
direction are involved and considered as unknowns. To solve for these unknown
derivatives, one needs to apply the 1D Taylor series expansion at some collocation points
along the respective spatial direction. In like manner, this procedure can be extended to
the two-dimensional (2D) case, in which the 2D Taylor series expansion is applied. We
call this procedure as two-dimensional Taylor series formulation. Since the formulation
only requires the information about the relative positions of the supporting nodes to the
51
reference node, the constructed scheme can be considered as a mesh-free approach. The
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
∂φ 2∂ φ 2 ∂ φ ∂ 2φ
2 2
∂φ 1 1
φ = φ 0 + ∆x + ∆y + (∆x ) 2 + (∆y ) 2 + (∆x )(∆y )
∂x 0 ∂y 0 2 ∂x 0 2 ∂y 0 ∂x∂y 0 (2.3)
2 2 2 2
+
1
(∆x )3 ∂ φ3 + 1 (∆y )3 ∂ φ3 + 1 (∆x )2 (∆y ) ∂ 2 φ + 1 (∆x )(∆y )2 ∂ φ2 + ...
6 ∂x 0 6 ∂y 0 2 ∂x ∂y 0 2 ∂x∂y 0
Reference knot
Supporting knots
Non-supporting knots
Suppose that equation (2.3) is truncated to the third order derivatives. Then it has 9
unknowns. Among them, 2 are the first order derivatives, 3 are the second order
derivatives, and 4 are the third order derivatives. Like the conventional FD scheme, we
52
need 9 equations to solve for these 9 unknowns. This can be achieved by applying
equation (2.3) at 9 neighbouring points. Suppose that all the 9 points are within a circular
φ j − φ o = s Tj ⋅ dφ , j = 1, 2, …, 9 (2.4)
where
1
2
( ) ( ) ( )( ) ( )
1
2
1
s Tj = ∆x j , ∆y j , ∆x j 2 , ∆y j 2 , ∆x j ∆y j , ∆x j 3 ,
6
1
6
( ) ( ) 1
2
1
( )( )
∆y j 3 , ∆x j 2 (∆y ) j , ∆x j ∆y j 2
2
∂φ ∂φ ∂ 2 φ ∂ 2 φ ∂ 2 φ
dφ T = , , 2 , 2 , ,
∂x 0 ∂y 0 ∂x 0 ∂y 0 ∂x∂y 0
∂ 3φ ∂ 3φ ∂ 3φ ∂ 3φ
∂x 3 , ∂y 3 , ∂x 2 ∂y , ∂x∂y 2
0 0 0 0
in this development, we truncated the Taylor series expansion after the third order
Furthermore, by defining
[
S T = s1 , ..., s 9 ]9×9
(2.6)
we can further assemble equations (2.4) into the following succinct matrix form:
53
∆ϕ = Sdϕ (2.7)
The square matrix S contains all the geometric information about the distribution of the
obtained as
dϕ = S −1∆ϕ (2.8)
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
matrix to be non-singular so that an inverse exists, we observed that the matrix tends to
become ill-conditioned numerically when one or more of the supporting nodes are very
close to the reference node, i.e. (∆x j , ∆y j ) ≈ 0 for some j. Secondly, it is noted that the
matrix may become ill-conditioned or singular when some supporting nodes are very
To overcome the first difficulty, the radius d o of the support domain is used to scale the
54
∆x j ∆y j
∆x j = , ∆y j = (2.9)
do do
Table 2.1 Condition number of the coefficient matrix before and after scaling
After
Before scaling
Scaling
Grid
N/A 0.1 0.01 0.001 0.0001
spacing h
Condition
8.7246 9.0321 58.027 550.95 5480.5
number
An experiment has been carried out to test the effect of scaling, and the results are shown
in Table 2.1. It can be clearly observed that the condition number of resultant matrix
local support scaling we can alleviate the negative effect caused by small value of
dφ = S −1 D ∆φ (2.10)
d o−1
d o−1
d o− 2
d o− 2
D= d o− 2 (2.11)
d o−3
d o−3
d o−3
d o−3
55
However, the second difficulty is not so easy to resolve. This is because little is known
about the effects of node distribution on the conditioning of the matrix, except for a few
special cases, such as when all the supporting nodes are located on a straight line. For
numerical implementation, we would hence have to check and ensure that the matrix S is
well-conditioned at every node of the computational domain. This can be done by a trial-
and-error process. However, the process greatly increases the computational cost. In the
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
(optimal approximation of the derivative vector dφ ) can be obtained by the least square
( )
n
E (b ) = ∑ φ j − φ 0 − s Tj ⋅ b
2
(2.13)
j =1
56
∂E
=0 (2.14)
∂b b =dφ
n 9
∑ j 0 ∑ S j ,k bk − S j ,m = 0
2 φ − φ − ( ) for m = 1,…,9 (2.15)
j =1 k =1
where S j ,k represents the entry of the matrix S at j-th row and k-th column, and bk
represents the element of derivative vector dφ at k-th row. Equation (2.15) can be further
simplified as,
n n 9
S (− φ = )
∑ j ,m j 0 ∑ ∑ S j ,k bk S j ,m for m = 1,…,9
φ (2.16)
j =1 j =1 k =1
S T ∆φ = S T S b (2.17)
Thus, we get the explicit expression for the optimal derivative approximation by least-
square technique as
( )
b = dφ = S T S
−1
S T ∆φ (2.18)
independent.
2
x ≠ 0 ⇒ x T S T Sx = Sx 2 > 0 . Hence S TS is positive definite.
57
As we have discussed above, the column vectors are prone to be linearly dependent when
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
points, the dimension of the column vectors increase correspondingly. At the same time,
the possibility of linear-independence for the column vectors increase greatly as well.
They will finally become linearly independent if we continuously adopt more and more
supporting points. Thus, we can say that the matrix S T S is symmetric and positive-
definite. This conclusion can be applicable to most of the “grid” or point distributions
except for some unreasonable ones. For example, [column1] = α [column 2] , where α is a
constant. This implies that all the points lie on one line, which is obviously a bad grid for
a two dimensional problem. Up to date, the largest number of supporting points used to
ensure the linear-independent column vectors is 16, for the 9 of approximated derivatives.
Equation (2.18) shows that by increasing the number of local supporting points, the
Weighting function
Through the use of least-square technique to avoid the singularity of the coefficient
matrix, it makes almost even error-distribution at the supporting points, which may not be
58
the optimal. Therefore, further improvement can be made to get better distribution of
approximation errors. That is the reason for the introduction of the weighting function.
The least square approximation (2.13) assumes the square errors to be uniformly
distributed across the supporting points. For a given amount of total error, one would
normally prefer the approximation error to be small in the crucial central region around
the reference node, where the derivatives are evaluated, and be willing to tolerate higher
errors for points further out, since the latter is expected to have smaller influence on the
distance-related weighting function that assigns greater weightage to points near the
reference node. Such weighting functions typically have the following properties:
• Their values decrease with increasing distance from the reference node.
Five different weighting functions are examined in the present study. All the four
2) W 1i = 4 / π (1 − ri 2 ) 4 (2.19b)
3) W 2 i = 1 / ri (2.19c)
5) W 4 i = 1 / ri 4 (2.19e)
59
∆xi2 + ∆yi2
where ri = , the index i is the ith supporting point, and d o denotes the
do
dφ = (S T WS ) S T W ∆φ
−1
(2.20)
points,
W1 0
W= O (2.21)
0 W n
dφ = C D ∆φ (2.22)
where the matrix D is given in equation (2.11). Note that if only the first- and second-
order derivative approximation is required, only the first five entries of dφ need to be
considered. However, the inclusion of high-order terms can increase the accuracy of the
method.
shares many common properties with FD scheme, the approach is named as Least-Square
based Finite Difference (LSFD) method. It is also interesting to note that for the method,
60
at each node the coefficient matrix remains unchanged for a fixed set of supporting points
and its inverse matrix needs to be calculated only once. The increase in computational
cost is acceptable as compared to the traditional FDM but the new scheme gives the
flexibility for complex problems. Furthermore, the derivatives given by equation (2.22)
are independent of the governing equations, and can be used repeatedly for other
Although we are interested in the accuracy of LSFD method, it seems better to begin by
investigating the error incurred in the discretization of derivatives. For simplicity, the
error analysis in this section is carried out on a uniform mesh with a grid spacing h. In
this development, since we have truncated the Taylor series expansion after the third
order derivatives, the truncation error for equation (2.12) can be written as:
( )
ei = O (∆xi ) 4 , (∆y i ) 4 , i=1, …, n (2.23)
Specifically, since a uniform mesh is chosen for analysis, we can see that ∆xi and ∆y i
ei = O (h 4 ), i=1, …, n (2.24)
where the derivative vector dφ exact has the same form as the derivative vector dφ except
61
In order to get the explicit expression of discretization error for the derivative vector dφ
Then, we have,
S T (S dφ exact + e ) = S T S dφ (2.26)
Denoting the discretization error E for the derivative vector as E = dφ − dφ exacct and
S TS E = S Te (2.27)
The structure of the matrix S demonstrates that it stores the information about grid
spacing and the relative positions of the supporting points corresponding to the center
point. However, we can extract the information about grid spacing from S by scaling, i.e.,
S = SH (2.28)
where S = h L
h 3 and H =
2
h h
M
M M M O
∆x ∆y n ( ∆y n ) 3
n L 3
h 9×9
h h h 3 n×9
∆x i ∆y i
and are constants for a uniform mesh since the set of supporting points for the
h h
center point is fixed as long as they are chosen. Therefore, we can see that matrix S is
only concerned with the point-distribution in the domain and matrix H is related to the
Substituting equation (2.28) into equation (2.27) and simplifying the expression gives,
E = H −1 (S T S ) S T e
−1
(2.29)
62
Since the matrix S T S is symmetric, positive and definite, it implies the existence and
grid spacing h, we can say that the entries of the resultant vector (S T S ) S T e remain the
−1
same order of those in the vector e , i.e, O(h4). Accordingly, we can decide the order of
O ( h 3 )
3
O ( h )
O ( h 2 )
2
O ( h )
E = O ( h 2 ) (2.30)
O(h)
O(h)
O(h)
O(h)
which indicates that the LSFD scheme allows us to approximate the second-order
derivatives to the second-order accuracy and the first-order derivatives to the third-order
accuracy. This is very encouraging conclusion, which shows that the use of least-square
Though the above analysis of discretization error of the scheme is made on the uniformly
distributed points, it can also be extended to other kinds of point distributions such as
scattered point distribution. The difference only lies on the choice of local distance
scaling or the so-called “mesh” size h. The order of discretization error remains the same.
From the analysis above, it can also be seen that the number of supporting points has no
effect on the order of discretization error, which is determined by the order of truncated
63
Taylor series expansion instead. However, it can influence the accuracy of LSFD scheme
in another way. As discussed in the previous section, large number of supporting points
mainly contributes to convertibility of coefficient matrix, but also expands the local
support of reference node. In other words, the radius of local support or the “mesh” size h
will become larger with the increasing of supporting points. That will slightly lower the
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
∂ 2u ∂ 2u
+ = −2π 2 sin πx ⋅ sin πy for 0<x<1, 0<y<1, (2.31)
∂x 2 ∂y 2
Boundary condition: u = 1 + x on ∂Ω ,
To solve equation (2.31), the Laplacian operator must be firstly discretized by LSFD
method. Suppose that the derivative coefficients for the Laplacian operator have been
computed, then, equation (2.31) is replaced by a difference equation with the form:
64
Nd
∑ (w
k =1
xx
i ,k + wiyy,k )u ik = −2π 2 sin πx ⋅ sin πy (2.32)
where subscript i represent the reference node, Nd denotes the number of supporting
points (including reference node itself) and subscript k represents the kth support point of
node i. wixx,k denotes the derivative coefficients for the second-order derivative with
respect to x coordinate at the kth support point of node i, and so for the wiyy,k . In the
following, a subroutine written in Fortran is provided along with the related ones, as an
example to show how to compute the derivative coefficients in the LSFD method.
c-------------------------------------------------------------------------------------------------
c---- This program is used to calculate the derivative coefficients in the LSFD method.
c---- Some explanations about the interface of this subroutine LSFD
c---- INPUT: pxy, xy,iw OUTPUT: v_deriv
c---- pxy: store the positions of the supporting points
c---- xy: store the position of the reference node
c---- iw: specify the weighting function implemented
c---- v_deriv: store the vector of computed derivative coefficients
error_tolerance=1e-9
if(iw.lt.0 .and. iw.gt.4)then
write(*,*)'wrong weighting functions'
stop
endif
65
scaling=0.d0
do i=1,np
dx=pxy(i,1)-xy(1)
dy=pxy(i,2)-xy(2)
scaling=dmax1(scaling,dsqrt(dx*dx+dy*dy))
enddo
scaling=scaling*1.2d0
c-----------------------------------------------------------------------------------
do i=1,np
dx=(pxy(i,1)-xy(1))/scaling
dy=(pxy(i,2)-xy(2))/scaling
A(i,1)=dx
A(i,2)=dy
A(i,3)=dx*dx*0.5d0
A(i,4)=dy*dy*0.5d0
A(i,5)=dx*dy
A(i,6)=(dx**3)/6.d0
A(i,7)=(dy**3)/6.d0
A(i,8)=0.5d0*dx*dx*dy
A(i,9)=0.5d0*dx*dy*dy
enddo
do ip=1,np
do jp=1,np
if(ip.eq.jp)then
dx=pxy(ip,1)-xy(1)
dy=pxy(ip,2)-xy(2)
dxy=dsqrt(dx*dx+dy*dy)/scaling
if(iw.eq.0)wi(ip,ip)=1.d0
if(iw.eq.1)wi(ip,ip)=dsqrt(4.d0/pi)*(1.d0-dxy*dxy)**4.d0
if(iw.eq.2)wi(ip,ip)=1.d0/dxy
if(iw.eq.4)wi(ip,ip)=1.d0/(dxy**4.d0)
if(iw.eq.3)wi(ip,ip)=1.-6.d0*dxy*dxy+8.d0*dxy**3.d0-3.d0*dxy**4.d0
else
wi(ip,jp)=0.d0
endif
enddo
enddo
do ik1=1,idim
do ik2=1,np
b(ik1,ik2)=A(ik2,ik1)
enddo
enddo
66
call brmul(b,wi,idim,np,np,d)
call brmul(d,a,idim,np,idim,e)
do ik1=1,idim
do ik2=1,idim
et(ik1,ik2)=e(ik1,ik2)
enddo
enddo
call brinv(e,idim,l)
call brmul(e,et,idim,idim,idim,unite)
if(erre.gt.error_tolerance)then
write(*,*)'too large inverse error',erre
write(*,*)xy(1),xy(2)
stop
endif
c---------------------------------------------------------------------------------------------------------
call brmul(e,d,idim,idim,np,r)
do ik1=1,idim
do ik2=1,np
vd_temp(ik1,ik2)=r(ik1,ik2)
enddo
enddo
do ik1=1,idim
do ik2=1,np
vd_temp(ik1,nd)=vd_temp(ik1,nd)-vd_temp(ik1,ik2)
enddo
67
enddo
return
end
subroutine brinv(a,n,l)
dimension a(9,9),is(9),js(9)
double precision a,t,d
l=1
do 100 k=1,n
d=0.0
do 10 i=k,n
do 10 j=k,n
if (abs(a(i,j)).gt.d) then
d=abs(a(i,j))
is(k)=i
js(k)=j
68
end if
10 continue
if (d+1.0.eq.1.0) then
l=0
write(*,20)
return
end if
20 format(1x,'err**not inv')
do 30 j=1,n
t=a(k,j)
a(k,j)=a(is(k),j)
a(is(k),j)=t
30 continue
do 40 i=1,n
t=a(i,k)
a(i,k)=a(i,js(k))
a(i,js(k))=t
40 continue
a(k,k)=1/a(k,k)
do 50 j=1,n
if (j.ne.k) then
a(k,j)=a(k,j)*a(k,k)
end if
50 continue
do 70 i=1,n
if (i.ne.k) then
do 60 j=1,n
if (j.ne.k) then
a(i,j)=a(i,j)-a(i,k)*a(k,j)
end if
60 continue
end if
70 continue
do 80 i=1,n
if (i.ne.k) then
a(i,k)=-a(i,k)*a(k,k)
end if
80 continue
100 continue
do 130 k=n,1,-1
do 110 j=1,n
t=a(k,j)
a(k,j)=a(js(k),j)
a(js(k),j)=t
110 continue
do 120 i=1,n
69
t=a(i,k)
a(i,k)=a(i,is(k))
a(i,is(k))=t
120 continue
130 continue
return
end
After the numerical discretization, the corresponding algebraic equations are solved by
the Gaussian-Seidel iterative method. The computed results are then compared with the
N 2
∑ u num − u exact
i =1
Relative L2 error norm: (2.33)
N 2
∑ u exact
i =1
The effect of five weighting functions as shown in equation (2.19) on the convergence
and accuracy of the solution is investigated. In order to study the difference between the
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
70
W4 -2.8207 -3.6312 -3.9873 -4.2382 -4.5925 -4.8441
Conventional
-3.3208 -4.1175 -4.4703 -4.7208 -5.0750 -5.3277
Central FDM
Table 2.2 shows the relative L2 error of the numerical solutions achieved by
LSFD with different grid spacing and weighting functions. From this table, we can see
that the difference of numerical errors is very small when the same grid spacing is used
with different weighting functions. The W1 weighting function gives slightly superior
performance. Figure 2.3 shows the decay of relative L2 error of the numerical solutions
with respect to the grid spacing for the weighing function W0, W1, W2, W3, W4,
respectively. We notice from the figure that the five convergence curves are actually the
straight lines. Moreover, they are parallel to each other and have the same convergence
rate (=2.01), with different weighting functions. In other words, the weighting functions
have no significant influence on the convergence rate. But, for the same grid spacing, the
LSFD method without weighting gives the worst accuracy. This implies that the role of
weighing function in assigning greater weightage to nearby nodal values does help to
improve numerical accuracy slightly. The convergence rate of present results (=2.01) is
consistent with the early analysis of having the second order of accuracy for the second
order derivatives by our LSFD schemes. This is a very encouraging feature as it shows
that the least-square minimization of errors in weighted or non-weighted form does not
FD scheme is also included. Since the central-difference FD scheme can approximate the
71
convergence rate should be 2 theoretically. As shown in Figure 2.4, its convergence line
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
-4.4
O W0
A W1
B W2
C W3
D W4
O
B
-4.5
log10(err)
C
D
-4.6 A
72
O W0 O
-3 A W1 A
W2
W3
W4
-3.5 F CD O F
A
log10(err)
O
-4 A
O F
A
-4.5 O F
A
O F
A
-5
F
∂T
u = 0, v = 0, =0
∂y
u=0 u=0
v=0 v=0
T=1 T=0
∂T
u = 0, v = 0, =0
∂y
73
The problem being considered is a two-dimensional buoyancy-driven flow of a
Boussinesq fluid in a square cavity, as shown schematically in Figure 2.5. The horizontal
walls of the cavity are insulated while the vertical walls are kept at different
temperatures. This problem has been studied by many researchers, and can serve as a
good model for testing and validating new numerical methods. The flow and heat transfer
in the cavity are governed by the following non-dimensional equations in terms of stream
∂ω ∂ω ∂ω ∂ 2ω ∂ 2ω ∂T
+u +v = Pr 2 + 2 + Ra Pr (2.34)
∂t ∂x ∂y ∂x ∂y ∂x
∂ 2ψ ∂ 2ψ
+ =ω (2.35)
∂x 2 ∂y 2
∂T ∂T ∂T ∂ 2T ∂ 2T
+u +v = + (2.36)
∂t ∂x ∂y ∂x 2 ∂y 2
where Pr and Ra are the Prandtl and Rayleigh numbers respectively. The Prandtl number
of Pr=0.71 is taken for the model problem. The u, v denote the components of velocity in
the x and y direction, which can be calculated from the stream function
∂ψ ∂ψ
u= , v=− (2.37)
∂y ∂x
74
∂T
ψ = = 0 , T=0, at y=0,1, 0<x<1. (2.41)
∂y
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,
dωi ni ni ni ni
= u i ∑ ci(,1kx ) ∆ωik + vi ∑ ci(,1ky ) ∆ωik = Pr ∑ ci(,2kx ) ∆ωik + ∑ ci(,2k y ) ∆ωik
dt k =1 k =1 k =1 k =1 (2.42)
ni
+ Ra Pr ∑ ci(,1kx ) ∆Ti k
k =1
ni ni
∑ c i ,k ∆ψ i + ∑ c i ,k ∆ψ i = ω i
(2 x) k (2 y) k
(2.43)
k =1 k =1
ni ni ni ni
dTi
= ui ∑ ci(,1kx ) ∆Ti k + vi ∑ ci(,1ky ) ∆Ti k = ∑ ci(,2k x ) ∆Ti k + ∑ ci(,2k y ) ∆Ti k (2.44)
dt k =1 k =1 k =1 k =1
ni ni
∑ ci(,1ky ) ∆ψ ik and vi = ∑ ci ,k ∆ψ i
(1 x ) k
ui = (2.45)
k =1 k =1
where ∆Fi k = Fi k − Fi , Fi represents the unknown value at node i, Fik represents the
unknown value at the kth supporting point for the node i. ci(,1kx ) , ci(,1ky ) , ci(,2k x ) and
ci(,2k y ) represent the computed LSFD coefficients at the kth supporting point around the ith
node for the first and second order derivatives in the x and y direction, respectively.
It should be indicated that the LSFD scheme approximates any derivative by a linear
75
other boundary points. So, when it is applied to implement the Neumann boundary
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
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
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
geometry, rapid variations of physical variables usually occur in the boundary layer.
Thus, we would like to be able to control the point distribution in these areas to ensure
that the boundary phenomena are captured. This requirement leads to the adoption of
locally orthogonal grids near the boundary. The locally orthogonal grid generation can be
made by the algebraic formulation or by the fast hyperbolic method. Another advantage
of this method is that user can explicitly give/determine the grid spacing in the normal
direction of the boundary. This feature is very attractive in the viscous flow simulations.
76
It should be emphasized that as only several layers of grids are concerned here, the
problem of grid shock formation in hyperbolic grid generation over strong concave
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.
w+2
w+1
Wall
Figure 2.6 Locally orthogonal grids near the boundary
As shown in Figure 2.6, three layers of structured points are distributed at and near the
boundary. Note that this special arrangement of points is only used to implement the
including the point on the three layers, any spatial derivative is discretized by the LSFD
scheme. Clearly, this strategy separates the discretization of governing equations done at
the interior points by the LSFD schemes and the implementation of Neumann boundary
77
condition done at the boundary points by conventional FD schemes. In other words, our
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,
4Tw+1 − Tw+2
Tw = , at y=0,1, 0<x<1 (second-order FD scheme)
3
3ψ w+1 1
Vorticity: ωw = − ω w+1 (second-order FD scheme) (2.48)
h2 2
where w denotes a point on the wall, w+1 and w+2 denote the first and second adjacent
points in the flow field from the wall. Our numerical simulations of this problem are
performed on a composite node distribution, which includes locally orthogonal grids near
the boundary and random points filled at the rest as shown in Fig. 2.7.
After numerical discretization by the LSFD method, the resultant algebraic equations are
solved by the SOR iteration method. The numerical results are visualized by isotherms
and streamlines. The results for the problems with Ra=104 and 105 are illustrated in Fig.
2.8.
78
Figure 2.7 Locally orthogonal grid and random node distribution
79
(c) Isotherms of Ra=105 (d) Isotherms of Ra=105
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
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
cylinders and rectangular outer boundary. For each circular cylinder, the nodes in its
neighborhood can be generated by the use of the local polar-cylindrical grid. At the
80
middle of two cylinders there is an invisible line which forms the border of the two
systems. Then, the sets of nodes generated from the local polar-cylindrical grid are
truncated by the outer boundary – a rectangle. The node distribution generated for the
flow past two circular cylinders in staggered arrangement is shown in Fig 2.9.
.. . . .. . . .. .. . . . . . . . . . . . . . .. .. . . .. . . .. . . .. . .. .. . .. . .. . .. . . .. .. . . .. .. .. . . . . . . . .. .. .. . . .. .. . . .. . .. . .. . .. .. . . . . .
. . ......... . . . . . . . .. ... .. . . . . .
...... .. .. ... .. .. .. .. ... .. .. .. .. .. .. .. .. .. ... .. .. .. .. ... .. .. ......... ........................................... .. ......... ... ... .. .. .. ... ... ......... .. ........................................... . ..
. . .. . . . . . . .. . . . . . . . . . . . .. . . . . . . .. . . . . . . .. . . .. . .. . .. . . .. . . .... . . . . . .. .. .. . . . . . .... . . .. . . .. . .. . .. . . .. . . . .
.................. ...... .. .. .. .. ... ... ... ... ... .. .. .. .. ...... .. .......................................................................................... .. .. .. ... ................................................................. .. .
. . . . . . . ..
......................... .. ......... .. .. .. .. .. .. .. ......... .... ................................................................................................................ .... .................................................................................... .. .
.. . .. . .. . .... . ...... . . .. .. .. .. .. .. .. .. .. . . ...... . .... . .. . .. . .. . . .......... .......... ........ ...... ...... ........................................ ...... .......... ...... .......... ... . . .. . .. .. . . . .. .. .. . . . . . .. . . .. .. . . .. .. .. . . . . . . . .. .. .. . . .. .. . . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . .
. . .
. . . . .
. . . . . .
............................................ .. .. .. ... .. .. .. .. ..........................................................................................................................................................................................................................................................
. . .. . .. ....... .. . . . . . . . . . . . . .
.. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. .. .. .. ... .. .. ... .. .. .. .. ... .. .. .. .. .. .. .. ... .. .. .. .. ... .. .. ... .... .... .... ...... . . . . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . .. . . .. . . . . .... .. .. . .. ...... . . . . .. . . .. . . . . . . . .. . . . ........... ............................................................................ ........... . . . . . .. . . .. . . . . .. .. .. .. .. .. .. .. .. .. . . .. . . .. .. .. . . . . . . . . . .. .. .. . . .. . . .. . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.................................................................... ............................................................................... ................................................................................................................................................................................................................................................................................. ... . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . .. . . . . .. . . . . .. . . . . . . . . . . . . . . . . . . . . .
......................................................................................................................................... ............................................................................................................................................................................................................................................................. .. . . . . . .
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. .. . . . . .
................................................................................................................................................................................................................................................................................................................................. ... ...
.
. .
. . .
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... .. .
. .
. . .
. .
.
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ ...
. .
. .
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ..... . . .
... . . . .
... ............................ .. ............................ .................................. .... .... .. .. ............ .... . ......... .......................................................................... .... ............ .... . . . ..... . . .
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. ........ . . . . . .
. . . .. ......... . .. .. ... .... .. . . .......... .. . . . . . .. . .. . .. .. .. . .. .. ........................................................................................................................ .....
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ............................................................................................................ . . ......
.... . . . . . . . . .. . . . . . . . . . . . .
. . . .
. . . .
.. . ... . . ....................................................... ... ... ..... . . ...... .. .. ................................................. ........................................................................................... .. .. .
......................... .... .......... .. . . . . . . . . .
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ ...................................................................................................... . .
....... .....................................................................................
.......................................................................................................................... . . . . .
. .
.. ... ... ... ... .......... ......................................................................................................................................................................................................................................
................................................................................................................................................ ............................................................................................ ....
......... ...............................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... ... ............................................................................................................................................................
.......... .................................................................................................................................................................................................................................
. . . . . . .
.. ........................................ ........................................................................................................................................................................................................................................................................................................................ . .
................................................................................................................................................
. . . . . . .
....................................................................................................................................................................................................................................................................................................................... ..... ............. ............................................................................................................................................................................................................................................................................................................ ..........
..... .....
.................................................................................................................................................. ............................................................................................................................................................................................................................................................................................................................................................................................ ..............
.......... .............
........................ ................. .......................................................................................................................................................... . . . . . . .
.....
. ..............................
...... ........
...........
.... .................................................................................................... . .
... ..............................................................................................
............... ............................................................................................................................................................... ....................................................................................................................... ...........
. . ... . ... .. . .. . . ...... .. . ... .. . .. .. . . .. ...... .... .. ...................... ......... ...................
.....................
...... .................. ... ... . . . .
..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
.
.........
...... .... ......................................................................................................... .... ......... ..................................................................................................................................................................................................... . .
..............
....... .....
..... ..............
.................
.................... ......
.... .. . . ... . ...... ....... .. .. . . ...
... ... .............................................................................................................................................................................................................................................................................................................. ...............
.................. ...... ............................................................................................................................ ............. .......................................................................................................................................................................................................................................................................................................................... . . . . . . .
........................................................................................................................................
............................
........
......................
.....................
.......... ....... .....................
........... ............................................................................................................................................................................................
.....................
... ..........
......
......
...
.......
....
.....
....
...... ...............
................
..................
................ ..................
.........
...... ...... .......................................................................... . . .......... ........................................................................................................................................................................................................................................................ . . . . . .
................................................................................ ....... .....
........ .......
..... ................
.............
.....................
.................
...................... ............ ........................................................................................................................................................................................................................................... ... ...
....
......
........ ..................
................
.................
................
................. ...... ...... ............................................................................ . ...
.........
................................................................................................................................................................................................ . . . . .
.................................................................................. ....... ..........
......... ..............
.................... ......... ....
.... ... ... ... ... .. .. .. . . . . . . . . . . .. ..
...
... ....
.... ..... ...........
................ ... ... .................................................................... .... ..... .............................
..........................
........ .............. ..... ....... .........
.....
......
.........................
.............................
.......................
.......................
..............
.................
....................... .................................... .................................. . . .
. . ..........................................................................................................
.
... . ........ ........................... .. .... ...... .... ... .. .. .. .. ..
............ ................................................................................................................................................... . . . . . . . . .. .. .. ... .............. ... ...
... ... .... ......
..... ...... .................... .... ... ... ... .. .. .. .
.......... ...... ...... ........... ... .... .... ..................
................... .... ... ...
.......... ... .. . . . .
................................................................................................ .......
..................
.................... ............... ........ ......... ......... ..... ...... .....................
........................
........ ............. .................. ... ... ...... .. .. ........................................................................................................... ... .... ..... ............ ......... ...... .. .......... .... .... ..... ........
.....................
...................
................... .............. .... .............. . . . . .
... ...
... .... .............
.................. ... .. .. ..
..... .... .. . . . . . . . . . . . . . . . . ........................ . . . . . ... ............... ............................................................. ... ... .... .....
... ............... ....
...................................................................................... ................
............................................................................................................................................................ ......................... ................... ...... . . .
......... ...
.......... ...... ..............
.................
..... ............. ... ......
...
...
... .. ............
...............
............... ..................................................... . ........ . . . .
. .
...................................................... ...... .... .......
.................. ...........
.............. ....... ... ... ..
........................... .
.... . . . . . . . . . . . . . . . ..................... . .... ............................... ... .. . ......... . . . . . . . .
....................................................................................................... ........ ............. . .
.............. ............................................................ ..... . .
...................................................... .......... ....
.... ..... ............ ......... ...... ... .. .. .. . . .. .... .... ... ... ..... .......
....... ... .... ...
. .
....... .................................................... .. .. .... .... .... .... .. .. ..... ....... ... . . . .
................... ..................... ........
........................
.......... ....... ...................................... . .. . . . .. ...... .. ....... ...
... ...........
........... .... ..
....
.... .... .... .... .. . .. .. .. . .. .. . . . ..... . . .
......................
.... ..........
............ ... .... ...............
...............
.............
............. ... ........................................................................ ................. . .. .. ...... .. .. ...
...
...........
...........
.. ..........
.. .. ......... ................................ . .. ...
. .
.
. .
.
.. .. .. .. ... ... ..... ....... .. .. . . . . . . . . . . . . .. .. . . .. ...
.. ..... ...
.. .. .. .... . . . . . . . . .. . . ... . . . . .
.
. .... .... ......... ......... . .. ... ..... ....... ..... ....... .....
..........
... .. . . . .
.. ............................. ............. .. .. .... .... ...... ...... ... .. .. .. .. .. .. .. .. .. .. .. .. .. .. . . . .. . . . . .. . . . . . .. . .. . .. . .. . .. .. . . .. . .
. ... . . . . . .
. . . . . .. ........ ... ........ ............. ........ ........... . .. . .. .. . .. .. .. .. . ... . .. . .. . . .. . . . .. .. . . . . . . . . . .. ..... .. .............................. ....... .. . .
......................... .. ................ . . . .. . .
......... .. .................................... . . ................ ...... .. .. .. ... ... ... ... ... ... ... ... ... .. .. .. ...... ................ ............ .. .
. . .
.... ... ...........
.... . . . .
....................... ...... .... ... . . ....... .. . .. ..... . ..... . . . . . . . . . . . ... . . . .. . . . .. . . . . . . . . . . . . . .. . . . .. . . . . . . . . . . . .. . . . . . . . . . .. . .. . . . . . . . . . . . . . . . . . . . .
. . .. . .. . . .... . . .. .. .. .. .. .. .. .. .. .. ......... .... ........................................ . ........... .. ... .. .. .. ... .. .. .. .. .. .. .. .. .. .. .. ... .. .. .. ... .. ......... .... ....... . .. . . . . .
.. .. . . . . . . . . . . .
........... ... .. .. .. ... ... .. .. .. .. .. .. .. .. .. ...... .. .. .. ... ........ .. ... .. .. .. ... .. .. .. .. .. .. .. .. .. .. .. .. .... .... .. . .. . . . . . . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
.................. ...... .. .. .. .. ... ... ... ... ... .. .. .. .. ...... .. ........................ ....... . . .... .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .... .... .... .... . . . .. . . .. . . . . .. .. .. .. .. .. .. .. .. . . . . .. . . .. . . .. .. .. . . . . . . .. . . .. . . .. . .. . .. . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . .
. . .. . . .. . . . .. . . . . . . . . . . . .. . . . .. . . .. . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. . .. .. .. .. .. .. .. .. . . . . . . . .. .. .. .. .. .. .. .. . .. . . . . . .. .. .. .. .. . .. .. . .. .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
...... .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .............. .... . . . .. .. .. .. .. .. .. .. . .. .. .. .. .. .. .. .. .. . .. .. .. .. .. .. .. .. .. .... .... . .
. . ......... . . . . . ... ... . .
.... . .. .. . .. .. .. . . . . . . . . . . . .. .. .. . .. .. . .... . .. . .. .. . . . .. . . .. . . . . . .. .. .. .. .. . . . . . .. . . .. . . .. . .. . . .
Figure 2 9 Node distribution for the flow around two staggered circular cylinders
Some numerical results are shown in Figs 2 10-2 11 In Fig 2 10 drag and lift coefficient
of flow past a pair of side-by-side cylinders with Reynolds number of Re=100 are
illustrated while the instantaneous vorticity contours and streamlines are shown in
81
1.7 2 1 3
1.5 1.8 0 2
1.3 1.6 -1 1
CD1
CD2
CL1
CL2
1.2 1.5 0.5
1.1 1.4 -2 0
1 1.3 -0.5
CD1
0.9 CD2 1.2 -3 CL1 -1
CL2
0.8 1.1 -1.5
0.7 1 -4 -2
150 160 170 180 150 160 170 180
time time
Figure 2.10 Drag and lift coefficients of flow past a pair of side-by-side cylinder (T=3D) at Re=100
Figure 2.11 Instantaneous vorticity contours and streamlines for flow past a pair of side-by-side
cylinders (T=3D) at Re=100
References
82
3. Radial Basis Function-based Differential
3.1 Introduction
In this chapter, we present another mesh-free method, which combines the derivative
approximation by the radial basis functions (RBFs). As a result, the method can be used
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-
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
advantages: (1) first of all, it is a truly mesh-free method, and is independent of spatial
dimension in the sense that the convergence order is of O(hd+1) where h is the density of
the collocation points and d is the spatial dimension; (2) furthermore, in the context of
83
scattered data interpolation, it is known that some RBFs have spectral convergence. In
other words, as the spatial dimension of the problem increases, the convergence order
also increases, and hence, much fewer scattered collocation points will be needed to
maintain the same accuracy as compared with conventional finite difference, finite
element and finite volume methods. This shows the applicability of the RBFs for solving
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
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
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
mesh-free. In our method, the RBFs are taken as the test functions in the DQ
approximation to compute the weighting coefficients. Once the weighting coefficients are
84
computed, the solution process for a PDE is exactly the same as the conventional DQ
method and finite difference schemes. Moreover, the method can be consistently well
the spatial dimension. The “radial” is named due to RBFs’ spherical symmetry about the
centre point x j . The distances are usually taken to be the Euclidean metric. There are
many RBFs (expression of ϕ ) available. The most commonly used RBFs are
2
Gaussians: ϕ(r ) = e − cr (3.1c)
1
Inverse multiquadrics: ϕ(r ) = (3.1d)
r 2 + c2
radial basis functions, the Gaussian and the inverse MQ are positive definite functions,
while the TPS and the MQ are conditionally positive definite functions.
85
In recent years, the theory of radial basis function has undergone intensive research and
functions. Simply, the RBF interpolation technique can be described as following: if the
function values of a function f(x) are known on a set of scattered points x ∈ Ω ⊂ ℜ d , the
N
f ( x) ≅ ∑ λ j ϕ ( x − x j ) + ψ ( x) (3.2)
2
j =1
radial basis function. Equation (3.2) can be written without the additional polynomial ψ .
If Ψqd denotes the space of d-variate polynomials of order not exceeding q, and letting the
m
ψ ( x ) = ∑ ζ i Pi ( x ) (3.3)
i =1
from the collocating equation (3.2) at the N knots. This is insured by the m conditions for
∑ λ P (x
j =1
j i j )=0 i=1, …, m (3.4)
The matrix formulation of equations (3.2) and (3.4) can be expressed as Ax = b with the
known function value on the scattered points as the components of vector b, and
86
ϕ Pm
A = T
Pm 0
(3.5)
x = (λ,ζ) T
It has been proven that for a case when the nodes are all distinct, the matrix resulting
from the above radial basis function interpolation is always nonsingular. In 1982, Franke
published a review article evaluating the interpolation methods for scattered data
available at that time. Among the methods tested, RBFs outperformed all the other
implementation. Among the RBFs tested by Franke, Hardy’s multiquadrics (MQ) were
Though TPS radial basis functions have been considered as optimal functions for
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
minimum value and then grew rapidly thereafter. This is due to the fact that the MQ
coefficient matrix becomes ill-conditioned when c 2 >> r 2 . How to choose the optimal
87
shape parameter remains an open problem. No mathematical theory has been developed
so far to determine such an optimal value. Similar difficulties are also encountered in
choosing the shape parameter for the inverse MQ and Gaussian radial basis functions.
yj
xi
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
at all mesh points in that direction. As shown in Fig. 3.1, DQ approximates the derivative
88
of a function with respect to x at a mesh point ( xi , y j ) (represented by the symbol ) by
all the functional values along the mesh line of y = y j (represented by the symbol ),
and the derivative of the function with respect to y by all the functional values along the
approximation of the nth order derivative with respect to x, f x(n ) , and the mth order
N
f x( n ) ( xi , y j ) = ∑ wi(,nk) f ( x k , y j ) (3.6a)
k =1
M
f y( m ) ( xi , y j ) = ∑ w j(,mk ) f ( xi , y k ) (3.6b)
k =1
where N, M are respectively the number of mesh points in the x and y direction, wi(,nk) ,
w j(,mk ) are the DQ weighting coefficients in the x and y directions. As shown by Shu
high order polynomial, Shu and Richards (1992) derived a simple algebraic formulation
and a recurrence relationship to compute wi(,nk) and w j(,mk ) . When the function is
approximated by a Fourier series expansion, Shu and Chew (1997) also derived simple
algebraic formulations to compute the weighting coefficients of the first and second order
derivatives. For simple geometry, the above DQ approach can obtain very accurate
results by using a considerably small number of mesh points. However, for complex
89
geometry, the above scheme cannot be applied directly. The coordinate transformation
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
in Fig. 2.1, any spatial derivative is approximated by a linear weighted sum of all the
conventional DQ approximation like equation (3.6), the mesh point is represented by two
approximation for the mth order derivative with respect to x, f x(m ) , and the nth order
NM
f x( m ) ( x k , y k ) = ∑ wk( m,k)1 f ( x k1 , y k1 ) (3.7a)
k 1=1
NM
f y( n ) ( x k , y k ) = ∑ wk(,nk)1 f ( x k1 , y k1 ) (3.7b)
k 1=1
90
In the following, we will show that the weighting coefficients in equation (3.7) can be
determined by the function approximation of RBFs and the analysis of a linear vector
space.
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
while at the same time keeping the “truly” mesh-free nature. In the following, we will
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
The MQ RBFs are used as basis functions to determine the weighting coefficients in the
can be easily extended to the case with other RBFs as basis functions or three-
dimensional problems.
91
Consider a two-dimensional problem. There are N knots randomly distributed in the
whole computational domain. Suppose that the solution of a partial differential equation
in the polynomial term ψ (x) . Then, the function in the domain can be approximated by
MQ RBFs as
N
f ( x, y ) = ∑λ j ( x − x j ) 2 + ( y − y j ) 2 + c 2j + λ N +1 (3.8)
j =1
To make the problem be well-posed, one more equation is required. From equation (3.4),
we have
N N
∑λ j = 0 ⇒ λi = − ∑λ j (3.9)
j =1 j =1, j ≠ i
N
f ( x, y ) = ∑ λ j g j ( x, y) + λ N +1 (3.10)
j =1, j ≠i
N
f ( x, y ) = ∑ λ j g j ( x, y ) + λ i (3.12)
j =1, j ≠ i
space V N with respect to the operation of addition and multiplication. From the concept
92
of linear independence, the bases of a vector space can be considered as linearly
independent subset that spans the entire space. In the space V N , one set of base vectors is
From the property of a linear vector space, if all the base functions satisfy the linear
equation (3.7), so does any function in the space V N represented by equation (3.12).
There is an interesting feature. From equation (3.12), while all the base functions are
given, the function f ( x, y ) is still unknown since the coefficients λi are unknown.
However, when all the base functions satisfy equation (3.7), we can guarantee that
f ( x, y ) also satisfies equation (3.7). In other words, we can guarantee that the solution of
a partial differential equation approximated by the radial basis function satisfies equation
(3.7). Thus, when the weighting coefficients of DQ approximation are determined by all
the base functions, they can be used to discretize the derivatives in a partial differential
Substituting all the base functions into equation (3.7a) as an example, we can obtain
N
0= ∑ wi(,mk) (3.13a)
k =1
∂ m g j ( xi , y i ) N
m
= ∑ wi(,mk) g j ( xk , y k ) , j = 1,2,..., N , but j ≠ i (3.13b)
∂x k =1
93
For the given i, equation system (3.13) has N unknowns with N equations. So, solving
this equation system can obtain the weighting coefficients wi(,mk) . From equation (3.11),
∂g j ( x, y ) x− xj x − xi
= −
∂x ( x − x j ) 2 + ( y − y j ) 2 + c 2j ( x − xi ) 2 + ( y − yi ) 2 + ci2
In the matrix form, the weighting coefficient matrix of the x-derivative can then be
determined by
0 0 L 0
g n (1,1) n
g x (1,2) L g (1, N )
n
[Gx ] = x x
M M O M
n n n
g x ( N ,1) g x ( N ,2) L g x ( N , N )
With the known matrices [G] and [Gx], the weighting coefficient matrix [W n ] can be
matrix of the y-derivative can be obtained in a similar manner. Using these weighting
coefficients, we can discretize the spatial derivatives, and transform the governing
equations into a system of algebraic equations, which can be solved by iterative or direct
method.
94
One of the most attractive properties in above method is that the weighting coefficients
are only related to the basis functions and the position of the knots. That character is very
appealing when we deal with the nonlinear problems. Since the derivatives are directly
discretized, the method can be consistently well applied to linear and nonlinear problems.
Another attractive property of RBF-DQ method is that it is naturally mesh-free, i.e., all
the information required about the knots in the domain is nothing but their positions.
The RBF-DQ method presented in the last section is a global approach. In other words,
the function approximation form (3.12) uses all the knots in the computational domain.
When the number of knots, N, is large, the matrix [G] may be ill-conditioned. This limits
its application. To improve it, we developed the local RBF-DQ method. To do this, at
every knot in the domain, we construct a local support region. The local support in this
method has the same configuration as that discussed in the LSFD method. As shown in
Fig. 2.2, at any knot, there is a supporting region, in which there are N knots randomly
distributed. So, equation (3.12) is applied in the local support. That is the only difference
between the local RBF-DQ method and the global RBF-DQ method. All the related
formulations are the same for these two versions of RBF-DQ method.
As shown in the previous section, the MQ approximation of the function contains a shape
parameter c that could be knot-dependent and must be determined by the user. It is well
known that the value of c strongly influences the accuracy of MQ approximation, which
95
is used to approximate the solution of PDEs. Thus, there exists a problem of how to select
a “good” value of c so that the numerical solution of PDEs can achieve satisfactory
accuracy. In general, there are three main factors that could affect the optimal shape
parameter c for giving the most accurate results. These three factors are the scale of
supporting region, the number of supporting knots, and the distribution of supporting
knots. Among the three factors, the effect of knot distribution is the most difficult to be
studied since there are infinite kinds of distribution. In this section, we will mainly
discuss how to minimize the effect of two factors, that is, the scale of supporting region
In the local MQ-DQ method, the number of supporting knots is usually fixed for an
application. Since the knots are randomly generated, the scale of supporting region for
each reference knot could be different, and the optimal shape parameter c for accurate
numerical results may also be different. Usually, it is very difficult to assign different
values of c at different knots. However, this difficulty can be removed from the
normalization of scale in the supporting region. The idea is actually motivated from the
finite element method, where each element is usually mapped into a regular shape in the
computational space. The essence of this idea is to transform the local support to a unit
square for the two dimensional case or a unit box for the three dimensional case. So, the
discussion about the optimal shape parameter is now confined to the MQ test functions in
the unit square or box. The coordinate transformation has the form
x y
x= , y= (3.15)
Di Di
96
where ( x, y ) represents the coordinates of supporting region in the physical space, ( x , y )
denotes the coordinates in the unit square, Di is the diameter of the minimal circle
enclosing all knots in the supporting region for the knot i. The corresponding MQ test
2 2
x y
ϕ = x − i + y − i + c 2 , i = 1,..., N , (3.16)
Di Di
where N is the total number of the knots in the support. Compared with traditional MQ-
RBF, we can find that the shape parameter c is equivalent to c Di . The coordinate
transformation (3.15) also changes the formulation of the weighting coefficients in the
local MQ-DQ approximation. For example, by using the differential chain rule, the first
df df dx 1 df 1 N N w (j1x )
= = =
dx dx dx Di dx Di
∑ w (j1x ) fj =∑
Di
fj (3.17)
j =1 j =1
where w (j1x ) are the weighting coefficients computed in the unit square, w (j1x ) / Di are
the actual weighting coefficients in the physical domain. Clearly, when Di is changed,
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
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
97
c-------------------------------------------------------------------------------------------------
c---- This program is used to calculate the derivative coefficients in the Local MQ-DQ
c---- method.
subroutine MQRBF(pxy,xy,c,r)
parameter(np=12,nd=np+1)
implicit real*8(a-h,o-z)
dimension pxy(np,2),xy(2),r(nd,5),pn(nd,2)
dimension a(nd,nd),b(nd,5))
do 20 i=1,nd
if(i.ne.nd)then
pn(i,1)=pxy(i,1)
pn(i,2)=pxy(i,2)
else
pn(i,1)=xy(1)
pn(i,2)=xy(2)
endif
20 continue
scaling=0.d0
do i=1,np
dx=pxy(i,1)-xy(1)
dy=pxy(i,2)-xy(2)
scaling=dmax1(scaling,dsqrt(dx*dx+dy*dy))
enddo
scaling=scaling*2.0
do j=1,nd
a(nd,j)=1.d0
enddo
do 19 i=1,nd-1
98
do 19 j=1,nd
dx=(pn(j,1)-pn(i,1))/scaling
dy=(pn(j,2)-pn(i,2))/scaling
dxk=(pn(j,1)-pn(nd,1))/scaling
dyk=(pn(j,2)-pn(nd,2))/scaling
a(i,j)=dsqrt(dx*dx+dy*dy+c)-dsqrt(dxk*dxk+dyk*dyk+c)
19 continue
do 23 i=1,nd-1
dx=(-pn(i,1)+pn(nd,1))/scaling
dy=(-pn(i,2)+pn(nd,2))/scaling
ffunc=dsqrt(dx*dx+dy*dy+c)
b(i,1)=dx/ffunc
b(i,2)=dy/ffunc
b(i,3)=(dy*dy+c)/(ffunc**3.)-1.d0/dsqrt(c)
b(i,5)=-dx*dy/(ffunc**3.)
b(i,4)=(dx*dx+c)/(ffunc**3.)-1.d0/dsqrt(c)
23 continue
b(nd,1)=0.
b(nd,2)=0.
b(nd,3)=0.
b(nd,4)=0.
b(nd,5)=0.
do i=1,nd
do j=1,5
r(i,j)=b(i,j)
enddo
enddo
call agjdn(a,r,nd,5,l)
99
c-------.nxn square matrix and b is a nxm matrix.
c------- The solution x is stored in b while the computation ends.
c------- Parameter l is used to return the information whether the computation is
c------- successfully performed. 1: Yes 0: No
subroutine agjdn(a,b,n,m,l)
implicit real*8(a-h,o-z)
dimension a(n,n),b(n,m),js(n)
l=1
do 8100 k=1,n
q=0.d0
do 810 i=k,n
do 810 j=k,n
if (dabs(a(i,j)).gt.q) then
q=dabs(a(i,j))
js(k)=j
is=i
end if
810 continue
if (q+1.0.eq.1.0) then
write(*,820)
l=0
return
end if
820 format(1x,' fail ')
do 830 j=k,n
d=a(k,j)
a(k,j)=a(is,j)
a(is,j)=d
830 continue
do 840 j=1,m
d=b(k,j)
b(k,j)=b(is,j)
b(is,j)=d
840 continue
do 850 i=1,n
d=a(i,k)
a(i,k)=a(i,js(k))
a(i,js(k))=d
850 continue
do 860 j=k+1,n
860 a(k,j)=a(k,j)/a(k,k)
do 870 j=1,m
870 b(k,j)=b(k,j)/a(k,k)
do 890 i=1,n
100
if (i.ne.k) then
do 880 j=k+1,n
880 a(i,j)=a(i,j)-a(i,k)*a(k,j)
do 885 j=1,m
885 b(i,j)=b(i,j)-a(i,k)*b(k,j)
end if
890 continue
8100 continue
do 8110 k=n,1,-1
do 8110 j=1,m
d=b(k,j)
b(k,j)=b(js(k),j)
b(js(k),j)=d
8110 continue
return
end
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
∂ 2u ∂ 2u
+ = g ( x, y ) (3.18)
∂x 2 ∂y 2
5
+ cos(5.4 y )
u ( x, y ) = 4 (3.19)
6 + 6(3x − 1) 2
101
Equation (3.19) will be used to provide the Dirichlet condition on the boundary, the
function g ( x, y ) , and to validate the numerical solution. The L2 norm of relative error is
2
N unumerical − uanalytical
∑ u −8
i =1 analytical + 10
L2 norm of relative error: (3.20)
N
To conduct numerical experiments, the knot distribution in the square domain is fixed,
which is shown in Fig. 3.2. In total, there are 673 knots in the domain. The accuracy of
numerical results in terms of L2 norm of relative error is studied by changing the shape
parameter c and the number of knots in the supporting region. In this study, four
different support sizes (numbers of supporting knots) are used for discretization, and they
102
Fig. 3.3 illustrates the variation of accuracy with different shape parameter and support
size (number of supporting knots). It can be seen from Fig. 3.3 that the L2 norm of
relative error depends on the value of shape parameter c and the support size. It was
found that when the number of supporting knots is fixed, with increase of shape
parameter c , the accuracy of numerical results is improved. And when the shape
parameter c is fixed, with increase of the supporting knots, the accuracy of numerical
results is also improved. Another interesting phenomenon is that the shape parameter c
with small number of supporting knots is less sensitive than that with large number of
supporting knots. In other words, when the number of supporting knots is relatively
small, the shape parameter c can be chosen in a wide range to get a convergent solution,
in which the accuracy of numerical solution is changed gradually. But when the number
of supporting knots is large, the shape parameter c can only be selected in a small range
to get convergent solution, in which the accuracy of numerical results changes sharply.
So, one has to balance the good accuracy of numerical results and the sensitivity of the
shape parameter c when the number of supporting knots is chosen. From our
103
10 points
16 points
-1.5 22 points
28 points
Log10(Relative L2 error norm)
-2
-2.5
-3
-3.5
-4
0 10 20
shape parameter c2
Figure 3.3 Log10(error) vs c 2 with irregular knot distribution for Poisson problem
Advection-diffusion equation
The discretization of the derivatives by local RBF-DQ method in the nonlinear PDEs
follows the same way as that in the linear PDEs. It is interesting to see whether the effect
behaves in the same way or a similar way to the linear equation. To study this, we
∂ 2u ∂ 2u ∂u ∂u
+ 2 + u + = q( x, y ) (3.21)
∂x 2
∂y ∂x ∂y
For simplicity, we suppose that the exact solution of equation (3.21) is also given by
equation (3.19), which is used to determine the function q ( x, y ) and the boundary
104
condition. It was found that when the same conditions such as knot distribution, shape
parameter, and the number of supporting knots are used, the accuracy of numerical
results for equation (3.21) is very close to the accuracy for equation (3.18). This can be
clearly observed in Table 3.1, which compares the accuracy of results for linear and
nonlinear equations with the use of 22 supporting knots. This observation is very
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
Table 3.1 Comparison of accuracy for linear and nonlinear equations with using 22
supporting knots
For their physical complexity and practicality, the flow and thermal fields in enclosed
space are of great importance due to their wide applications such as in solar collector-
105
receivers, insulation and flooding protection for buried pipes used for district heating and
cooling, cooling systems in nuclear reactors, etc. The purpose of this section is to
investigate how the mesh-free methods behave in the solution of the natural convection
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
ψ inner _ wall
= constant , ψ outer _ wall
=0 (3.23)
106
Y
L
(0,0)
X
ε ϕ0
R
( x0 , y 0 )
Figure 3.4 Sketch of physical domain of natural convection between a square outer
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 number of supporting knots is taken as 17, and the shape parameter c 2 is selected as
3.1. The numerical results for the cases with ϕ 0 = 45 0 , Ra = 3 × 105 and
( rr = 2.6 rr = L /(2 R ) ) are presented by the streamlines and vorticity contours. As shown
in Fig. 3.5, the eddy on the left hand side in the flow expands in size due to the increasing
space, with the center of the eddy moving downwards. The thermal plume tends to
incline to the left from the vertical line as the eccentricity increases. The eddy on the
RHS remains the similar size but shifts above the inner cylinder. The increasing
107
eccentricity allows larger space for the eddy on the RHS, but the increasing eddy on the
left hand side limits the space for the eddy on the RHS. It is the balance between the two
eddies that make the thermal plumes above the top of the inner cylinder shifts from the
ε =0.25
ε =0.50
ε =0.75
108
ε =0.95
Figure 3.5 Streamlines and isotherms for Ra = 3 × 105 , rr = 2.6 , and ϕ 0 = 450
References
R.L. Hardy, Multiquadric equations of topography and other irregular surfaces, Journal of
R. Franke, “Scattered data interpolation: tests of some methods”, Math. Comp., 38, pp.
181-199, (1982).
(1990).
109
R. E. Bellman, B. G. Kashef, and J. Casti, “Differential quadrature: A technique for the
rapid solution of nonlinear partial differential equations,” J. Comput. Phys. 10, 40-
52 (1972).
London, 2000.
110
4. Standard Lattice Boltzmann Method (LBM)
4.1 Introduction
mesoscopic and microscopic, see Fig. 4.1. Unlike conventional numerical methods,
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
LBM has achieved great progress since the 90’s in the last century.
111
The Basic Idea of LBM
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
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
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
space. The average process involves information from the whole velocity space.
112
Origination of LBM
The LBM originated from the lattice gas cellular automata (LGCA), which was
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
However, LGCA suffers some drawbacks such as large statistical noise, non-
(LBE) models had been developed and the most historically important of them are the
1. In 1987, Frisch, d’Humières and Hasslacher used LBE at the cradle of LGCA to
2. In 1988, McNamara and Zanetti introduced a LBE model, which eliminates the
113
3. In 1989, Higuera and Jimènez presented a LBE with a linearized collision operator,
4. The collision operator, which is based on the rules of LGCA, was further
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
The LBE with BGK models in the LBM are based on gas-kinetic
flow is described through the evolution of the discrete particle distribution functions on
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.
The first lattice gas cellular automaton (LGCA) was proposed in 1973 by
Hardy, Pomeau and de Pazzis. Although the HPP (named from the initials of the three
114
authors) model used in their work conserves the mass and moment, it does not yield
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
the index α = 1,2 scanning the spatial dimensions (see Fig. 4.2).
115
Each lattice node hosts up to six cells and each cell occupies with one particle. The
particles can move only along one of the six directions defined by the discrete
particles hop to the nearest neighbor pointed by the corresponding discrete vector c i .
All particles have the same mass m = 1. The particle occupation is defined by an
Obviously, the collection of the occupation numbers over the entire lattice with N
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
allowed by the lattice. The collision rule of FHP is shown in Fig. 4.2. nieq (r, t ) is the
1987):
ρ /b
nieq (r, t ) = (4.3)
1 + e Φi
where b(=6) is the number of the discrete speeds, ρ is the density and Φ i is a linear
combination of the mass, momentum and energy and for isothermal ideal fluids:
Φ i = A + Bciα uα (4.4)
116
where A and B are free Lagrange parameters to be adjusted in order to secure mass and
parameters A and B can be calculated by an expansion of Eq. (4.3) for small Mach
ρ ρ c iα uα ρ Qiαβ uα u β
nieq (r, t ) = + + G( ρ ) + O(u 3 ) (4.5)
b b c s2 b 2c s4
with
b − 2ρ
G( ρ ) = (4.6)
b−ρ
c
cs = (4.8)
D
ρ = ∑ ni (r, t ) (4.9)
i
ρu γ = ∑ c i γ n i ( r , t ) (4.10)
i
Note that ciα u β and Qiαβ uα u β are tensor operations, which mean summation when 2
⇒ The cells are positioned at nodes of the lattice and hold a finite number of
discrete states.
117
⇒ At each node and each link to the nearest neighbor there is a cell which may
⇒ 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
¾ Statistical noise
The statistical noise LGCA suffered comes from the Boolean system.
¾ Unphysical solution
To overcome the above drawbacks, the lattice Boltzmann method (LBM) was
developed.
118
4.3 Kinetic theory
Kinetic theory is the branch of statistic physics dealing with the dynamics of
of this section is to provide a minimal yet helpful theoretical introduction to the LBM
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
∂f ∂f ∂f
+c +F = Q( f ) (4.11)
∂t ∂r ∂c
where c is the particle velocity and F is the body force. Q( f ) is the collision integral
σ (Ω) is the differential collision cross section for the two particle collision which
transforms the velocities from {c1 , c 2 } (incoming) into {c1' , c '2 } (outgoing).
that the collision term is annihilated ( Q( f ) = 0 ) and leads to the so-called detailed
balance condition:
119
which means that any direct/inverse collision is dynamically balanced by an
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
and kinetic energy) alone. Therefore the equilibrium distribution functions are all of
the form:
1
f eq (c) = exp( A + B ⋅ c + Cc 2 ) (4.15)
2
(c − u )2
f (r, c, t ) = ρ (2πRT )
−D / 2
eq
exp − (4.16)
2 RT
Bhatnagar-Gross-Krook Approximation
One of the major problems when dealing with the Boltzmann equation is the
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
120
f − f eq
QBGK ( f ) = − (4.17)
τ
which was proposed by Bhatnagar, Gross and Krook in 1954. In Eq. (4.17), τ is a
typical relaxation time associated with collision relaxation to the local equilibrium.
constant value for the relaxation scale, which is equivalent to lump the whole spectrum
As already indicated in Section 4.2, the Boolean particle distribution and the
Fermi-Dirac equilibrium distribution are used in the LGCA. Therefore two major
drawbacks of the LGCA are the statistical noise and lack of Galilean invariant. On the
other hand, the collision term in the LGCA is also complicated and any efforts to seek
the numerical solutions of the LGCA are difficult. To overcome the above drawbacks,
the LBM is proposed and the main feature of LBM is to replace the Boolean particle
distribution ni and the collision term by the continuum particle distribution function
The lattice Boltzmann equation (LBE) with BGK models can be written as:
f i (r + e iδ t , t + δ t ) = f i (r, t ) −
1
τ
( f (r, t ) − f
i i
eq
(r, t )) (i = 0,1, L , M ) (4.18)
121
where f i is the density distribution function, which depends on position r in the
physical space, the particle discrete velocity e i and time t; f i eq is its corresponding
the single relaxation parameter related to the hydrodynamic viscosity, δ t is the time
M M
ρ = ∑ fi ρu = ∑ f i e i (4.19)
i =1 i =1
The equation of state and kinematic viscosity are defined as (Wolf-Gladrow 2000):
P = ρc s2 (4.20)
1
υ = c s2 (τ − )δ t (4.21)
2
As shown above, LBE was originated from the LGCA method. On the other hand, we
can show that LBE can also be derived from the discrete Boltzmann equation. Without
considering the external force F, the Boltzmann equation with BGK approximation can
be written as
∂f (c, r , t )
∂t
+ c ⋅ ∇f (c, r , t ) = −
1
τb
[ ]
f (c, r , t ) − f eq (c, r , t ) (4.22)
Note that this is a single relaxation time model. It can be shown that the velocity space
conservation laws. In the discrete velocity space, the Boltzmann equation becomes
122
∂f i (r , t )
∂t
+ e i ⋅ ∇f i (r , t ) = −
1
[
f (r , t ) − f i eq (r , t )
τb i
] (4.23)
where i indicates the different velocity directions. In the lattice context, i is equivalent
to the lattice direction, which usually takes a form of hexagonal or rectangular shapes.
Integrating equation (4.23) from t to t + δ t with the second order of accuracy gives
δt
f i (r + e iδ t , t + δ t ) − f i (r, t ) = −
τb
( f i (r, t ) − f i eq (r, t )) (i = 0,1, L , M ) (4.24)
Since the collision term in the LBE is described by the BGK approximation,
the local equilibrium is therefore from the Maxwell form. Using Taylor series
expansion, the Maxwell distribution function can be expanded in the small Mach
number limit as
(c − u )2
f eq (r, c, t ) = ρ (2πRT )− D exp −
/2
2 RT
c 2 − 2c ⋅ u + u 2
= ρ (2πRT )− D / 2 exp −
2 RT
c2 2c ⋅ u − u 2
= ρ (2πRT )− D / 2 exp − exp (4.25)
2 RT 2 RT
c 2 c ⋅ u (c ⋅ u) 2 u2
= ρ (2πRT )− D / 2 exp −
1 + + − + O(u 3 )
2 RT RT 2( RT ) 2
2 RT
c ⋅ u (c ⋅ u) 2 u2
= w(c) ρ 1 + + − + O(u 3 )
RT 2( RT ) 2
2 RT
123
e ⋅ u (e ⋅ u) 2 − c 2 u 2
= wi ρ 1 + i 2 +
eq i s
fi (4.26)
cs 4
2c s
where wi are constants. The values of wi and c s depend on the specific choice of the
Note that the repeated indexes α , β mean summation over the space dimension. The
∑ wi = 1 (4.28a)
i
∑we
i
i i =0 ═► ∑weα = 0
i
i i (4.28b)
∑ w ((e ∑ w e α uβ e β uα = c u
2
i i ⋅ u) 2 - cs2 u ) = 0 ═► i i i
2
s
2
(4.28c)
i i
∑ wi e i ⋅ e j = c s2δ ij (4.28d)
i
∑ w e ((e
2
i i j ⋅ u) 2 - cs2 u ) = 0 (4.28e)
i
Using equation (4.28) and Chapman- Enskog expansion to recover the Navier-
Stokes (N-S) equation, the constants wi can be determined. In the following, the
particle discrete velocity (DV) model is written as DnQm, where m is the speed model
and n is the space dimension. Popular examples are D1Q5, D2Q7, D2Q9, D3Q15 and
D3Q19, whose diagrams are sketched in Fig. 4.3(a-e), together with the synoptic Table
124
Table 4.1 Main parameters of some DnQm DV models
Models ei wi cs2
(0) 6/12 ( i =0)
D1Q5 ( ± 1) 2/12 ( i = 1,2) 1
(± 2) 1/12 ( i = 3,4)
(0,0) 6/12 ( i =0)
D2Q7 1/12 ( i = 1,L ,6) 1/4
( ± 1,0) ,( ± 1 2 ,± 3 2 )
(0,0) 16/36 ( i=0 )
D2Q9 ( ± 1,0) ,( 0,±1) 4/36( i = 2l + 1, l = 0,L ,3) 1/3
( ± 1,±1 ) 1/36( i = 2l , l = 1,L ,4)
(0,0,0) 16/72( i = 0 )
D3Q15 ( ± 1,0,0) ,( 0,±1,0) ,( 0,±1,0) 8/72( i = 1,L ,6) 1/3
( ± 1,±1,±1 ) 1/72( i = 7,L ,14)
(0,0,0)
12/36( i = 0 )
( ± 1,0,0) ,( 0,±1,0) ,( 0,±1,0)
D3Q19 2/36( i = 1,L ,6) 1/3
( ± 1,±1,0 ),( ± 1,0,±1, ),
1/36( i = 7,L ,18)
( 0,±1,±1 )
(a) D1Q5
3
3 2 4 2
0
4 1 0
5 1
5 6 6 8
7
125
■ e=0
■ e=0 ● e=1
● e=1
♦ e= 2
♦ e= 3
Te lattice velocity can form lattice tensors with different ranks. The nth rank lattice
tensor is defined as
Consequently, we have the 1st, 2nd, 3rd and 4th rank lattice tensors as
Lα = ∑ eiα
i
126
¾ An isotropic tensor of rank 2 is proportional to δ αβ .
δ αβ δ γζ , δ αγ δ βζ , δ αζ δ βγ
Lαβγζ = aδ αβ δ γζ + bδ αγ δ βζ + c δ αζ δ βγ
where wi are constants appeared in the equilibrium function. In the LBM context, the
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
developed by Chapman and Enskog between 1910 and 1920. The expansion
namely the ratio between the molecular mean free path λ and the characteristic length
127
In the following, the Chapman-Enskog expansion is employed to derive
one, because the spatial density variation is not zero in LBE simulations. In order to
that the Mach number is low and the density fluctuation ( δρ ) is of the order O( Ma 2 )
In the macroscopic level, the flow encounters the 3 basic time scales. The collision
happens very fast; the convection happens slower in the scale of ε −1 ; and the diffusion
happens much slower in the scale of ε −2 . In the space, the collision happens in the
expansion
2
f i = ∑ ε j f i( j ) (4.29)
j =0
1
∂ t = ∑ ε j +1∂ t j (4.30)
j =0
∇ r = ε 1∇ r1 (4.31)
The second order Taylor series expansion of L.H.S. of the LBE (4.18) yields
∂ δ ∂ 1
( + e i ⋅ ∇) f i + t ( + e i ⋅ ∇) 2 f i + ( f − f i eq ) + O(δ t3 ) = 0 (4.32)
∂t 2 ∂t τδ t i
where
− f i ) /(τδ t )
(0) eq
Ei( 0) = ( f i (4.34)
128
(
Ei(1) = ∂ t0 + ei ⋅ ∇1 f i (0 ) + ) 1
τδ t
f i (1) (4.35)
δt
(
Ei(2 ) = ∂ t1 f i (0 ) + ∂ t0 + ei ⋅ ∇1 f i (1) + ) 2
(∂ t0 )( )
+ ei ⋅ ∇1 ∂ t0 + ei ⋅ ∇1 f i (0 ) +
1
τδ t
f i (2 )
(4.36)
= ∂ t1 f i (0 )
( 1
)
+ ∂ t0 + ei ⋅ ∇1 1 − f i (1) +
1 (2 )
fi
2τ τδ t
M M
∑ f i (0) = ρ , ∑ f i (0) e i = ρu (4.37)
i =0 i =0
M M M M
∑ f i (j) = 0 , ∑ f i ( j) e i = 0 , ∑ ∑ f i ( 2)e i = 0
(2)
fi = 0, (4.38)
i =0 i =0 i =0 i =0
Mass Conservation
∂
ρ + ∇1 ⋅ ρu = 0 (4.40)
∂t 0
M
∂ M M
(1) 1 1 M
∑ Ei( 2) = ∑ + ∑ ( ∂ t 0 + e i ⋅ ∇1 ) f i 1 − + ∑f
(0) (2)
fi i , (4.41)
i =0 ∂t1 i =0 i =0 2τ τδt i =0
∂
ρ =0. (4.42)
∂t1
Combining Eq. (4.40) with Eq. (4.42) leads to the continuum equation
∂
ρ + ∇ ⋅ ρu = 0 (4.43)
∂t
129
Momentum Conservation
Now consider the second moment of Eq. (4.35). For the second moment of (4.35) it is
obtained:
M M
∂ (0) n
1 M
∑ Ei(1)e i =∑ f i e i + ∑ (e i ⋅ ∇ ) f i e i + ∑f
(0) (1)
ei (4.44)
i =0 i =0 ∂t 0 i =0 τδ t i =0
i
∂ M
ρu + ∇ ⋅ ∑ e i e i f i ( 0 ) = 0 (4.45a)
∂t 0 i =0
∂
ρu + ∇ ⋅ Π ( 0) = 0 (4.45b)
∂t 0
M
Π α ,β = ∑ ei ,α ei ,β f i ( 0 )
(0)
(4.46)
i =0
M M
∂ (0) 1 M ∂ (1) M
∑ Ei(2) ei = ∑ ∂t1
f i e i + 1 −
2τ
∑
i=0 ∂t 0
f i e i + ∑ (e i ⋅ ∇) f i (1) e i +
i =0 i =0 i =0 (4.47)
M
1
τδ t
∑ fi (2)
ei
i =0
∂ 1 M
ρu + 1 − ∇ ⋅ ∑ e i e i f i (1) = 0 (4.48a)
∂t1 2τ i =0
or in a form
∂ 1
ρu + 1 − ∇ ⋅ Π (1) = 0 (4.48b)
∂t1 2τ
130
M
Π α ,β = ∑ ei ,α ei ,β f i (1)
(1)
(4.49)
i =0
To evaluate the zeroth- and first-order momentum flux tensors in Eqs. (4.45) and
(q )
(4.48), the following tensor E of order q is defined
M
= ∑ wi ei , j ei ,k ...ei ,q , j , k ,..., q =1…3
(q)
E jk ..q (4.50)
i =1
(q )
for the D2Q9 model, E can be written as
M
= ∑ wi ei , j = 0
(1)
Ej
i =0
M
E jk (2) = ∑ wi ei , j ei ,k = c s2δ jk (4.51)
i =0
M
E jkl (3) = ∑ wi ei , j ei ,k ei ,l = 0 (4.52)
i =0
M
E jklm (4) = ∑ wi ei , j ei ,k ei ,l ei ,m = c s4 ∆ jklm (4.53)
i =0
(q )
Using these properties of tensor E and Eq. (4.27), it follows for zeroth- and first-
M
Π jk (0) = ∑ ei , j ei ,k f i (0) = c s2 ρδ jk + ρu j u k (4.54)
i =0
∆ jklm = δ jk δ lm + δ jl δ km + δ jm δ kl
131
M M
= ∑ ei , j ei ,k f i = −τδ t ∑ ei , j ei ,k Dt0 f i
(1) (1) (0)
Π jk
i =0 i =0
(4.55a)
∂ M
= −τδ t Π jk + ∇1 ⋅ ∑ ei , j ei ,k ei ,l f i ( 0)
(0)
∂t 0 i =0
Since
M M
1
∇1 ⋅ ∑ ei , j ei ,k ei ,l f i ( 0)
= 2 ∇1 ⋅ ρ ∑ wi ei , j ei ,k ei ,l ei ,m u m
i =0 cs i =0
∂u j ∂u k ∂ρ ∂ρ ∂ρ
= ρcs2 (δ jk ∇1 ⋅ u + + ) + cs2δ jk u m + cs2 (u j + uk )
∂xk ∂x j ∂xm ∂xk ∂x j
∂ ( 0) ∂
∏ jk = ( ρcs2δ jk + ρu j u k )
∂t0 ∂t0
∂ ∂ ∂ ∂
= cs2δ jk ρ + uj ( ρu k ) + u k ( ρu j ) − u j u k ρ
∂t 0 ∂t 0 ∂t 0 ∂t0
∂ ∂ ∂ ∂ ∂
= (cs2δ jk − u j u k ) ρ + u j [− ( ρcs2 ) − ( ρu k u m )] + u k [− ( ρcs2 ) − ( ρu j u m )]
∂t 0 ∂xk ∂xm ∂x j ∂xm
∂ ∂ρ ∂ρ ∂ ∂ ∂
= cs2δ jk ρ − cs2 (u j + uk )− ( ρu j uk u m ) − u j u k [ ρ+ ( ρu m )]
∂t 0 ∂xk ∂x j ∂xm ∂t0 ∂xm
∂ ∂ρ ∂ρ ∂
= cs2δ jk ρ − cs2 (u j + uk )− ( ρu j uk u m )
∂t 0 ∂xk ∂x j ∂xm
∂ ∂ρ ∂ρ ∂
= −cs2δ jk ( ρu m ) − cs2 (u j + uk )− ( ρu j u k u m )
∂xm ∂xk ∂x j ∂xm
∂ ∂ρ ∂ρ ∂
= − ρcs2δ jk ∇1 ⋅ u - cs2δ jk u m ρ − cs2 (u j + uk )− ( ρu j u k u m )
∂xm ∂xk ∂x j ∂xm
therefore, we have
1 M M
1 − Π jk = ∑ ei , j ei ,k f i = −τδ t ∑ ei , j ei ,k Dt0 f i
(1) (1) (0)
2τ i =0 i =0
1 ∂u ∂u j
− ∂ ( ρu j u k u m ) + O( Ma 2 )
= −τδ t 1 − cs2 ρ k + (4.55b)
2τ ∂x
j ∂xk ∂xm
1 ∂u ∂u j
≈ −cs2 ρτδ t 1 − k + + O( Ma )
2
2τ ∂x j ∂xk
132
∂ρu
+ ∇( ρuu) = −∇P + ρν∇ 2 u (4.56)
∂t
2τ − 1
ν= δt (4.57)
6
In the small Mach number limit, the density variation can be negligible. Thus one can
∇ ⋅u = 0 (4.58)
∂u 1
+ u ⋅ ∇u = − ∇P + ν ∇ 2 u (4.59)
∂t ρ
Boundary Conditions
f i〉
Ω
f i〈
Fluid Domain
133
Generally, formulating boundary conditions in the LBM consists of finding an
respectively. The n is the outward normal vector of the boundary element centered in x.
f i 〈 ( x ) = ∑∑ Π ij ( x − y ) f j〉 ( y ) (4.61)
y j
where the kernel Π ij (x − y ) of the boundary operator generally extends over a finite
range of values y inside the fluid domain. This boundary operator reflects the
interaction between the fluid molecules and the boundary. Consistent with this
molecular picture, boundary conditions can be viewed as special collisions between the
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,
134
4 3 2
0 U
5 1
4 3 2
4 3 2
0 6 7 8
5 1 0
Flow direction 5 1
6 7 8 4 3 2
6 7 8
Y 0
5 1
X 6 7 8
Figure 4.5 Sketch of Periodic, Non-slip and Sliding wall Boundary conditions
f i 〈 ( B1 ) = f j〉 ( B2 ) (4.62a)
f i 〈 ( B2 ) = f j〉 ( B1 ) (4.62b)
where B1 and B2 represent the left and right boundary layers. To illustrate the idea, let
us take the D2Q9 DV model as an example and consider only the direction along the X
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
135
back scheme of the distribution function. The bounce back means when a particle
streams to the boundaries, it just scatters back to the point it comes from:
f i 〈 ( B) = f j〉 ( B) (4.64)
Here e i = −e j . For the D2Q9 DV model and considering the direction along the y axis,
on the bottom wall (Fig. 4.5) we can rewrite equation (4.64) in terms of the boundary
f 2〈 1 0 0 f 6〉
〈 〉
f 3 = 0 1 0 f 7 (4.65)
f 〈 0 0 1 f 〉
4 8
This complete reflection guarantees that both tangential and normal components of the
Sliding Walls
In the literature, there have been several ways to treat this kind of boundary
conditions. The most popular one is the use of equilibrium distribution boundary
condition (EDBC) (Hou et al. 1995) and the hydrodynamic boundary condition (HBC)
(Nobel et al. 1995). The EDBC is to set an equilibrium state on the boundaries
provided that the density is equal to the equilibrium value. This boundary treatment is
easy to be implemented.
In the HBC, the incoming distributions and density can be defined by solving
the conservation relations (density, momentum, mass flux or energy) on the wall.
Considering the D2Q9 DV model on the top wall (Fig. 4.5), we have:
1 1 1 f 6〈 ρ 1 1 1 f 0 1 1 1 f 2〉
〈 〉
− 1 0 1 f 7 = ρu x − 0 1 − 1 f1 − 1 0 − 1 f 3 (4.66)
− 1 − 1 − 1 f 〈 ρu 0 0 0 f 1 1 1 f 〉
8 y 5 4
136
Initially the tangential momentum conservation is ensured by setting f1 = f5 and the
distributions f0, f1, f5 are not altered by the dynamics at any subsequent time step.
velocity profile at the inlet, while at the outlet either a given pressure or a no-flux
the equilibrium distributions with the desired values of density and inlet flow velocity:
f i = f i eq ( ρ in , u in ) (4.67)
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
f i ( Boutlet ) = 2 f i ( B1 ) − f i ( B2 ) (4.68)
where B1 and B2 represent the first and second rows next to the outlet boundary Boutlet.
Another way is to extrapolate the macroscopic variables to the outlet using the
zero gradient condition, and then use the equibrium function as the boundary condition.
137
4.5 Practical Implementation of LBM for Lid-Driven Square Cavity
Flows
problem is industrially important and usually is taken as one of the standard cases to
test new computational schemes. For this problem (Fig. 4.6), the flow in the cavity is
driven by the top lid moving from left to right with a constant velocity U. Here we
only study the flow with Re = 100 (Re = UL/υ is the Reynolds number based on the lid
velocity and the length of the square cavity) and adopt the D2Q9 DV model for the
LBM. For convenience, all variables used in this section are dimensionless and they
are defined as
u=U v=0
u=0 u=0
v=0 v=0
u=0 v=0
u = u / c, ( x , y ) = ( x / L, y / L ) , ρ = ρ / ρ0 , t = tc / ∆ x (4.69)
138
1. Discretized the flow domain
xi , j = (i − 1) /(Imax− 1)
y i , j = ( j − 1) /(Imax− 1)
then
velocity:
0 α =0
eα = (cos[(α − 1)π / 2], sin[(α − 1)π / 2]) α = 1,2,3,4
2 (cos[(α − 5)π / 2 + π / 4], sin[(α − 5)π / 2 + π / 4]) α = 5,6,7,8
Then
1 6 Re
τ= ( + 1) ───────── Relxation parameter (L = 1)
2 Uδ t
c s2 = 1 / 3
t=0
(i = 1, Imax; j = 1, Imax)
Then assuming
139
f α (i, j , t = 0) = f αeq (i, j , t = 0)
with
4. Iteration procedure
t = t + δt
¾ Streaming:
¾ Collision:
1
f α (i, j , t + δ t ) = f α (i, j , t + δ t ) − ( f α (i, j , t + δ t ) − f αeq (i, j , t + δ t ))
τ
140
¾ Boundary Condition (Fig. 4.7):
f6 f2 f5 = f7 f 6 = f8 f2 f5
f3 f1 = f 3 f1
f3 = f
f7 f4 f8 = f 6
f7 = f5 f4 f8
f 6 = f 6eq f 2 = f 4f 5 = f 7 f 6 = f8 f 2 = f 4 f 5 = f 7 f 6 = f 8 f 2 = f 4f 5 = f 5eq
f1 = f 3 f3 f1 f 3 = f1 f1
f3
f8
f7 f4 f 8 = f 8eq f7 f4 f8 f 7 = f 7eq f 4
Figure 4.7 Sketch of the boundary condition of LBM for the driven cavity flow
f 5 (i, j , t + δ t ) = f 7 (i, j , t + δ t )
j = 1: f 2 (i, j , t + δ t ) = f 4 (i, j , t + δ t ) ( i = 2, I max − 1 )
f 6 (i, j , t + δ t ) = f 8 (i, j , t + δ t )
f 5 (i, j , t + δ t ) = f 7 (i, j , t + δ t )
i = 1: f1 (i, j , t + δ t ) = f 3 (i, j , t + δ t ) ( j = 2, Imax− 1 )
f 8 (i, j , t + δ t ) = f 6 (i, j , t + δ t )
f 6 (i, j , t + δ t ) = f 8 (i, j , t + δ t )
i = Imax: f 3 (i, j , t + δ t ) = f1 (i, j , t + δ t ) ( j = 2, Imax− 1 )
f 7 (i, j , t + δ t ) = f 5 (i, j , t + δ t )
141
f 5 (i, j , t + δ t ) = f 7 (i, j , t + δ t )
f1 (i, j , t + δ t ) = f 3 (i, j , t + δ t )
i = 1, j = 1: f 2 (i, j , t + δ t ) = f 4 (i, j , t + δ t )
f 6 (i, j , t + δ t ) = f 6eq (i, j , t )
f 8 (i, j , t + δ t ) = f 8eq (i, j , t )
f 2 (i, j , t + δ t ) = f 4 (i, j , t + δ t )
f 6 (i, j , t + δ t ) = f 8 (i, j , t + δ t )
i = Imax, j = 1: f 3 (i, j , t + δ t ) = f1 (i, j , t + δ t )
f 5 (i, j , t + δ t ) = f 5eq (i, j , t )
f 7 (i, j , t + δ t ) = f 7eq (i, j , t )
Kp
ρ i , j = ∑ f α (i, j , t + δ t )
α =0
Kp
u i , j = ∑ f α (i, j , t + δ t )eα , x / ρ
α =0 (i = 1,Imax; j = 1,Imax-1)
Kp
vi , j = ∑ f α (i, j , t + δ t )eα , y / ρ
α =0
Pi , j = ρ i , j c s2
and
ρ i ,Imax = 1
u i ,Imax = U
(i = 1,Imax)
vi ,Imax = 0
Pi ,Imax = c s2
142
¾ Set convergent critiria:
(i = 1,Imax; j = 1,Imax-1)
If Error > 10 −6 , repeat above steps. Otherwise go to next step for output
Normalized velocity along horizontal and vertical center lines of the cavity:
1 ui, j 1 vi , j
ψ i, j = ∫ dy or −∫ dx (i = 1,Imax; j = 1,Imax)
0 U 0 U
∂u ∂v
ωi , j = − (i = 1,Imax; j = 2,Jmax)
∂y i , j ∂x i , j
The following Figs. 4.8-4.9 are typical results obtained by the LBM and their
143
1 0.6
Ghia's data
0.8 0.4
Present
0.2 result
0.6
0
0.4 Ghia's data
-0.2
Present
0.2 result -0.4
0 -0.6
-0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
U-Y X-V
Figure 4.8 U (left) and V (right) velocity profiles along vertical and horizontal
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:
144
Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid
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.
Hou S, Zou Q, Chen S, Doolen GD, and Cogley AC, “Simulation of cavity flow by
Koelman JMVA, “A simple lattice Boltzmann scheme for Navier-Stokes fluid flow”,
Luo L. S., Unified theory of the lattice Boltzmann models for nonideal gases, Phys.
Maier RS, Bernard RS and Grunau DW, “Boundary conditions for lattice Boltzmann
boundary condition for the lattice Boltzmann method”, Phys. Fluids, 7, p203,
1995.
145
Qian YH, Succi S and Orszag SA, “Recent advances in lattice Boltzmann computing”,
Succi S, “The Lattice Boltzmann Equation for Fluid Dynamics and Beyond”,
Wolfram S, “Cellular automaton fluids. 1: Basic theory”, J. Stat. Phys., 45, p471,
1986.
(2000).
146
5. Taylor Series Expansion- and Least Square-
5.1 Introduction
Despite its huge success in many practical applications, the conventional LBM
solver. This limits its application. This can be seen clearly in Fig. 5.1.
Mesh points
Positions from streaming
147
For many practical problems, an irregular grid or a meshless structure is always
preferred due to the fact that curved boundaries can be described more accurately and
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
mesh points and lattice velocity, and are computed in advance. The new method is also
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
This method was proposed by He et al. in 1996. The basic idea of ISLBM is
that all the particles are streamed to positions in the flow field first, which may not
coincide with the mesh points. Then, in the second step, interpolation is performed in
148
the whole domain. As compared with the standard LBM, ISLBM requires much more
in Fig. 5.2.
Mesh points
Positions from streaming
Differential LBM
Applying the first order Taylor series expansion to the standard LBE in time
[ ]
{recall f α ( x + eαxδt , y + eαyδt , t + δt ) = f α ( x, y , t ) + f αeq ( x, y , t ) − f α ( x, y , t ) / τ }
Equation (5.1) is a wave-like equation, which can be solved by the conventional finite
difference (FD) scheme, finite volume (FV) method, and finite element (FE) method.
149
Note that when the FD scheme is applied, the coordinate transformation has to be
adopted for complex domain. In general, the upwind scheme is needed to get the stable
solution.
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
The above equation can be used to simulate viscous flows at high Reynolds number.
We consider a two-dimensional (2D) case. As shown in Fig. 5.3, for simplicity, we let
point A represent the grid point ( x A , y A , t ) , point A' represent the position
150
[ ]
f α ( A' , t + δ t ) = f α ( A, t ) + f αeq ( A, t ) − f α ( A, t ) / τ (5.3)
[ ]
{recall f α ( x + eαxδt , y + eαyδt , t + δt ) = f α ( x, y , t ) + f αeq ( x, y , t ) − f α ( x, y , t ) / τ }
C' E'
C B' E P'
B P
A' D'
A D
For the general case, A' may not coincide with the mesh point P. We first consider the
Taylor series expansion with truncation to the first order derivative terms. Then,
∂fα ( P, t + δ t ) ∂f ( P, t + δ t )
fα ( A' , t + δ t ) = fα ( P, t + δ t ) + ∆x A + ∆y A α + O[(∆x A ) 2 , (∆y A ) 2 ]
∂x ∂y
(5.4)
where ∆x A = x A + eαx δ t − x P , ∆y A = y A + eαy δ t − y P . Note that the above approximation
has a truncation error of the second order. Substituting equation (5.4) into equation (5.3)
gives
∂f α ( P, t + δ t ) ∂f ( P, t + δ t ) f eq ( A, t ) − f α ( A, t )
f α ( P, t + δ t ) + ∆x A + ∆y A α = f α ( A, t ) + α
∂x ∂y τ
(5.5)
only involves two mesh points A and P. When a uniform grid is used, ∆x A = ∆y A = 0 ,
equation (5.5) is reduced to the standard LBE. Solving equation (5.5) can provide the
151
density distribution functions at all the mesh points. In this work, we try to develop an
explicit formulation to update the distribution function. In fact, our new development
ODE:
du
= f (u, t ), u = u0 , when t = 0 (5.6)
dt
n n n
du h 2 d 2u h 3 d 3u
u n +1
= u + h + 2 + 3 + .... , h = ∆t
n
(5.7)
dt 2 dt 6 dt
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.
the functional value at the next time level. For a given ODE with a complicated
expression, this application is very difficult. To improve the Taylor series method, the
Runge-Kutta method evaluates the functional values at some intermediate points and
152
then combines them (through the Taylor series expansion) to form a scheme with the
With this idea in mind, we look at equation (5.5). We know that at the time level
t + δ t , the density distribution function and its derivatives at the mesh point P are all
unknowns. So, equation (5.5) has three unknowns in total. To solve for the three
unknowns, we need three equations. However, equation (5.5) just provides one
equation. We need additional two equations to close the system. As shown in Fig. 5.3,
we can see that along the α direction, the particles at two mesh points P, B at the time
level t will stream to the new positions P' , B' at the time level t + δ t . The distribution
functions at these new positions can be computed through the standard LBE, which are
given below
[ ]
f α ( P' , t + δ t ) = f α ( P, t ) + f αeq ( P, t ) − f α ( P, t ) / τ (5.8)
[ ]
f α ( B' , t + δ t ) = f α ( B, t ) + f αeq ( B, t ) − f α ( B, t ) / τ (5.9)
Using Taylor series expansion with truncation to the first order derivative
function and its derivatives at the mesh point P. As a result, equations (5.8)-(5.9) can
be reduced to
∂f α ( P, t + δ t ) ∂f ( P, t + δ t ) f eq ( P, t ) − f α ( P, t )
f α ( P, t + δ t ) + ∆x P + ∆y P α = f α ( P, t ) + α
∂x ∂y τ
(5.10)
∂f α ( P, t + δ t ) ∂f ( P, t + δ t ) f eq ( B, t ) − f α ( B, t )
f α ( P, t + δ t ) + ∆x B + ∆y B α = f α ( B, t ) + α
∂x ∂y τ
(5.11)
153
where ∆x P = eαxδ t , ∆y P = eαy δ t
∆x B = x B + eαx δ t − x P , ∆y B = y B + eαy δ t − y P
Equations (5.5), (5.10) and (5.11) form a system to solve for three unknowns.
f α ( P, t + δ t ) = ∆ P / ∆ (5.12)
where ∆ = ∆x A ∆y B − ∆x B ∆y A + ∆x B ∆y P − ∆x P ∆y B + ∆x P ∆y A − ∆x A ∆y P
[ ]
gα , P = fα ( P, t ) + fαeq ( P, t ) − fα ( P, t ) / τ
[ ]
gα , A = fα ( A, t ) + fαeq ( A, t ) − fα ( A, t ) / τ
[ ]
gα , B = fα ( B, t ) + fαeq ( B, t ) − fα ( B, t ) / τ
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
truncate the Taylor series expansion to the second order derivative terms. For the two-
dimensional case, this expansion involves six unknowns, that is, one distribution
function at the time level t + δ t , two first order derivatives, and three second order
derivatives. To solve for these unknowns, we need six equations to close the system.
This can be done by applying the second order Taylor series expansion at 6 points. As
shown in Fig. 5.3, the particles at six mesh points P, A, B, C , D, E at the time level t will
stream to positions P ' , A' , B ' , C ' , D' , E ' at the time level t + δ t . The distribution
functions at these new positions can be computed through the standard LBE. Then by
154
using the second order Taylor series expansion at these new positions in terms of the
distribution function and its derivatives at the mesh point P, we can obtain the following
equation system
6
g α :i = {sα :i }T {Vα } = ∑ sα :i , jVα : j i = P, A, B, C , D, E (5.13)
j =1
where
( )
gα :i = fα ( xi , yi ,t ) + fαeq ( xi , yi ,t ) − fα ( xi , yi ,t ) / τ
gα :i is the post-collision state of the distribution function fα at the ith point and the
time level t, {sα :i }T is a vector with six elements formed by the coordinates of mesh
points, {Vα } is the vector of unknowns at the mesh point P and the time level t + δ t ,
which also has six elements, sα :i , j is the jth element of the vector {sα :i }T and Vα : j is the
jth element of the vector {Vα } . Our target is to find its first element
Vα :1 = f α ( P, t + δ t ) . Equation system (5.13) can be put into the following matrix form
155
∆x D = x D + eαx δ t − x P , ∆y D = y D + eαy δ t − y P
∆x E = x E + eαx δ t − x P , ∆y E = y E + eαy δ t − y P
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
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
equation (5.13). Equation (5.13) has 6 unknowns (elements of the vector {Vα}). If
equation (5.13) is applied at more than 6 mesh points, then the system is over-
determined. For this case, the unknown vector can be decided from the least squares
method. For simplicity, let the mesh point P be represented by the index i = 0 , and its
neighbouring points around P and it should be larger than 5. At each point, we can
6
errα :i = g α :i − ∑ sα :i , jVα : j i = 0,1,2,..., N (5.15)
j =1
156
2
N N 6
Eα = ∑ err = ∑ g α :i − ∑ sα :i , jVα : j
2
α :i (5.16)
i =0 i =0 j =1
To minimize the error Eα, we need to set ∂Eα / ∂Vα : j = 0, j = 1,2,...,6 , which leads to
− − − − − −
[ Sα ] =
− − − − − −
− − − − − −
1 ∆x N ∆y N (∆x N ) 2 / 2 (∆y N ) 2 / 2 ∆x N ∆y N ( N +1)×6
Clearly, when the coordinates of mesh points are given, and the particle velocity and
time step size are specified, the matrix [Sα] is determined. Then from equation (5.17),
we obtain
( ) −1
{Vα } = [ Sα ]T [ Sα ] [ Sα ]T {g α } = [ Aα ]{g α } (5.19)
Note that [Aα] is a 6×(N+1) dimensional matrix. From equation (5.19), we can have
N +1
f α ( x0 , y 0 , t + δ t ) = Vα :1 = ∑ aα :1, j g α : j −1 (5.20)
j =1
157
where aα :1, j are the elements of the first row of the matrix [Aα], which are pre-
introduced as compared with the standard LBE. Note that the function g is evaluated at
the time level t. So, equation (5.20) is actually an explicit form to update the
distribution function at the time level t + δ t for any mesh point. In the above process,
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.
For simplicity, we take the one-dimensional model to illustrate our analysis. Under this
f αeq (x, t ) − f α ( x, t )
f α ( x + eα δ t , t + δ t ) = f α (x, t ) + (5.21)
τ
∂f α ∂f δ ∂ 2 f α (eα δ t ) 2 ∂ 2 f α
2
f α ( x + eα δ t , t + δ t ) = f α ( x, t ) + δ t
+ eα δ t α + t + +
∂t ∂x 2 ∂t 2 2 ∂x 2
∂ 2 fα δ t ∂ 3 fα 3 ∂ fα
3
∂3 f ∂ 3 fα 3
eα δ t
2
+ 3 + 3eα 2 α + 3eα2 + e + ...
6 ∂t ∂x 3
α
∂t∂x ∂t ∂x ∂t∂x 2
(5.22)
∂f α δ t ∂ 2 f α 2 ∂ fα
2
∂f α ∂ 2 fα 2
f αeq − f α
δt + eα δ t + + 2eα + eα = + O( δ t )
3
∂t ∂x
2 ∂t 2
∂t∂x 2
∂x τ
158
(5.23)
Equation (5.23) will be used to analyze the TLLBM. We start with the Taylor series
expansion that truncates to the second order derivative terms. With Taylor series
∂f α (eα δ t − δx ) ∂ 2 f α f αeq ( x, t ) − f α ( x, t )
2
f α ( x + δx, t + δ t ) + (eα δ t − δx ) + = f α ( x , t ) +
∂x 2 ∂x 2 τ
(5.24)
equations. Suppose that a local mesh point xi is considered. The three equations can
be obtained by applying the Taylor series expansion at the three positions streamed
respectively from mesh points xi −1 , xi , xi +1 . Solving the three equations, we can get the
solution as
f α ( xi , t + δ t ) = aα :i g α :i (t ) + aα :i −1 g α :i −1 (t ) + aα :i +1 g α :i +1 (t ) (5.25)
f αeq ( xi , t ) − f α ( xi , t )
where g α :i (t ) = f α ( xi , t ) +
τ
(1 − ri )(1 + ri +1 ) (1 + ri +1 ) (1 − ri +1 )
aα :i = − , aα :i −1 = , aα :i +1 =
ri ri +1 ri (ri +1 + ri ) ri +1 (ri +1 + ri )
ri = ( xi − xi −1 ) /(eα δ t ) , ri +1 = ( xi +1 − xi ) /(eα δ t )
Using the second order Taylor series expansion, equation (5.25) can be reduced to
∂f α δ t2 ∂ 2 f α ∂g i (eα δ t ) 2 ∂ 2 g i
f α ( xi , t ) + δ t + = g i (t ) − e δ
α t + + O[δ t3 ] (5.26)
∂t 2 ∂t 2 ∂x 2 ∂x 2
On the other hand, from equation (5.21) and Taylor series expansion, we have
159
f αeq ( xi , t ) − f α ( xi , t )
g i (t ) = f α ( xi , t ) + = f α ( xi + eα δ t , t + δ t )
τ (5.27)
∂f ∂f
= f α ( xi , t ) + δ t α + eα δ t α + O(δ t2 )
∂t ∂x
∂g i ∂f ∂ 2 fα ∂ 2 fα
eα δ t = eα δ t α + eα δ t2 + (eα δ t ) 2 + O(δ t3 ) (5.28a)
∂x ∂x ∂t∂x ∂x 2
∂ 2 gi 2 ∂ fα
2
(eα δ t ) 2
= (eα δ t ) + O(δ t3 ) (5.28b)
∂x 2
∂x 2
Finally, by substituting equation (5.28) into equation (5.26), we obtain the same
differential equation as equation (5.23) and the truncation error has the following form
(eα δ t )3
− [ri (1 + ri +1 ) − ri +1 ] (5.29)
6
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
Next, we will consider the Taylor series expansion- and least squares- based
form. For the one-dimensional problem, the second order Taylor series expansion has
three unknowns, that is, the distribution function and its first and second order
derivatives at the mesh point xi and the time level t + δ t . As shown above, to solve for
these three unknowns, we need to have three equations, which are obtained by
applying the Taylor series expansion at three positions streamed from three mesh
160
points xi −1 , xi , xi +1 . To apply the least squares approach, the Taylor series expansion is
applied at four positions, which are streamed respectively from four mesh
shown in the previous section, by using the lease squares approach, the final equation
4
1
4 a b f α ( xi , t + δ t )
∑ g α :i + k −3
2 k =1
a 1 ∂f α ( xi , t + δ t ) 4
b c eα δ t = ∑ δ k g α :i + k −3 (5.30)
2 ∂x
4
k =1
1 1 1 ∂ 2
f ( x , t + δ )
b c d (eα δ t ) 2 α i t
∑ δ k g α :i + k −3
2
2 2 4 ∂x 2 k =1
4 4 4 4
where a = ∑ δ k , b = ∑ δ k2 , c = ∑ δ k3 , d = ∑ δ k4
k =1 k =1 k =1 k =1
eα δ t − ( xi − xi − 2 ) eα δ t − ( xi − xi −1 )
δ1 = = 1 − ri − ri −1 , δ2 = = 1 − ri
eα δ t eα δ t
eα δ t eα δt − ( xi − xi +1 )
δ3 = = 1, δ4 = = 1 + ri +1
eα δ t eα δt
f α ( xi , t + δ t ) =
1 4
[
∑ (bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) gα :i+k −3
∆ k =1
] (5.31)
∂g α :i ( xi + k −3 − xi ) 2 ∂ 2 g α :i ( xi + k −3 − xi ) 3 ∂ 3 g α :i
g α :i + k −3 = g α :i + ( xi + k −3 − xi ) + +
∂x 2 ∂x 2 6 ∂x 3
∂g (δ − 1) 2 ∂ 2 g α :i (δ k − 1) 3 3 ∂ g α :i
3
= g α :i + (δ k − 1)eα δ t α :i + k (eα δ t ) 2 + ( e δ
α t )
∂x 2 ∂x 2 6 ∂x 3
(5.32)
161
By substituting equation (5.32) into equation (5.31), we obtain
∂gα :i (e δ ) 2 ∂ 2 gα :i (eα δ t ) 3 ∂ 3 gα :i
f α ( xi , t + δ t ) = s1 gα :i + s 2 eα δ t + s3 α t + s 4 (5.33)
∂x 2 ∂x 2 2 ∂x 3
where s1 =
1 4
∑
∆ k =1
[(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) ]
s2 =
1 4
∑
∆ k =1
[ ]
(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) (δ k − 1)
s3 =
1 4
∑
∆ k =1
[ ]
(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) (δ k − 1) 2
s4 =
1 4
∑
∆ k =1
[ ]
(bc − ad )(b − aδ k ) − (b 2 − ac)(c − aδ k2 ) (δ k − 1) 3
1 4 4
s1 =
∆
(bc − ad ) ∑
k =1
(b − a δ k ) − (b 2
− ac ) ∑
k =1
(c − aδ k2 )
(5.34a)
1
[
= (bc − ad )(4b − a 2 ) − (b 2 − ac)(4c − ab) = 1
∆
]
1 4 4
s2 =
∆
(bc − ad ) ∑
k =1
( −b + (b + a )δ k − aδ 2
k ) − (b 2
− ac ) ∑
k =1
(cδ k − c − a(δ k3 − δ k2 )
=
1
∆
[
(bc − ad )(−4b + (b + a)a − ab) − (b 2 − ac)(ac − 4c − a(c − b)) = −1 ]
(5.34b)
1 4
s3 =
∆
(bc − ad ) ∑
k =1
{b(δ k2 − 2δ k + 1) − a(δ k3 − 2δ k2 + δ k )} −
4
(b 2 − ac)∑ {c(δ k2 − 2δ k + 1) − a(δ k4 − 2δ k3 + δ k2 )}
k =1
=
1
∆
[
(bc − ad ){b(b − 2a + 4) − a (c − 2b + a )} − (b 2 − ac){c(b − 2a + 4) − a(d − 2c + b)} = 1 ]
(5.34c)
162
1 4
s4 =
∆
(bc − ad ) ∑
k =1
{b(δ k2 − 2δ k + 1) − a (δ k4 − 2δ k3 + δ k2 )} −
4
(b 2 − ac)∑ {c(δ k2 − 2δ k + 1) − a (δ k5 − 2δ k4 + δ k3 )} (5.34d)
k =1
1 4
= −1 +
∆
(bc − ad ) 2
− (b 2
− ac )( c 2
− a ∑
k =1
δ k5 )
The above results show that equation (5.33) can be reduced to exactly the same
form as equation (5.26). Equation (5.26) can recover the Navier-Stokes equations with
second order of accuracy. This means that our least square-based form can also recover
the Navier-Stokes equations with the second order of accuracy, no matter whether the
Cylinder
To show the efficiency of the TLLBM for the problem with complex geometry, we
number. This problem is sketched as in Fig. 5.4. In this part, the Reynolds number
D , is selected to be 20 and 40. The far field boundary is set at 50.5 diameters away
from the center of the cylinder and a 241×181 O-type grid is used (a typical mesh is
shown in Fig. 5.5). With this grid distribution, the time step, in units of D /( 2U ∞ ) , is
equal to 0.00375, and the maximum grid stretch ratio rmax (defined as the ratio of the
maximum mesh spacing over the minimum mesh spacing) is 160.7. Three boundary
conditions are required in the simulation: One is at the cylinder surface, where a
complete half-way wall bounce back rule is used besides the non-slip boundary
163
condition; one is at central line (cut line) in the wake, where the periodic boundary
condition is imposed; the other is at far field r∞, where the infinite flow field is
approximated and the density distribution function is always set at its equilibrium
state. Initially, the flow field is assumed to be irrotational and potential. The free
stream velocity U is set to be 0.15. For convenience, all variables used in this section
u = u / c, ( x, y ) = ( x / R, y / R ) , ρ = ρ / ρ0 , t = tc / ∆ rmin (5.35)
mesh point, we only need to store 9 coefficients a1,k , k = 1,2,...,9 before Eq. (5.20) is
applied. Note that the configuration of 9 mesh points as shown in Fig. 5.6 is applied in
U∞ θ Periodic BC
x
R
Figure 5.4 A sketch of the flow past an impulsively started circular cylinder
164
Figure 5.5 Computational mesh for flow around a circular cylinder
i − 1, j + 1 i , j + 1 i + 1, j + 1
i − 1, j i, j i + 1, j
i − 1, j − 1 i, j − 1 i + 1, j − 1
Figure 5.6 Schematic plot of neighboring point distributions around the point ( i , j )
xi , j = r cos(2πξ )
y i , j = −r sin( 2πξ )
with
165
1
r = r0 + ( r∞ − r0 )1 − tan −1 [(1 − η ) tan( χ )]
χ
ξ = (i − 1) /(Imax− 1)
η = ( j − 2) /(Jmax − 2)
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.
velocity:
0 α =0
eα = (cos[(α − 1)π / 2], sin[(α − 1)π / 2]) α = 1,2,3,4
2 (cos[(α − 5)π / 2 + π / 4], sin[(α − 5)π / 2 + π / 4]) α = 5,6,7,8
Then
1 6 Re
τ= ( + 1) ───── Relxation parameter(D = 2)
2 UDδ t
c s2 = 1 / 3
subroutine comatrix
dimension amt(6,9),am(9,6),dmt(6,6),af(9),bf(9),ima(9),jma(9)
dimension cmm(9,241,181,8)
dimension x(241,181),y(241,181)
dimension uc(8),vc(8)
166
c ********* Variable illustrations*****************************
c am(6,9)---------------------------------Matrix [Sα ]
c amt(6,9)--------------------------------Transpose of Matrix [Sα ] , that is [Sα ]T
c dmt(6,6)-------------------------------- Multiplication and inverse of Matrix
c [Sα ] and [Sα ]T , that are [Sα ]T [Sα ] and
c ([S α ]T [Sα ])
−1
, respectvely
c cmm(9,241,181,8)--------------------Elements of the first row of Matrix [Aα ]
c ima(9), jma(9)-------------------------Index of the collection points used for
c calculation of f α ( x0 , y 0 , t + δ t )
c af(9),bf(9)------------------------------Variables of ∆x0 and ∆y 0 , respectively
c x(241,181),y(241,181)---------------Cartesian coordinates of xi , j , y i , j
c uc(8),vc(8)-----------------------------partcle discrete velocity components
c eαx , eαy for α = 1,L ,8
c************************************************************
do 6 k=1,Kp
do 6 i=1,Imax
do 6 j=2,Jmax-1
i1=i-1
i2=i+1
j1=j-1
j2=j+1
c--------periodic boundary condition
if(i.eq.1) i1=Imax-1
if(i.eq.im) i2=2
c-------------------------------------------
ima(1)=i
ima(2)=i1
ima(3)=i2
do 2 mi=1,3
ima(3+mi)=ima(mi)
ima(6+mi)=ima(mi)
2 continue
do 3 m=1,9
if(m.le.3) then
jma(m)=j
else if(m.gt.3.and.m.le.6) then
jma(m)=j1
else
jma(m)=j2
end if
3 continue
c
do 5 m=1,9
ik=ima(m)
jk=jma(m)
167
sx=x(ik,jk)-x(i,j)
sy=y(ik,jk)-y(i,j)
cx=uc(k)*dt
cy=vc(k)*dt
af(m)=sx+cx
bf(m)=sy+cy
am(m,1)=1.
am(m,2)=af(m)
am(m,3)=bf(m)
am(m,4)=0.5*af(m)**2
am(m,5)=0.5*bf(m)**2
am(m,6)=af(m)*bf(m)
c---------Transpose of Matrix [Sα ] , that is [Sα ]T
do 4 n=1,6
amt(n,m)=am(m,n)
4 continue
c---------------------------------------------------------
5 continue
c --------Multiplication of Matrix [Sα ] and [Sα ]T , that is [Sα ]T [Sα ]
call abmt(amt,am,dmt)
(
c------Computing the inverse of the Matrix dmt(6,6), that is [Sα ]T [Sα ] )−1
call invam(dmt)
c -----Computing the elements of Matrix [Aα ]
call mtve(i,j,k,dmt,amt)
6 continue
return
end
subroutine abmt(amt,am,dmt)
c-----------------------------------------------------------------------------------------
c This subroutine is programed to carry out the multiplication of
c Matrix [Sα ] and [Sα ]T
c------------------------------------------------------------------------------------------
dimension amt(6,9),am(9,6),dmt(6,6)
do 2 i=1,6
do 2 j=1,6
dmt(i,j)=0.0
do 1 l=1,9
dmt(i,j)=dmt(i,j)+amt(i,l)*am(l,j)
1 continue
2 continue
return
end
subroutine mtve(i,j,k,dmt,amt)
c-----------------------------------------------------------------------------------------
c This subroutine is programed to compute the elements of Matrix the
168
c ( )−1
[Aα ] and [Aα ] = [Sα ]T [Sα ] [Sα ]T
c------------------------------------------------------------------------------------------
dimension dmt(6,6),amt(6,9)
dimension cmm(9,241,181,8)
do 2 m=1,9
cmm(m,i,j,k)=0.0
do 2 l=1,6
cmm(m,i,j,k)=cmm(m,i,j,k)+dmt(1,l)*amt(l,m)
2 continue
return
end
subroutine invam(dmt)
c-----------------------------------------------------------------------------------------
c This subroutine is programed to compute the inversion of Matrix, that is
c ( )
[Sα ]T [Sα ]
−1
c------------------------------------------------------------------------------------------
dimension dmt(6,6),me(6),mf(6),c(6),b(6)
c********Variable illustration*********************
c me(6),mf(6)---------------------------One dimensional integer dimensions only used
c in this subroutine
c c(6),b(6)-------------------------------One dimensional real dimensions only used
c in this subroutine
c***********************************************
ep=1.0e-16
do 10 k=1,6
dy=0.0
do 20 i=k,6
do 20 j=k,6
if (abs(dmt(i,j)).le.abs(dy)) go to 20
dy=dmt(i,j)
i2=i
j2=j
20 continue
if (abs(dy).lt.ep) go to 32
if (i2.eq.k) go to 33
do 11 j=1,6
w=dmt(i2,j)
dmt(i2,j)=dmt(k,j)
dmt(k,j)=w
11 continue
33 if(j2.eq.k) go to 44
do 22 i=1,6
w=dmt(i,j2)
dmt(i,j2)=dmt(i,k)
dmt(i,k)=w
22 continue
44 me(k)=i2
mf(k)=j2
169
do 50 j=1,6
if (j-k) 2,3,2
3 b(j)=1./dy
c(j)=1.
go to 4
2 b(j)=-dmt(k,j)/dy
c(j)=dmt(j,k)
4 dmt(k,j)=0.
dmt(j,k)=0.
50 continue
do 40 i=1,6
do 40 j=1,6
dmt(i,j)=dmt(i,j)+c(i)*b(j)
40 continue
10 continue
do 60 l=1,6
k=6-l+1
k1=me(k)
k2=mf(k)
if (k1.eq.k) go to 70
do 55 i=1,6
w=dmt(i,k1)
dmt(i,k1)=dmt(i,k)
dmt(i,k)=w
55 continue
70 if(k2.eq.k) go to 60
do 66 j=1,6
w=dmt(k2,j)
dmt(k2,j)=dmt(k,j)
dmt(k,j)=w
66 continue
60 continue
return
32 ep=-ep
return
end
t=0
(i = 1, Imax; j = 2, Imax)
Initial density ρ
ρ i, j = 1
170
u(u,v)i , j =2 = 0 ;
u i , j ( j > 2 ) = U , vi , j ( j > 2 ) = 0
Then assuming
f1 (i,1, t = 0) = f 3 (i,3, t = 0)
f 2 (i,1, t = 0) = f 4 (i,3, t = 0)
f 3 (i,1, t = 0) = f1 (i,3, t = 0)
f 4 (i,1, t = 0) = f 2 (i,3, t = 0)
( α = 0L 8 ;i = 1, Imax)
f 5 (i,1, t = 0) = f 7 (i,3, t = 0)
f 6 (i,1, t = 0) = f 8 (i,3, t = 0)
f 7 (i,1, t = 0) = f 5 (i,3, t = 0)
f 8 (i,1, t = 0) = f 7 (i,3, t = 0)
Computational sequence
N=N+1 No
Convergence ?
YES
Calculating fαeq
OUTPUT
171
Output information in the flow fied
Time evolution of the wake length L , separation angle θ s and the drag
surface)
r∞ u r (i, j )
ψ i, j = ∫ dr u r = u cos(2π ξ ) − v sin( 2πξ )
r0 U
(i = 1,Imax; j = 2,Jmax)
∂u ∂v
ωi , j = − (i = 1,Imax; j = 2,Jmax)
∂y i , j ∂x i , j
5
L
4
Re=40
3
1 Re=20
0
0 4 8 t 12 16 20 24
Figure 5.8 Time evolution of the wake length for different Reynolds numbers (♦
172
(a) Re=20
(b) Re=40
Figure 5.9 Streamlines at the final steady state for different Reynolds numbers
References
Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid
173
Coutanceau M and Bouard R, “Experimental determination of the main features of the
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
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
Succi S, “The Lattice Boltzmann Equation for Fluid Dynamics and Beyond”,
(2000).
174
6. Application of TLLBM to
Simulate Thermal Flows
6.1 Introduction
The LBE discussed so far does not address the issue of a self-consistent coupling
between temperature dynamics and heat transfer within the fluid flow. Fully thermo-
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
isothermal models in which only the density distribution function is used. To obtain
the temperature evolution equation at the macroscopic level, additional particle speeds
are necessary and the equilibrium distribution functions must include the higher-order
velocity terms. Although this approach has been shown to be theoretically possible,
previous models suffer severe numerical instability and the temperature variation is
limited to a narrow range. Some recent works may provide new directions for this type
of approach. The second is the passive-scalar approach. It utilizes the fact that the
macroscopic temperature satisfies the same evolution equation as a passive scalar if the
viscous heat dissipation and compression work done by the pressure are negligible. In
175
a passive-scalar-based LBE thermal model, the temperature is simulated by a new
density distribution function. The main advantage of this scheme over the multi-speed
counterpart is the enhancement of the numerical stability. The third is Luo’s scheme
(Luo 1998). He suggested that the difficulty of solving thermal problems could be
overcome by going back to the Boltzmann equation for dense gases, the time-honored
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
model is to use a hybrid scheme in which the LBE flow simulation is decoupled from
conventional energy equation. The last category is the novel thermal model called the
(1998). This new scheme is based on the recent discovery that the LBE isothermal
equation in temporal, spatial and the particle velocity spaces. Following the same
evolution equation for the internal energy density distribution. This IEDDF thermal
model has proven itself to be a stable and simple thermal model, so it is widely used
currently.
176
6.2 Internal Energy Density Distribution Function (IEDDF) Thermal
Model
The IEDDF thermal model introduces an internal energy density distribution function
to simulate the temperature field. The macroscopic density and velocity fields are still
The density distribution and internal energy density distribution functions satisfy
f − f eq
∂ t f + (e • ∇ ) f = − +F (6.1)
τv
g − g eq
∂ t g + (e • ∇ )g = − − f (e − u ) • [∂ t u + (u • ∇ )u] (6.2)
τc
G • (e − u ) eq
where F = f and G is the external force acting on the unit mass.
RT
By adopting second-order integration for the above two equations, we can get
f α ( x + eα δ t , t + δ t ) − f α ( x, t ) = −
δt
τ v + 0.5δ t
[f α ( x, t ) − fαeq ( x, t )] + τ v Fα δ t
τ v + 0.5δ t
(6.3)
g α ( x + eα δ t , t + δ t ) − g α ( x, t ) = −
δt
[g α ( x, t ) − gα eq ( x, t )] − τ c fα ( x, t )qα δ t
τ c + 0.5δ t τ c + 0.5δ t
(6.4)
where
δt δ
f α = fα +
2τ v
( fα − fαeq ) − t Fα
2
δt δ
g α = gα +
2τ c
(gα − gαeq ) + t fα qα
2
177
1
qα = (eα − u ) • (− ∇p + ∇ • Π ) + (eα − u ) • ∇u
ρ
∏ = ρυ (∇u + u∇ )
G • (eα − u ) eq
Fα = fα
RT
When D2Q9 DV model is used, the equilibrium distribution functions for the density
3e • u 9(e • u )2 3u 2
fαeq = wα ρ 1 + α 2 + α 4 − 2 (6.5)
c 2c 2c
2 ρε u 2
g 0eq = − (6.6a)
3 c2
g1eq, 2,3, 4 =
ρε
1 . 5 + 1 . 5
eα • u
+ 4 . 5
(eα • u ) − 1.5 u 2
2
(6.6b)
9 c2 c4 c2
=
ρε eα • u (eα • u ) − 1.5 u 2
2
3 + 6 2 + 4.5
eq
g 5.6.7.8 (6.6c)
36 c c4 c2
where ε = RT
ρ =∑fα (6.7a)
α
ρ Gδ t
ρ u = ∑ eα f α + (6.7b)
α 2
δt
ρε = ∑ gα − ∑ fα qα (6.7c)
α 2 α
υ = τ v RT α = 2τ c RT (6.8)
178
Using the Chapman-Enskog expansion, the IEDDF thermal model can recover the
∂ t ρ + ∇ • (ρ u ) = 0 (6.9a)
TLLBM
usually not at the grid point ( x + δx ) . To solve this problem, the TLLBM technique
(Shu et al. 2001, 2002) introduced in the previous chapter can be applied to equations
(6.3) and (6.4) following the same procedure as shown in Chapter 5 for the isothermal
M
fα ( x0 , t + δ t ) = W1 = ∑ a1,k f k −1
'
(6.10a)
k =1
M
gα ( x0 , t + δ t ) = W '1 = ∑ a1,k g k −1
' '
(6.10b)
k =1
where
δt δt τ Fδ
f ' k = 1 − fα ( x k , eα , t ) + fαeq ( x k , eα , t ) + v α t
τ v + 0.5δ t τ v + 0.5δ t τ v + 0.5δ t
δt δt τ f qδ
g ' k = 1 − gα ( x k , eα , t ) + gαeq ( x k , eα , t ) − c α α t
τ c + 0.5δ t τ c + 0.5δ t τ c + 0.5δ t
179
When the same particle velocity models are chosen for the density and internal
energy density distributions, the geometric matrix A and A' are the same, which can
He (1997) is used. For the isothermal problems, the density distribution at the
where eα and e β have opposite directions. For the thermal problems, the internal
gα
neq
− eα fα
2 neq ,iso
(
= − gβ
neq 2
− eβ f β
neq ,iso
) (6.11b)
( g αneq = g α − g αeq )
Since the density distribution in the thermal model does not take into account the
temperature variation, its non-equilibrium part satisfies the boundary condition, Eq.
(6.11a) plays the role of f neq , iso in the boundary condition, Eq. (6.11b) for the internal
energy density distribution. The velocity of the wall is used when f eq for the boundary
nodes are calculated in order to enforce the no-slip boundary condition. The
temperature of the wall is also used when g eq for the boundary nodes are calculated in
order to satisfy the given temperature. For the Neumann type condition, the
the Dirichlet type condition by using the conventional second-order finite difference
180
6 2 5
fluid
3 1
7 4 8
The schematic plot of velocity directions of the nine-bit model is shown in Figure 6.1.
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
∂T
4Ti , 2 − Ti ,3 − 2∆
∂y
Ti ,1 = i ,1
(6.12)
3
where Ti ,1 is the approximate temperature on the wall; Ti , 2 and Ti ,3 are the temperatures
∂T
inside the flow domain near the wall; is the given heat flux on the wall. The
∂y i ,1
iteration is needed in order to get accurate values of the temperature on the boundary
181
At corner points, special treatment is needed. Take the left-bottom corner point
6 2 5
fluid
3 1
7 4 8
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
4 f 62, 2 − f 63,3
f 61,1 = (6.13a)
3
4 g 62, 2 − g 63,3
g 16,1 = (6.13b)
3
182
4 f 82, 2 − f 83,3
f 8
1,1
= (6.13c)
3
4 g 82, 2 − g 83,3
g 81,1 = (6.13d)
3
where fαi , j or gαi , j mean the density distribution or internal energy density distribution
The problem definition and boundary conditions are displayed in Figure 6.3. The two
the walls introduces a temperature gradient in a fluid, and the consequent density
difference induces a fluid motion, that is, convection. The top and bottom walls are
adiabatic.
∂T
u=0, v=0, =0
∂y
u=0 u=0
v=0 v=0
T=T1 T=T0
∂T
u=0, v=0, =0
∂y
183
Buoyancy force and dimensionless parameters
The Boussinesq approximation is applied to the buoyancy force term. This means
that the properties β and υ are considered as constants, the density ρ is constant, and
ρ G = ρ βg 0 (T − Tm ) j (6.14)
Tm =
(T1 + T0 ) is the average temperature, and j is the vertical direction opposite to that
2
of gravity.
Pr = υ Ra =
βg 0 ∆TL3 (6.15)
α υα
choose the value of βg 0 ∆TL . Once βg 0 ∆TL is determined, the kinetic viscosity and
thermal conductivity are determined through the two dimensionless numbers, Pr and
Ra. By using equation (6.8), two relaxation times τ υ and τ c are determined.
describing the convective heat transport. Its average in the whole flow domain and
L 1
∫ ∫ q (x, y )dxdy
L L
Nu = (6.16a)
α∆T L2
x
0 0
L 1 L
q ( x , y )dy
α∆T L ∫0 x 0
Nu = (6.16b)
184
where q x (x, y ) = uT ( x, y ) − α ∂ ( ∂x)T (x, y ) is the local heat flux in the horizontal x
direction.
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.
max (ui2, j + vi2, j ) n+1 − (ui2, j + vi2, j ) n ≤ 10 −8 , max Ti ,nj+1 − Ti ,nj ≤ 10 −8 (6.17)
where n and n +1 represent the old and new time levels, respectively.
1.Grid generation
185
Fix the value of βg 0 ∆TL based on the Rayleigh number. It is usually chosen to
be 0.1 for low Rayleigh number and 0.15 for high Rayleigh number. Then the
Then assuming
5. Iteration
t = t + δt
ρ G = ρ βg 0 (T − Tm ) j
f α ( x, t + δ t ) = f α ( x, t ) −
δt
τ v + 0.5δ t
[f α ( x, t ) − fαeq ( x, t )] + τ v Fα δ t
τ v + 0.5δ t
g α ( x, t + δ t ) = g α ( x, t ) −
δt
[g α ( x, t ) − gα eq ( x, t )] − τ c fα ( x, t )qα δ t
τ c + 0.5δ t τ c + 0.5δ t
186
M +1
fα ( x0 , t + δ t ) = W1 = ∑a
'
1,k f k −1
k =1
M +1
gα ( x0 , t + δ t ) = W '1 = ∑a
' '
1,k g k −1
k =1
ρ =∑fα
α
ρ Gδ t
ρ u = ∑ eα f α +
α 2
δt
ρε = ∑ gα − ∑ fα qα
α 2 α
5.6 Calculating the new equilibrium distribution functions for the density
187
Grid generation Calculating f eq and g eq .
Calculation of τ υ and τ c M +1
k =1
ρ = ∑α f α
Output
The following Figure 6.6 is one of the typical results obtained by the IEDDF thermal
188
We have also extended the IEDDF thermal model to be used on the three
dimensions. [Peng et al., J. Comp. Phys. 193, p260-274, 2003]. For the incompressible
flows, we proposed the simplified IEDDF thermal model which makes the
implementation easier and quicker. [Peng et al., Phys. Rev. E. 68, 026701, 2003].
References
Chen S and Doolen GD, Lattice Boltzmann Method for Fluid Flows, Annu. Rev. Fluid
He X., S. Chen, and G. D. Doolen, A novel thermal model for the lattice Boltzmann
Luo L. S., Unified theory of the lattice Boltzmann models for nonideal gases, Phys.
Pavlo P., G. Vahala and L. Vahala, Higher-order isotropic velocity grids in lattice
Shu C., Chew Y. T. and Niu X. D., “Least square-based LBM: A meshless Approach
for simulation of flows with complex geometry”, Phys. Rev. E., 64, P045701-1,
2001.
189
Shu C., Niu X.D. and Chew Y. T., “Taylor series expansion- and least square-based
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.
(2000).
Zou Q and He X, “On pressure and velocity boundary conditions for the lattice
190