Professional Documents
Culture Documents
Chapter 11e
Chapter 11e
Unstructured Grids
Ibrahim Sezai
Department of Mechanical Engineering
Eastern Mediterranean University
Fall 2015-2016
Introduction
When the solution domain is not rectangular Cartesian grids
cannot be used.
When the boundary does not coincide with the co-ordinate
lines we can use stepwise approximation near the boundary.
1
Body fitted grids
CFD methods for complex geometries:
1. Structured curvilinear grids (body fitted grids)
2. Unstructured grids
Structured curvilinear grids are based on mapping of the
flow domain onto a computational domain.
It is very difficult to find viable mappings when the
geometry is complex.
In such cases the domain may be sub-divided into several
sub-regions or blocks. Block structured grids.
For the most complex geometries unstructured grids are
used.
Most commercial packages use unstructured grids.
ME555 : Computational Fluid Dynamics 3 I. Sezai – Eastern Mediterranean University
An example of an
orthogonal curvilinear mesh
for calculating flow around
an aerofoil
Use of a non-orthogonal
body-fitted grid
arrangement for the
prediction of flow over
a half-cylinder
2
Cartesian vs. curvilinear grids
Flow over a heat
exchanger tube bank Body fitted grids give
(only a part shown) better results with no
waste of grids
(a) Cartesian grid using an approximated (a) Non-orthogonal body-fitted grid for the
profile to represent cylindrical surfaces; same problem;
(b) predicted flow pattern using a 40 X 15 (b) predicted flow pattern using a 40 X 15
Cartesian grid structured body-fitted grid
ME555 : Computational Fluid Dynamics 5 I. Sezai – Eastern Mediterranean University
( υ)
y-momentum J
t
Uυ Jg 11υ
Vυ Jg 22 υ (11.3)
p p
x x Jg 12 υ Jg 12 υ JS υ
g12 ( x x y y ) / J 2 η
g ( x y ) / J
11 2 2 2
Metric coefficients
g 22 ( x2 y2 ) / J 2
Jacobian of transformation J x y x y
ξ
Contravariant velocities U y u x υ V x υ y u
ME555 : Computational Fluid Dynamics 6 I. Sezai – Eastern Mediterranean University
3
Curvilinear grids - difficulties
Body-fitted grids are structured, so grid refinement
is generally not local.
Mapping of physical
geometry to
computational (a) physical grid in x-y co-ordinates
geometry in
structured meshes.
4
Curvilinear grids - difficulties
For complex geometries structured grid generation may be
very difficult resulting in skewed cells, which can lead to
stability problems for CFD solvers.
5
Block-structured grids
In block-structured grids the domain is sub-divided into
regions, each of which has a structured mesh.
Such meshes are more flexible than (single block)
structured meshes.
The block structured approach allows the use of fine grids
in regions where greater resolution is required.
Block-structured grids
6
Unstructured grids
There is no implicit structure of co-ordinate lines in
unstructured grids.
The mesh can easily be concentrated where necessary
without wasting computer storage.
Control volumes can be of any shape.
Unstructured grids
A mixture of different cell shapes can be used.
7
Discretisation in unstructured grids
There are two ways of defining CV’s in
unstructured grids:
1. Cell-centered control volumes
2. Vertex-centered control volumes.
8
Discretisation in unstructured grids
Application of Gauss’ divergence theorem to equation (11.4) gives
dV n ( v )dA n ( grad )dA s dV (11.7)
t CV A A CV
dV ( v ) dA ( grad ) dA s dV (11.8)
t CV
A
A
CV
Transient term Convection term Diffusion term Source term
Transient term
Using first order time derivative,
( V ) P ( V )oP
dV
N2
f2
t CV t N1
N3 P f1
f3
time.
Cell volume VP can be calculated by applying Gauss theorem on the
identity 1 = div(xi):
V dV div( xi )dV xi ndA x f Afx (11.9)
V V A
f
f → refers to cell faces. For the cell of node P the summation is
over the faces f1, f2, f3 and f4.
Afx x-component of the cell face surface vector.
xf = x-component of the position vector of the center of face f
ME555 : Computational Fluid Dynamics 18 I. Sezai – Eastern Mediterranean University
9
Volumes and surface areas
A f Af n Afx i Afy j Afz k (11.10)
Instead of xi, one can also use yj or zk, that is:
V y f Afy z f Afz (11.11)
f f
Surface areas
A1
Consider the cell of node P. Let the top v4 v3
surface be f1 with vertices v1,v2,v3,v4,v5.
v5
f1
Calculation of area of surface f1: v2
10
The cell face center can be found by averaging the
coordinates of the vertices of the face.
Nv
1
( xc ) f
Nv
x
i 1
i
(11.13)
Nv
1
( yc ) f
Nv
y
i 1
i
(11.14)
Nv
1
( zc ) f
Nv
z
i 1
i (11.15)
Diffusion term
The diffusion term is approximated as
( grad ) dA f f .A f
N2
(11.17) f2
N1
A f nb ( P ) N3 P f1
f3
where the summation is over the faces of a
cell. (over the faces f1, f2, f4, f4 for cell P in f4
N4
the figure).
Define: PN = rN – rP (11.18)
Af
rP , rN: position vector of
centroids of cells P and N et n
ePN θ
ePN : unit vector along line PN P f PN N
n: unit normal vector of surface f
Af: surface area vector
We wish to approximate the diffusive flux D f f f A f at the
surface
ME555 : Computational Fluid Dynamics 22 I. Sezai – Eastern Mediterranean University
11
Diffusion term
The gradient expression should involve Af
At
Diffusion term
Several options can be used in defining the direction of At.
Af Af Af
At At At
et n et n et n
ePN θ ePN θ ePN θ
P f N Ad P f N Ad P f N Ad
12
Diffusion term
Substituting the terms in Eq.(11.28) for the overrelaxed approach into Eq. (11. 23)
P
f .A f Ad N f .A t (11.29)
d PN
non-orthogonal
orthogonal term (cross diffusion) term
Af Af
where Ad A d A t A f Ad e PN
A f e PN
The overbar term in Eq. (11.29) is obtained via linear interpolation from the
adjacent nodal values:
13
Diffusion term
Orthogonal term is treated implicitly, whereas the cross
diffusion term is treated as a source term in a deferred
correction approach.
Overrelaxed approach (method (c)) is preferred, because
the coefficient of the implicit term is greater than that of
methods (a) and (b), and it increases with the skew angle θ.
Thus, the diagonal dominance of the coefficient matrix is
enhanced.
Ad f .A t
d PN
using P ' P P PP ', N ' N N NN ', NN ' PP '
N P (N P ) PP '
f .A f Ad f .A t Ad (11.34)
d d PN
PN
orthogonal term non-orthogonal
(cross diffusion term)
fο f Af Ad
where PP ' f1f et , sin = f1f fo f ,
f1 f Ad Af
Ad Af Af
fo f Pf Pfo Pf (Pf e PN )ePN ,
d PN A f PN
ME555 : Computational Fluid Dynamics 28 I. Sezai – Eastern Mediterranean University
14
Calculation of Gradients
Calculation of Gradient at Nodal Points
An expression is required to calculate gradient at points P and N in equation
(11.29). One popular method is to use Gauss’ rule as:
nf
1 1 1
P v
V V s
dV dA V f 1
f Af (11.31)
f2
N2
P
where f is calculated from N3 f1
N1
P
f3 rNf
f f f fof
o o
(11.32) rPf
f4
where
Pf e PN N4
f (1 f P )P f PN , fP
PN PN
o 1/2
fo (1 f P )P f P N f
P N
fof Pf Pfo Pf (Pf e PN )e PN
ePN f
o
An iterative process is required to calculate gradients:
Step 1: Calculate gradient from Eq. (11.31)
Step 2: Calculate f from Eq. (11.32)
Step 3: Repeat steps 1 and 2 until convergence. (4-5 repetitions required )
ME555 : Computational Fluid Dynamics 29 I. Sezai – Eastern Mediterranean University
15
Diffusion source term
However, sometimes μ may be a function of temperature. Morever, in the momentum
equations of turbulence models, μ is replaced by (μ + μt), where μt is the turbulent
viscosity, which is not constant at all. For those cases, sMx will not be zero.
The source term sMx can be expressed in vector form as
sMx div( gradu i ) div( x u)
where x is the x-component of the gradient operator i j k
and u ui vj wk is the velocity vector. x y z
Integrating over the control volume gives:
Sudiff div( u)dV ( u) ndA ( x u ) f Afx ( x v) f Afy ( x w) f Afz
x x
CV S f nb ( P )
Similarly, the corresponding terms for the y- and z-momentum equations are
Svdiff div( u)dV ( u) ndA ( y u ) f Afx ( y v) f Afy ( y w) f Afz
y y
CV S f nb ( P )
Convection term
The convection term is approximated as
n fP n fP N2
( v) dA ( v A) f f m f f
f2
(11.33) N1
A f 1 f 1 N3 P f1
f3
nfP: number of faces of cell P, (faces f1, f2, f3, f4 for cell f4
P in the figure). N4
( v ) d A Ffc f 1
(11.35)
A
16
Calculation of scalar f for Convection Terms
a) First order methods
1) Upwind difference method (UD)
f P for m f 0
(11.36)
f N for m f 0
The convective flux for the upwind difference method can be written
as
N1
f1
LUD formulation along a line in 1-D is: N3
f3 P
rPf
rNf
P U 1
f Uf x
f4
x 2
N4
17
Method of Deferred Correction
The convection term Ff m f f for high order methods at the cell faces is
implemented as the sum of the upwind value and other higher order terms which are
evaluated at the previous iteration:
Ff FfU ( FfH FfU )old (11.40)
Subscript U → refers to upwind (φcalculated using first order upwind method)
Subscript H → refers to a high order method such as CD or LUD.
Substituting FfU from Eqn. (11.37) into Eqn. (11.40)
old
Ff max(m f , 0.)P min(m f , 0.)N m f fH max(m f , 0.)P min(m f , 0.)N
Then, convection term in Eqn. (11.35) becomes
n f ( P) n f ( P)
( v) dA max(m
f 1
, 0.)P min(m f , 0.)N
f 1
f
A
implicit implicit
old
n f ( P)
m f fH max(m f , 0.)P min(m f , 0.)N
f 1
explicit
Source term
Source term in Eq. (11.8) is discretized as
s dV sV
CV
P p P )VP
( sceqn s eqn
p
(11.41)
18
Substituting the discretized forms of the transient, convection and diffusion terms
into the general equation (11.8)
(11.44)
P0VP
S trans aPoPo , aPo
t
nf (P)
n 1
S dc
m f max( m f , 0.)P min(m f , 0.)N
H
f
f 1
n 1
n f (P)
(N P ) PP '
f .A t f
d PN
Ad ,
(11.46)
f 1 f
nf
(p ) P VP p f A f
x x
for x -momentum equation
f 1
S pres nf
(p ) y V p A y
P P f f for y -momentum equation
f 1
A A A Af Af Af
PP ' f1f et , f1f fof d , fof Pf Pfo Pf ( Pf e PN )e PN , d f , A t A f Ad e PN , Ad A d
Af d PN A f PN A f e PN
19
For a degree of implicitness θ, Equation (11.44) can be written in the form of
aP P
N nb( P)
aNN S 1 for fully implicit, 0.5 for Crank-Nicolson, 0 for explicit scheme
S sceqnVP S trans S dc S pres +S imp (source in d.e. + transient + deferred correction + pressure + degree of implicitness) terms
f Ad PVP
aN
d PN
min m f , 0 , aP
N nb ( P )
aN
t
s eqn
p VP ,
P0VP
S trans aPoPo , aPo
t
nf (P)
n 1
S dc m f fH max( m f , 0.)P min(m f , 0.)N
f 1
n 1
n f (P)
(N P ) PP '
f .A t f
d PN
Ad ,
f 1 f
nf
(p ) P VP p f A f
x x
for x-momentum equation
f 1
S pres
nf
(p ) y V p A y
P P f f for y -momentum equation
f 1
20
MIM method
To find mf in Eq.(11.34), velocity vector vf at cell faces are calculated using the
momentum interpolation method (MIM) originally proposed by Rhie and Chow.
Rewriting the momentum
u
equations for a 2D flow in the form of Eq. (11.45)
aP
uP
N nb ( P )
aNu u N bPu V (p ) P .i
(11.49)
v
a (11.50)
P
vP
N nb ( P )
aNv vN bPv V (p ) P .j
Where, b is the source terms excluding pressure source. Above Eqns can be written as,
u P H [u ]P D[u ]P 0 (p ) P i
(11.51)
v
P H [ v ] P 0 D[v]P (p ) P j
where
N nb ( P )
aN N bP
V (11.52)
H [ ]P D[ ]P
aP / aP /
Defining the vector forms of the above operators as
H [u ] P D[u ]P 0 (P) P i (P ) Px
H[ v ]P DP
D[v]P
(P) P y (11.53)
H [ v ]P 0 (P) P j (P ) P
For point P, the momentum equation in vector form becomes
v P H[ v ]P D P (p ) P (11.54)
ME555 : Computational Fluid Dynamics 41 I. Sezai – Eastern Mediterranean University
MIM method
Similarly, for point N
v N H[ v]N D N (p) N
Eq. (11.54) can be written at the cell face f as
v f H f D f (p) f (11.55)
Assuming that the term Hf can be approximated by using an interpolation between
points P and N, that is
Hf Hf
where the overbar indicates linear average between point P and N. Then, Eq. (11.55)
becomes
v f H f D f (p) f (11.56)
21
Mass flow rate
where v f (1 f P ) v P f P v N
D f (1 f P )D P f P D N
p f (1 f P )(p) P f P (p) N
Df Df
where, fP is the geometric interpolation factor defined as
Pf Pf e PN Pf e PN
fP or preferably: f P
PN PN
1/2
PN PN
A more accurate interpolated value can be found using Eqn. (11.32).
Substituting eq (11.58) into eq (11.56)
v f v f D f (p ) f D f p f (11.59)
Mass flow rate: m f ( v A) f
Substituting Eq. (11.59) for vf :
m f f v f A f f D f p f A f f D f (p ) f A f (11.60)
22
SIMPLE Algorithm
Consider the momentum equations in Eq. (11.56) rewritten at the face f as
v f H[ v] f D f (p) f (11.64)
Let p', u', v' be the correction needed to correct the guessed pressure and velocity
fields, i.e.
p p * p and v v * v (11.65)
v*f H[ v* ] f D f (p* ) f
(11.66)
SIMPLE Algorithm
In SIMPLE method the second term on the left hand side of Eq. (11.67) is neglected.
Then, Eq. (11.67) becomes
vf D f pf (11.68)
The discretized continuity equation is
( P Po )
VP m f 0 where m f v f A f (11.69)
t f nb ( P )
( P Po )
or VP m *f m f 0 (11.70)
t f nb ( P ) f nb ( P )
where m f ( v) f A f
23
SIMPLE Algorithm
The term pf .A f is discretized using Eq. (11.34)
(D f A f ) A f (D f A f ) A f
m f f
A f PN
( pN pP ) f D f p .( At ) f f
f A f PN
(pN pP ) PP '
(11.73)
Substituting Eq. (11.73) into Eq. (11.70) , the continuity equation becomes
(D f A f ) A f ( P Po )
f nb ( P )
f
A f PN
( pN pP )
f nb ( P )
m *f
t f nb ( P )
f
VP f D f p .( A t ) f (11.74)
(D f A f ) A f
f nb ( P )
f
A f PN
(pN pP ) PP '
SIMPLE Algorithm
The pressure correction equation (11.74) can be written as:
aPp pP
N nb ( P )
aNp pN bPp (11.77)
(D f A f ) A f
aNp f
A f PN
p
a
P
N nb ( P )
aNp
( P Po )
bPp VP m *f f D f pf ( A t ) f
t f nb ( P ) f nb ( P )
(D f A f ) A f
f nb ( P )
f
A f PN
(pN pP ) PP '
The last term on the right hand side of bP term can be neglected.
Du 0
Df f (11.78)
0 D vf
24
SIMPLE Algorithm
From Eq. (11.73), the mass correction is
m f aNp ' ( pN pP ) f D f p .( At ) f aNp ' (pN pP ) PP '
f
(11.79)
After solving the p' field from Eq. (11.77) the mass flow rate at the surfaces are
corrected by using Eq. (11.79)
m f m *f aNp ( pN pP ) f D f pf ( At ) f aNp ' (pN pP ) PP ' (11.80)
SIMPLE Algorithm
Step 1: Solve the discretized transport equation (11.47) for = u and = v
aP aP
P
N nb ( P )
aN N S (1 )
P
n 1
Step 2: Calculate mass flow rate at cell faces (Eqn. (11.63))
m f f v f A f f D f (p) f A f aNp ' pN pP f (D f p f ) ( A t ) f aNp ' (pN pP ) PP '
25
Modifications to original MIM method
In the original MIM method proposed by Rhie and Chow, using equations (11.56-
11.57) for the face values Hf and Df , makes the solution to depend on the relaxation
parameter α as well as the time step size Δt. To overcome this, Eqns (11.49-11.50)
are written as (Bo Yu et al. , Numer. Heat Transf., Part B, v42, pp. 141-166, 2002) :
vP HP VP (p ) P (1 ) v nP1 aPo v oP VP (sbody ) P
aP aP aP
where (a)
H P a P1 a N v N (Sbc ) P (S dc ) P
N nb ( P )
Note that the source terms resulting from relaxation, unsteady term and body forces
has been separated from H term. Sbc is the source due to boundary conditions.
The corresponding equation at the face is
(b)
v f H f V f (p ) f (1 ) v nf 1 ( aPo ) f v of V f (sbody ) f
af af af
or
v f H f D f (p ) f (1 ) v nf 1 ( aPo ) f v of D f (sbody ) f
af (c)
Following the procedure as in Rhie and Chow method, the face velocity can be
expressed as
v f v f D f (p) f D f (p ) f
(d)
(1 ) v nf 1 v nf 1
(a f ) 1 (aPo ) f v of (aPo ) f v of
D f (sbody ) f D f (sbody ) f
where
1 1 1
(1 f P ) f P
af aP aN
VP
aPo
t
ME555 : Computational Fluid Dynamics 52 I. Sezai – Eastern Mediterranean University
26
Modifications to original MIM method
Then, using Eqn. (d), mass flow rate through face f can be written as
n 1 f v nf 1 A f
f (1 ) m f
m f m RC
f (D f A f ) A f o
t A f A f
m f f (a f ) 1 (aPo ) f v of A f (e)
f D f (sbody ) f D f (sbody ) f A f
where
m RC
f = mass flow rate calculated from Eqn. (11.63) using Rhie-Chow method.
m of = mass flow rate at face f during previous time step.
m nf 1= mass flow rate at face f during previous iteration step.
n 1
f is used during the current iteration so that no extra storage is
Note that m
needed for m nf 1 . However, storage is needed for m of .
ME555 : Computational Fluid Dynamics 53 I. Sezai – Eastern Mediterranean University
The use of the neighboring cell source values for the estimation of (sc)f, is expected
to circumvent the convergence difficulties encountered in flows with large source
terms.
It should be noted that Eqn. (d) is equivalent to Eqn. (c). However, Eqn (d) may be
preferred since extra storage is required for Hf in Eqn (c).
27
Gradient reconstruction using Least-Squares method
One popular method for calculating the gradient at points P and N is
to use Gauss’ method given by Eqn’s (11.31-11.32). Another possible
way is to use least-squares method.
Consider a control volume and its neighbors:
i 0 ( xi x0 ) ( yi y0 )
x
0 y 0
or
i 0 xi yi
x 0 y 0
where i → 1, 2, 3, 4,…, or A, B, C, D,...
For each node around “0” (0 →P) we have
1 0 x1 y1
x 0 y 0
2 0 x2 y2
x 0 y 0
3 0 x3 y3
x
0 y 0
N 0 xN y N
x 0 y 0
28
x1 y1 1 0
x
2 y2 2 0
x 0
x3 y3 3 0
: : :
y 0
xN yN N 0
A T AX A T B
or
a11 a12 x 0 b1
a
a22 b2
21
AT A
y 0 ATB
where X
It can be observed that the matrix ATA is a 2×2 matrix which can be
easily inverted to solve for X, i.e.
X ( A T A) 1 A T B
For 3D problems, X=[(∂/∂x)0, (∂/∂y)0, (∂/∂z)0] and ATA is a 3×3
matrix.
29
Performing the inversion we obtain
NB (0) x
C j ( j 0 )
0
x x 0 j 1
NB (0) y
y
0
y
( )0 C j ( j 0 )
0 j 1
z
0
NB (0)
C j ( j 0 )
z 0 j 1
z
where the C terms are
r12
C jx j ,1 j ,2 j ,3
r11
r23
C jy j ,2 j ,3
r22
C jz j ,3
and x j 1 r12
j ,1 , j ,2 y j x j
r112 r222 r11
1 r23 r12 r23 r13 r22
j ,3 z j y j x j ,
r332 r22 r11r22
and NB (0)
1 NB (0)
x x y
2
r11 j , r12 j j
j 1 r11 j 1
NB (0) NB (0)
1
x z , y
2
r13 j j r22 j r122
r11 j 1 j 1
NB (0) NB (0)
1
y z r z
2
r23 j j 12 13r , r33 j ( r132 r232 )
r22 j 1 j 1
30
Gradient reconstruction using Least-Squares with weighting coefficients
In the above least-squares method each neighbor node contributes
equally to the gradient reconstruction irrespective of its distance to the
central point P.
The accuracy of the method may detorriate on highly distorted
meshes.
It is possible to give different weights to the contribution of each
neighbor node to gradient reconstruction. This yield the following set
of equations for 2D problems:
w1x1 w1y1 w1 (1 0 )
w x w2 y2 w ( )
2 2 x 0 2 2 0
w3x3 w3 y3 w ( )
3 3 0
: : :
wN xN y 0
wN y N wN (N 0 )
NB (0) x
C j w j ( j 0 )
0
x x 0 j 1
NB (0)
( )0 y C jy w j ( j 0 )
0
y 0 j 1
z
0
NB (0)
C jz w j ( j 0 )
z 0 j 1
31
where the C terms are the same as that of the unweighted method:
r12 r23
C jx j ,1 j ,2 j ,3 , C jy j ,2 j ,3 , C jz j ,3
r11 r22
The α and r terms are
w j x j 1 r
j ,1 2
, j ,2 2
w j y j 12 w j x j
r 11 r22 r11
1 r23 r12 r23 r13 r22
j ,3 w j z j w j y j w j x j ,
r332 r22 r11r22
NB (0) NB (0)
1
w x w x w y
2
r11 j j , r12 j j j j
j 1 r11 j 1
NB (0) NB (0)
1
w x w z , w y
2
r13 j j j j r22 j j r122
r11 j 1 j 1
NB (0) NB (0)
1
w y w z r w z
2
r23 j j j j r ,
12 13 r33 j j (r132 r232 )
r22 j 1 j 1
2
where P W w e
r WW W P E EE
E P ve
f4
32
TVD Schemes in Unstructured Grids : 1) Flux Limiters
Since the index based notation used above is not suitable for unstructured grids, a more
appropriate notation proposed by Darwish and Moukalled (2003) will be adopted.
(N)
U: upwind node around face f
f
N2
(P)
v
D D: downwind node around face f
f2 U
N1 UU: (virtual) upwind node far
N3 P f1
UU
upstream
f3
(N)
f UU
f4 (P) U
N4 D v Locate UU such that r(UU)D = 2rUD
Exact r Formulation
Returning to the definition of r:
U UU D (U UU ) D (D UU ) (D U ) (11.86)
rf
D U D U D U
Note that D and U are the nodes straddling the interface and thus are readily available.
For node UU we can write:
(D UU ) U r(UU ) D (2U rUD ) (11.87)
since r(UU)D = 2rUD (U is at the center of the (UU)D segment). Other positions of UU
could also be chosen but with a loss of accuracy as the nodal gradient yields a second
order accuracy only when the difference is centered at U.
The formulation of rf becomes
(2U rUD ) (D U ) (2U rUD ) (11.88)
rf 1
D U D U
After calculating rf from Eq. (11.88) find ψ(rf) from a TVD scheme (chapter 5) and
then calculate f from Eq. (11.84).
ME555 : Computational Fluid Dynamics 66 I. Sezai – Eastern Mediterranean University
33
Exact r Formulation
Note that this r-formulation can also be used for any high order
scheme without TVD. For example for QUICK scheme:
ψ(rf) = 0.25rf + 0.75
34
Using the limited gradient , then the value of at any cell face is
found from
f P P rPf (11.91)
where rPf is the position vector from P to the face center f.
Point f is called the reconstruction point. (f is reconstructed from its
gradient at P)
However it should be noted that reconstruction points may also be
chosen to be the vertices of the face, which is common in vertex-based
unstructured grid methods.
The advantage of gradient limiters over the flux limiters is that, not
only the convection fluxes, but diffusion fluxes are also limited, since
these fluxes contain gradients of .
max max(P , N ), i 1, n
i
min min(P , N ), i 1, n
i
35
3) Compute a maximum allowable value of fi for each face i of CV:
fi min(1, yi )
4) Select
BJ min( fi ), i 1, n (11.94)
for the node P, where n number of faces of the CV
That is, the gradient limiter of Barth-Jespersen, BJ, is defined as the
minimum of all the neighboring face limiters fi.
A compact formulation of Barth-Jespersen’s limiter is given by Wang
(1998) as
max min Ni P
min 1, , (11.95)
Ni P i 1, n i 1, n
BJ
max fi P min fi P
i 1, n i 1, n
36
fi
37
Limiter of Michalac and Ollivier-Gooch
Venkatakrishnan’s limiter does not provide sufficient accuracy even
in smooth regions without any local extrema.
While the Barth-Jespersen limiter does satisfy these conditions,
convergence to steady state solution is difficult due to lack of
differentiability of min(1, y).
Michalac and Olliver-Gooch (2008) proposed a new approximation
for min(1, y) in the limiter function of Barth-Jespersen that will be
monotone and differentiable:
P ( y ) y yt (11.99)
fi
1 y yt
where 1 < yt < 2 is a threshold and P(y) is a polynomial satisfying
P 0 0, P y 1
t
dP dP
1, 0
dy 0 dy yt
The resulting limiters for yt = 1.5, 1.75 are plotted in the above figure.
For yt = 1.5 accuracy is better. For yt = 1.75 convergence is better.
ME555 : Computational Fluid Dynamics 76 I. Sezai – Eastern Mediterranean University
38
Modifications to Limiter in uniform regions
In regions of flow which are nearly uniform, extrema will occur
frequently in the transient solution.
Therefore, it is desirable to switch-off the limiter in those regions.
Michalac and Ollivier-Gooch suggest to switch the limiter off when
( max min ) ( K x)3/ 2 (11.101)
To maintain differentiability, a modified limiter, BJ-mod , is proposed:
BJ mod (1 ) BJ (11.102)
where BJ is Barth-Jespersen’s limiter calculated from Eqn. (11.94)
and is 1 for ( ) 2 ( K x)3
(11.103)
s( ) for ( K x)3 ( )2 2( K x)3
0 for ( ) 2 2( K x)3
where the transition function s() is
( )2 ( K x)3
s ( ) 2 3 3 2 1, (11.104)
( K x)3
ME555 : Computational Fluid Dynamics 77 I. Sezai – Eastern Mediterranean University
s()
The transition
function s()
The transition function s() is used to smoothly disable the limiter in nearly uniform
meshes.
In this way, the cells with = 1 have new = 1.
As a result need not be calculated in nearly uniform flow regions since from
(11.102) (1 )
BJ mod BJ
39
Sensitivity of results to K
Consider transonic flow at Mach 0.8 across an airfoil shown
in the figure. (Michalac and Olliver-Gooch (2009))
The sensitivity of total pressure loss across the shock near
the leading edge of the airfoil, to the tuning parameter K, is
shown in the figure below.
40
There are also free mesh generation packages such as
GMSH
SALOME
Some of these free mesh generation packages can also import
geometry files from solid modelers.
A geometric model of the solution domain is first developed.
Then, meshes are created on this geometric model.
Salome seems to have a better GUI (graphics user interface) and is
more user friendly than GMSH for the time being (as of 2015).
The mesh file created by the mesh generator software consists of two
parts which give information for nodes and elements. That is:
1) x, y and z coordinates of each node in the mesh
2) list of nodes of each element together with its element type and
region (zone) number.
ME555 : Computational Fluid Dynamics 81 I. Sezai – Eastern Mediterranean University
Drawing 1
41
The mesh of drawing 1 created by GMSH
$Nodes $Elements
13 24
1000 1121115
24 23 2100 2121152
22 3110 3122226
9 15 4010 4122263
5 0.4999999999986718 0 0 5123337
21
6 1 0.4999999999986718 0 6123374
10 12 16 14 7 0.5000000000013305 1 0 7124448
8 0 0.5000000000013305 0 8124481
17
9 0.5013711139750536 0.4999926352623462 0 9 2 2 99 6 4 8 11
13 10 0.3339866124247404 0.3331457930147393 0 10 2 2 99 6 8 10 11
11
18 11 0.3343386761842688 0.6672116118139605 0 11 2 2 99 6 8 1 10
19 20 12 0.6682287346435727 0.6666784466453495 0 12 2 2 99 6 11 10 9
13 0.6678219567120327 0.3329201164922819 0 13 2 2 99 6 2 6 13
$EndNodes 14 2 2 99 6 6 12 13
15 2 2 99 6 6 3 12
There are 13 nodes (blue colors) and 24 elements. 16 2 2 99 6 13 12 9
17 2 2 99 6 9 10 13
First 8 elements are boundary elements (line elements, elm type = 1). 18 2 2 99 6 10 5 13
19 2 2 99 6 10 1 5
Elements 9-24 are interior elements (triangular elmnts, elm type = 2). 20 2 2 99 6 13 5 2
In nodes data: 1st column is node number, columns 2-4 are x, y, z 21 2 2 99 6 9 12 11
22 2 2 99 6 12 7 11
coordinates of nodes. 23 2 2 99 6 12 3 7
24 2 2 99 6 11 7 4
In elements data: first column is element number, column 2 → elm $EndElements
type, column 3 → number of tags, columns 4-5 → tags, (tag1 →
physical region number, tag 2 → elementary region number), the rest
of columns (columns 6-7 or 6-8) → nodes of element.
ME555 : Computational Fluid Dynamics 83 I. Sezai – Eastern Mediterranean University
42
CGNS supports eight element shapes – points, lines, triangles,
quadrangles, tetrahedra, pentahedra, pyramids, and hexahedra.
Elements describing a volume are referred to as 3-D elements.
Those defining a surface are 2-D elements.
Line and point elements are called 1-D and 0-D elements,
respectively.
In a 3-D unstructured mesh, the cells are defined using 3-D elements,
while the boundary patches may be described using 2-D elements.
Each element shape may have a different number of nodes, depending
on whether linear or quadratic interpolation is used.
Therefore the name of each type of element is composed of two parts;
the first part identifies the element shape, and the second part the
number of nodes.
43
1-D line elements
BAR_2 BAR_3
Face Definition
Oriented edge Corner nodes Mid node
E1 N1,N2 N3
TRI_3 TRI_6
Edge Definition
Oriented edges Corner nodes Mid node
E1 N1,N2 N4
E2 N2,N3 N5
E3 N3,N1 N6
Face Definition
Face Corner nodes Mid-edge nodes Oriented edges
F1 N1,N2,N3 N4,N5,N6 E1,E2,E3
N1,...,N6 Grid point identification number. Integer ≥ 0 or blank, and no two values may be
the same. Grid points N1, N2, and N3 are in consecutive order about the triangle.
E1,E2,E3 Edge identification number.
F1 Face identification number.
ME555 : Computational Fluid Dynamics 88 I. Sezai – Eastern Mediterranean University
44
Quadrilateral elements
Edge Definition
Oriented Corner nodes Mid node
edges
E1 N1,N2 N5
E2 N2,N3 N6
E3 N3,N4 N7
E4 N4,N1 N8
Face Definition
Face Corner nodes Mid-edge nodes Mid-face node Oriented edges
TETRA_4 TETRA_10
45
Pyramid elements
PYRA_14
PYRA_5
Pentahedral elements
46
Hexahedral elements
47