You are on page 1of 59

Lecture Note – 4b

Finite Volume Method-


Convection-Diffusion
Problem
Lecture notes on CFD by
C. R. Prajapati
Apollo Institute of Engineering & Technology 1
• This chapter will deal with the most fundamental aspects
of numerical procedures for solving convection - diffusion
problems.
• General Convection-Diffusion Equation for an arbitrary
variable Φ
  u   v   w 
     
t x y z
  2  2  2 
  2  2  2  S
 x y z 

2
The finite-volume method
• The principle of the finite-volume method is local conservation
• the entire computational domain is divided into ‘small’ sub-
volumes, so-called cells.
• A typical 3-d control volume is shown right. Relative to the cell
centre (point P) the coordinate directions are commonly
denoted west, east, south, north, bottom, top with:
 lower case w, e, s, n, b, t used for cell faces;
 upper case W, E, S, N, B, T for adjacent nodes.
• For a Cartesian mesh these would usually correspond to ± x,
± y, ± z directions respectively.
• Cell-face areas will be denoted Aw, Ae, As, An, Ab, At. Cell
volumes will be denoted V.

3
4
In Two dimension

5
The Steady-State 1-D Advection-Diffusion
Equation

• it greatly simplifies the analysis;


• it permits a hand solution of the discretised equations;
• subsequent generalisation to 2 and 3 dimensions is
straight forward;
• in practice, discretisation of fluxes is generally carried out
coordinate-wise;
• many important theoretical problems are 1-d.

6
Conservation for one control volume gives
(Flux)e – (Flux)w = Source

where “flux” means the rate at which something passes


through a given area (here, a cell face).

7
• The one dimensional advection-diffusion equation for
steady state

u     
   S
x x  x 

Integrating over the control volume we get:

8
Discretising Diffusion
P e
w
W E

(Δx)w (Δx)e

Gradient diffusion is usually discretised by central differencing:

where

Similarly

9
Discretising Advection u

w P e
W E

(Δx)w (Δx)e
Purely diffusive problems (u = 0) are of passing interest only.
In typical engineering flow problems, advection fluxes far
exceed diffusive fluxes because the Reynolds number
(Re = ρUL/ μ= ratio of inertial forces [mass × acceleration] to
viscous forces) is very large.
The 1-d steady-state advection-diffusion equation is:

10
or

Φe and Φw have yet to be approximated.

The problem is …
How to approximate these face values in terms of the
values at adjacent nodes?
A method of specifying these face values in order to
calculate advective fluxes is called an advection scheme
or advection-differencing scheme.

11
Central Differencing
In central differencing the cell-face value is approximated by

Substituting we get:

or

12
i.e. 𝑎𝑃 ∅𝑃 − ෍ 𝑎𝑛𝑏 ∅𝑛𝑏 = 𝑏𝑃
𝑛𝑏
where

𝑎𝑃 = 𝑎𝑤 + 𝑎𝑒 − 𝑠𝑃 + 𝐹𝑒 − 𝐹𝑤
Let Dw = De=1 and Fe = Fw = 4
Then aw = 3, ae = -1 , aP = 2

Now if
E =200 and W =100 P =50 (unrealistic ! )

Monotonicity of Φ not preserved; negative coefficients give


unrealistic values at cell centre

13
• When 𝐹 > 2D, depending on whether F is positive or
negative, there is a possibility of aE or aW becoming
negative.
• Violates one of the basic rules.
• Negative coefficient also imply that 𝑎𝑃 ≤ σ 𝑎𝑛𝑏
• Fails to satisfy the Scarborough Criteria.

Scarborough Criterion :

Satisfaction of Scarborough Criterion ensures numerical


stability and realistic results.

• So Central Difference scheme is to be restricted to low


Reynolds Number i.e. to low value of F/D.

14
Example: one-dimensional steady
states convection and diffusion
A property φ is transported by means of convection and
diffusion through the one-dimensional domain. The equation
governing is:
d d  d 
u     
dx dx  dx 
Boundary conditions are:
0  1 x 0 and L  0 x L

