You are on page 1of 40

Chapter 5

The Finite Volume Method for


Convection-Diffusion Problems

Prepared by: Prof. Dr. I. Sezai


Eastern Mediterranean University
Mechanical Engineering Department

Introduction
The steady convection-diffusion equation is
div( ρφ u ) = div(Γgradφ ) + Sφ
Integration over the control volume gives :
∫ n ⋅ ( ρφu)dA = ∫ n ⋅ (Γgradφ )dA + ∫ Sφ dV
A A CV

This equation represents the flux balance in a control volume.


The main problem in the discretisation of the convective terms is the
calculation of φ at CV faces and its convective flux across these
boundaries.
Diffusion process affects the distribution of φ in all directions.
Convection spreads influence only in the flow direction. This sets a
limit on the grid size for stable convection-diffusion calculations with
central difference method.
ME555 : Computational Fluid Dynamics 2 I. Sezai - Eastern Mediterranean University

1
Steady one-dimensional convection and diffusion
In the absence of sources, the steady convection and diffusion of a
property φ in a given one-dimensional flow field u is governed by
d d dφ
( ρ uφ ) = (Γ ) (5.3)
dx dx dx
The flow must also satisfy continuity, so
d
( ρu) = 0
dx
Integrating Eqn. (5.3) over the CV
⎛ ∂φ ⎞ ⎛ ∂φ ⎞
( ρ uAφ )e − ( ρ uAφ ) w = ⎜ ΓA ⎟ − ⎜ ΓA ⎟ (5.5)
⎝ ∂x ⎠e ⎝ ∂x ⎠ w
Integrating continuity Eqn.

( ρ uA)e − ( ρ uA) w = 0 (5.6)


ME555 : Computational Fluid Dynamics 3 I. Sezai - Eastern Mediterranean University

Let F = ρuA convective mass flux at cell faces


D = ΓA/δx diffusion conductance
At cell faces:
Fw = ( ρ uA) w Fe = ( ρ uA)e
Γ w Aw Γ e Ae
Dw = De =
δ xWP δ xPE
Using central difference approach for the diffusion terms, Eqn (5.5)
becomes

Feφe − Fwφw = De (φE − φP ) − Dw (φP − φW ) (5.9)


C i i equation
Continuity i becomes
b
Fe − Fw = 0
We assume that velocity field is known → Fe, Fw known. (5.10)
We need to calculate φ at faces e and w.
ME555 : Computational Fluid Dynamics 4 I. Sezai - Eastern Mediterranean University

2
The Central Differencing Scheme
Works well for diffusion terms.
Let us use this method to compute the convective terms by
linear interpolation.
For a uniform grid, cell face values are:

φ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 5 I. Sezai - Eastern Mediterranean University

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
⎣⎝ ⎠ ⎝ ⎠ ⎦ ⎝ ⎠ ⎝ ⎠
which is of the form
aPφP = aW φW + aEφE (5.14)

where
aW aE aP
Fw Fe
Dw + De − aW + aE + ( Fe − Fw )
2 2
This equation has the same general form as the diffusion eqn. (4.11).
ME555 : Computational Fluid Dynamics 6 I. Sezai - Eastern Mediterranean University

3
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 CV’s)
(ii) Case 2: u = 2.5 m/s (use 5 CV’s)
Compare the results with the analytical solution.
φ − φo exp( ρ ux / Γ) − 1
=
φL − φo exp( ρ uL / Γ) − 1
(iii) Case 3: u = 2.5 m/s (20 CV’s)

ME555 : Computational Fluid Dynamics 7 I. Sezai - Eastern Mediterranean University

The governing equation is: d d ⎛ dφ ⎞


( ρ uφ ) = ⎜ Γ ⎟
A dx dx ⎝ dx ⎠ B
1 2 3 w 4 e 5 6 7
φ=1 W P E φ=0

δx/2 δxWP= δx δxPE=δx δx/2


δx
aPφP = aW φW + aEφE + Su For interior nodes: δ xWP = δ xPE = δ x
where aP = aW + aE + ( Fe − Fw ) − S P For node 2: δ xWP = δ x / 2
Fw = ( ρ uA) w Fe = ( ρ uA)e For node 6: δ xPE = δ x / 2
Γ w Aw Γ e Ae
Dw = De =
δ xWP δ 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 Dw + Fw / 2 0 −( De − Fe / 2) ( De − Fe / 2)φB
ME555 : Computational Fluid Dynamics 8 I. Sezai - Eastern Mediterranean University

4
The resulting system of equations are
⎡ − aP2 aE 2 ⎤ φ − Su2 ⎤
⎢ ⎥⎡ 2 ⎤ ⎡
⎢ aW3 − a p3 aE 3 ⎥ φ3⎢ ⎥ ⎢ ⎥
⎢ ⎥⎢ ⎥ ⎢ − Su3 ⎥
−a p4
⎥ ⎢ φ4 ⎥ ⎢ − Su4 ⎥
aW4 aE 4

⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ = ⎢ ⎥
⎢ aWi −a pi aE i ⎥ i⎢ φ ⎥ ⎢ − Su i

