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:
aPP aw W aeE
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 FAA De E P DA P A
2

For node 5, we have:


Fw
FBB 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 DeE
or
Dw Fw De Fe Fw P Dw Fw W DeE

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 DwW 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 2DB

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 AwW for Pew / 2

qw Fw AwP for Pew -2

The general form of the discretised equation is:


aPP aw W aeE 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 2A 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 9P 8A E
x 3
The discretised equation at node 1 is:
7 3 2 D
Fe P E A FAA De E P A 9P 8A E
8 8 8 3

47
At node 5

The diffusive flux through the west boundary is:


DB
B 8B 9P W
x 3
The discretised equation at node 5 is:
6 3 1 D
FBB Fw W P WW B 8B 9P 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 3P 2W WW for Fw > 0
8
1
w P 3W 2P E for Fw < 0
8
1
e P 3E 2P W for Fe > 0
8
1
e E 3P 2E EE for Fe < 0
8
The discritised equation:
aPP aw W aeE bP

53
with central coefficient
= + +

1
bno 3P 2W WW max Fw ,0 1 W 2P 3E max Fe ,0
8 8
1 1
3W 2P E max Fw ,0 2E EE 3P 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