15
Using 5 equally spaced cells and the central differencing
scheme for convection and diffusion, calculate the
distribution of φ as a function of x for,
• Case 1: u = 0.1 m/s
• Case 2: u = 2.5 m/s
Take L = 1.0 m, ρ = 1.0 kg/m3, Γ = 0.1 x 10-3 kg/m/s.

∆x
A B
1 2 3 4 5
Φ= 1 Φ= 0
W w P e E

∆x ∆x

16
For nodes 2, 3, and 4
Compared with the general form:
aPP  aw W  aeE
where
 F   F 
aw   Dw  w  ae   De  e 
 2   2
aP  aw  ae  Fe  Fw 

For the boundary nodes 1 and 5, from:

Fe
P  E   Fw W  P   De E  P   Dw P  W 
2 2

17
Where:-

Lecture notes on CFD by 18


C.R.Prajapati
For node 1, we have:

Fe
P  E   FAA  De E  P   DA P  A 
2

For node 5, we have:


Fw
FBB  P  W   DB B  P   Dw P  W 
2
Noting that DA  DB  2D and FA  FB  F
Compared with the general form:

aP P  aw W  ae E  bP

with aP  aw  ae  Fe  Fw   SP

19
We have

Node aw ae SP bP
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

20
What is the Remeady?
Peclet number Pe is defined by

• Mathematically, when the cell Peclet number Pe is bigger


than 2, the coefficient becomes negative, meaning that,
for example, an increase in ΦE would lead to a decrease in
ΦP. This is impossible for a quantity that is simply advected
and diffused.
• Physically, the advection process is directional; it
transports properties only in the direction of the flow.
However, the central-differencing formula assigns equal
weight to both upwind and downwind nodes.

21
Upwind Differencing:
• One major inadequacy of the central differencing scheme is
its inability to identify flow direction. In a strong convective
flow from west to east, the above treatment is unsuitable
because the west cell face should receive much stronger
influencing from node W than from node P.
• The upwind differencing or "donor cell" differencing scheme
takes into account the flow direction when determining the
value at a cell face: the convected value of φ is taken to be
equal to the value at the upstream node.

22
In upwind differencing Φface is taken
as the value at whichever is the
upwind node; i.e. in one dimension.

23
When the flow is in the positive direction:
uw > 0 and ue > 0 (Fw > 0 and Fe > 0), the upwind scheme sets:

w  W and e  P

the discretised equation is:


Fe P   Fw W   De E  P   Dw P  W 

re-arranging
Dw  De  Fe P  Dw  Fw W  DeE
or
Dw  Fw   De  Fe  Fw P  Dw  Fw W  DeE

24
When the flow is in the negative direction:
uw < 0 and ue < 0 (Fw < 0 and Fe < 0), the upwind scheme sets:

w  P and e  E

the discretised equation is:


Fe E   Fw P   De E  P   Dw P  W 

re-arranging
Dw  De  Fe   Fe  Fw P  DwW  De  Fe E

25
With this scheme, the algebraic equation for each control
volume takes the form

𝑎𝑃 ∅𝑃 − ෍ 𝑎𝑛𝑏 ∅𝑛𝑏 = 𝑏𝑃
𝑛𝑏
where

aP  aw  ae  Fe  Fw   SP

Discussion:-
• No negative coefficients
• Solution will be always physically realistic
• Scarborough Criteria will be satisfied.

26
Example: the same example as the previous one.

δx
A B
1 2 3 4 5
Φ= 1 Φ= 0
W w P e E

δx δx

Internal nodes 2, 3 and 4


Since F = Fe = Fw = ρu and D = De = Dw = Γ/δx, the discretised
equation at and the relevant neighbour coefficients are given
by:

27
Boundary nodes 1 and 5
At the boundary node 1, the upwind scheme gives:
Fe P   FA A   De E  P   DA P  A 
At the boundary node 5, the upwind scheme gives:
FB P   Fw W   DB B  P   Dw P  W 
Since at the boundary nodes: FA = FB = F = ρu and DA = DB
= 2Γ/δx = 2D,
We have:
Node aW aE SP bP
1 0 D -(2D+F) (2D+F)φA
2,3,4 D+F D 0 0
5 D+F 0 -2D 2DφB