⎢ ⎥⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥ ⎢ ⎥
⎢ aWn−2 − a pn − 2 ⎥ ⎢φ
aE n −2 ⎢ n − 2 ⎥ ⎢ ⎥ ⎢ − Su ⎥
⎢ ⎥
n−2

⎣⎢ aWn−1 −a pn−1 ⎦⎥ ⎢⎣φn −1 ⎥⎦ ⎢⎣ − Sun −1 ⎥⎦

Solve the system of equations using Tri-diagonal matrix algorithm


(TDMA) for φ2, φ 3, φ 4, … φ n-1 , where (n = 7)
ME555 : Computational Fluid Dynamics 9 I. Sezai - Eastern Mediterranean University

The solution for case 1 is:

⎡φ1 ⎤ ⎡ 1 ⎤
⎢φ ⎥ ⎢ 0.9421⎥
⎢ 2⎥ ⎢ ⎥
⎢φ3 ⎥ ⎢0.8006 ⎥
⎢ ⎥ ⎢ ⎥
⎢φ4 ⎥ = ⎢0.6276 ⎥
⎢φ5 ⎥ ⎢ 0.4163⎥
⎢ ⎥ ⎢ ⎥
⎢φ6 ⎥ ⎢ 0.1573⎥
⎢φ ⎥ ⎢ 0 ⎥
⎣ 7⎦ ⎣ ⎦

Exact solution is:


2.7183 − exp( x) Comparison of the numerical result with the
φ ( x) = analytical solution.
1.7183
ME555 : Computational Fluid Dynamics 10 I. Sezai - Eastern Mediterranean University

5
The solution for case 2: (u = 2.5 m/s, 5 CV’s)

Comparison of the numerical result with the analytical solution.

The solution appears to oscillate about the exact solution.


ME555 : Computational Fluid Dynamics 11 I. Sezai - Eastern Mediterranean University

The solution for case 3: (u = 2.5 m/s, 20 CV’s)

Comparison of the numerical result with the analytical solution.


Grid refinement has reduced the F/D ratio from 5 to 1.25.
Central difference scheme yields accurate results when F/D ratio is low.
ME555 : Computational Fluid Dynamics 12 I. Sezai - Eastern Mediterranean University

6
Properties of Discretisation Schemes

The numerical results will only be physically


realistic when the discretisation scheme has certain
fundamental properties. The most important ones
are:
• Conservativeness
• Boundednes
• Transportiveness

ME555 : Computational Fluid Dynamics 13 I. Sezai - Eastern Mediterranean University

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 CV’s.

ME555 : Computational Fluid Dynamics 14 I. Sezai - Eastern Mediterranean University

7
Example of consistent specification of diffusive fluxes

Γ w 2 (φ2 − φ1 ) Γ e 2 (φ3 − φ2 )
δx δx
Flux entering CV 2 Flux leaving CV 2
An overall flux balance may be obtained by summing the net flux through each CV
⎡ (φ2 − φ1 ) ⎤ ⎡ (φ3 − φ2 ) (φ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
Γe1 = Γw2, Γe2 = Γw3 and Γe3 = Γw4 → Fluxes across CV faces are
expressed in consistent manner,
→ fluxes cancel out in pairs when summed over the entire domain.
ME555 : Computational Fluid Dynamics 15 I. Sezai - Eastern Mediterranean University

Flux Consistency ensures conservation of φ over the entire domain


for the central difference formulation of the diffusive flux.
Inconsistent flux interpolation formulae give rise to unsuitable
schemes that do not satisfy overall conservation.

For nodes 1, 2 and 3 → quadratic function 1 is used.


For nodes 2, 3 and 4 → quadratic function 2 is used.
If gradient of 1 ≠ gradient of 2 at cell face → flux leaving CV 2 will
not be equal to flux entering CV 3
→ overall conservation is not satisfied.
ME555 : Computational Fluid Dynamics 16 I. Sezai - Eastern Mediterranean University

8
2) Boundedness

The sufficient condition for a convergent iterative method is


∑a nb ⎧≤ 1 at all nodes
⎨ a′P = aP − S p (5.22)
aP′ ⎩< 1 at one node at least
If eqn. (5.22) is satisfied, resulting matrix coefficients are diagonally
dominant.
For diagonal dominance, (aP – Sp) should be large and Sp < 0.
Diagonal dominance is a desirable feature for satisfying the boundedness
criterion.
This states that in the absence of sources the internal nodal values of φ
should be bounded by its boundary values.
In a steady conduction problem without sources for which the boundary
temperatures are 200 and 500 oC, all interior values of T should be between
these temperatures.
ME555 : Computational Fluid Dynamics 17 I. Sezai - Eastern Mediterranean University

Another essential requirement for boundedness is that all coefficients


of the discretised equations should have the same sign.
If the discretisation scheme does not satisfy the boundedness criteria
the solution may not converge at all.
all Or if it converges it will contain
wiggles. (See case 2 of Example 5.1). In case 2 most of the aE values
were negative (Table 5.3).

