very important fvm

Upload: samira-zahedi

Post on 06-Apr-2018

239 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Very Important FVM

    1/45

    7T H INDO GERMAN WINTER ACADEMY- 2008

    Discretization of convection-diffusiontype equations by

    Finite Volume Method

    Ritika Tawani

    Department of Chemical EngineeringIndian Institute of Technology, Bombay

    Guides:Prof. Suman Chakraborty, IIT-Kharagpur

    Prof. Vivek V. Buwa, IIT-Delhi

  • 8/3/2019 Very Important FVM

    2/45

    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

  • 8/3/2019 Very Important FVM

    3/45

    The Convection Diffusion Equation

    The general differential equation, for the conservation of a physicalproperty,!

    The 4 terms are: Unsteady term, Convection term, Diffusion term andSource 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 differentquantities

    eg:!=1: Mass conservation=1: Mass conservation

    !=u: x-momentum conservation=u: x-momentum conservation

    !=h: Energy conservation=h: Energy conservation

  • 8/3/2019 Very Important FVM

    4/45

    Finite Volume Method

    Key concept: Integration of differential equation over Control Volume

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

    The flow field should also satisfy continuity equation

  • 8/3/2019 Very Important FVM

    5/45

    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 linearprofile of!

    ,

  • 8/3/2019 Very Important FVM

    6/45

    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

  • 8/3/2019 Very Important FVM

    7/45

    Four Basic Rules

    For solutions to be: 1. Physically realistic2. Satisfy overall balance (conservative)

    There are some basic rules that need to be satisfied by the discretizationequations

    Standard form of discretization equations(1-D):

    Rule 1: Flux consistency at CV facesWhen a face is common to two adjacent control volumes, flux across it

    must be represented by the same expression in discretization equationsfor both the control volumes

    Rule 2: Positive coefficients

    All coefficients must always be of same sign because an increase inmust lead to increase in

  • 8/3/2019 Very Important FVM

    8/45

    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 ensureremains 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,

  • 8/3/2019 Very Important FVM

    9/45

    Central Differencing Scheme

    The Convective term is evaluated using piecewise linear profile of!

    Transport equation becomes,

  • 8/3/2019 Very Important FVM

    10/45

    Central Differencing Scheme

    Discretization equation can be written aswhere

    Assessment

    Conservativeness : Uses consistent expressions to evaluate convectiveand diffusive fluxes at CV faces.

    Unconditionally Conservative

    Boundedness : will become negative ifScheme is conditionally bounded ( )

  • 8/3/2019 Very Important FVM

    11/45

    Central Differencing Scheme

    Transportiveness : The CDS uses influence at node P from alldirections. Does not recognize direction of flow or strength ofconvection relative to diffusion

    Does not possess Transportiveness at high Peclet Numbers

    Accuracy : Second Order in terms of Taylor seriesStable and accurate only if

    Now,

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

  • 8/3/2019 Very Important FVM

    12/45

    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:

  • 8/3/2019 Very Important FVM

    13/45

    Upwind Differencing Scheme

    Assessment Conservativeness : It is conservative

    Boundedness : When flow satisfies continuity equation, all coefficientsare positive. Also, which is desirable for stable iterativesolutions 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 falsediffusion, which will be discussed later

  • 8/3/2019 Very Important FVM

    14/45

    Exact Solution

    The governing transport equation:

    If! = constant, the equation can be solved exactly

    Boundary conditions: , Solution:

    where,

  • 8/3/2019 Very Important FVM

    15/45

    Exponential Scheme

    Define Our transport equation becomes,

    Integrating over CV,

    The exact solution derived above can be used as profile assumptionwith

    Substitution giveswhere

  • 8/3/2019 Very Important FVM

    16/45

    Exponential Scheme

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

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

    Demerits: 1. exponentials expensive to compute

    2. not exact for 2-D, 3-D

  • 8/3/2019 Very Important FVM

    17/45

    Hybrid Scheme

    In exponential scheme,

  • 8/3/2019 Very Important FVM

    18/45

    Hybrid Scheme

    From Figure, we can see that1.

    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,

  • 8/3/2019 Very Important FVM

    19/45

    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

  • 8/3/2019 Very Important FVM

    20/45

    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

  • 8/3/2019 Very Important FVM

    21/45

    Higher Order Differencing schemes

    CDS has second order accuracy but does not posses transportivenessproperty.

    Upwind, hybrid schemes are very stable and obey transportiveness butare first order in terms of Taylor series truncation error which makesthem 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 areunstable and, therefore, more accurate higher order schemes, whichpreserve upwinding for stability and sensitivity to flow direction, are

    needed.

  • 8/3/2019 Very Important FVM

    22/45

    Quadratic upwind differencing scheme(QUICK)

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

    values

    For,

  • 8/3/2019 Very Important FVM

    23/45

    QUICK Scheme

    Diffusion terms are evaluated using gradient of the appropriateparabola (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

  • 8/3/2019 Very Important FVM

    24/45

    QUICK Scheme

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

    become negative for , thus the scheme isconditionally stable.

    Transportiveness : Built in because the quadratic function is based on 2upstream and 1 downstream node

    Accuracy : Third order in terms of Taylor series truncation error on auniform mesh

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

    not applicable

  • 8/3/2019 Very Important FVM

    25/45

    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:

  • 8/3/2019 Very Important FVM

    26/45

    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(examplegiven 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.

  • 8/3/2019 Very Important FVM

    27/45

    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 onnext page

  • 8/3/2019 Very Important FVM

    28/45

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

  • 8/3/2019 Very Important FVM

    29/45

    Summary

  • 8/3/2019 Very Important FVM

    30/45

    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

  • 8/3/2019 Very Important FVM

    31/45

  • 8/3/2019 Very Important FVM

    32/45

    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

  • 8/3/2019 Very Important FVM

    33/45

    Handling the Unsteady term

    Final Discretization Equation:

    where,

  • 8/3/2019 Very Important FVM

    34/45

    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 :

  • 8/3/2019 Very Important FVM

    35/45

    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

  • 8/3/2019 Very Important FVM

    36/45

    Handling the Unsteady term

    Even in Crank- Nicholson Scheme, if the time step is not sufficientlysmall, the coefficient of will become negative Crank Nicholson Scheme is also conditionally stable

    Implicit Scheme: Only in this case, the coefficient of is alwayspositive. Thus, fully implicit scheme satisfies requirements of simlicityand physically realistic behavior.

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

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

  • 8/3/2019 Very Important FVM

    37/45

    False Diffusion - Common View

    CDS has 2

    nd

    order accuracy while UDS has 1st

    order accuracy : FromTaylor series expansion

    UDS causes severe false diffusion : UDS is equivalent to replacing! inthe 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 forsmall!x or small Pe), since!~x variation is exponential

    We assumed CDS as standard, then compared diffusion coefficient ofUDS with that of CDS

    The so called false diffusion coefficient!u!x/2 is indeed desirable atlarge Peclet numbers

  • 8/3/2019 Very Important FVM

    38/45

    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 directionTo observe false diffusion: set!=0, If numerical solution producessmeared T profile(characteristic of!0), it entails false diffusion

  • 8/3/2019 Very Important FVM

    39/45

    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

  • 8/3/2019 Very Important FVM

    40/45

    False Diffusion - Proper View

    2. Uniform flow at 45togrid 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

  • 8/3/2019 Very Important FVM

    41/45

    False Diffusion - Proper View

    The above problem solved for different grid sizes gives the followingresults

  • 8/3/2019 Very Important FVM

    42/45

    False Diffusion - Proper View

    Conclusions

    Occurs when flow is oblique to grid lines and nonzero gradient exists indirection normal to flow

    False diffusion reduction: Use smaller x and y, allign grid lines morein direction of flow

    Enough to make false diffusion

  • 8/3/2019 Very Important FVM

    43/45

    QUICK Scheme (cont)

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

    Notice the undershootsand overshoots by the

    QUICK scheme

  • 8/3/2019 Very Important FVM

    44/45

    References

    Ferziger J. H. and Peric M. Computational Methods for FluidDynamics

    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

  • 8/3/2019 Very Important FVM

    45/45

    Thank You