28
Exact Solution
If Γ is constant, the equation can be solved
exactly. Let 0 ≤ x ≤ L
B.C. x=0 Φ = Φ0
x=L Φ = ΦL
The solution is
𝑃𝑥
∅ − ∅0 𝑒𝑥𝑝 −1
= 𝐿
∅𝐿 − ∅0 𝑒𝑥𝑝 𝑃 − 1
Where P = Peclet Number = Ratio of strengths of
convection and diffusion.
= F/D
29
P = 0 is pure diffusion.

-P>>1 When flow is in positive x-


ΦL
direction (i.e. P is positive),
P=-1 value of Φ is influenced by
upstream value Φ0
P=1
Φ0 For large positive values of
P>>1 P, the value of Φ remains
very close to upstream
L value of Φ0
X

30
Exponential Scheme
d∅
Let total flux J = ρu∅ − Γ
dx
dJ
Hence =0 or Je = Jw
dx
∅P − ∅E
Putting exact solution, we get Je = Fe ∅P +
exp Pe − 1
ρu e ∆x e 𝐹𝑒
where Pe = =
Γe 𝐷𝑒

∅P −∅E ∅W −∅P
Hence Fe ∅P + - Fw ∅W + =0
exp Pe −1 exp P𝑤 −1

31
Exponential Scheme
𝑎𝑃 ∅𝑃 = 𝑎𝑤 ∅𝑊 + 𝑎𝑒 ∅𝐸 + 𝑏𝑃

where
𝐹𝑒
𝑎𝑒 =
exp 𝑃𝑒 − 1

𝐹𝑤 exp 𝑃𝑤
𝑎𝑤 =
exp 𝑃𝑤 − 1

32
Assessment of Upwind Differencing Scheme
(UDS)
• Conservativeness:
UDS utilises consistent expressions to calculate fluxes
through cell faces. Therefore it is conservative.
• Boundedness:
Coefficients of discretised equations are always positive and
satisfies the requirement of boundedness.
𝑎𝑃 = 𝑎𝑤 + 𝑎𝑒 + 𝐹𝑒 − 𝐹𝑤
When flow satisfies continuity, 𝐹𝑒 − 𝐹𝑤 = 0
Hence, 𝑎𝑃 = 𝑎𝑤 + 𝑎𝑒 , which is desirable for stable
iterative solutions.
All coefficients are positive and coefficient matrix is diagonally
dominant.
33
Assessment of Upwind Differencing Scheme
(UDS)
• Transportiveness:
The scheme accounts for the direction of flow, so
transportiveness is built into the formulation.
• Accuracy:
The scheme is first order accurate.

34
The hybrid differencing scheme
• The hybrid differencing scheme of Spalding (1972) is
based on a combination of central and upwind
differencing schemes.
 The central differencing scheme, which is accurate to
second-order, is employed for small Peclet numbers
(Pe < 2).
 The upwind scheme, which is accurate to first order
but accounts for transportiveness, is employed for
large Peclet number (Pe>2).
• The hybrid differencing scheme uses piecewise
formulae based on the local Peclet number to
evaluate the net flux through each control volume
face:
35
1  2  1 2  
qw  Fw  1  W  1  P  for -2 < Pew < 2
 2  Pew  2  Pew  
qw  Fw AwW for Pew / 2

qw  Fw AwP for Pew × -2

The general form of the discretised equation is:


aPP  aw W  aeE  bP

with aP  aw  ae  Fe  Fw   SP
aw ae
  Fw     Fe  
max Fw ,  Dw  ,0 max  Fe ,  De  ,0
  2     2 

36
Assessment of the hybrid differencing scheme

• The scheme is fully conservative and since the coefficients


are always positive it is unconditionally bounded.

• It satisfies the transportiveness requirement by using


upwind formulation for large values of Peclet number.

• Widely used in various CFD procedures.

• The disadvantage is that the accuracy in terms of Taylor


series truncation error is only first-order

37
Quadratic Upstream Interpolation for
Convective Kinetics (QUICK) scheme

• Proposed by Leonard.

• Uses a three point upstream-weighted interpolation for cell


face values.

• The face value of Φ is obtained from a quadratic function


passing through two nodes on each side of the face and a
node on the upstream side.

38
QUICK Scheme

ΦP ΦE
ΦW Φw Φe
ΦWW

WW W w P e E EE

