Chapter 5.ppt  Eastern Mediterranean University · 2011. 9. 27. · Title: Microsoft PowerPoint ...
Embed Size (px)
Transcript of Chapter 5.ppt  Eastern Mediterranean University · 2011. 9. 27. · Title: Microsoft PowerPoint ...

1
Chapter 5
The Finite Volume Method for ConvectionDiffusion Problems
Prepared by: Prof. Dr. I. SezaiEastern Mediterranean UniversityMechanical Engineering Department
IntroductionThe steady convectiondiffusion equation is
( ) ( )div u div grad Sφρφ φ= Γ +
Integration over the control volume gives :( ) ( )dA grad dA S dVρφ φΓ +∫ ∫ ∫n u n( ) ( )
A A CV
dA grad dA S dVφρφ φ⋅ = ⋅ Γ +∫ ∫ ∫n u n
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.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 2
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 convectiondiffusion calculations with central difference method.

2
Steady onedimensional convection and diffusionIn the absence of sources, the steady convection and diffusion of a property φ in a given onedimensional flow field u is governed by
( ) ( )d d dudx dx dx
φρ φ = Γ (5.3)dx dx dx
The flow must also satisfy continuity, so
( ) 0d udx
ρ =
Integrating Eqn. (5.3) over the CV
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 3
( ) ( )e we w
uA uA A Ax xφ φρ φ ρ φ ∂ ∂⎛ ⎞ ⎛ ⎞− = Γ − Γ⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠
Integrating continuity Eqn.
( ) ( ) 0e wuA uAρ ρ− =
(5.5)
(5.6)
Let F = ρuA convective mass flux D = ΓA/δx diffusion conductance
at cell faces
At cell faces:( ) ( )w w e eF uA F uA
A Aρ ρ= =Γ Γ w w e ew e
WP PE
A AD Dx xδ δ
Γ Γ= =
Using central difference approach for the diffusion terms, Eqn (5.5) becomes
( ) ( )e e w w e E P w P WF F D Dφ φ φ φ φ φ− = − − −
C i i i b(5.9)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 4
0e wF F− =
Continuity equation becomes
We assume that velocity field is known → Fe, Fw known. We need to calculate φ at faces e and w.
(5.10)

3
The Central Differencing Scheme
Works well for diffusion terms.
Let us use this method to compute the convective terms by linear interpolation.linear interpolation.
For a uniform grid, cell face values are:
( ) / 2( ) / 2
e P E
w W P
φ φ φφ φ φ
= += +
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 5
Substituting into eqn (5.9)
( ) ( ) ( ) ( )2 2
e wP E W P e E P w P W
F F D Dφ φ φ φ φ φ φ φ+ − + = − − −
Rearranging,
2 2 2 2w e w e
w e P w W e EF F F FD D D D
F F F F
φ φ φ⎡ ⎤⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞− + + = + + −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟⎢ ⎥⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠⎣ ⎦⎡ ⎤⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞( )
2 2 2 2w e w e
w e e w P w W e EF F F FD D F F D Dφ φ φ⎡ ⎤⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞+ + − + − = + + −⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟⎢ ⎥⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠⎣ ⎦
which is of the formP P W W E Ea a aφ φ φ= +
where
(5.14)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 6
( )2 2
W E P
w ew e W E e w
a a aF FD D a a F F+ − + + −
This equation has the same general form as the diffusion eqn. (4.11).