Table 5.3
Node
2
3
4
5
6

Fe Γ e Ae ρ ue Ae
aE = De − = −
2 δ xPE 2
ME555 : Computational Fluid Dynamics 18 I. Sezai - Eastern Mediterranean University

9
3) Transportiveness
The transportiveness property of a fluid flow can be illustrated by
considering a constant source of φ at a point P
F ρu
Pe = = cell Peclet number
D Γ /δ x

Distribution of φ in the vicinity


of a source at different Peclet
numbers.

Lines represent contours of constant φ.


For no convection and pure diffusion Pe = 0
For no diffusion and pure convection Pe → ∞, φE = φP E is
influenced only by P.
ME555 : Computational Fluid Dynamics 19 I. Sezai - Eastern Mediterranean University

Assesment of the Central Differencing Scheme for Convection


Diffusion Problems

Conservativeness
The central differencing scheme uses
consistent expressions to evaluate convective
and diffusive fluxes at the CV faces.
The scheme is conservative.

ME555 : Computational Fluid Dynamics 20 I. Sezai - Eastern Mediterranean University

10
Boundedness
(i) The internal coefficients of discretised scalar transport equation
(5.14) are
aW aE aP
Fw Fe
Dw + De − aW + aE + ( Fe − Fw )
2 2

(Fe – Fw) = 0 from continuity → aP = aW + aE


Thus, convergence criteria (5.22) is satisfied by the central difference
scheme
scheme.
In the example of section 5.3:
For case 2: Pe = 5 → oscillatory
For case 1 and 3: Pe < 2

ME555 : Computational Fluid Dynamics 21 I. Sezai - Eastern Mediterranean University

(ii) aE = De – Fe/2

Fe
For aE > 0 → < De
2
Fe
or = Pee < 2 to have positive aE .
De

If Pe > 2 → CD scheme violates boundedness


→ gives physically unrealistic solutions.

ME555 : Computational Fluid Dynamics 22 I. Sezai - Eastern Mediterranean University

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 I. Sezai - Eastern Mediterranean University

5.6 The upwind differencing scheme


The scheme takes into account the flow direction, φ at cell face = φ at upstream
node formulation is used

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 I. Sezai - Eastern Mediterranean University

12
The discretised equation (5.9) becomes
FeφP − Fwφw = De (φE − φP ) − Dw (φP − φW ) (5.26)
Which can be rearranged as
( Dw + De + Fe ) φP = ( Dw + Fw ) φW + DeφE
to give
⎡⎣( Dw + Fw ) + De + ( Fe − Fw ) ⎤⎦ φP = ( Dw + Fw ) φW + DeφE
(5.27)
When the flow is in the negative direction, uw<0, ue<0 (Fw<0, Fe<0), the
scheme takes
φw = φP and φe = φE (5.28)
Now the discretised euqation is
(5.29)
FeφE − FwφP = De (φE − φP ) − Dw (φP − φW )

or ⎡⎣ Dw + ( De − Fe ) + ( Fe − Fw ) ⎤⎦ φP = DwφW + ( De − Fe )φE (5.30)


ME555 : Computational Fluid Dynamics 25 I. Sezai - Eastern Mediterranean University

the equations (5.27) and (5.30) can be written in the usual general
form
aPφP = aW φW + aEφE (5.31)
with central coefficient
aP = aW + aE + ( Fe − Fw )
and neighbour coeffcients
aw ae
Fw>0, Fe>0 Dw + Fw De
Fw<0,
<0 Fe<0 Dw De - Fe
A form of notation for neighbour coefficients of the upwind
differencing method that covers both flow directions is:
aw ae
Dw + max(Fw,0) De + max(0, – Fe)
ME555 : Computational Fluid Dynamics 26 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.

ME555 : Computational Fluid Dynamics 27 I. Sezai - Eastern Mediterranean University

The governing equation is: d d ⎛ dφ ⎞


( ρ uφ ) = ⎜ Γ ⎟
dx dx ⎝ dx ⎠
A B
1 2 3 w 4 e 5 6 7
φ=1 W P E φ=0

δx/2 δxWP= δx δxPE=δx δx/2


δx
aPφP = aW φW + aEφE + Su For interior nodes: δ xWP = δ xPE = δ x
where aP = aW + aE + ( Fe − Fw ) − S P For node 2: δ xWP = δ x / 2
Fw = ( ρ uA) w Fe = ( ρ uA)e For node 6: δ xPE = δ x / 2
Γ w Aw Γ e Ae
Dw = De =
δ xWP δ 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 Dw + max( Fw , 0) 0 −( De + max(0, − Fe )) ( De + max(0, − Fe ))φB
ME555 : Computational Fluid Dynamics 28 I. Sezai - Eastern Mediterranean University

14
u = 0.l m/s:

ME555 : Computational Fluid Dynamics 29 I. Sezai - Eastern Mediterranean University

u = 2.5 m/s

Upwind scheme produced a much more realistic solution compared with