Fw > 0 Fe > 0

39
QUICK Scheme
6 3 1
• When Fw > 0 ∅𝑤 = ∅𝑊 + ∅𝑃 − ∅𝑊𝑊
8 8 8

6 3 1
• When Fe > 0 ∅𝑒 = ∅𝑃 + ∅𝐸 − ∅𝑊
8 8 8

Hence, for Fw > 0 and Fe > 0


6 3 1 6 3 1
𝐹𝑒 ∅𝑃 + ∅𝐸 − ∅𝑊 − 𝐹𝑤 ∅𝑊 + ∅𝑃 − ∅𝑊𝑊
8 8 8 8 8 8
= 𝐷𝑒 ∅𝐸 − ∅𝑃 − 𝐷𝑤 ∅𝑃 − ∅𝑊

40
or
3 6
𝐷𝑤 − 𝐹𝑤 + 𝐷𝑒 + 𝐹𝑒 ∅𝑃
8 8
6 1 3 1
= 𝐷𝑤 + 𝐹𝑤 + 𝐹𝑒 ∅𝑊 + 𝐷𝑒 − 𝐹𝑒 ∅𝐸 − 𝐹𝑤 ∅𝑊𝑊
8 8 8 8

or 𝑎𝑃 ∅𝑃 = 𝑎𝑤 ∅𝑤 + 𝑎𝑒 ∅𝐸 + 𝑎𝑤𝑤 ∅𝑊𝑊
6 1
where 𝑎𝑤 = 𝐷𝑤 + 𝐹𝑤 + 𝐹𝑒
8 8
3 1
𝑎𝑒 = 𝐷𝑒 − 𝐹𝑒 𝑎𝑤𝑤 = − 𝐹𝑤
8 8

𝑎𝑃 = 𝑎𝑤 + 𝑎𝑒 + 𝑎𝑤𝑤 + 𝐹𝑒 − 𝐹𝑤

41
6 3 1
• When Fw < 0 ∅𝑤 = ∅𝑃 + ∅𝑊 − ∅𝐸
8 8 8
6 3 1
• When Fe < 0 ∅𝑒 = ∅𝐸 + ∅𝑃 − ∅𝐸𝐸
8 8 8
Hence, for Fw < 0 and Fe < 0
6 3 1 6 3 1
𝐹𝑒 ∅𝐸 + ∅𝑃 − ∅𝐸𝐸 − 𝐹𝑤 ∅𝑃 + ∅𝑊 − ∅𝐸
8 8 8 8 8 8
= 𝐷𝑒 ∅𝐸 − ∅𝑃 − 𝐷𝑤 ∅𝑃 − ∅𝑊
For which we get
𝑎𝑃 ∅𝑃 = 𝑎𝑤 ∅𝑊 + 𝑎𝑒 ∅𝐸 + 𝑎𝑒𝑒 ∅𝐸𝐸

42
3
where 𝑎𝑤 = 𝐷𝑤 + 𝐹𝑤
8
6 1 1
𝑎𝑒 = 𝐷𝑒 − 𝐹𝑒 − 𝐹𝑤 𝑎𝑒𝑒 = 𝐹𝑒
8 8 8
𝑎𝑃 = 𝑎𝑤 + 𝑎𝑒 + 𝑎𝑤𝑤 + 𝐹𝑒 − 𝐹𝑤
Combining we get
6 3 1
𝐹𝑒 ∅𝑒 = ∅𝑃 + ∅𝐸 − ∅𝑊 𝑚𝑎𝑥 𝐹𝑒 , 0 +
8 8 8
6 3 1
∅𝐸 + ∅𝑃 − ∅𝐸𝐸 𝑚𝑎𝑥 −𝐹𝑒 , 0
8 8 8

6 3 1
𝐹𝑤 ∅𝑤 = ∅𝑊 + ∅𝑃 − ∅𝑊𝑊 𝑚𝑎𝑥 𝐹𝑤 , 0 +
8 8 8
6 3 1
∅𝑃 + ∅𝑊 − ∅𝐸 𝑚𝑎𝑥 −𝐹𝑤 , 0
8 8 8