4
Example 5.1
A property φ is transported by convection and diffusion through the one dimensional domain shown below. Using central differencescheme, find the distribution of φ for (L =1, ρ = 1, Γ = 0.1)scheme, find the distribution of φ for (L 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.exp( / ) 1o uxφ φ ρ− Γ −=
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 7
exp( / ) 1L o uLφ φ ρ− Γ −(iii) Case 3: u = 2.5 m/s (20 CV’s)
The governing equation is: ( )d d dudx dx dx
φρ φ ⎛ ⎞= Γ⎜ ⎟⎝ ⎠A B
1 2 3 4 5 6 7φ = 1 W P E
ewφ = 0
P P W W E E ua a a Sφ φ φ= + +where ( )P W E e w Pa a a F F S= + + − −
( ) ( )w w e ew w e e
F uA F uAA AD D
ρ ρ= =Γ Γ
For interior nodes: For node 2: / 2For node 6: / 2
WP PE
WP
PE
x x xx xx x
δ δ δδ δδ δ
= ==
=
δxδx/2 δxWP= δx δx/2δxPE=δx
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 8
2 0 / 2 ( / 2) ( / 2)3, 4,5 / 2 / 2 0 0
6 / 2 0 ( / 2) ( / 2)
W E P u
e e w w w w A
w w e e
w w e e e e B
Node a a S SD F D F D F
D F D FD F D F D F
φ
φ
− − + ++ −+ − − −
w w e ew eWP PE
D Dx xδ δ
= =

5
The resulting system of equations are
2 2 2 2P E
W p E
a a Sua a a Su
φφ
−⎡ ⎤ −⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎢ ⎥−⎢ ⎥ ⎢ ⎥ ⎢ ⎥3 3 3
4 4 4
2 2 2
3 3
4 4
2 2
i i i
n n n
W p E
W p E
i iW p E
n nW p E
Sua a a Su
Sua a a
Sua a a
φφ
φ
φ− − −
− −
⎢ ⎥ −⎢ ⎥ ⎢ ⎥⎢ ⎥− ⎢ ⎥ ⎢ ⎥−⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥ ⎢ ⎥−−⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥−⎢ ⎥− ⎢ ⎥ ⎢ ⎥⎢ ⎥
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 9
1 11 1
n n n
n nn nW p
Sua a φ− −
− −
⎢ ⎥ ⎢ ⎥⎢ ⎥ −⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦−⎢ ⎥⎣ ⎦
Solve the system of equations using Tridiagonal matrix algorithm (TDMA) for φ2, φ 3, φ 4, … φ n1 , where (n = 7)
The solution for case 1 is:
1
2
10.9421
φφ⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥2
3
4
5
6
7
0.94210.80060.62760.41630.1573
0
φφφφφφ
⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 10
7φ ⎣ ⎦⎣ ⎦
Exact solution is:
2.7183 exp( )( )1.7183
xxφ −=Comparison of the numerical result with the analytical solution.

6
The solution for case 2: (u = 2.5 m/s, 5 CV’s)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 11
Comparison of the numerical result with the analytical solution.
The solution appears to oscillate about the exact solution.
The solution for case 3: (u = 2.5 m/s, 20 CV’s)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 12
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.

7
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
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 13
• Transportiveness
1. ConservativenessTo 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 adjacent CV through the same faceadjacent 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.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 14

8
Example of consistent specification of diffusive fluxes
2 2 1( )wx
φ φδ
Γ − 2 3 2( )ex
φ φδ
Γ −
Flux entering CV 2 Flux leaving CV 2An overall flux balance may be obtained by summing the net flux through each CV
3 22 1 2 11 2 2
( )( ) ( )e A e wqx x x
φ φφ φ φ φδ δ δ
−− −⎡ ⎤⎡ ⎤Γ − + Γ −Γ⎢ ⎥⎢ ⎥⎣ ⎦ ⎣ ⎦
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 15
4 3 3 2 4 33 3 4
( ) ( ) ( )e w B w B Aq q qx x x
φ φ φ φ φ φδ δ δ− − −⎡ ⎤ ⎡ ⎤+ Γ −Γ + −Γ = −⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦
Γ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.
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.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 16
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.

9
2) Boundedness
The sufficient condition for a convergent iterative method is
1 at all nodes< 1 at one node at least
nbaa
≤⎧⎨′ ⎩
∑P P pa a S′ = − (5.22)< 1 at one node at leastPa ⎩
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 boundednesscriterion.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 17
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.
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 Or if it converges it will containthe solution may not converge at 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).
Node
2
Table 5.3
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 18
2 2e e e e e
E ePE
F A u Aa Dx
ρδΓ
= − = −
23456

