Chapter 5 PDF
Chapter 5 PDF
Chapter 5 PDF
Introduction
The steady convection-diffusion equation is
div( u ) = div(grad ) + S
CV
(5.3)
( uA )e ( uA ) w = A A
x
x w
(5.5)
(5.6)
3
w Aw
xWP
De =
e Ae
xPE
Using central difference approach for the diffusion terms, Eqn (5.5)
becomes
Fee Fww = De (E P ) Dw (P W )
(5.9)
C i i equation
Continuity
i becomes
b
Fe Fw = 0
(5.10)
e = (P + E ) / 2
w = (W + P ) / 2
Substituting into eqn (5.9)
Fe
F
(P + E ) w (W + P ) = De (E P ) Dw (P W )
2
2
ME555 : Computational Fluid Dynamics
Rearranging,
Fw
Fe
Fw
Fe
Dw 2 + De + 2 P = Dw + 2 W + De 2 E
Fw
Fe
Fw
Fe
Dw + 2 + De 2 + ( Fe Fw ) P = Dw + 2 W + De 2 E
(5.14)
where
aW
Dw +
aE
Fw
2
De
aP
Fe
2
aW + aE + ( Fe Fw )
This equation has the same general form as the diffusion eqn. (4.11).
ME555 : Computational Fluid Dynamics
Example 5.1
A property is transported by convection and diffusion through the
one dimensional domain shown below. Using central difference
scheme, find the distribution of for (L =1,
1, = 1, = 0.1)
(i) Case 1: u = 0.1 m/s (use 5 CVs)
(ii) Case 2: u = 2.5 m/s (use 5 CVs)
Compare the results with the analytical solution.
o exp( ux / ) 1
=
L o exp( uL / ) 1
=1
d
d d
( u ) =
dx
dx dx
4
w
e
5
x/2
B
7
=0
xWP= x xPE=x
x/2
aPP = aW W + aEE + Su
where
aP = aW + aE + ( Fe Fw ) S P
Fw = ( uA) w
Dw =
w Aw
xWP
Fe = ( uA)e
De =
e Ae
xPE
Node
aW
aE
SP
Su
2
0
De Fe / 2 ( Dw + Fw / 2) ( Dw + Fw / 2) A
3, 4,5 Dw + Fw / 2 De Fe / 2
0
0
6
0
( De Fe / 2) ( De Fe / 2)B
Dw + Fw / 2
ME555 : Computational Fluid Dynamics
aW3
aE 2
a p3
aE 3
aW4
a p4
aE 4
aWi
a pi
aE i
aWn2
a pn 2
aWn1
Su2
2
3
Su3
4 Su4
Su
i
i
Su
aE n 2 n 2
n2
a pn1 n 1 Sun 1
3 0.8006
4 = 0.6276
5 0.4163
6 0.1573
0
( x) =
2.7183 exp( x)
1.7183
11
12
13
1. Conservativeness
To ensure conservation of for the whole solution
domain the flux of leaving a CV across a certain
face must be equal to the flux of entering the
face
adjacent CV through the same face.
To achieve this the flux through a common face
must be represented in a consistent manner (by one
and the same expression) in adjacent CVs.
14
w 2 (2 1 )
x
Flux entering CV 2
e 2 (3 2 )
x
Flux leaving CV 2
An overall flux balance may be obtained by summing the net flux through each CV
(3 2 )
(2 1 )
(2 1 )
e1 x q A + e 2 x w 2 x
(4 3 )
(3 2 )
(4 3 )
+ e3
w3
+ q w4
= q q
x
x B
x B A
15
16
2) Boundedness
The sufficient condition for a convergent iterative method is
nb
aP
1 at all nodes
aP = aP S p
(5.22)
17
aE = De
Fe e Ae ue Ae
=
2 xPE
2
18
3) Transportiveness
The transportiveness property of a fluid flow can be illustrated by
considering a constant source of at a point P
u
F
cell Peclet number
Pe = =
D / x
19
Conservativeness
The central differencing scheme uses
consistent expressions to evaluate convective
and diffusive fluxes at the CV faces.
The scheme is conservative.
20
10
Boundedness
(i) The internal coefficients of discretised scalar transport equation
(5.14) are
aW
Dw +
aE
Fw
2
De
aP
Fe
2
aW + aE + ( Fe Fw )
21
(ii) aE = De Fe/2
For aE > 0
or
Fe
< De
2
Fe
= Pee < 2
De
to have positive aE .
22
11
Transportiveness
The CD scheme does not recognise the direction of the
flow or the strength of convection relative to diffusion.
Thus it does not posses the transportiveness property at
Thus,
high Pe.
Accuracy
The CD scheme is stable and accurate only if Pe = F/D <
2.
The CD scheme satisfies this criteria for low Re numbers
or for small grid spacings.
Thus, CD scheme is not a suitable discretisation practice
for general purpose flow calculations.
ME555 : Computational Fluid Dynamics
23
When the flow is in the positive direction, uw>0, ue>0 (Fw>0, Fe>0), the
upwind scheme sets w = W and e = P
(5.25)
ME555 : Computational Fluid Dynamics
24
12
(5.26)
Dw + ( De Fe ) + ( Fe Fw ) P = DwW + ( De Fe )E
ME555 : Computational Fluid Dynamics
25
(5.30)
the equations (5.27) and (5.30) can be written in the usual general
form
aPP = aW W + aEE
(5.31)
aP = aW + aE + ( Fe Fw )
and neighbour coeffcients
aw
ae
Fw>0, Fe>0
Dw + Fw
De
Fw<0,
Dw
De - Fe
<0 Fe<0
A form of notation for neighbour coefficients of the upwind
differencing method that covers both flow directions is:
ae
aw
Dw + max(Fw,0)
ME555 : Computational Fluid Dynamics
26
De + max(0, Fe)
I. Sezai - Eastern Mediterranean University
13
Example 5.2 Solve the problem considered in example 5.1 using the
upwind differencing scheme for
(i) u = 0.1 m/s,
((ii)) u = 2.5 m/s
with the coarse five-point grid.
=1
Dw =
w Aw
xWP
=0
x/2
Fe = ( uA)e
De =
B
7
xWP= x xPE=x
aP = aW + aE + ( Fe Fw ) S P
Fw = ( uA) w
e
P
aPP = aW W + aEE + Su
where
x/2
d
d d
( u ) =
dx
dx dx
27
e Ae
xPE
Node
aW
aE
SP
Su
2
0
De + max(0, Fe ) ( Dw + max( Fw , 0)) ( Dw + max( Fw , 0)) A
3, 4,5 Dw + max( Fw , 0) De + max(0, Fe )
0
0
6
0
( De + max(0, Fe )) ( De + max(0, Fe ))B
Dw + max( Fw , 0)
ME555 : Computational Fluid Dynamics
28
14
u = 0.l m/s:
29
u = 2.5 m/s
30
15
Conservativeness
the upwind differencing scheme utilises consistent
expressions to calculate fluxes through cell faces: therefore
it can be easily shown that the formulation is conservative
Boundedness
the coefficients of the discretised equation are always
positive and satisfy the requirements for boundedness
Fe Fw = 0 aP = aW + aE
No wiggles in
solution
31
Accuracy
the scheme is based on the backward differencing formula so the accuracy is only
first order on the basis of the Taylor series truncation error (see Appendix A):
A major drawback of the scheme:
it p
produces erronous results when the flow is not aligned
with the ggrid lines.
g
is smeared error has a diffusion-like appearance false diffusion
32
16
33
Pew =
( u )w
Fw
=
Dw w / xWP
(5.35)
The hybrid differencing formula for the net flux through the west face is as
follows:
1
2
1
2
qw = Fw 1 +
W + 1
P
2 Pew
2 Pew
qw = FwW
qw = FwP
ME555 : Computational Fluid Dynamics
34
for
for
Pew 2
for
Pew 2
(5.36)
17
(5.37)
aP = aW + aE + ( Fe Fw )
After some re-arrangement it is easy to establish that the neighbour
coefficients for the hybrid differencing scheme for steady one dimensional convection diffusion can be written as follows:
aW
aE
F
F
max Fw , Dw + w , 0 max Fe , De e
2
2
35
, 0
36
18
37
Is fully conservative
Is unconditionally bounded (since the coefficients
are always positive)
Satisfies the transportiveness property
Produces physical realistic solutions
Highly stable compared with higher order scheme
Is only first order accurate
38
19
39
two-dimensional flow
three-dimensional flow
aW
max[Fw,(D
(Dw+Fw/2),0]
/2) 0] max[Fw,(D
(Dw+Fw/2),0]
/2) 0] max[Fw,(D
(Dw+Fw/2),0]
/2) 0]
aE
max[-Fe,(De-Fe/2),0]
max[-Fe,(De-Fe/2),0]
max[-Fe,(De-Fe/2),0]
aS
max[Fs,(Ds+Fs/2),0]
max[Fs,(Ds+Fs/2),0]
aN
max[-Fn,(Dn-Fn/2),0]
max[-Fn,(Dn-Fn/2),0]
aB
max[Fb,(Db+Fb/2),0]
aT
max[-Ft,(Dt-Ft/2),0]
Fe-Fw
Fe-Fw+Fn-Fs
Fe-Fw+Fn-Fs+Ft-Fb
40
20
(u)wAw
(u)eAe
(u)sAs
(u)nAn
(u)bAb
(u)tAt
wAw/xWP
eAe/xPE
sAs/ySP
nAn/yPN
bAb/zPN
tAt/zPT
41
42
21
For example, the net flux per unit area at the west control volume
face is evaluated using
qw = Fw W w (P W ) for
5
where w = (1 0.1
0 1Pew ) Pew
and
qw = FwW
for
0 < Pe < 10
(5.44a)
Pew > 10
(5.44b)
aE
) + max [ F , 0]
5
43
) + max [ F , 0]
5
44
22
Two upstream nodes and one downstream node is used to calculate the
face value of
ME555 : Computational Fluid Dynamics
45
It can be shown that for a uniform grid the value of at the cell face
between two bracketing nodes i and i-1, and upstream node i-2 is given by
the following formula:
6
3
1
face = i 1 + i i 2
(5.45)
8
8
8
h uw > 0, the
h bbracketing
k i nodes
d for
f the
h west face
f
d P, the
h
When
w are W and
upstream node is WW (Figure 5.17), and
6
3
1
(5.46)
w = W + P WW
8
8
8
When ue > 0, the bracketing nodes for the east face e are P and E, the
upstream node is W ,so
6
8
3
8
1
8
e = P + E W
(5.47)
The diffusion terms may be evaluated using the gradient of the appropriate
parabola.
It is interesting to note that on a uniform grid this practice gives the same
expressions as central differencing for diffusion.
ME555 : Computational Fluid Dynamics
46
23
If Fw>0 and Fe>0 and if we use equations (5.46-5.47) for the convective
terms and central differencing for the diffusion terms, the discretised form of
the one-dimensional convection-diffusion transport equation(5.9) may be
written as Fee Fww = De (E P ) Dw (P W )
(5.9)
6
3
1
3
1
6
Fe 8 P + 8 E 8 W Fw 8 W + 8 P 8 WW = De (E P ) Dw (P W )
which can be rearranged to give
3
6
6
1
3
1
Dw 8 Fw + De + 8 Fe P = Dw + 8 Fw + 8 Fe W + De 8 Fe E 8 FwWW
47
(5.48)
(5.49)
(5 49)
For Fw < 0 and Fe < 0 the flux across the west and east boundaries is given
by the expressions
6
3
1
8
8
8
6
3
1
e = E + P EE
8
8
8
w = P + W E
(5 50)
(5.50)
Substitution of these two formulae for the convective terms in the discretised
convection-diffusion equation (5.9) together with central differencing for the
diffusion terms leads, after re-arrangement as above, to the following
coefficients:
48
24
General expressions, valid for positive and negative flow directions, can be obtained
by combining the two sets of coefficients above.
The QUICK scheme for one-dimensional convection-diffusion problems can be
summarised as follows:
(5.51)
aP = aW + aE + aWW + aEE + ( Fe Fw )
And neighbour coefficients
where
49
Example 5.4 Using the QUICK scheme solve the problem considered in
example 5.1 for u=0.2 m/s on a five-point grid. Compare the quick solution
with the exact and central differencing solution.
A
1
=1
w
W
x/2
e
P
xWP= x xPE=x
B
7
=0
x/2
Boundaryy Points :
Consider node 2. w = A
50
25
Mirror Node
Domain boundary
Node 2
It can be easily shown that the linearly extrapolated value at the minor
node is given by
(5.52)
0 = 2 A P
The extrapolation to the mirror node has given us the required W node
for the formula (5.47) that calculates e at the east face of control
volume 2:
6
8
3
8
e = P + E
1
7
3
2
( 2 A P ) = P + E A
8
8
8
8
51
(5.53)
52
26
The discretised equations for nodes 2, 3 and 6 are now written to fit into the
standard form to give:
with
(5.59)
aP = aW + aE + aWW + aEE + ( Fe Fw ) S P
The solution is
2 0.9648
0.8707
3
4 = 0.7309
5 0.5226
6 0.2123
(5.60)
(5 60)
53
54
27
55
f = f + f
HO
of = of of
where:
uf = f value to be computed by 1st order upwind method
HO
56
28
1
8
w = W + P WW
w = W +
Similarly:
uf
1
[3P 2W WW ]
8
For Fw > 0
1
[3E 2P W ]
8
1
w = P + [3W 2P E ]
8
1
e = E + [3P 2E EE ]
8
e = P +
57
F Fe > 0
For
For Fw < 0
For Fe < 0
I. Sezai - Eastern Mediterranean University
ae
Dw + max( Fw , 0) De + max(0, Fe )
(5.62)
(5.63)
((5.64))
Su
max[ Fw , 0](w W ) max[ Fw , 0](w P )
+ max[ Fe , 0](e E ) max[ Fe , 0](e P )
((5.65))
Note that aw and ae are the same as that of the upwind method.
58
29
QUICK scheme
Has greater accuracy than central, upwind or power schemes
Retains the upwind weighted characteristics
Resultant false diffusion is small
59
60
30
Homework
H
y
x
y
x c p x y c p y
Find the temperature profile in the channel for Re = umeanH/ = 10, Pr = cp/k = 1. Use Lx/H = 5, where
Lx is the length of the solution domain. Use UPWIND method. (Note: k/cp = /Pr for fluids.). Also,
choosing = 1, find from Re relation. Take Tin = 0, Twalls = 100, umean = 1 m/s
ME555 : Computational Fluid Dynamics
61
w
WW
e = P
e
EE
ve
UPWIND
e = P
ME555 : Computational Fluid Dynamics
(5.66)
62
31
w
WW
SOU (LUD)
EE
ve
e = P +
(5.67)
63
w
WW
CENTRAL
EE
ue
1
2
(5.69)
64
e = P + (E P )
ME555 : Computational Fluid Dynamics
32
W
w
WW
e
P
QUICK
EE
ue
65
(5.72)
66
33
(5.73)
= P W for LUD scheme
E P
(5.74)
P W
E P
e = P + 3 +
=3+ P W
E P
1
(E P )
4
(5.75)
1
for QUICK scheme
4
67
(5.76)
r=
P W
E P
(5.77)
(5.78)
= 1 for CD scheme
P W
for LUD scheme
E P
1
= 3 + P W for QUICK scheme
E P 4
68
34
69
70
35
(5.79)
= 3 1 + 5 3
71
72
36
UD scheme is TVD
LUD scheme is not TVD for r > 2
CD scheme is not TVD for r < 0.5
QUICK scheme is not TVD for r < 3/7 and r > 5
ME555 : Computational Fluid Dynamics
73
74
37
75
Limiter function
Source
r+ r
1+ r
r + r2
1+ r2
V
Van Alb
Albada
d et all. (1982)
min(r ,1) if r > 0
if r 0
0
(r ) =
Roe (1985)
SUPERBEE
Roe (1985)
Sweby
Sweby (1984)
QUICK
UMIST
S
Leonard (1988)
Lien
i andd Leschziner
h i
(1993)
0 2
= 1 Min-Mod Limiter
= 2 SUPERBEE Limiter of Roe
ME555 : Computational Fluid Dynamics
76
38
MINMOD
MINMOD
77
d
d d
( u ) =
(5.81)
dx
dx dx
The coefficients of the discretized equation are written in the deferred correction
approach.
h IIn thi
this approach,
h the
th aE, aW, aP coefficients
ffi i t are the
th same as off UD scheme.
h
The extra terms resulting from the application of a limiter function is added to the
source term Sdc.
The face values are:
For u > 0
For u < 0
1
2
1
w = W + (rw+ )(P W )
2
e = P + (re+ )(E P )
1
2
1
w = P + (rw )(W P )
2
e = E + ( re )(P E )
78
re+ = P W
E P
rw+ = W WW
P W
re = EE E
E P
rw = E P
P W
(5.82)
(5.83)
39
aPP = aW W + aEE + S dc
(5.84)
aP = aW + aE + ( Fe Fw )
where
aw
ae
Dw + max( Fw , 0) De + max(0, Fe )
S dc
max[ Fw , 0](w W ) max[ Fw , 0](w P )
+ max[ Fe , 0](e E ) max[ Fe , 0](e P )
((5.86))
79
Comparison of TVD schemes for pure convection flowing 45o to the grid direction.
80
40