You are on page 1of 50

Discretization of Convection

Diffusion type equation


10th Indo German Winter Academy 2011
By,
Rajesh Sridhar,
Indian Institute of Technology Madras

Guides:
Prof. Vivek V. Buwa
Prof. Suman Chakraborty
IIT Delhi
IIT Kharagpur

Agenda:
Introduction
Finite Volume Discretization
Introduction
Spatial Discretization
Spatial Discretization for 2-D and 3-D problems
Source Term Discretization
Unsteady Term Discretization
False Diffusion

Introduction:
General transport equation for the conservation of property is,

Unsteady
term

Convection
term

Diffusion
term

Source
term

is the diffusion coefficient corresponding to and S is the source term.

The above equation transforms into certain famous equations for different
s.
=1
=v
=e

Mass Conservation Equation


Momentum Conservation Equation
Energy Conservation Equation

Finite Volume Method:


Key concept in FVM:
Integration of the differential equation over the Control
Volume.

Solution Procedure:
Grid Generation.
Discretization of differential equation into algebraic equations.
Simultaneous solution of the algebraic equations.

Grid Generation:
Divide the domain into discrete control volumes.
Place a number of nodes between the system boundaries.
Boundaries of control volumes are placed midway between the
adjacent nodes.

Discretization:
The general form of discretized equation is,
aPP = anbnb + b

where,
indicates summation over the neighboring nodes,
anb is the neighboring node coefficient,
nb is the value of property at the neighboring node,
b is a constant.

Discretization Schemes:
For the solutions to be physically realistic, a discretization scheme
should satisfy the following requirements:
1. Conservativeness
2. Boundedness
3. Transportiveness

Conservativeness:

Flux consistency at the CV faces. i.e.

Flux of leaving a control volume = Flux of entering the adjacent control


volume through the same face

Discretization Schemes:
Boundedness:
The discretized equations are solved by iterative methods.
Sufficient condition for a convergent iterative solution is,
|anb|
|aP|

<1

where,
aP is the net coefficient of the central node. i.e. aP SP
Negative Slope Linearization of Source term:
If the source term depends on , it can be linearized
as,
S = SC + SPP

Discretization Schemes:
Boundedness:
|anb|
<1
|aP|
This constraint can be satisfied if aP is made as large as possible. This
can be achieved if the scheme can ensure,
i. SP is always negative.
All coefficients should be of the same sign, preferably positive. i.e. an
increase in at one node should result in an increase in at
neighbouring nodes.
If SP becomes zero, then both and + c will satisfy the equation.

Discretization Schemes:
Transportiveness:
A non-dimensional Peclet number is defined to measure the relative
strengths of convection and diffusion.

where,

u
F
Pe =
=
/x
D

F = convective mass flux per unit area


= fluid density
= diffusion coefficient

D = diffusion conductance
u = fluid flow velocity
x = characteristic length

Primary Objective: The relationship between the magnitude of Peclet


Number and the directionality of influencing .i.e. Transportiveness should
be borne out of the discretization scheme.

Discretization Schemes:
Consider the general contours of constant for a constant
source at P for different values of Pe depicted below.

For Pe = 0 .i.e pure diffusion, the contours are concentric circles for
constant values of because diffusion tends to spread out evenly in all
directions.
As Pe increases, the curve becomes more elliptic and the value of at E
node is more influenced by the upstream node.
At Pe =
.i.e pure convection, the contours are completely outstretched
and value of at E is affected only by upstream conditions.

Spatial Discretization:
Consider the steady convection and diffusion of a property in a onedimensional flow field u.

The flow must also satisfy continuity equation.

Integration of the transport equation over the control volume


yields,
Integration of the continuity equation yields,

Spatial Discretization:
Assuming Ae = Aw = A and employing central differencing approach to
represent the diffusion term, we get

The integrated continuity equation,

where,

Schemes for calculating the value of at the cell faces will be discussed
now.

Spatial Discretization Schemes:


Central Differencing Scheme.
First Order Upwind Scheme
Exact Solution
Exponential Scheme
Hybrid Scheme
Power Law Scheme
QUICK Scheme

Central Differencing Scheme:


Here, we use linear interpolation for computing the cell face values.

W
W

e = (E + P)
2
Transport equation becomes,

w = (P+ W)
2

Central Differencing Scheme:


The final discretized equation can be written as,
where,

Assessment:
Conservativeness:
Uses consistent expressions to evaluate convective and
diffusive fluxes at CV faces. Unconditionally Conservative.

Central Differencing Scheme:


Boundedness:
aE = De -

Fe
2

<0

Pe > 2

aW or aE will become negative if Pe > 2, depending on the flow