10
3) TransportivenessThe transportiveness property of a fluid flow can be illustrated by considering a constant source of φ at a point P
cell Peclet number/
F uPeD x
ρδ
= =Γ
Distribution of φ in the vicinity of a source at different Peclet numbers.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 19
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.
Assesment of the Central Differencing Scheme for Convection Diffusion Problems
ConservativenessThe central differencing scheme uses consistent expressions to evaluate convective and diffusive fluxes at the CV faces.
The scheme is conservative.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 20

11
Boundedness
(i) The internal coefficients of discretised scalar transport equation (5.14) are
W E Pa a a
( )2 2w e
w e W E e wF FD D a a F F+ − + + −
(Fe – Fw) = 0 from continuity → aP = aW + aEThus, convergence criteria (5.22) is satisfied by the central difference scheme
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 21
scheme.
In the example of section 5.3:For case 2: Pe = 5 → oscillatory For case 1 and 3: Pe < 2
(ii) aE = De – Fe/2
For 0 eFa D> → → <
= <
If Pe > 2 → CD scheme violates boundedness
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 22
→ gives physically unrealistic solutions.

12
TransportivenessThe 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 atThus, it does not posses the transportiveness property at high Pe.Accuracy
The CD scheme is stable and accurate only if Pe = F/D < 2.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 23
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.
5.6 The upwind differencing schemeThe scheme takes into account the flow direction, φ at cell face = φ at upstream
node formulation is used
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 24
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)

13
The discretised equation (5.9) becomes
Which can be rearranged as( ) ( )e P w w e E P w P WF F D Dφ φ φ φ φ φ− = − − − (5.26)
( ) ( )P W ED D F D F Dφ φ φ+ + = + +to give
When the flow is in the negative direction, uw

14
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 fivepoint grid.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 27
The governing equation is: ( )d d dudx dx dx
φρ φ ⎛ ⎞= Γ⎜ ⎟⎝ ⎠A B
1 2 3 4 5 6 7φ = 1 W P E
ewφ = 0
P P W W E E ua a a Sφ φ φ= + +where ( )P W E e w Pa a a F F S= + + − −
( ) ( )w w e ew w e e
F uA F uAA AD D
ρ ρ= =Γ Γ
For interior nodes: For node 2: / 2For node 6: / 2
WP PE
WP
PE
x x xx xx x
δ δ δδ δδ δ
= ==
=
δxδx/2 δxWP= δx δx/2δxPE=δx
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 28
2 0 max(0, ) ( max( ,0)) ( max( ,0))3, 4,5 max( ,0) max(0, ) 0 0
6 max( ,0) 0 ( max(0, )) ( max(0, ))
W E P u
e e w w w w A
w w e e
w w e e e e B
Node a a S SD F D F D F
D F D FD F D F D F
φ
φ
+ − − + ++ + −+ − + − + −
w w e ew eWP PE
D Dx xδ δ
= =

15
u = 0.l m/s:
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 29
u = 2.5 m/s
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 30
Upwind scheme produced a much more realistic solution compared with central difference scheme.
However, the solution is not very close to the exact value.

16
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 conservativeBoundednessthe coefficients of the discretised equation are always positive and satisfy the requirements for boundedness
Fe – Fw = 0 → aP = aW + aE Stable iterative solutionAll coefficients are positive No wiggles in
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 31
Coefficient matrix is diagonally dominantTransportiveness
The scheme accounts for the direction of the flow so transportiveness is build into the formulation.
solution
Accuracythe 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 produces erronous results when the flow is not aligned with the grid lines.p g gφ is smeared error has a diffusionlike appearance false diffusion
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 32

17
Consider pure convection without diffusion and no source term.the true solution is:all nodes above diagonal should be 100all nodes below diagonal should be 0
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 33
Upwind method is not suitable for accurate flow calcualtions
5.7 The hybrid differencing schemeCentral differencing scheme: accurate to second order → Not transportiveUpwind differencing scheme: accurate to first order → is transportive
Hybrid difference scheme uses:central difference scheme for Pe < 2upwind difference scheme in which diffusion has been set to zero for Pe ≥ 2
For a west face
The hybrid differencing formula for the net flux through the west face is as follows:
( )/
w ww
w w WP
uFPeD x
ρδ
= =Γ (5.35)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 34
1 2 1 21 1 2 22 2
2
2
w w W P ww w
w w W w
w w P w
q F for PePe Pe
q F for Pe
q F for Pe
φ φ
φ
φ
⎡ ⎤⎛ ⎞ ⎛ ⎞= + + − − <