central difference scheme.
However, the solution is not very close to the exact value.
ME555 : Computational Fluid Dynamics 30 I. Sezai - Eastern Mediterranean University

15
5.6.1 Assessment of the upwind differencing scheme
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 Stable iterative solution
All coefficients are positive No wiggles in
Coefficient matrix is diagonally dominant solution
Transportiveness
The scheme accounts for the direction of the flow so
transportiveness is build into the formulation.
ME555 : Computational Fluid Dynamics 31 I. Sezai - Eastern Mediterranean University

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
g with the ggrid lines.
φ is smeared Æ error has a diffusion-like appearanceÆ false diffusion

ME555 : Computational Fluid Dynamics 32 I. Sezai - Eastern Mediterranean University

16
Consider pure convection without diffusion and no source term.
the true solution is:
all nodes above diagonal should be 100
all nodes below diagonal should be 0

Upwind method is not suitable for accurate flow calcualtions


ME555 : Computational Fluid Dynamics 33 I. Sezai - Eastern Mediterranean University

5.7 The hybrid differencing scheme


Central differencing scheme: accurate to second order → Not transportive
Upwind differencing scheme: accurate to first order → is transportive
Hybrid difference scheme uses:
central difference scheme for Pe < 2
upwind difference scheme in which diffusion has been set to zero for Pe ≥ 2
For a west face
Fw ( ρ u )w
Pew = = (5.35)
Dw Γ w / δ xWP
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 ⎥ for −2 < Pew < 2
⎢⎣ 2 ⎝ Pew ⎠ 2 ⎝ Pew ⎠ ⎥⎦ (5.36)
qw = FwφW for Pew ≥ 2

qw = FwφP for Pew ≤ −2


ME555 : Computational Fluid Dynamics 34 I. Sezai - Eastern Mediterranean University

17
The general form of the discretised equation is
aPφP = aW φW + aEφE (5.37)
The central coefficient is given by
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 ⎟ , 0⎥
⎣ ⎝ 2 ⎠ ⎦ ⎣ ⎝ 2 ⎠ ⎦

ME555 : Computational Fluid Dynamics 35 I. Sezai - Eastern Mediterranean University

Example 5.2 Solve the problem considered in case 2 of


example 5.1 using the hybrid scheme for u=2.5 m/s.
Compare a 5 node solution with a 25 node solution

ME555 : Computational Fluid Dynamics 36 I. Sezai - Eastern Mediterranean University

18
Comparison with the analytical solution
The numerical results are compared with the analytical solution in table 5.9

ME555 : Computational Fluid Dynamics 37 I. Sezai - Eastern Mediterranean University

5.7.1 Assessment of the hybrid differencing scheme

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

ME555 : Computational Fluid Dynamics 38 I. Sezai - Eastern Mediterranean University

19
Hybrid differencing scheme for multi-dimensional
convection-diffusion
The discretised equation that covers all cases is given by

aPφP = aW φW + aEφE + aSφS + aN φN + aBφB + aT φT

with central coefficient


aP = aW + aE + aS + aN + aB + aT + ΔF

ME555 : Computational Fluid Dynamics 39 I. Sezai - Eastern Mediterranean University

The coefficient of this equation for the hybrid differencing scheme


are as follows:
One-dimensional flow 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]

ΔF Fe-Fw Fe-Fw+Fn-Fs Fe-Fw+Fn-Fs+Ft-Fb

ME555 : Computational Fluid Dynamics 40 I. Sezai - Eastern Mediterranean University

20
In the above expressions the value of F and D are calculated
with the following formulae

Face
F w e s n b t

F (ρu)wAw (ρu)eAe (ρu)sAs (ρu)nAn (ρu)bAb (ρu)tAt

D ΓwAw/δxWP ΓeAe/δxPE ΓsAs/δySP ΓnAn/δyPN ΓbAb/δzPN ΓtAt/δzPT

ME555 : Computational Fluid Dynamics 41 I. Sezai - Eastern Mediterranean University

The Power Law Scheme


Is a more accurate approximation to the 1-D exact
solution
Produces better results than the hybrid
y scheme
for Pe > 10 Æ diffusion is set to zero
for 0 < Pe < 10 Æ the flux is evaluated by a
polynomial expression

ME555 : Computational Fluid Dynamics 42 I. Sezai - Eastern Mediterranean University

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 0 < Pe < 10 (5.44a)
where β w = (1 − 0.1
0 1Pew ) Pew
5

and qw = FwφW for Pew > 10


(5.44b)

The coefficients of the one-dimensional descretised equation


utilising the power-law scheme for steady one-dimensional
convection-diffusion are given by
Central coefficient: aP = aW + aE + ( Fe − Fw )
and
aW aE
Dw max ⎡⎢0, (1 − 0.1 Pew ) ⎤⎥⎦ + max [ F , 0] De max ⎡⎢0, (1 − 0.1 Pee ) ⎤⎥⎦ + max [ − F , 0]
5 5

⎣ w
⎣ e

ME555 : Computational Fluid Dynamics 43 I. Sezai - Eastern Mediterranean University

5.9 Higher order differencing schemes for convection-


