Professional Documents
Culture Documents
net/publication/280385280
CITATIONS READS
3 2,327
1 author:
Joel Guerrero
Università degli Studi di Genova
42 PUBLICATIONS 139 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Joel Guerrero on 29 July 2019.
4 Joel Guerrero
5 July 5, 2019
6 Contents
11 3 Turbulence Modeling 13
12 3.1 Reynolds Averaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
13 3.2 Incompressible Reynolds Averaged Navier-Stokes Equations . . . . . . . . . . . . 16
14 3.3 Boussinesq Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
15 3.4 Two-Equations Models. The κ − ω Model . . . . . . . . . . . . . . . . . . . . . . 18
1
42 Chapter 1
45 When presenting the fluid flow equations, as well as throughout this manuscript, we make use
46 of the following vector/tensor notation and mathematical operators.
47
48 From now on we are going to refer to a zero rank tensor as a scalar. A first rank tensor will
49 be referred as a vector. And a second rank tensor will associated to a tensor. Vectors will
50 be denoted by minuscule bold letters, whereas tensors by majuscule bold letters or bold greek
51 symbols. Scalars will be represented by normal letters or normal greek symbols.
52
53 Hereafter, the vector is almost always a column vector and a row vector is expressed as a
54 transpose of a column vector indicated by the superscript T . Vectors a = a1 i + a2 j + a3 k and
55 b = b1 i + b2 j + b3 k are expressed as follows
a1 b1
a = a2 , b = b2 ,
a3 b3
56 the transpose of the column vectors a and b are represented as follows
aT = [a1 , a2 , a3 ] , bT = [b1 , b2 , b3 ] ,
1 1
57 The magnitude of a vector a is defined as |a| = (a · a) 2 = (a1 2 + a2 2 + a3 2 ) 2 .
58
63 The dot product of two vectors a and b (also known as scalar product of two vectors), yields to
64 a scalar quantity and is given by
b1
aT · b = a · b = a1 , a2 , a3 b2 = a1 b1 + a2 b2 + a3 b3 .
b3
2
65 The dot product of two vectors a and b is commutative (a · b = b · a).
66
67 The cross product of two vectors a × b (also known as vector product of two vectors), is the
68 vector normal to the plane of a and b, and is defined by the determinant
i
j k a2 b3 − a3 b2
a × b = a1 a2 a3 = a3 b1 − a1 b3 ,
b1 b2 b3 a1 b2 − a2 b1
69 a × b and b × a result in two different vectors, pointing in opposite directions with the same
70 magnitude (a × b = −b × a).
71
72 The tensor product (also known as dyadic product) of two vectors a ⊗ b produces a second rank
73 tensor and is defined by
a1 a1 b1 a1 b2 a1 b3
a ⊗ b = abT = ab = a2 [b1 , b2 , b3 ] = a2 b1 a2 b2 a2 b3 ,
a3 a3 b1 a3 b2 a3 b3
74 notice that unlike the dot product, the tensor product of two vectors is non-commutative
75 (a ⊗ b 6= b ⊗ a).
76
77 The double dot product (:) of two second rank tensors A and B (also known as scalar product
78 of two second rank tensors)
A11 A12 A13 B11 B12 B13
A = A21 A22 A23 , B = B21 B22
B23 ,
A31 A32 A33 B31 B32 B33
79 produces a scalar φ = A:B, which can be evaluated as the sum of the 9 products of the tensor
80 components
81 The double dot product of two second rank tensors is commutative (A:B = B:A) .
82
83 The dot product of a tensor A and a vector a, produces a vector b = A · a, whose components
84 are
A11 a1 + A12 a2 + A13 a3
b = bi = Aij aj = A21 a1 + A22 a2 + A23 a3 .
A31 a1 + A32 a2 + A33 a3
85 The dot product of a non symmetric tensor A and a vector a is non-commutative (Aij aj 6= ai Aij ).
86 If the tensor A is symmetric then b = a · A = AT · a.
87
88 The dot product of two tensors A and B (also known as single dot product or tensor product of
89 two tensors), produces another second rank tensor C = A · B, whose components are evaluated
90 as
3
91 The dot product of two tensors is non-commutative (A · B 6= B · A).
92
93 Note that our definitions of the tensor-vector dot product and tensor-tensor dot-product are
94 consistent with the ordinary rules of matrix algebra.
95
104 The dot product of vector a and the operator ∇ is called the divergence (div) of the vector field;
105 the output of this operator is a scalar and is defined as
110 The curl operator of a vector a produces another vector. This operator is defined by
i j k
∂a3 ∂a2 ∂a1 ∂a3 ∂a2 ∂a1 T
∂ ∂ ∂
curl a = ∇ × a = = − , − , − .
∂x ∂y ∂z ∂y ∂z ∂z ∂x ∂x ∂y
a1 a2 a3
111 The divergence of the gradient is called the Laplacian operator and is denoted by ∆. The
112 Laplacian of a scalar φ(x, y, z) yields to another scalar field and is defined as
4
∂2φ ∂2φ ∂2φ
div grad φ = ∇ · ∇φ = ∇2 φ = ∆φ = + 2 + 2.
∂x2 ∂y ∂z
113 The Laplacian of a vector field a is defined as the diverge of the gradient just like in the scalar
114 case, but in this case it yields to a vector field, such that
2
∂ a1 ∂ 2 a1 ∂ 2 a1
∂x2 + ∂y 2 + ∂z 2
2
2
∂ a2 ∂ 2 a2 ∂ 2 a2
div grad a = ∇ · ∇a = ∇ a = ∆a = 2 +
2
+ .
2
∂x
2 ∂y ∂z
∂ a3 ∂ 2 a3 ∂ 2 a3
+ +
∂x2 ∂y 2 ∂z 2
115 The Laplacian transforms a tensor field into another tensor field of the same rank.
116
117 As previously discussed, a tensor is said to be symmetric if its components are symmetric about
118 the diagonal, i.e., A = AT . A tensor is said to be skew or anti-symmetric if A = −AT which
119 intuitively implies that A11 = A22 = A33 = 0. Every second rank tensor can be decomposed
120 into symmetric and skew parts by
1 1
A + AT + A − AT = symm A + skew A.
A=
|2 {z } |2 {z }
symmetric skew
125 • ∇ · ∇ × a = 0.
126 • ∇ × ∇α = 0.
5
133 • ∇ · (αa) = α∇ · a + a · ∇α.
135 • ∇ · (a × b) = b · ∇ × a − a · ∇ × b.
136 • ∇ · (a ⊗ b) = b · ∇a + a∇ · b.
140 • ∇ × (αa) = α∇ × a + ∇α × a.
144 • ab:A = a · (b · A)
145 • A:ab = (A · a) · b
146 where α and β are scalars; a, b and c are vectors; and A is a tensor.
6
147 Chapter 2
150 The starting point of any numerical simulation are the governing equations of the physics of the
151 problem to be solved. Hereafter, we present the governing equations of fluid dynamics and their
152 simplification for the case of an incompressible viscous flow.
153
154 The equations governing the motion of a fluid can be derived from the statements of the conser-
155 vation of mass, momentum, and energy [1, 2, 3]. In the most general form, the fluid motion is
156 governed by the time-dependent three-dimensional compressible Navier-Stokes system of equa-
157 tions. For a viscous Newtonian, isotropic fluid in the absence of external forces, mass diffusion,
158 finite-rate chemical reactions, and external heat addition; the conservation form of the Navier-
159 Stokes system of equations in compact differential form and in primitive variable formulation
160 (ρ, u, v, w, et ) can be written as
∂ρ
+ ∇ · (ρu) = 0,
∂t
∂ (ρu)
+ ∇ · (ρuu) = −∇p + ∇ · τ , (2.0.1)
∂t
∂ (ρet )
+ ∇ · (ρet u) = ∇ · q − ∇ · (pu) + τ :∇u,
∂t
161 where τ is the viscous stress tensor and is given by
τxx τxy τxz
τ = τyx τyy τyz . (2.0.2)
τzx τzy τzz
162 For the sake of completeness, let us recall that in the conservation form (or divergence form)
163 [4], the momentum equation can be written as
∂ (ρu)
+ ∇ · (ρuu) = −∇p + ∇ · τ , (2.0.3)
∂t
164 where the tensor product of the vectors uu in eq. 2.0.3 is equal to
2
u u uv uw
uu = v u v w = vu v 2 vw .
(2.0.4)
w wu wv w2
165 Let us recall the following identity
7
∇ · (uu) = u · ∇u + u(∇ · u), (2.0.5)
166 and from the divergence-free constraint (∇ · u = 0) it follows that u(∇ · u) is zero, therefore
167 ∇ · (uu) = u · ∇u. Henceforth, the conservation form of the momentum equation eq. 2.0.3 is
168 equivalent to
∂ (u)
ρ + u · ∇ (u) = −∇p + ∇ · τ ,
∂t
169 which is the non-conservation form or advective/convective form of the momentum equation.
170
171 The set of equations 2.0.1 can be rewritten in vector form as follows
178 The vectors ev , fv and gv contain the viscous fluxes (or diffusive fluxes) in the x, y and z
179 directions and are defined as follows
0
τxx
ev =
τxy ,
τxz
uτxx + vτxy + wτxz − qx
0
τyx
fv =
τyy ,
(2.0.9)
τyz
uτyx + vτyy + wτyz − qy
0
τzx
gv =
τzy ,
τzz
uτzx + vτzy + wτzz − qz
8
180 where the heat fluxes qx , qy and qz are given by the Fourier’s law of heat conduction as follows
∂T
qx = −k ,
∂x
∂T
qy = −k , (2.0.10)
∂y
∂T
qz = −k ,
∂z
181 and the viscous stresses τxx , τyy , τzz , τxy , τyx , τxz , τzx , τyz and τzy , are given by the following
182 relationships
2 ∂u ∂v ∂w
τxx = µ 2 − − ,
3 ∂x ∂y ∂z
2 ∂v ∂u ∂w
τyy = µ 2 − − ,
3 ∂y ∂x ∂z
2 ∂w ∂u ∂v
τzz = µ 2 − − ,
3 ∂z ∂x ∂y
(2.0.11)
∂u ∂v
τxy = τyx = µ + ,
∂y ∂x
∂u ∂w
τxz = τzx = µ + ,
∂z ∂x
∂v ∂w
τyz = τzy = µ + ,
∂z ∂y
183 In equations 2.0.9-2.0.11, T is the temperature, k is the thermal conductivity and µ is the laminar
184 viscosity. In order to derive the viscous stresses in eq. 2.0.11 the Stokes’s hypothesis was used [5].
185
186 Examining closely equations 2.0.6-2.0.11 and counting the number of equations and unknowns,
187 we clearly see that we have five equations in terms of seven unknown flow field variables u, v,
188 w, ρ, p, T , and et . It is obvious that two additional equations are required to close the system.
189 These two additional equations can be obtained by determining relationships that exist between
190 the thermodynamic variables (p, ρ, T, ei ) through the assumption of thermodynamic equilibrium.
191 Relations of this type are known as equations of state, and they provide a mathematical rela-
192 tionship between two or more state functions (thermodynamic variables). Choosing the specific
193 internal energy ei and the density ρ as the two independent thermodynamic variables, then
194 equations of state of the form
p = ρRg T, (2.0.13)
m2
198 where Rg is the specific gas constant and is equal to 287 for air. Assuming also that the
s2 K
199 working gas behaves as a calorically perfect gas (a calorically perfect gas is defined as a perfect
200 gas with constant specific heats), then the following relations hold
cp Rg γRg
ei = cv T, h = cp T, γ= , cv = , cp = , (2.0.14)
cv γ−1 γ−1
9
201 where γ is the ratio of specific heats and is equal to 1.4 for air, cv the specific heat at constant
202 volume, cp the specific heat at constant pressure and h is the enthalpy. By using eq. 2.0.13 and
203 eq. 2.0.14, we obtain the following relations for pressure p and temperature T in the form of eq.
204 2.0.12
p (γ − 1) ei
p = (γ − 1) ρei , T = = , (2.0.15)
ρRg Rg
205 where the specific internal energy per unit mass ei = p/(γ − 1)ρ is related to the total energy
206 per unit mass et by the following relationship,
1 2
u + v 2 + w2 .
et = ei + (2.0.16)
2
207 In our discussion, it is also necessary to relate the transport properties (µ, k) to the thermody-
208 namic variables. Then, the laminar viscosity µ is computed using Sutherland’s formula
3
C1 T 2
µ= , (2.0.17)
(T + C2 )
209 where for the case of the air, the constants are C1 = 1.458 × 10−6 mskg
√
K
and C2 = 110.4K.
210
211 The thermal conductivity, k, of the fluid is determined from the Prandtl number (P r = 0.72 for air)
212 which in general is assumed to be constant and is equal to
cp µ
k=
, (2.0.18)
Pr
213 where cp and µ are given by equations eq. 2.0.14 and eq. 2.0.17 respectively.
214
215 When dealing with high speed compressible flows, it is also useful to introduce the Mach number.
216 The mach number is a non dimensional parameter that measures the speed of the gas motion
217 in relation to the speed of sound a,
1 r
∂p 2 p p
a= = γ = γRg T . (2.0.19)
∂ρ S ρ
218 Then the Mach number M∞ is given by,
U∞ U∞ U∞
M∞ = =p =p (2.0.20)
a γ(p/ρ) γRg T
219 Another useful non dimensional quantity is the Reynold’s number, this quantity represents the
220 ratio of inertia forces to viscous forces and is given by,
ρ∞ U∞ L
Re = , (2.0.21)
µ∞
221 where the subscript ∞ denotes freestream conditions, L is a reference length (such as the chord
222 of an airfoil or the length of a vehicle), and µ∞ is computed using the freestream temperature
223 T∞ according to eq 2.0.17.
224
225 The first row in eq. 2.0.6 corresponds to the continuity equation. Likewise, the second, third
226 and fourth rows are the momentum equations, while the fifth row is the energy equation in terms
227 of total energy per unit mass.
228
229 The Navier-Stokes system of equations 2.0.6-2.0.9, is a coupled system of nonlinear partial differ-
230 ential equations (PDE), and hence is very difficult to solve analytically. In fact, to the date there
10
231 is no general closed-form solution to this system of equations; hence we look for an approximate
232 solution of this system of equation in a given domain D with prescribed boundary conditions
233 ∂D and given initial conditions Dq̊.
234
235 If in eq. 2.0.6 we set the viscous fluxes ev = 0, fv = 0 and gv = 0, we get the Euler system of
236 equations, which governs inviscid fluid flow. The Euler system of equations is a set of hyperbolic
237 equations while the Navier-Stokes system of equations is a mixed set of hyperbolic (in the inviscid
238 region) and parabolic (in the viscous region) equations. Therefore, time marching algorithms
239 are used to advance the solution in time using discrete time steps.
∇ · (u) = 0,
∂u −∇p (2.1.1)
+ ∇ · (uu) = + ν∇2 u,
∂t ρ
249 where ν is the kinematic viscosity and is equal ν = µ/ρ. The previous set of equations in
250 expanded three-dimensional Cartesian coordinates is written as follows
∂u ∂v ∂w
+ + = 0,
∂x ∂y ∂z
2
2
∂ u ∂2u ∂2u
∂u ∂u ∂uv ∂uw 1 ∂p
+ + + =− +ν + + ,
∂t ∂x ∂y ∂z ρ ∂x ∂x2 ∂y 2 ∂z 2
2
2
∂2v ∂2v
∂v ∂uv ∂v ∂vw 1 ∂p ∂ v (2.1.2)
+ + + =− +ν + + ,
∂t ∂x ∂y ∂z ρ ∂x ∂x2 ∂y 2 ∂z 2
∂w ∂uw ∂vw ∂w2
2
∂ w ∂2w ∂2w
1 ∂p
+ + + =− +ν + + .
∂t ∂x ∂y ∂z ρ ∂x ∂x2 ∂y 2 ∂z 2
251 Equation 2.1.2 governs the unsteady three-dimensional motion of a viscous, incompressible and
252 isothermal flow. This simplification is generally not of a great value, as the equations are
253 hardly any simpler to solve. However, the computing effort may be much smaller than for the
254 full equations (due to the reduction of the unknowns and the fact that the energy equation is
255 decoupled from the system of equation), which is a justification for such a simplification. The
256 set of equations 2.1.1 can be rewritten in vector form as follow
11
0
u
q=
v ,
(2.1.4)
w
258 and ei , fi and gi are the vectors containing the inviscid fluxes (or convective fluxes) in the x, y
259 and z directions and are given by
u v w
u2 + p vu wu
ei = uv ,
fi =
v 2 + p ,
gi =
wv .
(2.1.5)
uw vw w2 + p
260 The viscous fluxes (or diffusive fluxes) in the x, y and z directions, ev , fv and gv respectively,
261 are defined as follows
0 0 0
τxx τyx τzx
ev = τxy ,
τyy ,
fv = gv = τzy .
(2.1.6)
τxz τyz τzz
262 Since we made the assumptions of an incompressible flow, appropriate expressions for shear
263 stresses must be used, these expressions are given as follows
∂u
τxx = 2µ ,
∂x
∂v
τyy = 2µ ,
∂y
∂w
τzz = 2µ ,
∂z
∂u ∂v
(2.1.7)
τxy = τyx = µ + ,
∂y ∂x
∂w ∂u
τxz = τzx = µ + ,
∂x ∂z
∂w ∂v
τyz = τzy = µ + ,
∂y ∂z
264 where we used Stokes’s hypothesis [5] in order to derive the viscous stresses in eq. 2.1.7.
265
Equation 2.1.7 can be written in compact vector form as τ = 2µD, where D = 12 ∇u + ∇uT
266
267 is the symmetric tensor of the velocity gradient tensor ∇u = [D + S], and where D represents
268 the strain-rate tensor and S represents the spin tensor (vorticity). The skew or anti-symmetric
269 part of the velocity gradient tensor is given by S = 12 ∇u − ∇uT .
270
271 Equations 2.1.3-2.1.6, are the governing equations of an incompressible, isothermal, viscous flow
272 written in conservation form. Hence, we look for an approximate solution of this set of equations
273 in a given domain D with prescribed boundary conditions ∂D and given initial conditions Dq̊.
12
274 Chapter 3
276 All flows encountered in engineering applications, from simple ones to complex three-dimensional
277 ones, become unstable above a certain Reynolds number (Re = U L/ν where U and L are char-
278 acteristic velocity and length scales of the mean flow and ν is the kinematic viscosity). At low
279 Reynolds numbers flows are laminar, but as we increase the Reynolds number, flows are observed
280 to become turbulent. Turbulent flows are characterize by a chaotic and random state of motion
281 in which the velocity and pressure change continuously on a broad range of time and length
282 scales (from the smallest turbulent eddies characterized by Kolmogorov micro-scales, to the flow
283 features comparable with the size of the geometry).
284
285 There are several possible approaches for the numerical simulation of turbulent flows. The first
286 and most intuitive one, is by directly numerically solving the governing equations over the whole
287 range of turbulent scales (temporal and spatial). This deterministic approach is referred as Di-
288 rect Numerical Simulation (DNS) [15, 16, 17, 10, 22, 23]. In DNS, a fine enough mesh and small
289 enough time-step size must be used so that all of the turbulent scales are resolved. Although
290 some simple problems have been solved using DNS, it is not possible to tackle industrial prob-
291 lems due to the prohibitive computer cost imposed by the mesh and time-step requirements.
292 Hence, this approach is mainly used for benchmarking, research and academic applications.
293
294 Another approach used to model turbulent flows is Large Eddy Simulation (LES) [18, 19, 15,
295 22, 23]. Here, large scale turbulent structures are directly simulated whereas the small turbulent
296 scales are filtered out and modeled by turbulence models called subgrid scale models. According
297 to turbulence theory, small scale eddies are more uniform and have more or less common char-
298 acteristics; therefore, modeling small scale turbulence appears more appropriate, rather than
299 resolving it. The computational cost of LES is less than that of DNS, since the small scale
300 turbulence is now modeled, hence the grid spacing is much larger than the Kolmogorov length
301 scale. In LES, as the mesh gets finer, the number of scales that require modeling becomes
302 smaller, thus approaching DNS. Thanks to the advances in computing hardware and parallel
303 algorithms, the use of LES for industrial problems is becoming practical.
304
305 Today’s workhorse for industrial and research turbulence modeling applications is the Reynolds
306 Averaged Navier-Stokes (RANS) approach [20, 21, 22, 10, 12, 23]. In this approach, the RANS
307 equations are derived by decomposing the flow variables of the governing equations into time-
308 mean (obtained over an appropriate time interval) and fluctuating part, and then time averaging
309 the entire equations. Time averaging the governing equations gives rise to new terms, these new
310 quantities must be related to the mean flow variables through turbulence models. This pro-
311 cess introduces further assumptions and approximations. The turbulence models are primarily
312 developed based on experimental data obtained from relatively simple flows under controlled
313 conditions. This in turn limits the range of applicability of the turbulence models. That is, no
13
314 single RANS turbulence model is capable of providing accurate solutions over a wide range of
315 flow conditions and geometries.
316
317 Two types of averaging are presently used, the classical Reynolds averaging which gives rise
318 to the RANS equations and the mass-weighted averaging or Favre averaging which is used to
319 derive the Favre-Averaged Navier-Stokes equations (FANS) for compressible flows applications.
320 In both statistical approaches, all the turbulent scales are modeled, hence mesh and time-step
321 requirements are not as restrictive as in LES or DNS. Hereafter, we limit our discussion to
322 Reynolds averaging.
323
Figure 3.1: Time averaging for a statistically steady turbulent flow (left) and time averaging for an
unsteady turbulent flow (right).
330 Hereafter, x is the vector containing the Cartesian coordinates x, y, and z in N = 3 (where
331 N is equal to the number of spatial dimensions). A key observation in eq. 3.1.1 is that φ̄ is
332 independent of time, implying that any equation deriving for computing this quantity must be
333 steady state.
334
335 In eq. 3.1.1, the mean value φ̄ is obtained by an averaging procedure. There are three different
336 forms of the Reynolds averaging:
337 1. Time averaging: appropriate for stationary turbulence, i.e., statically steady turbulence
338 or a turbulent flow that, on average, does not vary with time.
Z t+T
1
φ̄(x) = lim φ(x, t) dt, (3.1.2)
T →+∞ T t
14
339 here t is the time and T is the averaging interval. This interval must be large compared
340 to the typical time scales of the fluctuations; thus, we are interested in the limit T → ∞.
341 As a consequence, φ̄ does not vary in time, but only in space.
343 with CV being a control volume. In this case, φ̄ is uniform in space, but it is allowed to
344 vary in time.
N
1 X
φ̄(x, t) = lim φ̄(x, t), (3.1.4)
N →∞ N
i=1
346 where N , is the number of experiments of the ensemble and must be large enough to
347 eliminate the effects of fluctuations. This type of averaging can be applied to any flow
348 (steady or unsteady). Here, the mean value φ̄ is a function of both time and space (as
349 illustrated in figure 3.1).
350 We use the term Reynolds averaging to refer to any of these averaging processes, applying any of
351 them to the governing equations yields to the Reynolds-Averaged Navier-Stokes (RANS) equa-
352 tions. In cases where the turbulent flow is both stationary and homogeneous, all three averaging
353 are equivalent. This is called the ergodic hypothesis.
354
355 If the mean flow φ̄ varies slowly in time, we should use an unsteady approach (URANS); then,
356 equations eq. 3.1.1 and eq. 3.1.2 can be modified as
366 Before deriving the RANS equations, we recall the following averaging rules,
15
φ̄0 = 0,
φ = φ̄,
φ̄ = φ̄ + φ0 = φ̄,
∂φ ∂ φ̄
= ,
∂x ∂x
φ + ϕ = φ̄ + ϕ̄ ,
φ̄ϕ = φ̄ϕ̄ = φ̄ϕ̄,
φ̄ϕ̄ = φ̄ϕ̄, (3.1.7)
φ̄ϕ0 = φ̄ϕ̄0 = 0,
φϕ = (φ̄ + φ0 )(ϕ̄ + ϕ0 )
= φ̄ϕ̄ + φ̄ϕ0 + ϕ̄φ0 + φ0 ϕ0
= φ̄ϕ̄ + φ̄ϕ0 + ϕ̄φ0 + φ0 ϕ0
= φ̄ϕ̄ + φ0 ϕ0 ,
φ02 6= 0,
φ0 ϕ0 6= 0.
370 we now substitute eq. 3.2.1 into the incompressible Navier-Stokes equations eq. 2.1.1 and we
371 obtain for the continuity equation
∇ · (u) = ∇ · ū + u0 = ∇ · (ū) + ∇ · u0 = 0.
(3.2.2)
372 Then, time averaging this equation results in
∇ · (ū) + ∇ · ū0 = 0, (3.2.3)
373 and using the averaging rules stated in eq. 3.1.7, it follows that
∇ · (ū) = 0. (3.2.4)
374 We next consider the momentum equation of the incompressible Navier-Stokes equations eq.
375 2.1.1. We begin by substituting eq. 3.2.1 into eq. 2.1.1 in order to obtain,
∂ (ū + u0 ) −∇ (p̄ + p0 )
ū + u0 ū + u0 + ν∇2 ū + u0 ,
+∇· = (3.2.5)
∂t ρ
376 by time averaging eq. 3.2.5, expanding and applying the rules set in eq. 3.1.7, we obtain
∂ ū −∇p̄
+ ∇ · ūū + u0 u0 = + ν∇2 ū. (3.2.6)
∂t ρ
16
377 Grouping equations 3.2.4 and 3.2.6, we obtain the following set of equations,
∇ · (ū) = 0,
∂ ū −∇p̄ 1 (3.2.7)
+ ∇ · (ūū) = + ν∇2 ū − ∇ · τ R .
∂t ρ ρ
378 The set of equations eq. 3.2.7 are the incompressible Reynolds-Averaged Navier-Stokes (RANS)
379 equations. Notice that in eq. 3.2.7 we have retained the term ∂ ū/∂t, despite the fact that
380 ū is independent of time for statistically steady turbulence, hence this expression is equal to
381 zero when time average. In practice, in all modern formulations of the RANS equations the
382 time derivative term is included. In references [20, 22, 3, 16, 25], a few arguments justifying
383 the retention of this term are discussed. For not statistically stationary turbulence or unsteady
384 turbulence, a time-dependent RANS or unsteady RANS (URANS) approach is required, an
385 URANS computation simply requires retaining the time derivative term ∂ ū/∂t in the computa-
386 tion. For unsteady turbulence, ensemble average is recommended and often necessary.
387
388 The incompressible Reynolds-Averaged Navier-Stokes (RANS) equations eq. 3.2.7 are identical
389 to the incompressible Navier-Stokes equations eq. 2.1.1 with the exception of the additional term
τ R = −ρ u0 u0 , where τ R is the so-called Reynolds-stress tensor (notice that by doing a check
390
391 of dimensions, it will show that τ R it is not actually a stress; it must be multiplied by the density
392 ρ, as it is done consistently in this manuscript, in order to have dimensions corresponding to the
393 stresses. On the other hand, since we are assuming that the flow is incompressible, that is, ρ is
394 constant, we might set the density equal to unity, thus obtaining implicit dimensional correctness.
395 Moreover, because we typically use kinematic viscosity ν, there is an implied division by ρ in
396 any case). The Reynolds-stress tensor represents the transfer of momentum due to turbulent
397 fluctuations. In 3D, the Reynolds-stress tensor τ R consists of nine components
0 0
ρu u ρu0 v 0 ρu0 w0
τ R = −ρ u0 u0 = − ρv 0 u0 ρv 0 v 0 ρv 0 w0 .
(3.2.8)
ρw0 u0 ρw0 v 0 ρw0 w0
398 However, since u, v and w can be interchanged, the Reynolds-stress tensor forms a symmetrical
399 second order tensor containing only six independent components. By inspecting the set of
400 equations eq. 3.2.7 we can count ten unknowns, namely; three components of the velocity (u, v,
401
R 0 0
w), the pressure (p), and six components of the Reynolds stress τ = −ρ u u , in terms of
402 four equations, hence the system is not closed. The fundamental problem of turbulence modeling
403 based on the Reynolds-averaged Navier-Stokes equations is to find six additional relations in
404 order to close the system of equations eq. 3.2.7.
R 2 h i 2
τ R = −ρ u0 u0 = 2µT D̄ − ρκI = µT ∇u + (∇u)T − ρκI,
(3.3.1)
3 3
R
410 where D̄ denotes the Reynolds-averaged strain-rate tensor ( 12 (∇u + ∇uT )), I is the identity
411 matrix, µT is called the turbulent eddy viscosity, and
1
κ = u0 · u0 , (3.3.2)
2
17
412 is the turbulent kinetic energy. Basically, we assume that this fluctuating stress is proportional
413 to the gradient of the average quantities (similarly to Newtonian flows). The second term in
414 eq. 3.3.1 ( 23 ρκI), is added in order for the Boussinesq approximation to be valid when traced,
415 that is, the trace of the right hand side in eq. 3.3.1 must be equal to that of the left hand side
416 (−ρ(u0 u0 )tr = −2ρκ), hence it is consistent with the definition of turbulent kinetic energy (eq.
417 3.3.2). In order to evaluate κ, usually a governing equation for κ is derived and solved, typically
418 two-equations models include such an option.
419
420 The turbulent eddy viscosity µT (in contrast to the molecular viscosity µ), is a property of the
421 flow field and not a physical property of the fluid. The eddy viscosity concept was developed
422 assuming that a relationship or analogy exists between molecular and turbulent viscosities. In
423 spite of the theoretical weakness of the turbulent eddy viscosity concept, it does produce rea-
424 sonable results for a large number of flows.
425
426 The Boussinesq approximation reduces the turbulence modeling process from finding the six
427 turbulent stress components τ R to determining an appropriate value for the turbulent eddy
428 viscosity µT .
429
430 One final word of caution, the Boussinesq approximation discussed here, should not be associ-
431 ated with the completely different concept of natural convection.
432
ρκ
µT = (3.4.1)
ω
446 Turbulent Kinetic Energy
447
∂κ
ρ + ρ∇ · (ūκ) = τ R :∇ū − β ∗ ρκω + ∇ · [(µ + σ ∗ µT ) ∇κ] (3.4.2)
∂t
448 Specific Dissipation Rate
449
∂ω ω
ρ + ρ∇ · (ūω) = α τ R :∇ū − βρω 2 + ∇ · [(µ + σµT ) ∇ω] (3.4.3)
∂t κ
450 Closure Coefficients
451
5 3 9 1 1
α= , β= , β∗ = , σ= , σ∗ = (3.4.4)
9 40 100 2 2
18
452 Auxiliary Relations
453
1
κ2
= β ∗ ωκ and l= (3.4.5)
ω
454 Equations eq. 3.2.7 and eq. 3.4.1-3.4.5, are the governing equations of an incompressible,
455 isothermal, turbulent flow written in conservation form. Hence, we look for an approximate
456 solution of this set of equations in a given domain D, with prescribed boundary conditions ∂D,
457 and given initial conditions Dq̊.
19
458 Chapter 4
460 The purpose of any discretization practice is to transform a set of partial differential equations
461 (PDEs) into a corresponding system of discrete algebraic equations (DAEs). The solution of
462 this system produces a set of values which correspond to the solution of the original equations at
463 some predetermined locations in space and time, provided certain conditions are satisfied. The
464 discretization process can be divided into two steps, namely; the discretization of the solution
465 domain and the discretization of the governing equation.
466
467 The discretization of the solution domain produces a numerical description of the computational
468 domain (also known as mesh generation). The space is divided into a finite number of discrete
469 regions, called control volumes (CVs) or cells. For transient simulations, the time interval is also
470 split into a finite number of time steps. The governing equations discretization step altogether
471 with the domain discretization, produces an appropriate transformation of the terms of the gov-
472 erning equations into a system of discrete algebraic equations that can be solve using any direct
473 or iterative method.
474
475 In this section, we briefly presents the finite volume method (FVM) discretization, with the
476 following considerations in mind:
477 • The method is based on discretizing the integral form of the governing equations over each
478 control volume of the discrete domain. The basic quantities, such as mass and momentum,
479 will therefore be conserved at the discrete levels.
481 • The method is applicable to any number of spatial dimensions (1D, 2D or 3D).
482 • The control volumes can be of any shape. All dependent variables share the same control
483 volume and are computed at the control volume centroid, which is usually called the
484 collocated or non-staggered variable arrangement.
485 • Systems of partial differential equations are treated in a segregated way, meaning that
486 they are are solved one at a time in a sequential manner.
487 The specific details of the solution domain discretization, system of equations discretization
488 practices and implementation of the FVM are far beyond the scope of the present discussion.
489 Hereafter, we give a brief description of the FVM method. For a detailed discussion, the inter-
490 ested reader should refer to references [7, 3, 10, 11, 12, 9, 13].
491
20
492 4.1 Discretization of the Solution Domain
493 Discretization of the solution domain produces a computational mesh on which the governing
494 equations are solved (mesh generation stage). It also determines the positions of points in space
495 and time where the solution will be computed. The procedure can be split into two parts: tem-
496 poral discretization and spatial discretization.
497
498 The temporal solution is simple obtained by marching in time from the prescribed initial condi-
499 tions. For the discretization of time, it is therefore necessary to prescribe the size of the time-step
500 that will be used during the calculation.
501
502 The spatial discretization of the solution domain of the FVM method presented in this manuscript,
503 requires a subdivision of the continuous domain into a finite number of discrete arbitrary con-
504 trol volumes (CVs). In our discussion, the control volumes do not overlap, have a positive finite
505 volume and completely fill the computational domain. Finally, all variables are computed at the
506 centroid of the control volumes (collocated arrangement).
507
Figure 4.1: Arbitrary polyhedral control volume VP . The control volume has a volume V and is con-
structed around a point P (control volume centroid), therefore the notation VP . The vector from the
centroid of the control volume VP (point P), to the centroid of the neighboring control volume VN (point
N), is defined as d. The face area vector Sf points outwards from the surface bounding VP and is normal
to the face. The control volume faces are labeled as f, which also denotes the face center.
508 A typical control volume is shown in figure 4.1. In this figure, the control volume VP is bounded
509 by a set of flat faces and each face is shared with only one neighboring control volume. The
510 shape of the control volume is not important for our discussion, for our purposes it is a general
511 polyhedron, as shown in figure 4.1. The control volume faces in the discrete domain can be
512 divided into two groups, namely; internal faces (between two control volumes) and boundary
513 faces, which coincide with the boundaries of the domain. The face area vector Sf is constructed
514 for each face in such a way that it points outwards from the control volume, is located at the
515 face centroid, is normal to the face and has a magnitude equal to the area of the face (e.g., the
516 shaded face in figure 4.1). Boundary face area vectors point outwards from the computational
517 domain. In figure 4.1, the point P represents the centroid of the control volume VP and the
518 point N represents the centroid of the neighbor control volume VN . The distance between the
21
519 point P and the point N is given by the vector d. For simplicity, all faces of the control volume
520 will be marked with f, which also denotes the face centroid (see figure 4.1).
521
522 A control volume VP , is constructed around a computational point P. The point P, by definition,
523 is located at the centroid of the control volume such that its centroid is given by
Z
(x − xP ) dV = 0. (4.1.1)
VP
524 In a similar way, the centroid of the faces of the control volume VP is defined as
Z
(x − xf ) dS = 0. (4.1.2)
Sf
525 Finally, let us introduce the mean value theorem for the transported quantity φ over the control
526 volume VP , such that
Z
1
φ= φ(x)dV. (4.1.3)
V P VP
527 In the FVM method discussed in this manuscript, the centroid value φP of the control volume
528 VP is represented by a piecewise constant profile. That is, we assume that the value of the
529 transported quantity φ is computed and stored in the centroid of the control volume VP and
530 that its value is equal to the mean value of φ inside the control volume,
Z
1
φP = φ = φ(x)dV. (4.1.4)
V P VP
531 This approximation is exact if φ is constant or vary linearly.
532
538 Here φ is the transported quantity, i.e., velocity, mass or turbulent energy and Γφ is the diffusion
539 coefficient of the transported quantity. This is a second order equation since the diffusion
540 term includes a second order derivative of φ in space. To represent this term with acceptable
541 accuracy, the order of the discretization must be equal or higher than the order of the equation
542 to be discretized. In the same order of ideas, to conform to this level of accuracy, temporal
543 discretization must be of second order as well. As a consequence of these requirements, all
544 dependent variables are assumed to vary linearly around the point P in space and instant t in
545 time, such that
22
546 Equations 4.2.2 and 4.2.3 are obtained by using Taylor Series Expansion (TSE) around the nodal
547 point P and time t, and truncating the series in such a way to obtain second order accurate
548 approximations.
549
550 A key theorem in the FVM method is the Gauss theorem (also know as the divergence or Ostro-
551 gradsky’s theorem), which will be used throughout the discretization process in order to reduce
552 the volume integrals in eq. 4.2.1 to their surface equivalents.
553
554 The Gauss theorem states that the volume integral of the divergence of a vector field in a region
555 inside a volume, is equal to the surface integral of the outward flux normal to the closed surface
556 that bounds the volume. For a vector a, the Gauss theorem is given by,
Z I
∇ · adV = ndS · a,
V ∂V (4.2.4)
557 where ∂V is the surface bounding the volume V and dS is an infinitesimal surface element with
558 the normal n pointing outward of the surface ∂V . From now on, dS will be used as a shorthand
559 for ndS.
560
561 By using the Gauss theorem, we can write eq. 4.2.1 as follows
Z I I Z
∂
(ρφ) dV + dS · (ρuφ) − dS · (ρΓφ ∇φ) = Sφ (φ) dV. (4.2.5)
∂t VP ∂VP | {z } ∂VP | {z } VP
convective flux diffusive flux
562 Equation 4.2.5 is a statement of conservation. It states that the rate of change of the transported
563 quantity φ inside the control volume VP is equal to the rate of change of the convective and
564 diffusive fluxes across the surface bounding the control volume VP , plus the net rate of creation
565 of φ inside the control volume. Notice that so far we have not introduce any approximation,
566 equation 4.2.5 is exact.
567
568 In the next sections, each of the terms in eq. 4.2.1 will be treated separately, starting with the
569 spatial discretization and concluding with the temporal discretization. By proceeding in this
570 way we will be solving eq. 4.2.1 by using the Method of Lines (MOL). The main advantage of
571 the MOL, is that it allows us to select numerical approximations of different accuracy for the
572 spatial and temporal terms. Each term can be treated differently to yield to different accuracies.
573
579 To calculate the surface integrals in eq. 4.2.5 we need to know the value of the transported quan-
580 tity φ on the faces of the control volume. This information is not available, as the variables are
581 calculated on the control volume centroid, so an approximation must be introduced at this stage.
582
583 We now make a profile assumption about the transported quantity φ. We assume that φ varies
584 linearly over each face f of the control volume VP , so that φ may be represented by its mean
585 value at the face centroid f . We can now approximate the surface integral as a product of the
586 transported quantities at the face center f (which is itself an approximation to the mean value
23
587 over the surface) and the face area. This approximation to the surface integral is known as the
588 midpoint rule and is of second-order accuracy.
589
590 It is worth mentioning that a wide range of choices exists with respect to the way of approximat-
591 ing the surface integrals, e.g., midpoint rule, trapezoid rule, Simpson’s rule, Gauss quadrature.
592 Here, we have used the simplest method, namely, the midpoint rule.
593
594 For illustrating this approximation, let us consider the term under the divergence operator in
595 eq. 4.2.4 and recalling that all faces are flat (that is, all vertexes that made up the face are
596 contained in the same plane), eq. 4.2.4 can be converted into a discrete sum of integrals over all
597 faces of the control volume VP as follows,
Z I
∇ · adV = dS · a,
VP ∂VP
X Z
= dS · a ,
f f (4.2.6)
X X
≈ (Sf · af ) = (Sf · af ) .
f f
598 Using the same approximations and assumptions as in eq. 4.2.6, the surface integrals (or fluxes)
599 in eq. 4.2.5 can be approximate as follow
I XZ X X
dS · (ρuφ) = dS · (ρuφ)f ≈ Sf · ρuφ f
= Sf · (ρuφ)f . (4.2.7)
∂VP | {z }
f f f f
convective flux
I XZ X X
dS · (ρΓφ ∇φ) = dS · (ρΓφ ∇φ)f ≈ Sf · ρΓφ ∇φ f
= Sf · (ρΓφ ∇φ)f . (4.2.8)
∂VP | {z }
f f f f
diffusive flux
600 To approximate the volume integrals in eq. 4.2.5, we make similar assumptions as for the surface
601 integrals, that is, φ varies linearly over the control volume and φ = φP . Integrating eq. 4.2.2
602 over a control volume VP , it follows
Z Z
φ (x) dV = [φP + (x − xP ) · (∇φ)P ] dV,
VP VP
Z Z
(4.2.9)
= φP dV + (x − xP ) dV · (∇φ)P ,
VP VP
= φP V P .
603 The second integral in the RHS of eq. 4.2.9 is equal to zero because the point P is the centroid
604 of the control volume (recall eq. 4.1.1). This quantity is easily calculated since all variables at
605 the centroid of VP are known, no interpolation is needed. The above approximation becomes
606 exact if φ is either constant or varies linearly within the control volume; otherwise, it is a second
607 order approximation.
608
∂ X X
ρφVP + Sf · (ρuφ)f − Sf · (ρΓφ ∇φ)f = Sφ VP . (4.2.10)
∂t
f f
24
610 Let us recall that in our formulation of the FVM, all the variables are computed and stored at
611 the control volumes centroid. The face values appearing in eq. 4.2.10; namely, the convective
612 flux F C = S·(ρuφ) through the faces, and the diffusive flux F D = S·(ρΓφ ∇φ) through the faces,
613 have to be calculated by some form of interpolation from the centroid values of the neighboring
614 control volumes located at both sides of the faces, this issue is discussed in the following section.
615
Z X
∇ · (ρuφ) dV = Sf · (ρuφ)f ,
VP f
X
= Sf · (ρu)f φf , (4.2.11)
f
X
= F̊ φf ,
f
618 where F̊ in eq. 4.2.11 represents the mass flux through the face,
F̊ = Sf · (ρu)f . (4.2.12)
619 Obviously, the flux F̊ depends on the face value of ρ and u, which can be calculated in a similar
620 fashion to φf (as it will be described in the next section), with the caveat that the velocity field
621 from which the fluxes are derived must be such that the continuity equation is obeyed, i.e.,
Z I X Z X X
∇ · udV = dS · u = dS · u = Sf · (ρu)f = F̊ = 0. (4.2.13)
VP ∂VP f f f f
622 Before we continue with the formulation of the interpolation scheme or convection differencing
623 scheme used to compute the face value of the transported quantity φ; it is necessary to examine
624 the physical properties of the convection term. Irrespective of the distribution of the velocity in
625 the domain, the convection term does not violate the bounds of φ given by its initial condition.
626 If for example, φ initially varies between 0 and 1, the convection term will never produce values
627 of φ that are lower than zero or higher that one. Considering the importance of boundedness
628 in the transport of scalar properties, it is essential to preserve this property in the discretized
629 form of the term.
630
638 • Central Differencing (CD) scheme. In this scheme (also known as linear interpo-
639 lation), linear variation of the dependent variables is assumed. The face centered value
640 is found from a simple weighted linear interpolation between the values of the control
641 volumes at points P and N (see figure 4.2), such that
25
φf = fx φP + (1 − fx ) φN . (4.2.14)
642 In eq. 4.2.14, the interpolation factor fx , is defined as the ratio of the distances f N and
643 P N (refer to figure 4.2), i.e.,
fN | xf − x N |
fx = = . (4.2.15)
PN |d|
644 A special case arises when the face is situated midway between the two neighboring control
645 volumes VP and VN (uniform mesh), then the approximation reduces to an arithmetic
646 average
(φP + φN )
φf = . (4.2.16)
2
647 This practice is second order accurate, which is consistent with the requirement of overall
648 second order accuracy of the method. It has been noted however, that CD causes non-
649 physical oscillations in the solution for convection dominated problems, thus violating the
650 boundedness of the solution ([7, 3, 10, 11, 9, 13, 14]).
651
652 • Upwind Differencing (UD) scheme. An alternative discretization scheme that guar-
653 antees boundedness is the Upwind Differencing (UD). In this scheme, the face value is
654 determined according to the direction of the flow (refer to figure 4.3),
(
φf = φP for F̊ ≥ 0,
φf = (4.2.17)
φf = φN for F̊ < 0.
655 This scheme guarantees the boundedness of the solution ([7, 3, 10, 11, 9, 13, 14]). Unfor-
656 tunately, UD is at most first order accurate, hence it sacrifices the accuracy of the solution
657 by implicitly introducing numerical diffusion.
658
659 In order to circumvent the numerical diffusion inherent of UD and unboundedness of CD, linear
660 combinations of UD and CD, second order variations of UD and bounded CD schemes has been
661 developed in order to conform to the accuracy of the discretization and maintain the bounded-
662 ness and stability of the solution [7, 3, 10, 11, 9, 13, 14].
663
26
Figure 4.3: Face interpolation. Upwind Differencing (UD) scheme. A) F̊ ≥ 0. B) F̊ < 0.
Z X
∇ · (ρΓφ ∇φ) dV = Sf · (ρΓφ ∇φ)f ,
VP f
X (4.2.18)
= (ρΓφ )f Sf · (∇φ)f ,
f
fN | x f − xN |
(Γφ )f = fx (Γφ )P + (1 − fx ) (Γφ )N where fx = = . (4.2.19)
PN |d|
672 If the control volumes are uniform (the face f is midway between VP and VN ), then fx is equal
673 to 0.5, and (Γφ )f is equal to the arithmetic mean.
674
27
675 However, the method above described suffers from the drawback that if (Γφ )N is equal to zero,
676 it is expected that there would be no diffusive flux across face f . But in fact, eq. 4.2.19
677 approximates a value for (Γφ )f , namely
683 A better model for the variation of Γφ between control volumes is to use the harmonic mean,
684 which is expressed as follows,
685
(Γφ )N (Γφ )P fN | xf − xN |
(Γφ )f = where fx = = . (4.2.21)
fx (Γφ )P + (1 − fx )(Γφ )N PN |d|
686 This formulation gives (Γφ )f equal to zero if either (Γφ )N or (Γφ )P is zero. For (Γφ )P >> (Γφ )N
687 gives
(Γφ )N
(Γφ )f = , (4.2.22)
fx
688 as required.
689
Figure 4.5: A) Vector d and S on an orthogonal mesh. B) Vector d and S on a non-orthogonal mesh.
φN − φP
S · (∇φ)f = |S| . (4.2.23)
|d|
694 By using eq. 4.2.23, the face gradient of φ can be calculated from the values of the control vol-
695 umes straddling face f (VP and VN ), so basically we are computing the face gradient by using
696 a central difference approximation of the first order derivative in the direction of the vector d.
697 This method is second order accurate, but can only be used on orthogonal meshes.
698
28
699 An alternative to the previous method, would be to calculate the gradient of the control volumes
700 at both sides of face f by using Gauss theorem, as follows
1 X
(∇φ)P = (Sf φf ) .
VP (4.2.24)
f
701 After computing the gradient of the neighboring control volumes VP and VN , we can find the
702 face gradient by using weighted linear interpolation.
703
704 Although both of the previously described methods are second order accurate; eq. 4.2.24 uses a
705 larger computational stencil, which involves a larger truncation error and can lead to unbounded
706 solutions. On the other hand, spite of the higher accuracy of eq. 4.2.23, it can not be used on
707 non-orthogonal meshes.
708
709 Unfortunately, mesh orthogonality is more an exception than a rule. In order to make use of
710 the higher accuracy of eq. 4.2.23, the product S · (∇φ)f is split in two parts
711 The two vectors introduced in eq. 4.2.25, namely; ∆⊥ and k, need to satisfy the following
712 condition
S = ∆⊥ + k. (4.2.26)
713 If the vector ∆⊥ is chosen to be parallel with d, this allows us to use eq. 4.2.23 on the orthogonal
714 contribution in eq. 4.2.25, and the non-orthogonal contribution is computed by linearly interpo-
715 lating the face gradient from the centroid gradients of the control volumes at both sides of face
716 f , obtained by using eq. 4.2.24. The purpose of this decomposition is to limit the error intro-
717 duced by the non-orthogonal contribution, while keeping the second order accuracy of eq. 4.2.23.
718
719 To handle the mesh orthogonality decomposition within the constraints of eq. 4.2.26, let us
720 study the following approaches ([14, 8, 10]), with k calculated from eq. 4.2.26:
721 • Minimum correction approach (figure 4.6). This approach attempts to minimize the non-
722 orthogonal contribution by making ∆⊥ and k orthogonal,
d·S
∆⊥ = d. (4.2.27)
d·d
723 In this approach, as the non-orthogonality increases, the contribution from φP and φN
724 decreases.
725
726 • Orthogonal correction approach (figure 4.7). This approach attempts to maintain the
727 condition of orthogonality, irrespective of whether non-orthogonality exist,
d
∆⊥ = |S|. (4.2.28)
|d|
29
Figure 4.6: Non-orthogonality treatment in the minimum correction approach.
728 • Over-relaxed approach (figure 4.8). In this approach, the contribution from φP and φN
729 increases with the increase in non-orthogonality, such as
d
∆⊥ = |S|2 . (4.2.29)
d·S
730 All of the approaches described above are valid, but the so-called over-relaxed approach seems
731 to be the most robust, stable and computationally efficient.
732
733 Non-orthogonality adds numerical diffusion to the solution and reduces the accuracy of the nu-
734 merical method. It also leads to unboundedness, which in turn can conduct to nonphysical
735 results and/or divergence of the solution.
736
737 The diffusion term, eq. 4.2.18, in its differential form exhibits a bounded behavior. Hence, its
738 discretized form will preserve only on orthogonal meshes. The non-orthogonal correction poten-
739 tially creates unboundedness, particularly if mesh non-orthogonality is high. If the preservation
740 of boundedness is more important than accuracy, the non-orthogonal correction has got to be
741 limited or completely discarded, thus violating the order of accuracy of the discretization. Hence
30
742 care must be taken to keep mesh orthogonality within reasonable bounds.
743
744 The final form of the discretized diffusion term is the same for all three approaches. Since eq.
745 4.2.23 is used to compute the orthogonal contribution, meaning that d and ∆⊥ are parallel, it
746 follows
φN − φP
∆⊥ · (∇φ)f = |∆⊥ | , (4.2.30)
|d|
747 then eq. 4.2.25 can be written as
φN − φP
S · (∇φ)f = |∆⊥ | + k · (∇φ)f . (4.2.31)
|d| | {z }
non-orthogonal contribution
| {z }
orthogonal contribution
748 In eq. 4.2.31, the face interpolated value of ∇φ of the non-orthogonal contribution is calculated
749 as follows
758 By means of the Gauss theorem, the gradient terms of the control volume VP arising from the
759 discretization process or needed to compute the face gradients are calculated as follows,
Z I
∇φdV = dSφ,
VP ∂VP
X
(∇φ)P VP = (Sf φf ) ,
f (4.2.33)
1 X
(∇φ)P = (Sf φf ) ,
VP
f
760 where the value φf on face f can be evaluated using the convection central differencing scheme.
761
762 After computing the gradient of the control volumes at both sides of face f by using eq. 4.2.33,
763 we can find the face gradient by using weighted linear interpolation,
767 The Green-Gauss cell based gradient evaluation uses a computational stencil larger than the
768 one used by eq. 4.2.23; hence the truncation error is larger and it might lead to oscillatory
31
769 solutions (unboundedness), which in turns can lead to nonphysical values of φ and divergence,
770 The advantage of this method is that it can be used in orthogonal and non-orthogonal meshes;
771 whereas eq. 4.2.23, can be only used in orthogonal meshes.
772
773 Another alternative, is by evaluating the face gradient by using a Least-Square fit (LSF). This
774 method assumes a linear variation of φ (which is consistent with the second order accuracy
775 requirement), and evaluates the gradient error at each neighboring control volume N using the
776 following expression,
778 where the weighting function w is given by wN = 1/|d|. Then, the following expression is used
779 to evaluate the gradient at the centroid of the control volume VP ,
X
(∇φ)P = 2
wN G−1 · d (φN − φP ) .
N
X (4.2.37)
2
G= wN dd.
N
780 After evaluation the neighbor control volumes gradient, they can be interpolated to the face.
781 Note that G is a symmetric N × N matrix and can easily be inverted (where N is the number of
782 spatial dimensions). This formulation leads to a second order accurate gradient approximation
783 which is independent of the mesh topology.
784
Sφ (φ) = Sc + Sp φ, (4.2.38)
793 where Sc is the constant part of the source term and Sp depends on φ. For instance, if the source
794 term is assume to be constant, eq. 4.2.38 reduces to Sφ (φ) = Su .
795
796 Following eq. 4.2.9, the volume integral of the source terms is calculated as
Z
Sφ (φ) dV = Sc VP + Sp VP φP . (4.2.39)
VP
32
797 4.2.6 Temporal Discretization
798 In the previous sections, the discretization of the spatial terms was presented. Let us now
799 consider the temporal derivative of the general transport eq. 4.2.1, integrating in time we get
Z t+∆t Z Z Z
∂
ρφdV + ∇ · (ρuφ) dV − ∇ · (ρΓφ ∇φ) dV dt
t ∂t VP VP VP
Z t+∆t Z
= Sφ (φ) dV dt. (4.2.40)
t VP
800 Using equations 4.2.7-4.2.9 and 4.2.39, eq. 4.2.40 can be written as,
Z t+∆t
∂ρφ
X X
VP + Sf · (ρuφ)f − Sf · (ρΓφ ∇φ)f dt
t ∂t P
f f
Z t+∆t
= (Sc VP + Sp VP φP ) dt. (4.2.41)
t
801 The above expression is usually called the semi-discretized form of the transport equation. It
802 should be noted that the order of the temporal discretization of the transient term in eq. 4.2.41
803 does not need to be the same as the order of the discretization of the spatial terms (convection,
804 diffusion and source terms). Each term can be treated differently to yield different accuracies.
805 As long as the individual terms are second order accurate, the overall accuracy of the solution
806 will also be second order.
810 where φn = φ(t + ∆t) and φn−1 = φ(t) represent the value of the dependent variable at the new
811 and previous times respectively. Equation 4.2.42 provides the temporal derivative at a centered
812 time between times n − 1 and n. Combining equations 4.2.41 and 4.2.42 and assuming that the
813 density and diffusivity do not change in time, we get
ρP φnP − ρP φn−1 1X 1X
P
VP + F̊ φnf − (ρΓφ )f S · (∇φ)nf
∆t 2 2
f f
1X 1X
+ F̊ φfn−1 − (ρΓφ )f S · (∇φ)fn−1
2 2
f f
1 1
= Su VP + Sp VP φnP + Sp VP φPn−1 . (4.2.43)
2 2
814 This form of temporal discretization is called Crank-Nicolson (CN) method and is second order
815 accurate in time. It requires the face values of φ and ∇φ as well as the control volume values for
33
816 both old (n − 1) and new (n) time levels. The face values are calculated from the control volume
817 values on each side of the face, using the appropriate differencing scheme for the convection term
818 and eq. 4.2.31 for the diffusion term. The CN method is unconditionally stable, but does not
819 guarantee boundedness of the solution.
820
φn−2 = φt−∆t ,
φn−1 = φt , (4.2.44)
n t+∆t
φ =φ ,
828 to calculate the temporal derivative. Expressing time level n − 2 as a Taylor expansion around
829 n we get
n 2 n
n−2 n ∂φ ∂ φ
∆t2 + O ∆t3 ,
φ =φ −2 ∆t + 2 2
(4.2.45)
∂t ∂t
830 doing the same for time level n − 1 we obtain
n n
1 ∂2φ
n−1 n ∂φ
∆t2 + O ∆t3 .
φ =φ − ∆t + 2
(4.2.46)
∂t 2 ∂t
831 Combining this equation with eq. 4.2.45 produces a second order approximation of the temporal
832 derivative at the new time n as follows
n 3 n
− 2φn−1 + 12 φn−2
∂φ 2φ
= . (4.2.47)
∂t ∆t
833 By neglecting the temporal variation in the face fluxes and derivatives, eq. 4.2.47 produces a
834 fully implicit second order accurate discretization of the general transport equation,
3
2 ρP φ
n − 2ρP φn−1 + 12 ρP φn−2 X X
VP + F̊ φnf − (ρΓφ )f S · (∇φ)nf
∆t
f f
= Su VP + Sp VP φnP . (4.2.48)
835 In the CN method, since the flux and non-orthogonal component of the diffusion term have to
836 be evaluated using values at the new time n, it means that it requires inner-iterations during
837 each time step. Coupled with the memory overhead due to the large number of stored variables,
838 this implies that the CN method is expensive compared to the BD described before. The BD
839 method, although cheaper and considerably easier to implement than the CN method, results in
840 a truncation error larger than the latter. This is due to the assumed lack of temporal variation
841 in face fluxes and derivatives. This error manifests itself as an added diffusion. However, if we
842 restrict the Courant number (CFL) to a value below 1, the time step will tend to be very small,
843 keeping temporal diffusion errors to a minimum.
844
34
845 4.2.7 System of Algebraic Equations
846 At this point, after spatial and temporal discretization and by using equations 4.2.43 or 4.2.48
847 in every control volume of the domain, a system of algebraic equations of the form
875 Mainly, there are three boundary conditions which are used to close the system of equations,
876 namely:
877 • Zero-gradient boundary condition, defining the solution gradient to be zero. This condition
878 is known as a Neumann type boundary condition.
879 • Fixed-value boundary condition, defining a specified value of the solution. This is a Dirich-
880 let type condition.
881 • Symmetry boundary condition, treats the conservation variables as if the boundary was a
882 mirror plane. This condition defines that the component of the solution gradient normal
883 to this plane should be fixed to zero. The parallel components are extrapolated from the
884 interior cells,
885 For example, for an external aerodynamics simulation we might set the following boundary
886 conditions. At the inflow boundary the velocity is defined as fixed-value and the pressure as
887 zero-gradient. At the outflow boundary, the pressure is defined as a fixed-value and the velocity
888 as a zero-gradient. If symmetry is a concern, symmetrical boundary conditions are used at fixed
35
889 boundaries. On a fixed wall, we need to ensure a zero flux through the wall or non penetrating
890 condition. In the case of a no-slip wall, a fixed-value is specified for the velocity (u = 0) in
891 combination with a zero-gradient for the pressure. If the boundary of the wall moves, then the
892 proper boundary condition is a moving-wall velocity which introduces an extra velocity in order
893 to maintain the no-slip condition and ensures a zero flux through the moving boundary.
894
895 Together with suitable boundary conditions we need to impose initial conditions. The initial
896 conditions determine the initial state of the governing equations at the initial time for an un-
897 steady problem (usually at t = 0), or at the first iteration for an iterative scheme. The better
898 the initial conditions are (the closer to the real solution), the stable and robust the numerical
899 scheme will be and the faster a converged solution will be reached (locally or globally). A com-
900 mon practice in external aerodynamics consist in setting the freestream values of velocity and
901 pressure as initial conditions in the whole domain.
902
36
912 Let us first introduce Taylor Series Expansions (TSE), which we are going to use to determine the
913 order of the truncation error O of the various approximations presented in the previous sections.
914
915 Consider the equally spaced mesh shown in figure 4.9, where ∆WP = ∆PE = ∆x. According to
916 TSE, any continuous differentiable function can be expressed as an infinite sum of terms that
917 are calculated from the values of the function derivatives at a single point. For φ(x) the TSE at
918 φ(x + ∆x) is equal to
923 By using TSE, we can obtain approximate expressions for the first and higher derivatives at a
924 point located in the direction x in terms of the function values at neighboring points.
925
926 Let us consider the discrete points W , P and E shown in figure 4.9. The TSE of φE around
927 point P (for P located midway between points W and E such that ∆WP = ∆PE = ∆x and
928 ∆wP = ∆Pe = ∆PE /2 = ∆x/2), is given by
2 3
∂φ 1 2 ∂ φ 1 3 ∂ φ
φE = φP + ∆x + ∆x + ∆x + HOT . (4.3.5)
∂x P 2! ∂x2 P 3! ∂x3 P
929 Equation 4.3.5 may be rearranged to give
2 3
∂φ φE − φP 1 ∂ φ 1 2 ∂ φ
= − ∆x − ∆x + HOT . (4.3.6)
∂x P ∆x 2! ∂x2 P 3! ∂x3 P
930 By summing all terms which involve the multiplying factor ∆x and higher and representing
931 them as O(∆x), yields to
∂φ φE − φP
= + O(∆x), (4.3.7)
∂x P ∆x
932 which is an approximation for the first derivative of φ with respect to x at the discrete point
933 P . The term O(∆x)n represents the truncation error of the approximation and determines the
934 rate at which the error decreases as the spacing between the points is reduced. The smaller ∆x
935 is, the smaller the error.
936
937 Equation 4.3.7 is known as the forward difference approximation of the first derivative and is
938 first order accurate because the truncation error is of order one or O(∆x).
939
37
940 In our notation we used discrete values φP , φE and φW , by using subscript index notation i to
941 represent the discrete points (this notation might be more amenable to follow for some readers),
942 eq. 4.3.7 is written as
∂φ φi+1 − φi
= + O(∆x). (4.3.8)
∂x i ∆x
943 Let us consider the TSE of φW around the discrete point P which is given by
2 3
∂φ 1 2 ∂ φ 1 3 ∂ φ
φW = φP − ∆x + ∆x − ∆x + HOT . (4.3.9)
∂x P 2 ∂x2 P 3! ∂x3 P
944 Rearranging and grouping eq. 4.3.9 we obtain
∂φ φP − φW
= + O(∆x), (4.3.10)
∂x P ∆x
945 or
∂φ φi − φi−1
= + O(∆x). (4.3.11)
∂x i ∆x
946 Equation 4.3.10 (or eq. 4.3.11) is known as the backward difference approximation of the first
947 derivative and is first order accurate because the truncation error is of order one or O(∆x).
948
949 Now consider the TSE in eq. 4.3.5 and eq. 4.3.9, which are repeated here for convenience
2 3
∂φ 1 2 ∂ φ 1 3 ∂ φ
φE = φP + ∆x + ∆x + ∆x + HOT , (4.3.12)
∂x P 2! ∂x2 P 3! ∂x3 P
950 and
∂2φ ∂3φ
∂φ 1 1
φW = φP − ∆x + ∆x2 − ∆x3 + HOT . (4.3.13)
∂x P 2 ∂x2 P 3! ∂x3 P
951 Subtracting eq. 4.3.13 from eq. 4.3.12, we obtain
3
∂φ 1 3 ∂ φ
φE − φW = 2∆x + 2 ∆x + HOT . (4.3.14)
∂x P 3! ∂x3 P
952 Rearranging and grouping eq. 4.3.14, we obtain
∂φ φE − φW
= + O(∆x)2 , (4.3.15)
∂x P 2∆x
953 or
∂φ φi+1 − φi−1
= + O(∆x)2 . (4.3.16)
∂x i 2∆x
954 Equation 4.3.15 (or eq. 4.3.16) is known as the central difference approximation of the first
955 derivative and is second order accurate because the truncation error is of order two or O(∆x)2 .
956 Approximations for the derivatives in the other directions are obtained in exactly the same fash-
957 ion.
958
38
959 4.3.2 Accuracy of the Upwind Scheme and Central Differencing Scheme
960 Let us study the truncation error associated with the upwind and central differencing schemes
961 presented in section 4.2.2. Consider the equally spaced mesh shown in figure 4.9, such that
962 ∆WP = ∆PE = ∆x and ∆Pe = ∆eE = ∆PE /2 = ∆x/2. Using TSE about face e, we obtain
2 3
∂2φ ∂3φ
∆x ∂φ 1 ∆x 1 ∆x
φP = φe − + − + HOT , (4.3.17)
2 ∂x e 2! 2 ∂x2 e 3! 2 ∂x3 e
2 3
∂2φ ∂3φ
∆x ∂φ 1 ∆x 1 ∆x
φE = φe + + + + HOT . (4.3.18)
2 ∂x e 2! 2 ∂x2 e 3! 2 ∂x3 e
φP = φe + O(∆x), (4.3.19)
φE = φe + O(∆x), (4.3.20)
964 and recalling eq. 4.2.17, which we rewrite here for convenience
(
φe = φP for F̊ ≥ 0,
φe = (4.3.21)
φe = φN for F̊ < 0.
965 From equations 4.3.19-4.3.21 we see that the upwind differencing scheme is first order accurate
966 because the truncation error is of order one or O(∆x).
967
(∆x)2 ∂2φ
φP + φE
φe = − + HOT , (4.3.22)
2 8 ∂x2 e
969 which is a central differencing approximation of φ at face e. Truncating eq. 4.3.22 at the second
970 order derivative yields to
φP + φE
+ O(∆x)2 ,
φe = (4.3.23)
2
971 hence the central differencing scheme is second order accurate because the truncation error is of
972 order two or O(∆x)2 .
973
974 Equation 4.3.23 is second order accurate only on uniform meshes (when ∆WP = ∆PE = ∆x and
975 ∆Pe = ∆eE = ∆PE /2 = ∆x/2). On non uniform meshes we need to use equations 4.2.14-4.2.15.
976
977 Consider the mesh shown in figure 4.9 and let us say that ∆WP 6= ∆PE and ∆Pe 6= ∆eE
978 (non-uniform mesh). The interpolated face value e can be found by using a weighted linear
979 interpolation as follows
φe = ex φP + (1 − ex ) φE , (4.3.24)
980 where the interpolation factor ex , is defined as the ratio of the distances eE and P E, i.e.,
eE | xe − xE |
ex = = . (4.3.25)
PE | ∆PE |
39
981 Let us find the truncation error of eq. 4.3.24. The TSE of φP around the discrete point E is
982 given by
983 Solving for ∂φ/∂x in eq. 4.3.26 and truncating in the second order derivative, we obtain
∂φ φE − φP
= . (4.3.27)
∂x E (xE − xP )
984 The TSE of φe about the discrete point E is expressed as follows
(xE − xe )(xe − xP ) ∂ 2 φ
φe = (1 − ex ) φE + ex φP +
2! ∂x2 E
(xE − xe )3 (xe − xP ) ∂ 3 φ
− + HOT . (4.3.30)
3!(xE − xe ) ∂x3 E
988 where the interpolation factor ex is given by
xE − xe
ex = (4.3.31)
xE − xP
989 The truncation error in eq. 4.3.30 is proportional to the product of the mesh spacing, hence the
990 scheme is second order accurate on uniform and non uniform meshes. Notice that when the face
991 e is situated midway between the two neighboring control volumes (uniform mesh), ex is equal
992 to 0.5 and eq. 4.3.30 reduces to eq. 4.3.23.
993
(x − xP )2 ∂2φ (x − xP )3 ∂3φ
∂φ
φ(x) = φP + (x − xP ) + + + HOT . (4.3.32)
∂x P 2! ∂x2 P 3! ∂x3 P
997 Integrating eq. 4.3.32 over the control volume VP , yields
(x − xP )2 ∂2φ
Z Z
∂φ
φ (x) dV = φP + (x − xP ) +
VP VP ∂x P 2! ∂x2
P 3
)3
(x − xP ∂ φ
+ + HOT . (4.3.33)
3! ∂x3 P
40
998 Assuming that φ(x) varies linearly over the control volume, all derivatives of order higher than
999 ∂φ/∂x in eq. 4.3.33 are zero. Also, the term containing the derivative ∂φ/∂x is equal to zero
1000 since the point P is the centroid of the control volume, which is given by
Z
(x − xP ) dV = 0. (4.3.34)
VP
1001 Hence eq. 4.3.33 becomes
Z
φ (x) dV = φP VP ,
VP (4.3.35)
1003 Thus, the centroid value φP represents the mean value φ. Equation 4.3.36 is easily calculated
1004 since all variables at the centroid of VP are known, no interpolation is needed. The above ap-
1005 proximation becomes exact if φ is either constant or varies linearly within the control volume;
1006 otherwise, it is a second order approximation. The above analysis can be applied to any variable
1007 being represented by its volume or face centroid value.
1008
2 3
∂2φ ∂3φ
∆x ∂φ 1 ∆x 1 ∆x
φE = φe + + + + HOT . (4.3.38)
2 ∂x e 2! 2 ∂x2 e 3! 2 ∂x3 e
2 3
∂2φ ∂3φ
∆x ∂φ 1 ∆x 1 ∆x
φP = φe − + − + HOT , (4.3.39)
2 ∂x e 2! 2 ∂x2 e 3! 2 ∂x3 e
1014 Subtracting eq. 4.3.39 from eq. 4.3.38 , rearranging and manipulating we obtain
∆x2 ∂ 3 φ
∂φ φE − φP
= − + HOT . (4.3.40)
∂x e ∆x 48 ∂x3 e
1015 Truncating eq. 4.3.40 at the third order derivative we get
∂φ φE − φP
= + O(∆x)2 . (4.3.41)
∂x e ∆x
1016 Therefore the assumption of linear variation in eq. 4.3.41 leads to a second order accurate ap-
1017 proximation of (∂φ/∂x)e because the truncation error is of order two or O(∆x)2 .
1018
41
1019 4.3.5 Spatial and Temporal Linear Variation
1020 Let us study the truncation error associated with the assumption of spatial and temporal linear
1021 variation of φ. Using TSE around the discrete point P (refer to figure 4.9) and time t yields to
(x − xP )2 ∂ 2 φ
∂φ
φ(x) = φP + (x − xP ) + +
∂x
P 2! ∂x2 P
(x − xP )3 ∂ 3 φ
+ HOT , (4.3.42)
3! ∂x3 P
t t t
∆t2 ∂ 2 φ ∆t3 ∂ 3 φ
t ∂φ
φ(t + ∆t) = φ + ∆t + + + HOT . (4.3.43)
∂t 2! ∂t2 3! ∂t3
∂φ
φ(x) = φP + (x − xP ) + O(∆x)2 , (4.3.44)
∂x P
t
t ∂φ
φ(t + ∆t) = φ + ∆t + O(∆t)2 . (4.3.45)
∂t
1023 From equations 4.3.44-4.3.45 we see that the assumption of spatial and temporal linear variation
1024 is second order accurate because the truncation error is of order two or O(∆x)2 in space, and
1025 O(∆t)2 in time.
1026
Figure 4.10: Orthogonal and non-skew mesh. Notice that the vectors d and S are parallel.
1033 For non-orthogonal meshes (figure 4.11), we computed the face gradient of the transported quan-
1034 tity φ using eq. 4.2.31. In this equation we introduced a correction to improve the accuracy of
1035 the face gradient in the case of non-orthogonality. The non-orthogonality affect the solution by
1036 adding numerical diffusion to the solution, hence reducing the accuracy. Non-orthogonality can
1037 also lead to oscillatory solutions (unboundedness), which in turn can lead to nonphysical values
1038 and divergence. The higher the non-orthogonal angle (the angle between the face area vector S
42
1039 and the vector d in figure 4.11), the higher the numerical diffusion, and this in fact reduces the
1040 accuracy of the numerical method.
1041
Figure 4.11: Non-orthogonal and non-skew mesh. Notice that the vectors d and S are not parallel. The
angle between the vector d and S is the non-orthogonal angle.
1042 Let us now study the influence of skewness on the solution accuracy. Skewness can be defined as
1043 the deviation of the face centroid f from the point where the vector d intercepts the face. This
1044 situation is shown in figure 4.12, where f is the face centroid, fi is the point where the vector
1045 d intersects the face f , and ∆i is the vector that represents the deviation of fi from f . Under
1046 these conditions, the face values linearly interpolated from the control volumes VP and VN , no
1047 longer accurately represent the value of the face center.
1048
Figure 4.12: Skewness error in neighboring control volumes; where fi represents the face interpolated
value, f the face centroid, and the vector ∆i is the deviation of fi from f .
1049 With reference to figure 4.12, the degree of skewness can be measured ass follows,
1050
| ∆i |
ψskew = . (4.3.46)
|d|
1051 Skewness adds numerical diffusion to the solution and reduces the accuracy of the numerical
1052 method. It also leads to unboundedness, which in turn can conduct to nonphysical results
1053 and/or divergence of the solution.
1054
1055 In some situations, it can happen that the point fi falls outside face f , which leads to even higher
1056 truncation errors and more severe unboundedness. This type of scenarios is usually found when
1057 dealing with sharp edges or the intersection of two or more surfaces. In general, it is highly
43
1058 advisable to keep the skewness to a minimum.
1059
1060 The error due to mesh skewness can be reduced by correcting the error introduced due to the
1061 deviation of the face interpolated value fi from the face centroid f , by using the following second
1062 order approximation,
φfi = fx φP + (1 − fx ) φN , (4.3.48)
fi N | x fi − x N |
fx = = . (4.3.50)
PN |d|
1068 Problems can be encountered in the evaluation of the gradients of φ in eq. 4.3.49, as the
1069 calculation of the gradient of the control volumes VP and VN requires the knowledge of the face
1070 centroid gradient at point fi or (∇φ)fi , by using the Gauss theorem (eq. 4.2.33) we obtain,
1 X 1 X h i
(∇φ)P = Sf φ f = Sf φfi + ∆i · (∇φ)fi . (4.3.51)
VP VP
f f
1071 One way to circumvent this problem, is by computing an initial approximation of (∇φ)fi by
1072 using centered differences as follows,
(φN − φP )
∇φfi = . (4.3.52)
|d|
1073 Then eq. 4.3.51 is used to compute (∇φ)P and (∇φ)N based on the initial approximation of
1074 (∇φ)fi . Once we obtain the new face gradient (∇φ)fi by using eq. 4.3.49, we can improve this
1075 initial approximation by iterating again using the newly computed value. At the end of the iter-
1076 ative process, the corrected value of φf is computed by using eq. 4.3.47 and the corrected value
1077 of ∇φf is approximated by linearly interpolating the gradient of the neighboring control volumes.
1078
1079 Alternatively, we can compute the gradient of the control volumes straddling face f by using
1080 Gauss theorem (eq. 4.2.33), which we repeat here for convenience
1 X
(∇φ)P = (Sf φf ) , (4.3.53)
VP
f
1081 where the value φf on face f can be evaluated by using linear interpolation (eq. 4.2.14). Once
1082 we have obtained the gradient of the neighboring control volumes VP and VN (by using eq.
1083 4.3.53), we can obtain an initial approximation to the face gradient by using arithmetic average
1084 as follows,
(∇φP + ∇φN )
∇φf = . (4.3.54)
2
44
Figure 4.13: Orthogonal and skew mesh; where ∆P f is the vector connecting the centroid of the control
volume VP with the face center f , and ∆N f is the vector connecting the centroid of the control volume
VN with the face center f .
1085 This initial approximation of the face interpolated values is then improved by doing a linear
1086 reconstruction from the control volumes centroid values to the face f (linear extrapolation). By
1087 looking at figure 4.13, this approximation is given by
1095 Skewness and non-orthogonality can be presented together, reducing significatively the accuracy
1096 of the numerical scheme (refer to figure 4.14). Whenever one of these mesh induced errors are
1097 presented (figures 4.11-4.14), corrections should be applied in order to avoid numerical diffusion,
1098 unboundedness, and to maintain second order accuracy. In spite of the fact that the methods
1099 previously presented to handle non-orthogonality and skewness are second order accurate, they
1100 use a large computational stencil, which implies larger truncation errors, and can also lead to
1101 potential unboundedness.
1102
1103 To approximate the convective fluxes with the highest accuracy by using the approximations
1104 presented in the previous sections (e.g., CD and midpoint rule), the vector d connecting the
1105 centroid of two neighboring control volumes should pass through the center of the common
1106 face f (non-skew mesh). Maximum accuracy for the diffusive flux is obtained when the vector
1107 d connecting the centroid of two neighboring control volumes is orthogonal to the face f and
1108 passes through the face center (orthogonal and non-skew mesh). Unfortunately, this type of
1109 meshes are more an exception than a rule. Hence, mesh generation requires careful user input
1110 and good meshing practices in order to avoid highly skewed and/or awful non-orthogonal meshes.
1111
1112 From our discussion, we have seen the importance of mesh quality in the solution accuracy.
1113 Highly skewed and/or awful non-orthogonal meshes, will substantially reduce the accuracy of
1114 the numerical method and will add numerical diffusion to the solution, which in turn will smear
1115 the gradients of the transported quantity φ. Bad quality meshes can also lead to oscillatory
45
Figure 4.14: Non-orthogonal and skew mesh; where fi represents the face interpolated value, f the face
centroid and the vector ∆i is the deviation of fi from f .
1116 solutions (unboundedness), which in turn can conduct to nonphysical values and therefore di-
1117 vergence. In practice, in order to avoid unboundedness when reconstructing the face gradients
1118 we use gradient limiters (also known as slope limiters), to bound the face gradients so as to
1119 avoid undershoots and overshoots on the solution. In this manuscript we will not discuss gradi-
1120 ent limiters, but the interested reader should refer to references [3, 7, 8, 9, 10, 13, 14, 26, 27].
1121
1129 As we assumed that the values of the transported quantity φ are computed and stored in the
1130 centroid of the control volume VP , and at the centroid of the faces of the same control volume;
1131 the mean value approximation (eq. 4.3.36), is valid on both uniform and non-uniform meshes.
1132
1133 However, the value of the face gradient approximation, eq. 4.3.37, is only valid on uniform
1134 meshes (refer to section 4.3.4). For non-uniform meshes (see figure 4.16), some of the terms in
1135 the TSE do not cancel, leaving a formal truncation error of order one or O(∆x), this scenario
1136 will be studied hereafter.
1137
1138 Let us consider the unequally spaced mesh shown in figure 4.16, such that ∆WP < ∆PE ,
1139 ∆Ww < ∆wP , and ∆Pe < ∆eE . Using TSE about face e, we obtain
∂2φ ∂3φ
∂φ 1 1
φE = φe + ∆eE + ∆2eE + ∆3eE + HOT , (4.3.57)
∂x e 2! ∂x2 e 3! ∂x3 e
∂2φ ∂3φ
∂φ 1 1
φP = φe − ∆Pe + ∆2Pe − ∆3Pe + HOT . (4.3.58)
∂x e 2! ∂x2 e 3! ∂x3 e
46
Figure 4.15: Uniform mesh. Notice that ∆WP = ∆PE = ∆x, ∆wP = ∆Pe , and ∆Ww = ∆Pe = ∆eE =
∆PE /2 = ∆x/2.
Figure 4.16: Non-uniform mesh. Notice that ∆WP < ∆PE , ∆Ww < ∆wP , and ∆Pe < ∆eE .
47
∂2φ
∂φ 1 2 2
φE − φP = (∆eE + ∆Pe ) + ∆eE − ∆Pe +
∂x e 2 ∂x2 e
∂3φ
1 3 3
∆eE + ∆Pe + HOT . (4.3.59)
6 ∂x3 e
1 ∆2eE − ∆2Pe
∂2φ
∂φ φE − φP
= −
∂x e (∆eE + ∆Pe ) 2 (∆eE + ∆Pe ) ∂x2 e
1 ∆3eE + ∆3Pe
∂3φ
− + HOT . (4.3.60)
6 (∆eE + ∆Pe ) ∂x3 e
1143 By inspecting eq. 4.3.61, we notice that if ∆eE = ∆P e (uniform mesh), the leading term of t
1144 is equal to zero and we obtain a second order accurate approximation to (∂φ/∂x)e . We can
1145 also infer that the larger the difference between ∆eE and ∆P e , the larger the error. Hence, it
1146 becomes clear that if we keep the difference between ∆eE and ∆P e small, the error of the leading
1147 term in eq. 4.3.61 will tend to zero.
1148
∆eE = Gf ∆P e , (4.3.62)
1150 Gf determines how fast or how slow the mesh expands or contracts between adjacent control
1151 volumes. Substituting eq. 4.3.62 into 4.3.61, yields to
G 2 ∆2 − ∆2 2
1 f Pe Pe ∂ φ
t = − , (4.3.63)
2 (Gf ∆Pe + ∆Pe ) ∂x2 e
1152 where we only show the leading term of the truncation error t . Manipulating eq. 4.3.63 yields
1153 to
∂2φ
(1 − Gf ) ∆Pe
t = . (4.3.64)
2 ∂x2 e
1154 From eq. 4.3.64 we can see that the truncation error of the centered difference approximation is
1155 of order one and proportional to the mesh spacing ∆Pe . Similarly, the truncation error of the
1156 backward difference approximation (eq. 4.3.58) is of order one and proportional to the mesh
1157 spacing ∆Pe and is given by
∂2φ
∆Pe
t = . (4.3.65)
2 ∂x2 e
48
1158 However, if we set the value of Gf close to one in eq. 4.3.64, the truncation error of the centered
1159 difference approximation is significatively smaller than the truncation error of the backward
1160 difference approximation (eq. 4.3.65). It is clear that in order to keep small as possible the error
1161 of the leading term in eq. 4.3.61, we should use a growth factor Gf close to unity.
1162
1163 From the previous discussion, it seems that uniform meshes are desirable. The use of uniform
1164 meshes to represent complex geometries is not an easy task and it is computational expensive,
1165 as it will use the same mesh resolution in areas of high gradients (where we concentrate more
1166 control volumes in order to better resolve steep gradients or local features), and areas where the
1167 solution change slowly. In practice, we refine the mesh (or concentrate more control volumes),
1168 close to walls where we expect boundary layers, in areas of strong gradients, and in zones where
1169 we want to better resolve some local features. Far from the walls and areas of steep gradients or
1170 zones interest, we use a coarse mesh. Non-uniform meshes are the rule rather than the exception
1171 when dealing with complex geometries.
1172
1173 The only thing that we should keep in mind when using non-uniform meshes is that the mesh
1174 should be smooth, i.e., there should be no large spacing differences or fast volume transitions
1175 between neighboring control volumes (otherwise the solution accuracy will be compromise), and
1176 this is achieved by using local refinement an a suitable value of growth factor Gf .
1177
49
1178 Chapter 5
∂ (ρu)
=0 (5.2.2)
∂x
1188 We consider the one-dimensional control volume shown in figure 5.1. Our attention is focused
1189 in a general node P, the neighboring nodes are identified by W and E and the control volume
1190 faces by w and e.
Figure 5.1: A general nodal point is identified by P and its neighbors in a one-dimensional geometry,
the nodes to the west and east, are identified by W and E respectively. The west side face of the control
volume is referred to by w and the east side control volume face by e. The distances between the nodes W
and P, and between nodes P and E, are identified by ∆xW P and ∆xP E respectively. Similarly distances
between face w and point P and between P and face e are denoted by ∆xwP and ∆xP e respectively. Figure
6 shows that the control volume width is ∆x = ∆xwe .
1191 Integration of eq. 5.2.1 over the control volume shown in figure 5.1 gives
50
∂φ ∂φ
(ρuSφ)e − (ρuSφ)w = ΓS − ΓS (5.2.3)
∂x e ∂x w
1192 and integration of eq. 5.2.2 yields to
F = ρu,
Γ (5.2.5)
D=
∆x
1196 The cell face values of the variables F and D can be written as
Fw = (ρu)w Fe = (ρu)e ,
Γ Γ (5.2.6)
Dw = De =
∆xW P ∆xP E
1197 By employing the central differencing approach to represent the contribution of the diffusion
1198 terms on the right hand side of eq. 5.2.3, we obtain
∂φ φE − φP
ΓS = Γe Se
∂x e ∆xP E
(5.2.7)
∂φ φP − φW
ΓS = Γw Sw
∂x w ∆xW P
Fe − Fw = 0 (5.2.9)
1203 In the previous we assumed that Sw = Se = S, so we can divide the left and right hand sides of
1204 eq. 5.2.3 by the area S.
1205
1206 The central differencing approximation has been used to represent the diffusion terms which
1207 appear on the right hand side of eq. 5.2.8, and it seems logical to try linear interpolation to
1208 compute the cell face values for the convective terms on the left hand side of this equation. For
1209 a uniform mesh we can write the cell face values of the quantity φ as
(φP + φE )
φe =
2 (5.2.10)
(φW + φP )
φw =
2
51
1210 Substitution of the above equations into the convection terms of eq. 5.2.8 yields to
Fe Fw
(φP + φE ) − (φW + φP ) = De (φE − φP ) − Dw (φP − φW ) (5.2.11)
2 2
1211 Rearranging and grouping eq. 5.2.11 yields to
aP φP = aW φW + aE φE (5.2.12)
1212 where
Fw
aW = Dw +
2
Fe (5.2.13)
aE = De −
2
aP = aW + aE + (Fe − Fw )
1227 Let us explain step by step the solution method by using the mesh illustrated in figure 5.3. The
1228 domain has been divided into five control volumes, so as ∆x = 0.2 m. Note that L = 1.0 m
1229 (length), ρ = 0.1 kg/m3 , Γ = 0.1 kg/m.s.
52
1230 The discretized eq. 5.2.12 and its coefficients eq. 5.2.13 apply to all internal control volumes
1231 (2, 3 and 4). Control volumes 1 and 5 need special treatment since they are boundary cells.
1232 Integrating the convection-diffusion equation eq. 5.2.1 and using central differences for both
1233 the convective and diffusive terms, and by applying the boundary and initial conditions we can
1234 obtain the solution to our model equation.
1235
1236 The value of φ is given at the west face of cell 1 (φw = φA = 1) so we do not need to make any
1237 approximation in the convective flux term at this boundary. This yields the following equation
1238 for node 1,
Fe
(φP + φE ) − FA φA = De (φE − φP ) − DA (φP − φA ) (5.3.2)
2
1239 For the control volume 5, the φ value at the east face is known (φe = φB = 0). As before, we
1240 obtain the following equation
Fw
FB φB − (φP + φW ) = DE (φB − φP ) − Dw (φP − φW ) (5.3.3)
2
1241 Rearranging and grouping equations 5.3.2 and 5.3.3, we get the discretized equations at bound-
1242 aries nodes,
aP φP = aW φW + aE φE + Su (5.3.4)
1243 where
aP = aW + aE + (Fe − Fw ) − SP (5.3.5)
1244 Note that DA = DB = 2Γ/∆x = 2D and FA = FB = F .
1245
1246 To introduce the boundary conditions we have suppressed the link to the boundary side and
1247 entered the boundary flux as source terms.
1248
Node aW aE SP Su
1 0 D − F/2 −(2D + F ) (2D + F )φA
2, 3, 4 D + F/2 D − F/2 0 0
5 D + F/2 0 −(2D − F ) (2D − F )φB
1249 For u = 0.1 m/s, F = ρu = 0.1, D = Γ/∆x = 0.5, the coefficient are summarized in table 2.
1250
Node aW aE SP Su aP = aW + aE − SP
1 0 0.45 -1.1 1.1φA 1.55
2 0.55 0.45 0 0 1.0
3 0.55 0.45 0 0 1.0
4 0.55 0.45 0 0 1.0
5 0.55 0 -0.9 0.9φB 1.45
53
1.55 −0.45 0.0 0.0 0.0 φ1 1.1
−0.55 1.0 −0.45 0.0 0.0 φ2 0.0
0.0
−0.55 1.0 −0.45 0.0
φ3 = 0.0
(5.3.6)
0.0 0.0 −0.55 1.0 −0.45 φ4 0.0
0.0 0.0 0.0 −0.55 1.45 φ5 0.0
1252 The solution of the previous system yields to
φ1 0.9421
φ2 0.8006
φ3 = 0.6276 (5.3.7)
φ4 0.4163
φ5 0.1579
1253 The numerical and analytical solutions are compared in table 5.3 and in figure 5.4. The analytical
1254 solution for this problem is,
2.7183 − ex
φ(x) = (5.3.8)
1.7183
1255 From the results, it can be seen that regardless the coarseness of the mesh, the central differ-
1256 encing (CD) scheme gives reasonable agreement with the analytical solution.
1257
Figure 5.4: Comparison of the numerical and analytical solutions for u = 0.1 m/s.
1258 The cell Peclet number (or cell Reynolds number), is defined as,
ρu∆x
P ecell = (5.3.9)
Γ
1259 gives a relation between convection and diffusion. If the local Peclet number is less than 2, it is
1260 sufficient for boundedness of the solution by using CD for computing the convective terms. But
54
1261 when the Peclet number is higher than 2, the solution obtained by using CD for the convective
1262 terms shows an oscillatory behavior (unboundedness).
1263
1264 As an exercise, try to compute the cell Peclet number for the previous example.
1265
1266 In the next case (u = 2.5 m/s), the cell Peclet number is higher than 2. Let us see the solution,
1267 this is let to you as an exercise. You just need to proceed in exactly the same way as we did before.
1268
55
1273 Chapter 6
56
1277 Bibliography
1278 [1] J. D. Anderson, “Computational Fluid Dynamics: The Basics with Applications”, McGraw-
1279 Hill, 1995.
1281 [3] D. Drikakis and W. Rider, “High-Resolution Methods for Incompressible and Low-Speed
1282 Flows”, Springer, 2005.
1283 [4] P. M. Gresho, “Incompressible fluid dynamics: some fundamental formulation issues”, An-
1284 nual Review of Fluid Mechanics, Vol. 23, 1991, pp. 413-453.
1285 [5] F. M. White, “Viscous Fluid Flow”, McGraw-Hill, Third Edition, 2005.
1286 [6] C. A. J. Fletcher, “Computational Techniques for Fluid Dynamics: Volume 2: Specific
1287 Techniques for Different Flow Categories”, Springer, Second Edition, 1996.
1288 [7] J. H. Ferziger and M. Peric, “Computational Methods for Fluid Dynamics”, Springer, Sec-
1289 ond Edition, 2002.
1290 [8] J. Blazek, “Computational Fluid Dynamics: Principles and Applications”, Elsevier, Second
1291 Edition, 2003.
1292 [9] E. F. Toro, “Riemann Solvers and Numerical Methods for Fluid Dynamics”, Springer, Third
1293 Edition, 2009.
1294 [10] H. Versteeg and W. Malalasekera, “An Introduction to Computational Fluid Dynamics:
1295 The Finite Volume Method”, Pearson, Second Edition, 2007.
1296 [11] S. Patankar, “Numerical Heat Transfer and Fluid Flow”, McGraw-Hill, 1980.
1297 [12] R. H. Pletcher, J. C. Tannehill and D. A. Anderson, “Computational Fluid Mechanics and
1298 Heat Transfer”, Taylor and Francis, Second Edition, 1997.
1299 [13] R. J. LeVeque, “Finite Volume Methods for Hyperbolic Problems”, Cambridge Texts in
1300 Applied Mathematics, 2002.
1301 [14] H. Jasak, “Error Analysis and Estimation for the Finite Volume Method with Application
1302 for Fluid Flows”, PhD Thesis, Imperial College London, 1996.
1303 [15] X. Jiang and C-H. Lai, “Numerical Techniques for Direct and Large-Eddy Simulations”,
1304 CRC Numerical Analysis and Scientific Computing Series, 2009.
1305 [16] P. A. Durbin and B. A. Pettersson-Reif, “Statistical Theory and Modeling for Turbulent
1306 Flows”, Wiley, Second Edition, 2010.
57
1308 [18] P. Sagaut, “Large Eddy Simulation for Incompressible Flows: An Introduction”, Springer,
1309 2005.
1310 [19] L. C. Berselli, T. Iliescu and W. J. Layton , “Mathematics of Large Eddy Simulation of
1311 Turbulent Flows”, Springer, 2010.
1312 [20] D. C. Wilcox, “Turbulence Modeling for CFD”, DCW Industries, Third Edition, 2006.
1313 [21] T. Cebeci, “Turbulence Models and Their Application: Efficient Numerical Methods with
1314 Computer Programs”, Springer, 2004.
1316 [23] K. A. Hoffmann and S. T. Chiang, “Computational Fluid Dynamics. Volume 3”, EES,
1317 Fourth Edition, 2000.
1318 [24] D. C. Wilcox, “Re-assessment of the Scale-Determining Equation for Advanced Turbulence
1319 Models”, AIAA Journal, vol. 26(11), 1988, pp. 1299-1310.
1320 [25] U. Frisch, “Turbulence, the legacy of A. N. Kolmogorov”, Cambridge University Press,
1321 Cambridge, 1995.
1322 [26] H. Jasak, “High Resolution NVD Differencing Scheme for Arbitrarily Unstructured
1323 Meshes”, Int. J. Numer. Meth. Fluids, Vol. 31, pp. 431-449, 1999.
1324 [27] C. Laney, “ Computational Gasdynamics”, Cambridge University Press, Cambridge, 1998.
58