18
The general form of the discretised equation is
The central coefficient is given byP P W W E Ea a aφ φ φ= + (5.37)
After some rearrangement 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:
( )P W E e wa a a F F= + + −
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 35
max , ,0 max , ,02 2
W E
w ew w e e
a a
F FF D F D⎡ ⎤ ⎡ ⎤⎛ ⎞ ⎛ ⎞+ − −⎜ ⎟ ⎜ ⎟⎢ ⎥ ⎢ ⎥⎝ ⎠ ⎝ ⎠⎣ ⎦ ⎣ ⎦
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
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 36

19
Comparison with the analytical solutionThe numerical results are compared with the analytical solution in table 5.9
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 37
5.7.1 Assessment of the hybrid differencing scheme
Is fully conservative Is unconditionally bounded (since the coefficients are always positive)Satisfies the transportiveness propertyProduces physical realistic solutionsHighly stable compared with higher order schemeIs only first order accurate
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 38

20
Hybrid differencing scheme for multidimensional convectiondiffusionThe discretised equation that covers all cases is given by
with central coefficient
P P W W E E S S N N B B T Ta a a a a a aφ φ φ φ φ φ φ= + + + + +
P W E S N B Ta a a a a a a F= + + + + + + Δ
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 39
The coefficient of this equation for the hybrid differencing schemeare as follows:
Onedimensional flow twodimensional flow threedimensional flow
max[F (D +F /2) 0] max[F (D +F /2) 0] max[F (D +F /2) 0]aW max[Fw,(Dw+Fw/2),0] max[Fw,(Dw+Fw/2),0] max[Fw,(Dw+Fw/2),0]
aE max[Fe,(DeFe/2),0] max[Fe,(DeFe/2),0] max[Fe,(DeFe/2),0]
aS  max[Fs,(Ds+Fs/2),0] max[Fs,(Ds+Fs/2),0]
aN  max[Fn,(DnFn/2),0] max[Fn,(DnFn/2),0]
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 40
aB   max[Fb,(Db+Fb/2),0]
aT   max[Ft,(DtFt/2),0]
ΔF FeFw FeFw+FnFs FeFw+FnFs+FtFb

21
In the above expressions the value of F and D are calculated with the following formulae
F bFace 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
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 41
The Power Law SchemeIs a more accurate approximation to the 1D exact solutionProduces better results than the hybrid schemeyfor Pe > 10 diffusion is set to zerofor 0 < Pe < 10 the flux is evaluated by a polynomial expression
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 42

22
For example, the net flux per unit area at the west control volume face is evaluated using
( )( )5
for 0 10where 1 0 1
w w W w P Wq F PePe Pe
φ β φ φβ⎡ ⎤= − − < (5.44b)
( )a a a F F= + + −
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 43
Central coefficient:and
Wa
( )P W E e wa a a F F= + +
Ea
( ) [ ]5max 0, 1 0.1 max ,0e e eD Pe F⎡ ⎤− + −⎢ ⎥⎣ ⎦( ) [ ]5
max 0, 1 0.1 max ,0w w wD Pe F⎡ ⎤− +⎢ ⎥⎣ ⎦
5.9 Higher order differencing schemes for convectiondiffusion problems
Hybrid and Upwind schemes areStableObey the transportiveness requirementBut have first order accuracyAre prone to numerical diffusion errors
Such errors can be minimized by employing higher orderdiscretisations.
CentralDifference scheme is second order accurate but is not stable.
Formulations that do not take into account the flow direction are
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 44
unstableFor more accuracy: use higher order schemes, which preserve upwinding for stability