direction.
Scheme is conditionally bounded ( Pe < 2).
Transportiveness:
The CDS uses influence at node P from all directions.
Does not recognize direction of flow or strength of convection
relative to diffusion.
Does not possess Transportiveness at high Peclet Numbers.

Central Differencing Scheme:


Accuracy:
Second Order in terms of Taylor series.
Stable and accurate only if Pe < 2.

For a low value of Pe, either velocity should be less or


the grid spacing should be small.

First Order Upwind Scheme:


Here,

e = P

if, Fe > 0

e = E

if, Fe < 0

w is defined similarly.
Now, we can define [[ ]] operator as,
[[ A , B ]] = MAX (A,B).
The final discretization equation is,
where,

First Order Upwind Scheme:


Assessment:
Conservativeness:
Utilises consistent expressions to calculate through cell faces.
Hence, conservative.
Boundedness:
When flow satisfies continuity equation, all coefficients
are positive. Also, aP = aE + aW which is desirable for stable iterative
solutions of linear equations.
Transportiveness:
Direction of flow inbuilt in the formulation, thus accounts for
transportiveness.
Accuracy:
When flow is not aligned with the grid lines, it produces false
diffusion, which will form last part of our discussion.

Exact Solution:
The transport equation,

If is constant, the above equation can be solved exactly for the


boundary conditions,

Solution:

where,

P=

uL

= 0

x=0

= L

x=L

Exponential Scheme:
J = u d
dx
Now, our transport equation can be expressed as,
dJ
dx = 0
Here, we define a variable J such that

Integrating over the CV, we get


Je = Jw
The exact solution derived in the previous slide can be used as a profile
assumption between P and E with 0 being replaced by P ,L by E ,L by xe
resulting in
where,

Exponential Scheme:
Similar substitution for Jw results in the standard discretization equation,
with the values of coefficients,

Merits:

Guaranteed to produce exact solution for any Peclet


number for 1-D steady convection-diffusion.
Demerits:
Exponentials are expensive to calculate.
Not exact for 2-D and 3-D cases.

Hybrid Differencing Scheme:


Combination of Upwind and Central Differencing Scheme.
Central Differencing Scheme (2nd order accurate) for small Pe
(Pe < 2).
Upwind Scheme (transportive) for large Pe (Pe > 2).
Simplification of the exponential scheme for easier computation.
aE
De
Exponential scheme
Hybrid Scheme

-2

Pe

Hybrid Differencing Scheme:


From exponential scheme,

So, we can define a hybrid piece-wise linear function as,


aE
=
De

1 - Pe
2
0
-Pe

-2 < Pe < 2
Pe > 2
Pe < 2

Hybrid Differencing Scheme:


The final discretization equation along with the value of the coefficients
is given below:

Assessment:
Combines advantages of both Upwind and CDS schemes.
Conservative and unconditionally bounded.
Satisfies transportiveness by using Upwind scheme for large Pe.
Only disadvantage is accuracy in terms of Taylor series expansion
which is first order.

Power Law Scheme:


Similar to Hybrid Differencing Scheme, but more accurate and
produces better results.
Diffusion is set equal to zero for |Pe| > 10.

Higher Order Differencing Schemes:


Need for Higher Order Schemes:
Accuracy of Upwind and Hybrid schemes is only first order in
terms of Taylor Series truncation error, leading to numerical diffusion
errors.
Central differencing scheme is second order accurate but doesnot
possess transportiveness property, hence unstable.
Errors reduced by bringing in a wider influence involving more
neighbour points.
Formulations that do not take into account the flow direction are
unstable and, therefore, more accurate higher order schemes, which
preserve upwinding for stability and sensitivity to flow direction, are
needed.

QUICK Scheme:
QUICK stands for Quadratic Upwind Interpolation for Convective Kinetics.
3 point upstream-weighted quadratic interpolation used for cell face
values
WW

W w

uw
WW

When Fw > 0,

EE

ue

P
w

When Fe > 0,

e = 6 P+ 3 E - 1 W
8
8
8
w = 6 W+ 3 P - 1 WW
8
8
8

EE

QUICK Scheme:
Diffusion terms are evaluated using gradient of the appropriate
parabola (For uniform grid, gives same results as CDS for diffusion).
Discretized convection diffusion transport equation:
Fe ( 6 P+ 3 E - 1 W ) Fw ( 6 w+ 3 P - 1 WW ) = De (E - P) - Dw (P - W)
8
8
8
8
8
8

Standard form of discretized equation:

Similar expressions can be obtained for Fe < 0 and Fw < 0.

QUICK Scheme:
General expressions valid for both positive and negative flow directions
is given below:
with central coefficient ,
and neighbouring coefficients,

Assessment of QUICK Scheme:


Conservativeness:
Uses consistent quadratic profiles. Hence, conservative.
Boundedness:
Conditionally stable. For uw > 0 and ue > 0, aWW is
negative and aE can become negative for Pe > 8/3.
Transportiveness:
Built-in because the quadratic function is based on 2
upstream and 1 downstream node.

Accuracy:
Third order in terms of Taylor series truncation error on
a uniform mesh.
Note: Discretization equations not only involve immediate
neighbour nodes but also nodes further away, thus TDMA methods
are not directly applicable.

QUICK Summary:
Has greater formal accuracy than central differencing or hybrid
schemes and it retains upwind weighted characteristics.
But, can sometimes give minor undershoots and overshoots.

Other higher order schemes:

Use increases accuracy.


Implementation of Boundary Conditions can be problematic.
Computation costs also need to be considered.
To avoid undershoots and overshoots (get oscillation free solution),
class of TVD (Total variation diminishing) schemes have been
formulated.

Spatial Discretization for 2-D and 3-D:


Discretization in 2D:

Discretization in 3D:

Spatial Discretization for 2-D and 3-D:


Coefficients for HDS in 2D and 3D cases:

Spatial Discretization Summary:

Source Term Discretization:


In a one-dimensional case, the discretization equation simply becomes,

aPP = aEE + aWW + b


If the source term is a constant S = SC then all other coefficients
remain same and,

b = SCx
If source term is dependent on , linearization is done as:

S = SC + SPP
In this case, b and aP become,
All other coefficients remain same.
In a similar way, Source term can be incorporated in 2-D and 3-D.

Unsteady Term Discretization:


Consider a 1-D unsteady diffusion equation.
Integration over the control volume gives,

t+t

t+t

= e
t

E - P
xe

- w
t

P - W
xw

Unsteady Term Discretization:


Now we need an assumption for with t, we assume

where 0< f <1

f =1 Implicit
f = 0.5 Crank-Nicholson
f = 0 Explicit

t+t

Unsteady Term Discretization:


The final discretization equation becomes,
aPP1 = aE{fP1+(1-f)E0} + aW {fW1 +(1-f)W0} + {aP0-(1-f)aE (1-f) aW} P0
where,

Unsteady Term Discretization:


Asssesment:
Explicit Scheme:
aPP1 = aEE0 + aWW0 + {aP0- aE - aW} P0
The coefficient of P0 becomes negative if aP0 exceeds aE + aW.
For uniform conductivity and equal grid spacing, scheme is stable if

Crank Nicholson Scheme:


Coefficient of P0 is

Unsteady Term Discretization:


Even in Crank-Nicholson Scheme, if the time step is not sufficiently
small, the coefficient of P0 will become negative.
Crank Nicholson Scheme is also conditionally stable.
Implicit Scheme:
Only in this case, the coefficient of P0 is always positive. Thus,
fully implicit scheme satisfies requirements of simplicity and physically
realistic behaviour.
However, at small time steps, Crank Nicholson scheme is more
accurate than fully implicit scheme.

False Diffusion
Usually it is stated that the Central difference scheme is superior to the
Upwind scheme because it is second-order accurate whereas the Upwind
scheme is only first-order accurate.
But when we compare the Central difference and Upwind schemes:

This added diffusion is considered bad at small Peclet numbers, however it


actually corrects the solution at large Peclet number.

False Diffusion
False diffusion is a numerically introduced diffusion and arises in
convection dominated flows, i.e. high Pe number flows.
False diffusion is a multidimensional phenomenon and occurs when the
flow is perpendicular to the grid lines.
X

Consider the following


example:
If there was no false
diffusion, then the temperature
will be exactly 100 C
everywhere above the diagonal
and exactly 0 C everywhere
below the diagonal.

Hot Fluid
T = 100C
X
Cold Fluid
T = 0C

False Diffusion

False Diffusion Upwind Scheme:

False Diffusion QUICK Scheme:


It diverges!

False Diffusion - Summary:


Occurs when flow is oblique to grid lines and nonzero gradient exists
in direction normal to flow.
False diffusion reduction: Use smaller x and y, align grid lines more
in the direction of flow.
Enough to make false diffusion << real diffusion.
CDS is no remedy for false diffusion. At high Pe, it produces
unrealistic results.
Basic Cause: Treating flow across each CV as locally 1-D.
For less false diffusion:
Scheme should take account of multidimensional nature of flow.
Involve more neighbours in discretisation equation.

References
Patankar S.V.

Numerical Heat Transfer and Fluid Flow

Versteeg H. K. and Malalasekera W. An introduction to computational


fluid Dynamics: The finite volume method
Lecture Notes by Dr. Shamit Bakshi, IIT Madras.

Thank You!

You might also like