diffusion problems
Hybrid and Upwind schemes are
Stable
Obey the transportiveness requirement
But have first order accuracy
Æ Are prone to numerical diffusion errors
Such errors can be minimized by employing higher order
discretisations.
CentralDifference scheme is second order accurate but is not
stable.
Formulations that do not take into account the flow direction are
unstable
For more accuracy:
use higher order schemes, which preserve upwinding for
stability

ME555 : Computational Fluid Dynamics 44 I. Sezai - Eastern Mediterranean University

22
5.9.1 Quadratic upwind differencing scheme: the QUICK scheme

The quadratic upstream interpolation for convective kinetic (QUICK)


scheme of Leonard(1979) uses a three-point upstream-weighted
upstream quadratic interpolation for cell face values. The face value of
φ is obtained from a quadratic function through two bracketing nodes
( each
(on h side
id off the
h face)
f ) andd a node
d on the
h upstream side
id (Fig.
( i 5.17)
1 )

Two upstream nodes and one downstream node is used to calculate the
face value of φ
ME555 : Computational Fluid Dynamics 45 I. Sezai - Eastern Mediterranean University

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
8 8 8 (5.45)
h uw > 0, the
When h bbracketing
k i nodesd for
f the
h west face
f ’w’ are W andd P, the
h
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 3 1
φe = φP + φE − φW (5.47)
8 8 8
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 I. Sezai - Eastern Mediterranean University

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 Feφe − Fwφw = De (φE − φP ) − Dw (φP − φW ) (5.9)
⎡ ⎛6 3 1 ⎞ ⎛6 3 1 ⎞⎤
⎢ 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 FwφWW
(5.48)
This is now written in the standard form for discretised equations
aPφP = aW φW + aEφE + aWW φWW (5.49)
(5 49)
where

ME555 : Computational Fluid Dynamics 47 I. Sezai - Eastern Mediterranean University

For Fw < 0 and Fe < 0 the flux across the west and east boundaries is given
by the expressions
6 3 1
φw = φP + φW − φE
8 8 8
(5 50)
(5.50)
6 3 1
φe = φE + φP − φEE
8 8 8
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:

ME555 : Computational Fluid Dynamics 48 I. Sezai - Eastern Mediterranean University

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:

aPφP = aW φW + aEφE + aWW φWW + aEEφEE (5.51)


With central coefficient
aP = aW + aE + aWW + aEE + ( Fe − Fw )
And neighbour coefficients

where αw=1 for Fw > 0 and αe=1 for Fe > 0


αw=0 for Fw < 0 and αe=0 for Fe < 0
ME555 : Computational Fluid Dynamics 49 I. Sezai - Eastern Mediterranean University

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 B
1 2 3 w 4 e 5 6 7
φ=1 W P E φ=0

δx/2 δxWP= δx δxPE=δx δx/2


δx
Boundaryy Points :
Consider node 2. φw = φA

To calculate φe : φw is needed. But there is no φw Æ use linear


interpolation to create a mirror node at δx/2 to the west of boundary A.

ME555 : Computational Fluid Dynamics 50 I. Sezai - Eastern Mediterranean University

25
Mirror Node Domain boundary Node 2

It can be easily shown that the linearly extrapolated value at the minor
node is given by
φ0 = 2φ A − φP (5.52)
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 3 1 7 3 2
φe = φP + φE − ( 2φ A − φP ) = φP + φE − φA (5.53)
8 8 8 8 8 8
ME555 : Computational Fluid Dynamics 51 I. Sezai - Eastern Mediterranean University

At the boundary nodes the gradients in diffusive flux terms


can be evaluated using central difference scheme similar to
calculation of diffusion terms in interior nodes.

ME555 : Computational Fluid Dynamics 52 I. Sezai - Eastern Mediterranean University

26
The discretised equations for nodes 2, 3 and 6 are now written to fit into the
standard form to give:
aPφP = aWW φWW + aW φW + aEφE + Su (5.59)
with
aP = aW + aE + aWW + aEE + ( Fe − Fw ) − S P
The solution is

⎡φ2 ⎤ ⎡ 0.9648 ⎤
⎢φ ⎥ ⎢0.8707 ⎥
⎢ 3⎥ ⎢ ⎥
⎢φ4 ⎥ = ⎢ 0.7309 ⎥ (5.60)
(5 60)
⎢ ⎥ ⎢ ⎥
⎢φ5 ⎥ ⎢ 0.5226 ⎥
⎢⎣φ6 ⎥⎦ ⎢⎣ 0.2123 ⎥⎦

ME555 : Computational Fluid Dynamics 53 I. Sezai - Eastern Mediterranean University

ME555 : Computational Fluid Dynamics 54 I. Sezai - Eastern Mediterranean University