23
5.9.1 Quadratic upwind differencing scheme: the QUICK scheme
The quadratic upstream interpolation for convective kinetic (QUICK) scheme of Leonard(1979) uses a threepoint upstreamweighted upstream quadratic interpolation for cell face values. The face value of φ is obtained from a quadratic function through two bracketing nodes ( h id f h f ) d d h id ( i 1 )(on each side of the face) and a node on the upstream side (Fig. 5.17)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 45
Two upstream nodes and one downstream node is used to calculate the face value of φ
It can be shown that for a uniform grid the value of φ at the cell face between two bracketing nodes i and i1, and upstream node i2 is given by the following formula:
h h b k i d f h f d h(5.45)1 2
6 3 18 8 8face i i i
φ φ φ φ− −= + −
When uw > 0, the bracketing nodes for the west face ’w’ are W and P, the upstream node is WW (Figure 5.17), and
When ue > 0, the bracketing nodes for the east face ’e’ are P and E, the upstream node is W ,so
6 3 18 8 8w W P WW
φ φ φ φ= + − (5.46)
6 3 1φ φ φ φ
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 46
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.
(5.47)8 8 8e P E Wφ φ φ φ= + −

24
If Fw>0 and Fe>0 and if we use equations (5.465.47) for the convective terms and central differencing for the diffusion terms, the discretised form of the onedimensional convectiondiffusion transport equation(5.9) may be written as ( ) ( )e e w w e E P w P WF F D Dφ φ φ φ φ φ− = − − − (5.9)
( ) ( )6 3 1 6 3 1F F D Dφ φ φ φ φ φ φ φ φ φ⎡ ⎤⎛ ⎞ ⎛ ⎞⎜ ⎟ ⎜ ⎟
which can be rearranged to give
This is now written in the standard form for discretised equations
( ) ( )8 8 8 8 8 8e P E W w W P WW e E P w P W
F F D Dφ φ φ φ φ φ φ φ φ φ⎡ ⎤⎛ ⎞ ⎛ ⎞+ − − + − = − − −⎜ ⎟ ⎜ ⎟⎢ ⎥⎝ ⎠ ⎝ ⎠⎣ ⎦
3 6 6 1 3 18 8 8 8 8 8w w e e P w w e W e e E w WW
D F D F D F F D F Fφ φ φ φ⎡ ⎤ ⎡ ⎤ ⎡ ⎤− + + = + + + − −⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦ ⎣ ⎦(5.48)
a a a aφ φ φ φ+ + (5 49)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 47
whereP P W W E E WW WWa a a aφ φ φ φ= + + (5.49)
For Fw < 0 and Fe < 0 the flux across the west and east boundaries is given by the expressions
6 3 18 8 8w P W E
φ φ φ φ= + −(5 50)
Substitution of these two formulae for the convective terms in the discretised convectiondiffusion equation (5.9) together with central differencing for the diffusion terms leads, after rearrangement as above, to the following coefficients:
6 3 18 8 8e E P EE
φ φ φ φ= + −(5.50)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 48

25
General expressions, valid for positive and negative flow directions, can be obtained by combining the two sets of coefficients above.The QUICK scheme for onedimensional convectiondiffusion problems can be summarised as follows:
With central coefficient
And neighbour coefficients
P P W W E E WW WW EE EEa a a a aφ φ φ φ φ= + + + (5.51)
( )P W E WW EE e wa a a a a F F= + + + + −
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 49
where αw=1 for Fw > 0 and αe=1 for Fe > 0 αw=0 for Fw < 0 and αe=0 for Fe < 0
Example 5.4 Using the QUICK scheme solve the problem considered in example 5.1 for u=0.2 m/s on a fivepoint grid. Compare the quick solution with the exact and central differencing solution.
Boundary Points :
A B
δxδx/2 δxWP= δx δx/2
1 2 3 4 5 6 7φ = 1 W P E
ewφ = 0
δxPE=δx
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 50
y
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.

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

27
The discretised equations for nodes 2, 3 and 6 are now written to fit into the standard form to give:
withP P WW WW W W E E ua a a a Sφ φ φ φ= + + + (5.59)
( )F F SThe solution is
( )P W E WW EE e w Pa a a a a F F S= + + + + − −
2
3
4
0.96480.87070.7309
φφφ
⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥=⎢ ⎥ ⎢ ⎥ (5 60)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 53
5
6
0.52260.2123
φφ
⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦⎣ ⎦
(5.60)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 54

