discretization of convection-diffusion type equations by finite

Post on 11-Feb-2022

8 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

7 T H INDO GERMAN WINTER ACADEMY- 2008

Discretization of convection-diffusion type equations by

Finite Volume Method

Ritika Tawani

Department of Chemical Engineering Indian Institute of Technology, Bombay

Guides: Prof. Suman Chakraborty, IIT-Kharagpur

Prof. Vivek V. Buwa, IIT-Delhi

Contents

  The Convection Diffusion Equation   Finite Volume Method

  Four basic rules   Central Differencing Scheme   Upwind Differencing Scheme   Exact Solution   Exponential Scheme   Hybrid Scheme   Power Law Scheme   Higher Order Differencing Schemes   QUICK Scheme   Discretization Equations for 2-D, 3-D   Handling the Source term   Handling the Unsteady term

  False Diffusion

The Convection Diffusion Equation

  The general differential equation, for the conservation of a physical property, !

  The 4 terms are: Unsteady term, Convection term, Diffusion term and Source term

  In general, ! = !(x, y, z, t) = !(x, y, z, t) (x, y, z, t)  ! is the diffusion coefficient corresponding to the particular property !, S is the corresponding source term , S is the corresponding source term

  As ! takes different values we get conservation equations for different quantities

eg: !=1: Mass conservation =1: Mass conservation !=u: x-momentum conservation =u: x-momentum conservation !=h: Energy conservation =h: Energy conservation

Finite Volume Method

  Key concept: Integration of differential equation over Control Volume

  For simplification, we first do finite volume formulation for 1-D steady state equation(with no source term)

  The flow field should also satisfy continuity equation

Finite Volume Method

  Control Volume(CV) to be used:

  Integration of transport equation for the shown CV gives

  Derivatives for diffusion term are calculated assuming piecewise linear profile of !

,

Finite Volume Method

  Assuming , the integral of transport equation becomes,

where,

  Also, from continuity equation, we have

  There are various methods to calculate the Convection term and will be discussed after the four basic rules

Four Basic Rules

  For solutions to be: 1. Physically realistic 2. Satisfy overall balance (conservative) There are some basic rules that need to be satisfied by the discretization equations

Standard form of discretization equations(1-D): Rule 1: Flux consistency at CV faces

When a face is common to two adjacent control volumes, flux across it must be represented by the same expression in discretization equations for both the control volumes

Rule 2: Positive coefficients All coefficients must always be of same sign because an increase in must lead to increase in

Four Basic Rules

Rule 3: Negative slope linearization of source term If source term is dependent on !, it is linearized as:

This will then appear in along with other terms. To ensure remains positive, must be negative or zero

Rule 4: Sum of neighbour coefficients If governing differential equation contains only derivatives of !, both ! and !+c will satisfy the equation. In this case,

Central Differencing Scheme

  The Convective term is evaluated using piecewise linear profile of !

  Transport equation becomes,

Central Differencing Scheme

  Discretization equation can be written as

where

Assessment   Conservativeness : Uses consistent expressions to evaluate convective

and diffusive fluxes at CV faces. Unconditionally Conservative

  Boundedness : will become negative if Scheme is conditionally bounded ( )

Central Differencing Scheme

  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

  Accuracy : Second Order in terms of Taylor series Stable and accurate only if Now,

For stability and accuracy, either velocity should be very low or grid spacing should be small

Upwind Differencing Scheme

  The diffusion term is still discretized using piecewise linear profile of !   For convection term, ! at interface is equal to ! at the grid point on

the upwind side

is defined similarly   Define , then, upwind scheme gives

  Discretization equation:

Upwind Differencing Scheme

Assessment   Conservativeness : It is conservative

  Boundedness : When flow satisfies continuity equation, all coefficients are positive. Also, 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 be discussed later

Exact Solution

  The governing transport equation:

  If ! = constant, the equation can be solved exactly

  Boundary conditions: ,

  Solution:

where,

Exponential Scheme

  Define

  Our transport equation becomes,

  Integrating over CV,

  The exact solution derived above can be used as profile assumption with

  Substitution gives

where

Exponential Scheme

  After substitution of similar expression for , equation in our standard form can be written as:

  Merit: Guaranteed to produce exact solution for any Peclet number for 1-D steady convection-diffusion

  Demerits: 1. exponentials expensive to compute 2. not exact for 2-D, 3-D

Hybrid Scheme

  In exponential scheme,

Hybrid Scheme

  From Figure, we can see that 1.

2.

3.

The 3 straight lines representing these limiting cases are shown in figure   The hybrid scheme is made up of these 3 straight lines

,

Hybrid Scheme

  Standard Discretization equation

  Significance of HDS: 1. Combines advantages of both CDS and UDS 2. Identical to CDS for -2 ≤ ≤ 2 3. Outside this range, it reduces to UDS with diffusion set equal to zero

  Disadvantage: First order accuracy in terms of Taylor Series

Power Law Scheme

  Similar to HDS but more accurate   Diffusion is set equal to zero for >10 or < -10   Otherwise diffusion is calculated from a polynomial expression

  Discretization equation