43
𝑎𝑃 ∅𝑃 = 𝑎𝑤 ∅𝑊 + 𝑎𝑒 ∅𝐸 + 𝑎𝑤𝑤 ∅𝑊𝑊 + 𝑎𝑒𝑒 ∅𝐸𝐸 + 𝑏𝑃

with 𝑎𝑃 = 𝑎𝑤 + 𝑎𝑒 + 𝑎𝑤𝑤 + 𝑎𝑒𝑒 + 𝐹𝑒 − 𝐹𝑤 − 𝑆𝑃

6 3 1
𝑎𝑤 = 𝐷𝑤 + 𝑚𝑎𝑥 𝐹𝑤 , 0 + 𝑚𝑎𝑥 −𝐹𝑤 , 0 + 𝑚𝑎𝑥 𝐹𝑒 , 0
8 8 8
3 6 1
𝑎𝑒 = 𝐷𝑒 − 𝑚𝑎𝑥 𝐹𝑒 , 0 − 𝑚𝑎𝑥 −𝐹𝑒 , 0 − 𝑚𝑎𝑥 −𝐹𝑤 , 0
8 8 8
1 1
𝑎𝑤𝑤 = − 𝑚𝑎𝑥 𝐹𝑤 , 0 𝑎𝑒𝑒 = 𝑚𝑎𝑥 −𝐹𝑒 , 0
8 8

44
Example: using the QUICK scheme solve the problem for
u = 0.2 m/s on a 5-point grid.

u = 0.2 m/s, F = Fe = Fw = ρu = 0.2, D = De = Dw =Γ/δx =


0.1/0.2 = 0.5, Pew = Pee = F/D = 0.4.
• The discretisation equation with the QUICK scheme at
internal nodes 3 and 4 is given by:
6 3 1
𝑎𝑤 = 𝐷𝑤 + 𝑚𝑎𝑥 𝐹𝑤 , 0 + 𝑚𝑎𝑥 −𝐹𝑤 , 0 + 𝑚𝑎𝑥 𝐹𝑒 , 0
8 8 8
3 6 1
𝑎𝑒 = 𝐷𝑒 − 𝑚𝑎𝑥 𝐹𝑒 , 0 − 𝑚𝑎𝑥 −𝐹𝑒 , 0 − 𝑚𝑎𝑥 −𝐹𝑤 , 0
8 8 8

1 1
𝑎𝑤𝑤 = − 𝑚𝑎𝑥 𝐹𝑤 , 0 𝑎𝑒𝑒 = 𝑚𝑎𝑥 −𝐹𝑒 , 0
8 8

45
Nodes 1, 2 and 5 are all affected by the domain boundaries.
Leonard (1979) suggests a linear extrapolation to create a
"mirror" node at a distance δx/2 to the west of the physical
boundary.

ΦP
ΦA
ΦO

O δx/2 A δx/2 P

46
At node 1
φe at the east face of control volume 1:
6 3 1 6 3 1
e  P  E  0  P  E  2A  P 
8 8 8 8 8 8
7 3 2
 P  E  A
8 8 8
The diffusive flux through the west boundary is:
 DA
 A  9P  8A  E 
x 3
The discretised equation at node 1 is:
7 3 2  D
Fe  P  E  A   FAA  De E  P   A 9P  8A  E 
8 8 8  3

47
At node 5

The diffusive flux through the west boundary is:


 DB
 B  8B  9P  W 
x 3
The discretised equation at node 5 is:
6 3 1  D
FBB  Fw  W  P  WW   B 8B  9P  W 
8 8 8  3
 Dw P  W 
At node 2
The discretised equation at node 2:
6 3 1  7 3 2 
Fe  P  E  W   Fw  W  P  A 
8 8 8  8 8 8 
 De E  P   Dw P  W 

48
Node aww aw ae SP bP
1 0 0  1 3  8 2  8 2 
De 
3
DA  F 
8   3
e DA 
8
Fe  FA   3 DA 
8
Fe  FA A

2 0  7 1   3  1

1
Fw  A
D  F  Fe D  Fe Fw
8   8 
w w e
8 4 4

5 1
 Fw  1 6  0
8  8 
D  D  Fw
8  w
3
B
8    DB  FB  D
 3 B  FB B
3  