28
5.9.2 Assessment of the QUICK schemeThe scheme:
Uses consistent quadratic profiles is conservativeIs based on a quadratic function has 3rd order truncation errorIs based on 2 upstream and 1 downstream nodes hasIs 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 negativeIf uw > 0 and ue > 0 :
8F
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 55
Then aE = De – 3 / 8 Fe becomes negative forGives rise to stability problems and unbounded solutions.QUICK scheme is conditionally stable
Involves φWW and φEE which are not immediateneighbour nodes
83
ee
e
FPeD
= >
5.9.3 Stability problems of the QUICK scheme and remedies
May have negative main coefficients can be unstableAlso other higher order schemes may be oscillatory and unstableunder certain conditions
In this case use:Method of deferred correctionIn 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.
HO u
u of f f
o o of f f
φ φ φ
φ φ φ
= + Δ
Δ = −
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 56
where:value to be computed by 1st order upwind methodvalue computed by high order scheme from previous old valuesvalue computed by 1st order upwind method from previous old values
f f fφ φ φuf fφ φ=0HO
f fφ φ=0u
f fφ φ=

29
Let us apply the deferred correction method to QUICK scheme.For uw > 0 QUICK scheme is
6 3 1w W P WWφ φ φ φ= + −
This can be written as
Similarly:ufφ
8 8 8w W P WWφ φ φ φ
[ ]1 3 2 08w W P W WW w
For Fφ φ φ φ φ= + − − >0 is added to source term f uSφΔ
[ ]1 3 2 0F Fφ φ φ φ φ+ >
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 57
(5.62)[ ]
[ ]
[ ]
3 2 081 3 2 081 3 2 08
e P E P W e
w P W P E w
e E P E EE e
For F
For F
For F
φ φ φ φ φ
φ φ φ φ φ
φ φ φ φ φ
= + − − >
= + − − <
= + − − <
The discretisation equation takes the form
The central coefficient isP P W W E E ua a a Sφ φ φ= + + (5.63)
( )P W E e wa a a F F= + + − (5.64)where
( )P W E e w
max[ ,0]( ) max[ ,0]( )max( ,0) max(0, )
max[ ,0]( ) max[ ,0]( )
w e u
w w W w w Pw w e e
e e E e e P
a a SF F
D F D FF F
φ φ φ φφ φ φ φ− − − −
+ + −+ − − − −
( )
(5.65)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 58
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
( )

30
5.9.4 general comments on the QUICK differencing scheme
QUICK schemeHas greater accuracy than central, upwind or power schemesRetains the upwind weighted characteristicsResultant false diffusion is smallResultant false diffusion is small
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 59
Can give (minor) undershoots and overshoots (see Fig. 5.20)
To prevent this problem use:1. Limiters
Limit the scheme to have the face value φf to be between φfcertain values (ULTRA SHARP)
2. Total variation diminishing schemes (TVD)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 60

31
Homework
yH
•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
max
21 1 and 0u y vu H
⎛ ⎞= − − =⎜ ⎟⎝ ⎠
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 61
where umax = 1.5umean. The energy equation is
( ) ( ) p p
uT vT k T k Tx y x c x y c 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
Generalisation of Upwindbiased SchemesFor 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)
EEEPWWWew
φeφP
veUPWIND
φe = φP
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 62
φe = φP
The face value of φ is taken to be equal to the value of the upstream node;
(5.66)

32
Generalisation of Upwindbiased Schemes
φeφPφW
φe = φP +(φP – φW) / 2
2) Linear Upwind Differencing Scheme (LUD) also called the second order upwind differencing scheme (SOU)
E EEPWWWew
veSOU (LUD)
φ 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φ φ δφ φ −
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 63
( )2
1 ( )2
P We P
P P W
xφ φφ φδ
φ φ φ
= +
= + −
The term ½(φP – φW) can be thought as a second order correction to the standard upwind scheme.
(5.67)
Generalisation of Upwindbiased Schemes3) Central Differencing Scheme (CD)
φeφPφE
φe = (φP + φW) / 2
EEEPWWWew
ueCENTRAL
The value of φ is assumed to vary linearly between the two nodes straddling the face, that is;
( )P Eφ φφ + (5 68)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 64
( )2
or1 ( )2
P Ee
e P E P
φ φφ
φ φ φ φ
=
= + −
(5.68)
(5.69)