27
5.9.2 Assessment of the QUICK scheme
The scheme:
Uses consistent quadratic profiles Æ is conservative
Is based on a quadratic functionÆ has 3rd order truncation error
Is based on 2 upstream and 1 downstream nodes Æ has
transportiveness
aP = Σ anb if flow field satisfies continuity Æ desirable for
boundedness
aE and aW may not be positive Æ aWW and aEE are negative
If uw > 0 and ue > 0 :
F 8
Æ Then aE = De – 3 / 8 Fe becomes negative for Pee = e >
De 3
Æ Gives rise to stability problems and unbounded solutions.
Æ QUICK scheme is conditionally stable
Involves φWW and φEE which are not immediate-neighbour nodes
ME555 : Computational Fluid Dynamics 55 I. Sezai - Eastern Mediterranean University

5.9.3 Stability problems of the QUICK scheme and remedies


May have negative main coefficients Æ can be unstable
Also other higher order schemes may be oscillatory and unstable
under certain conditions
In this case use:
Method of deferred correction
In this method the cell face value φf is formulated as the sum of the
upwind value and other higher order terms which are evaluated at the
previous iteration.
φ f = φ f + Δφ f
u o

HO u
Δφ of = φ of − φ of
where:
φ uf = φ f value to be computed by 1st order upwind method
HO
φ 0f = φ f value computed by high order scheme from previous old values
u
φ 0f = φ f value computed by 1st order upwind method from previous old values

ME555 : Computational Fluid Dynamics 56 I. Sezai - Eastern Mediterranean University

28
Let us apply the deferred correction method to QUICK scheme.
For uw > 0 QUICK scheme is
6 3 1
φw = φW + φP − φWW
8 8 8
This can be written as
1
φw = φW + [3φP − 2φW − φWW ] For Fw > 0
8
φ uf Δφ 0f is added to source term Su
Similarly: 1
φe = φP + [3φE − 2φP − φW ] F Fe > 0
For
8
1 (5.62)
φw = φP + [3φW − 2φP − φE ] For Fw < 0
8
1
φe = φE + [3φP − 2φE − φEE ] For Fe < 0
8
ME555 : Computational Fluid Dynamics 57 I. Sezai - Eastern Mediterranean University

The discretisation equation takes the form


aPφP = aW φW + aEφE + Su
(5.63)
The central coefficient is
aP = aW + aE + ( Fe − Fw ) ((5.64))
where

aw ae Su
max[ Fw , 0](φw − φW ) − max[ − Fw , 0](φw − φP )
Dw + max( Fw , 0) De + max(0, − Fe )
+ 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.

The advantage of this approach is that the coefficients are always


positive and now satisfy the requirements for conservativeness,
boundedness and transportiveness
ME555 : Computational Fluid Dynamics 58 I. Sezai - Eastern Mediterranean University

29
5.9.4 general comments on the QUICK differencing scheme

QUICK scheme
Has greater accuracy than central, upwind or power schemes
Retains the upwind weighted characteristics
Resultant false diffusion is small

Can give (minor) undershoots and overshoots (see Fig. 5.20)


ME555 : Computational Fluid Dynamics 59 I. Sezai - Eastern Mediterranean University

To prevent this problem use:


1. Limiters
Limit the scheme to have the face value φf to be between
certain values (ULTRA SHARP)
2. Total variation diminishing schemes (TVD)

ME555 : Computational Fluid Dynamics 60 I. Sezai - Eastern Mediterranean University

30
Homework

H
y

•Consider a fluid at a uniform temperature Ti entering a channel whose surface is maintained at a


different temperature Ts. A Thermal boundary layer along the tube developes, after which the form of
the temperature profile does not change. Assume that the flow profile is constant in the channel where
the velocities are given by
2
u ⎛ 2y ⎞
= 1− ⎜ − 1⎟ and v = 0
umax ⎝H ⎠
where umax = 1.5umean. The energy equation is
∂ ( ρ uT ) ∂ ( ρ vT ) ∂ ⎛ k ∂T ⎞ ∂ ⎛ k ∂T ⎞
+ = ⎜ ⎟+ ⎜ ⎟
∂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 I. Sezai - Eastern Mediterranean University

Generalisation of Upwind-biased Schemes


For convection terms, an estimate of φ value at the faces of a CV is
required. Consider east face, assuming ue > 0

1) Standard Upwind Differencing Scheme (UD)


φe = φP
φP
φe

w e
WW W P E EE
ve
UPWIND

The face value of φ is taken to be equal to the value of the upstream


node;

φe = φP (5.66)

ME555 : Computational Fluid Dynamics 62 I. Sezai - Eastern Mediterranean University

31
Generalisation of Upwind-biased Schemes
2) Linear Upwind Differencing Scheme (LUD) also called the second
order upwind differencing scheme (SOU)
φe = φP +(φP – φW) / 2
φP φe
φW

w e
WW W P E EE

SOU (LUD) ve

φ is assumed to vary linearly between W and e. Then φe is found by


extrapolating the two upstream node values φW and φP to face e.
(φP − φW ) δ x
φe = φP +
δx 2
(5.67)
1
= φP + (φP − φW )
2
The term ½(φP – φW) can be thought as a second order correction to
the standard upwind scheme.
ME555 : Computational Fluid Dynamics 63 I. Sezai - Eastern Mediterranean University