49
Assessment of QUICK Scheme
• Uses consistent quadratic profiles for the cell face values
of fluxes and hence conservative.
• Its accuracy in terms of the Taylor series truncation error is
third order on a uniform mesh.
• The transportiveness property is built into the scheme
using two upstream and one downstream nodal values.
• Boundedness:
• For modest Peclet number (Pe < 8/3), if the flow field
satisfies continuity, the coefficient aP equals the sum of all
neighbour coefficient which is desirable for boundedness.

50
Assessment of QUICK Scheme

• For Peclet number (Pe) > 8/3, the main coefficients (E and
W) are not guaranteed to be positive and the coefficients
aWW and aEE are negative.
• This give rise to stability problems and unbounded
solutions under certain flow conditions.
• Since the discretised equations involve not only immediate-
neighbouring nodes but also nodes further away, Tri-
diagonal matrix solution (TDMA) methods are not directly
applicable.

51
Remeady

• The QUICK scheme can be unstable due to appearance of


negative main coefficients.
• Place troublesome negative coefficients in source term to
retain positive main coefficients.
• Treat main coefficients implicitly and source term explicitly
(deferred correction).
• Scheme becomes stable and fast converging variant.

52
• The Hayase et al. (1990) QUICK scheme:
1
w  W  3P  2W  WW  for Fw > 0
8
1
w  P  3W  2P  E  for Fw < 0
8
1
e  P  3E  2P  W  for Fe > 0
8
1
e  E  3P  2E  EE  for Fe < 0
8
The discritised equation:
aPP  aw W  aeE  bP

53
with central coefficient
𝑎𝑃 = 𝑎𝑤 + 𝑎𝑒 + 𝐹𝑒 − 𝐹𝑤 − 𝑏ത𝑃

1
bno  3P  2W  WW max Fw ,0  1 W  2P  3E max Fe ,0
8 8
1 1
 3W  2P  E max  Fw ,0   2E  EE  3P max  Fe ,0 
8 8

and 𝑏ത𝑃 = 𝑏𝑃 + 𝑏𝑛𝑜

54
Extension to 2 and 3 Dimensions
• For a multi-dimensional flow the net flux out of a cell can
be obtained by summing the outward fluxes through all
faces.
• For quadrilateral elements (in 2d) or hexahedral elements
(in 3d) then the net flux out of a cell is simply the sum of
the net fluxes through opposing sides and the general
conservation equation for 3 d may be written:
(fluxe – fluxw) + (fluxn – fluxs) + (fluxt – fluxb) = source
i.e.

𝑎𝑃 ∅𝑃 − ෍ 𝑎𝑛𝑏 ∅𝑛𝑏 = 𝑏𝑃
𝑛𝑏

55
Summary
• The generic scalar-transport equation for a particular
control volume has the form
rate of change + net outward flux = source
• “flux” rate of transport through a surface and consists of:
 advection – transport with the flow (other authors prefer
convection);
 diffusion – net transport by random molecular or turbulent
fluctuations.
• Discretisation of the (steady) scalar-transport equation
yields an equation of form
𝑎𝑃 ∅𝑃 − ෍ 𝑎𝑛𝑏 ∅𝑛𝑏 = 𝑏𝑃
𝑛𝑏

56
• Source terms are linearised as:

• The crucial issue of discretising the convection-diffusion


equation is the formulation of suitable expressions for the
values of the transported property φ at cell faces when
accounting for the convective contribution in the equation.
• Discretisation scheme that posses conservativeness,
boundedness and transportiveness give physically realistic
results and stable iterative solutions.
• The central differencing scheme lacks transportiveness
and gives unrealistic solutions at large values of the cell
Peclet number.

57
• Upwind, hybrid and power-law differencing scheme
possess conservativeness, boundedness and
transportiveness and are hightly stable, but suffer from
false diffusion in multi-dimensional flows if the velocity
vectors is not parallel to one of the co-ordinate
directions.
• Higher order schemes, such as QUICK, can minimise
false diffusion errors but are less computationally stable.
This causes small over- and undershoots in the solutions
of some problems including those with large gradients of
φ.
• Diffusive fluxes are usually discretised by central
differencing.

58
Lecture notes on CFD by
C. R. Prajapati
Apollo Institute of Engineering & Technology 59

You might also like