Higher Order Differencing schemes

  CDS has second order accuracy but does not posses transportiveness property.

  Upwind, hybrid schemes are very stable and obey transportiveness but are first order in terms of Taylor series truncation error which makes them prone to diffusion errors.

  Such errors minimized by employing higher order discretisation.   Higher order schemes involve more neighbour points and reduce

discretization errors by bringing wider influence.   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.

Quadratic upwind differencing scheme (QUICK)

  Quadratic upstream interpolation for convective kinetics(QUICK)   3 point upstream-weighted quadratic interpolation used for cell face

values

  For

,

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:

  Standard form of discretized equation

  Similarly, coefficients can be obtained for

QUICK Scheme

Assessment   Conservativeness : Ensured   Boundedness : For , is always negative, can

become negative for , thus the scheme is conditionally stable.

  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

  Another feature : Discretization equations not only involve immediate neighbour nodes but also nodes further away, thus TDMA methods are not applicable

QUICK Scheme

  QUICK scheme above can be unstable due to negative coefficients   Reformulated in different ways- Formulations involve placing -ve

coefficients in source term to retain +ve main coefficients   The Hayse et el(1990) QUICK scheme is summarized as:

  Discretization equation:

QUICK Scheme

Summarizing:   Has greater formal accuracy than central differencing or hybrid

schemes and it retains upwind weighted characteristics   But, can sometimes give minor undershoots and overshoots(example

given later) 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.

Discretization Equations for 2-D, 3-D

Discretization Equation for 2-D

Discretization Equation for 3-D

The coefficients for 2-D, 3-D for hybrid differencing scheme are shown on next page

Coefficients for 2-D, 3-D(HDS)

Summary

Handling the Source term

  For 1-D, Discretization equation simply becomes,

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

  If source term is dependent on !, linearization is done as:

In this case, b and become,

All other coefficients remain same In a similar way, Source term can be incorporated in 2-D, 3-D

Handling the Unsteady term

  For handling the unsteady term we will look at 1-D unsteady equation without convection(without source term), later we can extend the concept to convection-diffusion equations of all kinds

  Integration over the 1-D CV gives

Handling the Unsteady term

  Density remains constant(from continuity equation)

  Now we need an assumption for with t, We assume

  We use similar formulas for and

Handling the Unsteady term

  Final Discretization Equation:

where,

Handling the Unsteady term

  If f=0: Scheme is explicit   If f=0.5: Crank Nicholson Scheme   If f=1: Implicit Scheme   Variation of Temperature with time for the three schemes is :

Handling the Unsteady term

Analysis:   Explicit Scheme:

  The coefficient of becomes negative if exceeds

  For uniform conductivity and equal grid spacing, scheme is stable if

  Crank Nicholson Scheme: Coefficient of is

Handling the Unsteady term

  Even in Crank- Nicholson Scheme, if the time step is not sufficiently small, the coefficient of will become negative

  Crank Nicholson Scheme is also conditionally stable

  Implicit Scheme: Only in this case, the coefficient of is always positive. Thus, fully implicit scheme satisfies requirements of simlicity and physically realistic behavior.

  However, at small time steps, Crank Nicholson scheme is more accurate than fully implicit scheme

  Reason: Temperature time curve is nearly linear for small time intervals which is exactly what we assumed in Crank Nicholson scheme

False Diffusion - Common View

  CDS has 2nd order accuracy while UDS has 1st order accuracy : From Taylor series expansion

  UDS causes severe false diffusion : UDS is equivalent to replacing ! in the CDS by !+!u!x/2

⇒ CDS is better than UDS (misleading, true only for small Pe) Problem with this view:   Truncated taylor series ceases to be a good representation(except for

small !x or small Pe), since !~x variation is exponential   We assumed CDS as standard, then compared diffusion coefficient of

UDS with that of CDS   The so called false diffusion coefficient !u!x/2 is indeed desirable at

large Peclet numbers

False Diffusion - Proper View

  Important only for large Pe(for small Pe, real diffusion is large enough)   Multidimensional phenomena   Consider example: 2 parallel streams with equal velocity, nonequal

Temperature contacted   If !≠ 0, mixing layer forms where T changes from higher to lower value   If !=0, T discontinuity persists in streamwise direction =0, T discontinuity persists in streamwise direction

To observe false diffusion: set !=0, If numerical solution produces smeared T profile(characteristic of !≠0), it entails false diffusion

False Diffusion - Proper View

  CDS: For !=0, it gives non unique or unrealistic solutions   UDS:

1. Uniform flow in x-direction: !=0 and y-direction velocity = 0

Thus, given upstream value on each horizontal line gets established at all points on that line

No false diffusion

False Diffusion - Proper View

2. Uniform flow at 45°togrid lines(say, ∆x=∆y)

Results obtained are shown in adjacent figure Thus, false diffusion is observed

For no false diffusion: !=100 above the diagonal !=0 below the diagonal

False Diffusion - Proper View

  The above problem solved for different grid sizes gives the following results

False Diffusion - Proper View

Conclusions   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, allign grid lines more

in 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. Also, involve more neighbours in discretisation equation.

QUICK Scheme (cont…)

  The above problem if solved on a 50*50 grid using Upwind and QUICK schemes gives the following results.

  Notice the undershoots and overshoots by the QUICK scheme

References

  Ferziger J. H. and Peric M. Computational Methods for Fluid Dynamics

  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

Thank You

top related