Generalisation of Upwind-biased Schemes


3) Central Differencing Scheme (CD)
φe = (φP + φW) / 2
φe φE
φP

w e
WW W P E EE

CENTRAL ue

The value of φ is assumed to vary linearly between the two nodes


straddling the face, that is;
(φ + φ ) (5 68)
(5.68)
φe = P E
2
or
1 (5.69)
φe = φP + (φE − φP )
2
ME555 : Computational Fluid Dynamics 64 I. Sezai - Eastern Mediterranean University

32
Generalisation of Upwind-biased Schemes
4) QUICK Scheme
φe = 6/8φP + 3/8φE – 1/8φW)
φP φ e
φE
φW

w e
WW W P E EE
QUICK ue

The scheme is based on the assumption that φ varies in terms of a


second degree polynomial between two upstream (W and P) and the
downstream node E.E
6 3 1
φe = φP + φE − φW (5.70)
8 8 8
1 (5.71)
or φe = φP + (3φE − 2φP − φW )
8
ME555 : Computational Fluid Dynamics 65 I. Sezai - Eastern Mediterranean University

Generalisation of Upwind-biased Schemes


All higher order schemes can be expressed in the form:
1
φe = φP + ψ (φE − φP ) (5.72)
2
ψ = an appropriate
pp p function

Convective flux at face e is Feφe


For a higher order scheme convective flux consist of two parts:
1) Upwind flux, FeφP
2) Additional flux, Feψ(φE – φP)/2
Additional flux is connected to the gradient of φ at face e, as
indicated by (φE – φP)

ME555 : Computational Fluid Dynamics 66 I. Sezai - Eastern Mediterranean University

33
Generalisation of Upwind-biased Schemes
ψ = 0 for UD scheme
ψ = 1 for CD scheme

LUD scheme may be written as


1 ⎛ φ −φ ⎞ (5.73)
φe = φP + ⎜ P W ⎟ (φE − φP )
2 ⎝ φE − φP ⎠
⎛ φ −φ ⎞ (5.74)
→ ψ = ⎜ P W ⎟ for LUD scheme
⎝ φE − φP ⎠
QUICK scheme may
Q y be written as
1⎡ ⎛ φP − φW ⎞ 1⎤
φe = φP + ⎢3 + ⎜ ⎟ ⎥ (φE − φP ) (5.75)
2⎣ ⎝ φE − φP ⎠ 4⎦
⎛ φ −φ ⎞1 (5.76)
→ ψ =⎜3+ P W ⎟ for QUICK scheme
⎝ φE − φP ⎠4
ME555 : Computational Fluid Dynamics 67 I. Sezai - Eastern Mediterranean University

Generalisation of Upwind-biased Schemes


φP − φW
let r= (5.77)
φE − φP
r = ratio of upwind-side gradient to downwind-side gradient
ψ is a function of r: ψ = ψ(
ψ(r))
A higher order convection scheme can be written as
1
φe = φP + ψ (r )(φE − φP ) (5.78)
2
ψ = 0 for UD scheme
ψ = 1 for CD scheme
⎛ φP − φW ⎞
ψ =⎜ ⎟ for LUD scheme
⎝ φE − φP ⎠
⎛ φ −φ ⎞ 1
ψ = ⎜ 3 + P W ⎟ for QUICK scheme
⎝ φE − φP ⎠ 4
ME555 : Computational Fluid Dynamics 68 I. Sezai - Eastern Mediterranean University

34
All of the above expressions assume that the flow
direction is positive (from west to east).
Similar expressions
p exist for negative
g flow direction.
In that case, r is still the ratio of upwind-side
gradient to downwind-side gradient.

ME555 : Computational Fluid Dynamics 69 I. Sezai - Eastern Mediterranean University

Total Variation and TVD Schemes


UD scheme is the most stable scheme (no wiggles)
CD and QUICK have higher order accuracy but give rise
to wiggles under certain conditions.
Our aim is to find a convection scheme with a higher-
order accuracy but without wiggles.
The desirable property for a stable, non-oscillatory, higher
order scheme is monotonicity preserving.
For a scheme to preserve to preserve monotonicity:
1. It must not create local extrema
2. The value of an existing local minimum must be non-decreasing
and that of a local maximum must be non-increasing.
Monotonicity preserving schemes do not create
new undershoots and overshoots.
ME555 : Computational Fluid Dynamics 70 I. Sezai - Eastern Mediterranean University

35
Total Variation and TVD Schemes
Consider the discrete data set shown in the figure.

The total variation of this data set is


TV (φ ) = φ2 − φ1 + φ3 − φ2 + φ4 − φ3 + φ5 − φ4 (5.79)
= φ3 − φ1 + φ5 − φ3

For monotonicity, this TV must not increase with


time.

ME555 : Computational Fluid Dynamics 71 I. Sezai - Eastern Mediterranean University

Total Variation and TVD Schemes


In other words TV must diminish with time.
Hence, the term total variation diminishing or
TVD.
Originally TVD was developed for time-dependent
flows.
For TVD: TV(φn+1) ≤ TV(φn) where n refer to time
step.
In the next section we show how TVD is also linked
to desirable behaviour of discretisation schemes for
steady convection-diffusion problems.