33
Generalisation of Upwindbiased Schemes4) QUICK Scheme
φeφPφEφW
φe = 6/8φP + 3/8φE – 1/8φW)
E EEPWWWew
ueQUICK
φW
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
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 65
downstream node E.6 3 18 8 8e P E W
φ φ φ φ= + −
1 (3 2 )8e P E P W
φ φ φ φ φ= + − −or
(5.70)
(5.71)
Generalisation of Upwindbiased SchemesAll higher order schemes can be expressed in the form:
1 ( )2e P E P
φ φ ψ φ φ= + −
ψ = an appropriate function
(5.72)
ψ pp p
Convective flux at face e is FeφeFor a higher order scheme convective flux consist of two parts:
1) Upwind flux, FeφP2) Additional flux, Feψ(φE – φP)/2
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 66
E P
Additional flux is connected to the gradient of φ at face e, as indicated by (φE – φP)

34
Generalisation of Upwindbiased Schemes
LUD scheme may be written as
ψ = 0 for UD scheme
ψ = 1 for CD scheme
LUD scheme may be written as1 ( )2
= for LUD scheme
P We P E P
E P
P W
E P
φ φφ φ φ φφ φ
φ φψφ φ
⎛ ⎞−= + −⎜ ⎟−⎝ ⎠
⎛ ⎞−→ ⎜ ⎟−⎝ ⎠
QUICK scheme may be written as
(5.73)
(5.74)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 67
Q y
1 13 ( )2 4
1 = 3 for QUICK scheme4
P We P E P
E P
P W
E P
φ φφ φ φ φφ φ
φ φψφ φ
⎡ ⎤⎛ ⎞−= + + −⎢ ⎥⎜ ⎟−⎝ ⎠⎣ ⎦
⎛ ⎞−→ +⎜ ⎟−⎝ ⎠
(5.75)
(5.76)
Generalisation of Upwindbiased Schemes
ψ is a function of r: ψ = ψ(r)
P W
E P
r φ φφ φ
−=
−let
r = ratio of upwindside gradient to downwindside gradient
(5.77)
ψ ψ ψ( )
A higher order convection scheme can be written as1 ( )( )2e P E P
rφ φ ψ φ φ= + −
ψ = 0 for UD scheme
ψ = 1 for CD scheme
(5.78)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 68
ψ
1= 3 for QUICK scheme4
P W
E P
φ φψφ φ
⎛ ⎞−+⎜ ⎟−⎝ ⎠
= for LUD schemeP WE P
φ φψφ φ
⎛ ⎞−⎜ ⎟−⎝ ⎠

35
All of the above expressions assume that the flow direction is positive (from west to east).Similar expressions exist for negative flow direction.p gIn that case, r is still the ratio of upwindside gradient to downwindside gradient.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 69
Total Variation and TVD SchemesUD 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 higherOur aim is to find a convection scheme with a higherorder accuracy but without wiggles.The desirable property for a stable, nonoscillatory, higher order scheme is monotonicity preserving.For a scheme to preserve to preserve monotonicity:
1. It must not create local extrema
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 70
2. The value of an existing local minimum must be nondecreasing and that of a local maximum must be nonincreasing.
Monotonicity preserving schemes do not create new undershoots and overshoots.

36
Total Variation and TVD SchemesConsider the discrete data set shown in the figure.
The total variation of this data set is2 1 3 2 4 3 5 4
3 1 5 3
( )
TV φ φ φ φ φ φ φ φ φ
φ φ φ φ
= − + − + − + −
= − + −(5.79)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 71
For monotonicity, this TV must not increase with time.
3 1 5 3φ φ φ φ
Total Variation and TVD SchemesIn other words TV must diminish with time.Hence, the term total variation diminishing or TVD.Originally TVD was developed for timedependent flows.For TVD: TV(φn+1) ≤ TV(φn) where n refer to time step.
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 72
In the next section we show how TVD is also linked to desirable behaviour of discretisation schemes for steady convectiondiffusion problems.

37
Criteria for TVD SchemesNecessary and sufficient conditions for a scheme to be TVD1) For 0 < r < 1 → ψ(r) ≤ 2r2) For r ≥ 1 → ψ(r) ≤ 2
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 73
UD scheme is TVDLUD scheme is not TVD for r > 2CD scheme is not TVD for r < 0.5QUICK scheme is not TVD for r < 3/7 and r > 5
Requirement for Second Order AccuracyFor second order accuracy, the flux limiter function ψ should pass through the point (1, 1) in the r– ψ diagram.
Range of possible secondorder schemes is bounded by the CD and LUD schemes: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
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 74
Region for a secondorder TVD scheme

38
Symmetry Property for Limiter FunctionsSymmetry Property for limiter functions:
( ) (1/ )r rr
ψ ψ= (5.80)
A limiter function that satisfies the symmetry property ensures that backward and forwardfacing gradients are treated in the same fashion without the need for special coding.
r
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 75
Flux Limiter Functions
2
Van Leer Van Leer (1974)1
V Alb d V Alb d (1982)
r rr
r r l
+++
Name Limiter function Source
2Van Albada Van Albada . (1982)1min( ,1) if 0
MinMod ( ) Roe (1985)0 if 0
SUPERBEE max[0,min(2 ,1),min( , 2)] Roe
et alr
r rr
rr r
ψ
+>⎧
= ⎨ ≤⎩ (1985)
Sweby max[0,min( ,1),min( , )] Sweby (1984)QUICK max[0,min(2 , (3 ) / 4, 2)] Leonard (1988)
S [0 i (2 (1 3 ) / 4 (3 ) / 4 2)] i d h i (1993)
r rr rβ β
+
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 76
UMIST max[0,min(2 , (1 3 ) / 4, (3 ) / 4, 2)] Lien and Leschziner (1993)r r r+ +
0 ≤ β ≤ 2β = 1 → MinMod Limiterβ = 2 → SUPERBEE Limiter of Roe

39
Flux Limiter Functions
MIN‐MOD
MIN‐MOD
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 77
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.
Implementation of TVD Schemes
The coefficients of the discretized equation are written in the deferred correction h I thi h th ffi i t th f UD h
For the one dimensional convection diffusion equation
( )d d dudx dx dx
φρ φ ⎛ ⎞= Γ⎜ ⎟⎝ ⎠ (5.81)
approach. In this approach, the aE, aW, aP coefficients are the same as of UD scheme. The extra terms resulting from the application of a limiter function is added to the source term Sdc.
1 ( )( )21 ( )( )
e P e E Pr
r
φ φ ψ φ φ
φ φ ψ φ φ
+
+
= + −
+
The face values are:
P We
E P
W WW
r
r
φ φφ φ
φ φ
+
+
⎛ ⎞−= ⎜ ⎟−⎝ ⎠⎛ ⎞−
= ⎜ ⎟
For u > 0(5.82)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 78
( )( )2w W w P W
rφ φ ψ φ φ= + − wP W
rφ φ
= ⎜ ⎟−⎝ ⎠
1 ( )( )21 ( )( )2
e E e P E
w P w W P
r
r
φ φ ψ φ φ
φ φ ψ φ φ
−
−
= + −
= + −
For u < 0 EE EeE P
E Pw
P W
r
r
φ φφ φ
φ φφ φ
−
−
⎛ ⎞−= ⎜ ⎟−⎝ ⎠⎛ ⎞−
= ⎜ ⎟−⎝ ⎠
(5.83)

40
Implementation of TVD SchemesThe discretisation equation takes the form
The central coefficient isP P W W E E dca a a Sφ φ φ= + + (5.84)
(5 85)
where( )P W E e wa a a F F= + + −
max[ ,0]( ) max[ ,0]( )max( ,0) max(0, )
max[ ,0]( ) max[ ,0]( )
w e dc
w w W w w Pw w e e
e e E e e P
a a SF F
D F D FF F
φ φ φ φφ φ φ φ− − − −
+ + −+ − − − −
(5.85)
(5.86)
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 79
φ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
( )
Evaluation of TVD Schemes
I. Sezai  Eastern Mediterranean UniversityME555 : Computational Fluid Dynamics 80
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.