ME555 : Computational Fluid Dynamics 72 I. Sezai - Eastern Mediterranean University

36
Criteria for TVD Schemes
Necessary and sufficient conditions for a scheme to be TVD
1) For 0 < r < 1 → ψ(r) ≤ 2r
2) For r ≥ 1 → ψ(r) ≤ 2

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 I. Sezai - Eastern Mediterranean University

Requirement for Second Order Accuracy


For second order accuracy, the flux limiter function ψ should pass
through the point (1, 1) in the r– ψ diagram.
Range of possible second-order schemes is bounded by the CD and
LUD schemes:
For 0 < r < 1 for TVD to be second order r ≤ ψ(r) ≤ 1
For r ≥ 1 for TVD to be second order 1 ≤ ψ(r) ≤ r

Region for a second-order TVD scheme


ME555 : Computational Fluid Dynamics 74 I. Sezai - Eastern Mediterranean University

37
Symmetry Property for Limiter Functions
Symmetry Property for limiter functions:
ψ (r )
= ψ (1/ r ) (5.80)
r
A limiter function that satisfies the symmetry
property ensures that backward and forward-facing
gradients are treated in the same fashion without the
need for special coding.

ME555 : Computational Fluid Dynamics 75 I. Sezai - Eastern Mediterranean University

Flux Limiter Functions


Name Limiter function Source
r+ r
Van Leer Van Leer (1974)
1+ r
r + r2
V Alb
Van Albada
d V
Van Alb d et all. (1982)
Albada
1+ r2
⎧min(r ,1) if r > 0
Min-Mod ψ (r ) = ⎨ Roe (1985)
⎩0 if r ≤ 0
SUPERBEE max[0, min(2r ,1), min( r , 2)] Roe (1985)
Sweby max[0, min( β r ,1), min(r , β )] Sweby (1984)
QUICK max[0, min(2r , (3 + r ) / 4, 2)] Leonard (1988)
UMIST
S max[0, i (2r , (1 + 3r ) / 4,
[0 min(2 4 (3 + r ) / 4,
4 2)] Lien
i andd Leschziner
h i (1993)

0≤ β≤2
β = 1 → Min-Mod Limiter
β = 2 → SUPERBEE Limiter of Roe
ME555 : Computational Fluid Dynamics 76 I. Sezai - Eastern Mediterranean University

38
Flux Limiter Functions

MIN‐MOD

MIN‐MOD

All Limiter functions in a r–ψ diagram

All limiter functions are symmetric except QUICK limiter.


UMIST limiter function is a symmetric version of the QUICK limiter.
ME555 : Computational Fluid Dynamics 77 I. Sezai - Eastern Mediterranean University

Implementation of TVD Schemes


For the one dimensional convection diffusion equation
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:
1 ⎛ φ −φ ⎞
For u > 0 φe = φP + ψ (re+ )(φE − φP ) re+ = ⎜ P W ⎟
2 ⎝ φE − φ P ⎠ (5.82)
1 ⎛ φ −φ ⎞
φw = φW + ψ (rw+ )(φP − φW ) rw+ = ⎜ W WW ⎟
2 ⎝ φP − φW ⎠

1 ⎛ φ −φ ⎞
For u < 0 φe = φE + ψ ( re− )(φP − φE ) re− = ⎜ EE E ⎟
2 ⎝ φE − φP ⎠
(5.83)
1 ⎛ φ −φ ⎞
φw = φP + ψ (rw− )(φW − φP ) rw− = ⎜ E P ⎟
2 ⎝ φP − φW ⎠
ME555 : Computational Fluid Dynamics 78 I. Sezai - Eastern Mediterranean University

39
Implementation of TVD Schemes
The discretisation equation takes the form
aPφP = aW φW + aEφE + S dc (5.84)
The central coefficient is

aP = aW + aE + ( Fe − Fw ) (5 85)
(5.85)

where
aw ae S dc
max[ Fw , 0](φw − φW ) − max[ − Fw , 0](φw − φP )
Dw + max( Fw , 0) De + max(0, − Fe )
+ max[− Fe , 0](φe − φE ) − max[ Fe , 0](φe − φP )
((5.86))
φe and φw are as defined in Eqs. (5.82) and (5.83)
Note that Sdc is the same as defined in Eq. (5.65).
Note also that aw and ae are the same as that of the upwind method.
The advantage of this approach is that the coefficients are always positive
and now satisfy the requirements for conservativeness, boundedness and
transportiveness
ME555 : Computational Fluid Dynamics 79 I. Sezai - Eastern Mediterranean University

Evaluation of TVD Schemes

Comparison of TVD schemes for pure convection flowing 45o to the grid direction.

TVD schemes does not give unphysical overshoots or undershoots.


However, TVD schemes require about 15% more CPU time.

ME555 : Computational Fluid Dynamics 80 I. Sezai - Eastern Mediterranean University

40

You might also like