nptel cfd notes

259
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method The Lecture deals with: Classification of Partial Differential Equations Boundary and Initial Conditions Finite Differences Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_1.ht m 1 of 1 6/19/2012 4:29 PM

description

iit notes

Transcript of nptel cfd notes

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    The Lecture deals with:

    Classification of Partial Differential Equations

    Boundary and Initial Conditions

    Finite Differences

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_1.htm

    1 of 1 6/19/2012 4:29 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Classification of Partial Differential Equations

    For analyzing the equations for fluid flow problems, it is convenient to consider the case ofa second-order differential equation given in the general form as

    (1.1)

    If the coefficients A, B, C, D, E, and F are either constants or functions of only (x, y) (donot contain or its derivatives), it is said to be a linear equation; otherwise it is a

    non-linear equation.

    An important subclass of non-linear equations is quasilinear equations.

    In this case, the coefficients may contain or its first derivative but not the second

    (highest) derivative.

    If the aforesaid equation is homogeneous, otherwise it is non-homogeneous.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_2.htm

    1 of 1 6/19/2012 4:30 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Classification of Partial Differential Equations

    Refer to eqiation 1.1

    if the equation is Parabolic

    if the equation is Elliptic

    if the equation is Hyperbolic

    Unsteady Navier-Strokes equations are elliptic in space and parabolic in time.

    At steady-state, the Navier-Strokes equations are elliptic.

    In Elliptic problems, the boundary conditions must be applied on all confining surfaces.These are Boundary Value Problems.

    A Physical Problem may be Steady or Unsteady.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_3.htm

    1 of 1 6/19/2012 4:30 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Classification of Partial Differential Equations

    In this slide we'll discuss Mathematical aspects of the equations that describe fluid flowand heat transfer problems.

    Laplace equations:

    (1.2)

    Poisson equations:

    (1.3)

    Laplace equations and Poisson equations are elliptic equations and generallyassociated with the steady-state problems.

    The velocity potential in steady, inviscid, incompressible, and irrotational flows satisfiesthe Laplace equation.

    The temperature distribution for steady-state, constant-property, two-dimensionalcondition satisfies the Laplace equation if no volumetric heat source is present in thedomain of interest and the Poisson equation if a volumetric heat source is present.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_4.htm

    1 of 1 6/19/2012 4:30 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Classification of Partial Differential Equations

    The parabolic equation in conduction heat transfer is of the form

    (1.4)

    The one-dimensional unsteady conduction problem is governed by this equation when

    and are identified as the time and space variables respectively, denotes the

    temperature and B is the thermal diffusivity. The boundary conditions at the two ends aninitial condition are needed to solve such equations.

    The unsteady conduction problem in two-dimension is governed by an equation of theform

    (1.5)

    Here denotes the time variable, and a souce term S is included. By comparing thehighest derivatives in any two of the independent variables, with the help of theconditions given earlier, it can be concluded that Eq. (1.5) is parabolic in time and ellipticin space. An initial condition and two conditions for the extreme ends in each specialcoordinates is required to solve this equation.

    Fluid flow problems generally have nonlinear terms due to the inertia or accelerationcomponent in the momentum equation. These terms are called advection terms. Theenergy equation has nearly similar terms, usually called the convection terms, whichinvolve the motion of the flow field. For unsteady two-dimensional problems, theappropriate equation can be represented as

    (1.6)

    denotes velocity, temperature or some other transported property,

    and are velocity components,B is the diffusivity for momentum or heat, andS is a source term.

    The pressure gradients in the momentum or the volumetric heating in the energyequation can be appropriately substituted in S. Eq. (1.6) is parabolic in time and elliptic inspace.

    For very high-speed flows, the terms on the left side dominate, the second-order terms onthe right hand side become trivial, and the equation become hyperbolic in time and space.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_5.htm

    1 of 1 6/19/2012 4:31 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Boundary & Initial Conditions

    Formulation of the problem requires a complete specification of the geometry of interestand appropriate boundary conditions. An arbitrary domain and bounding surfaces aresketched in Fig. 1.1.

    Figure 1.1: Schematic sketch of an arbitrary Domain

    The conservation equations are to be applied within the domain. The number of boundaryconditions required is generally determined by the order of the highest derivativesappearing in each independent variable in the governing differential equations.

    The unsteady problems governed by a first derivative in time will require initial conditionin order to carry out the time integration. The diffusion terms require two spatialboundary conditions for each coordinate in which a second derivative appears.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_6.htm

    1 of 1 6/19/2012 4:31 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Boundary & Initial Conditions

    The spatial boundary conditions in flow and heat transfer problems are of three generaltypes. They may stated as

    (1.7)

    (1.8)

    (1.9)

    and denote three separate zones on the bounding surface in Fig. 1.1.

    The boundary conditions in Eqns. (1.7) to (1.9) are usually referred to as Dirchlet,Neumann and mixed boundary conditions, respectively. The boundary conditions arelinear in the dependant variable .

    In Eqns. (1.7) to (1.9), is a vector denoting position on the boundary, is

    the directional derivative normal to the boundary, and and are arbitrary

    functions. The normal derivative may be expressed as

    (1.10)

    Here is the unit vector normal to the boundary, is the nabla operator, [.] denotes

    the dot product, are the direction-cosine components of and are the

    unit vectors aligned with the coordinates.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_7.htm

    1 of 1 6/19/2012 4:31 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Finite Differences

    Analytical solutions of partial differential equations provide us with closed-formexpressions which depict the variation of the dependent variable in the domain.

    The numerical solutions, based on finite differences, provide us with the values atdiscrete points in the domain which are known as grid points.

    Consider Fig. 1.2, which shows a domain of calculation in the plane.

    Figure 1.2; discrete Grid Points

    Let us assume that the spacing of the grid points in the direction is uniform, and givenby . Likewise, the spacing of the points in the direction is also uniform, and given

    by

    It is not necessary that or be uniform. We could imagine unequal spacing in both

    directions, where different values of between each successive pairs of grid points are

    used. The same could be presumed for as well.

    However, often, problems are solved on a grid which involves uniform spacing in eachdirection, because this simplifies the programming, and often result in higher accuracy.

    In some class of problems, the numerical calculations are performed on a transformed

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_8.htm

    1 of 2 6/19/2012 4:31 PM

  • computational plane which has uniform spacing in the transformed-independent-variablesbut non-uniform spacing in the physical plane.

    These typical aspects will be discussed later.

    At present let us consider uniform spacing in each coordinate direction. According to ourconsideration, and are constants, but it is not mandatory that be equal to

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_8.htm

    2 of 2 6/19/2012 4:31 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 1: Finite Difference Method

    Let us refer to Fig. 1.2.

    The grid points are identified by an index which increases in the positive - direction,

    and an index which increases in the positive -direction. If is the index of

    point in Fig.1.2, then the point immediately to the right is designated as and

    the point immediately to the left is and the point directly below is

    The basic philosophy of finite difference method is to replace the derivatives of thegoverning equations with algebraic difference quotients. This will result in a system ofalgebraic equations which can be solved for the dependent variables at the discrete gridpoints in the flow field.

    In the next lecture we'll look at some of the common algebraic difference quotients inorder to be acquainted with the methods related to discretization of the partial differentialequations.

    Congratulations, you have finished Lecture 1. To view the next lecture select it from the left hand sidemenu of the page or click the next button.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture1/1_9.htm

    1 of 1 6/19/2012 4:32 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 2:

    The Lecture deals with:

    Elementary Finite Difference Quotients

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_1.htm

    1 of 1 6/19/2012 4:36 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 2:

    Elementary Finite Difference Quotients

    Finite difference representations of derivatives are derived from Taylor series expansions.

    For example, if is the - component of the velocity, at point can be

    expressed in terms of Taylor series expansion about point as

    ... (2.1)

    Mathematically, Eq. (2.1) is an exact expression for if the series converges.

    In practice, is small and any higher-order term of is smaller than . Hence, for

    any function Eq. (2.1) can be truncated after a finite number of terms.

    Example:In terms of magnitude, and higher order are neglected, Eq. (2.1) becomes

    (2.2)

    Eq. (2.2) is second-order accurate, because terms of order and higher have been

    neglected. If terms if order and higher are neglected, Eq. (2.2) is reduced to

    (2.3)

    Eq. (2.3) is first-order accurate.

    In Eqns. (2.2) and (2.3) the neglected higher-order terms represent the truncation error.Therefore, the truncation errors for Eqns. (2.2) and (2.3) are

    and

    It is now obvious that the truncation error can be reduced by retaining more terms in theTaylor series expansion of the corresponding derivative and reducing the magnitude of

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_2.htm

    1 of 2 6/20/2012 12:16 PM

  • .

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_2.htm

    2 of 2 6/20/2012 12:16 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 2:

    Elementary Finite Difference Quotients

    Let us return to Eq. (2.1) and solve for as:

    or

    (2.4)

    In Eq. (2.4) the symbol is a formal mathematical nomenclature which means terms of

    order of , expressing the order the magnitude of the truncation error. The first-order-

    accurate difference representation for the derivative expressed by Eq. (2.4)

    can be identified as a first-order forward difference.

    Now consider a Taylor series expansion for , and

    or

    (2.5)

    Solving for , we obtain

    (2.6)

    Eq. (2.6) is a first-order backward expression for the derivative at grid point

    Subtracting Eq. (2.5) from (2.1)

    (2.7)

    And solving for from Eq. (2.7) we obtain

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_3.htm

    1 of 2 6/20/2012 12:16 PM

  • (2.8)

    Eq. (2.8) is a second-order central difference for the derivative at grid point

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_3.htm

    2 of 2 6/20/2012 12:16 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 2:

    Elementary Finite Difference Quotients

    In order to obtain a finite difference for the second-order partial derivative

    add Eq. (2.1) and 2.5). This produces

    (2.9)

    Solving Eq. (2.9) for we obtain

    (2.10)

    Eq. (2.10) is a second-order central difference form for the derivative at grid

    point

    Difference quotients for the derivatives are obtained in exactly the similar way. The

    results are analogous to the expression for the derivatives.

    [Forward difference]

    [Backward difference]

    [Central difference]

    [Central difference of secondderivative]

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_4.htm

    1 of 1 6/20/2012 12:17 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 2:

    Elementary Finite Difference Quotients

    Central difference given by Eq. (2.10) can be interpreted as a forward difference of thefirst order derivatives, with backward difference in terms of dependent variables for thefirst-order derivatives. This is because

    or

    or

    The same approach can be made to generate a finite difference quotient for the mixed

    derivative at grid point .

    Example,

    (2.11)

    In Eq. (2.11), if we write the derivative as a central difference of derivatives,

    and further make use of central differences to find out the derivatives, we obtain

    (2.12)

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_5.htm

    1 of 2 6/20/2012 12:17 PM

  • Congratulations, you have finished Lecture 2. To view the next lecture select it from the left hand sidemenu of the page or click the next button.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_5.htm

    2 of 2 6/20/2012 12:17 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 3:

    The Lecture deals with:

    Basic Aspects of Finite -Difference Equations

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture3/3_1.htm

    1 of 1 6/20/2012 12:18 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 3:

    Combinations of finite difference quotients for partial derivatives form finite differenceexpressions for the partial differential equations.

    Example, The Laplace equation in two dimensions, becomes

    or

    (3.1)

    Where is the mesh aspect ratio

    If we solve the Lapalce equation on a domain given by Fig. 1.2, the value of will be

    (3.2)

    It can be said that many other forms of difference approximations can be obtained for thederivatives which constitute the governing equations for fluid flow and heat transfer.

    The basic procedure, however, remains the same. In order to appreciate some more finitedifference representations see Tables 2.1 and 2.2.

    Interested readers are referred to Anderson, Tannehill and Pletcher (1984) for more insight into variousdiscretization methods.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture3/3_2.htm

    1 of 1 6/20/2012 12:19 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 3:

    Basic Aspects of Finite-Difference Equations

    In this slide we shall look into some of the basic aspect of difference equations.

    Consider the following one dimensional unsteady state heat conduction equation. Thedependent variable (temperature) is a function of and (time) and is a constant

    known as thermal diffusivity.

    (3.3)

    It is to be noted that Eq.(3.3) is classified as a parabolic partial differential equation.

    If we substitute the time derivative in Eq. (3.3) with a forward difference, and a spatialderivative with a central difference (usually called FTCS, Forward Time Central Spacemethod of discretization), we obtain

    (3.4)

    In Eq. (3.4), the index for time appears as a superscript, where n denotes conditions at

    time denotes conditions at time and so on. The subscript denotes the

    grid point in the spatial dimension.

    However, there must be a truncation error for the equation because each one of the finitedifference quotient has been taken from a truncated series.

    Considering Eqns. (3.3) and (3.4) and looking at the truncation error associated with thedifference quotients we can write

    (3.5)

    In Eq. (3.5), the terms in the square brackets represent truncation error for the complete

    equation. It is evident that truncation error (TE) for this representation is

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture3/3_3.htm

    1 of 1 6/20/2012 12:19 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 3:

    Basic Aspects of Finite-Difference Equations

    Table 3.1: Difference Approximations for Derivatives

    grid spacing

    Table 3.2: Difference Approximations for Derivatives

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture3/3_4.htm

    1 of 2 6/20/2012 12:19 PM

  • With respect to Eq. (3.5), it can be said that as and the truncation error

    approach zero.

    Hence, in the limiting case, the difference equation also approaches the originaldifferential equation. Under such circumstances, the finite difference representation of thepartial differential equation is said to be consistent.

    Congratulations! You have finished Lecture 3. To view the next lecture select it from the left hand sidemenu of the page or click the next button.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture3/3_4.htm

    2 of 2 6/20/2012 12:19 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 4:

    The Lecture deals with:

    Consistency

    Convergence

    Explicit and Implicit ethod

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture4/4_1.htm

    1 of 1 6/20/2012 12:20 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 4:

    Consistency

    A finite difference representation of a partial differential equation (PDE) is said to beconsistent if we can show that the difference between the PDE and its finite difference(FDE) representation vanishes as the mesh is refined, i.e,

    lim (PDE-FDE) =

    lim (TE)=0

    A questionable scheme would be one for which the truncation error is and not

    explicitly or or higher orders.

    In such cases the scheme would not be formally consistent unless the mesh were refinedin a manner such that . Let us take Eq. (3.3) and use the Dufort-Frankel

    (1953) differencing scheme. The FDE is

    (4.1)

    Now the leading terms of truncated series form the truncation error for the completeequation:

    The above expression for truncation for error meaningful if together with

    and .However, and may individually approach zero in such a

    way that . Then if we reconstitute the PDE from FDE and TE, we shall obtain

    lim (PDE-FDE) =

    lim (TE) =

    And finally PDE becomes

    We started with a parabolic one and ended with a hyperbolic one!

    So, DuFort-Frankel scheme is not consistent for the 1D unsteady state heat conduction

    equation unless together with and .

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture4/4_2.htm

    1 of 2 6/20/2012 12:20 PM

  • Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture4/4_2.htm

    2 of 2 6/20/2012 12:20 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 4:

    Convergence

    A solution of the algebraic equation that approximates a partial differential equation (PDE)is convergent if the approximate solution approaches the exact solution of the PDE foreach value of the independent variable as the grid spacing tend to zero.

    The requirement is

    as

    Where, is the solution of the system of algebraic equations.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture4/4_3.htm

    1 of 1 6/20/2012 12:20 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 4:

    Explicit and Implicit Methods

    The solution of Eq. (3.4) takes the form of a marching procedure (or scheme) in stepsof time.

    We know the dependent variable at all at a time level from given initial conditions.

    Examining Eq. (3.4) we see that it contains one unknown, namely .

    Thus, the dependent variable at time is obtained directly from the known values

    of and

    (4.2)

    This is a typical example of an explicit finite difference method.

    Congratulations! You have finished Lecture 4. To view the next lecture select it from the left hand sidemenu of the page or click the next button.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture4/4_4.htm

    1 of 1 6/20/2012 12:20 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 5:

    The Lecture deals with:

    Explicit and Implicit Methods

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_1.htm

    1 of 1 6/20/2012 12:22 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 5:

    Let us now attempt a different discretization of the original partial differential equationgiven by Eq. (3.3). Here we express the spatial difference on the right-hand side in terms

    of averages between and time level

    (5.1)

    The differencing shown in Eq. (5.1) is known as the Crank-Nicolson implicit scheme.

    The unknown is not only expressed in terms of the known quantities at time level

    but also in terms of unknown quantities at time level . Hence Eq. (5.1) at a given grid

    point , cannot itself result in a solution of .

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_2.htm

    1 of 1 6/20/2012 12:22 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 5:

    Eq. (5.1) has to be written at all grid points, resulting in a system of algebraic equations

    from which the unknowns for all can be solved simultaneously. This is a typical

    example of an implicit finite-difference solution (Fig. 5.1).

    Figure 5.1: Crank Nicolson Implicit Scheme

    Since they deal with the solution of large system of simultaneous linear algebraicequations, implicit methods usually require the handling of large matrices.

    Generally, the following steps are followed in order to obtain a solution. Eq (5.1) can berewritten as

    (5.2)

    where or

    or

    (5.3)

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_3.htm

    1 of 2 6/20/2012 12:23 PM

  • Eq. (5.3) has to be applied at all grid points, i.e., from to A system of

    algebraic will result (refer to Fig 5.1).

    at

    at

    at

    at

    Finally the equation will be of the form:

    Here, we express the system of equation in the form of A ,

    where,

    C: right-hand side column vector (known), A: tridiagonal coefficient matrix (known) and : the solution vector (to be determined).

    Note that the boundary values at and are transferred to the known

    right-hand side.

    For such a tridiagonal system, different solution procedures are available. In order toderive advantage of the zeros in the coefficient-matrix, the well known Thomasalgorithm (1949) can be used .

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_3.htm

    2 of 2 6/20/2012 12:23 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 5:

    Explicit and Implicit Methods for Two-Dimensional Heat Conduction Equation

    The two-dimensional conduction is given by

    (5.5)

    Here, the dependent variable, (temperature) is a function of space and ( )and (

    ) is the thermal diffusivity.

    If we apply the simple explicit method to heat conduction equation, the followingalgorithm results

    (5.6)

    When we apply the crank-Nicolson to the two-dimensional heat conduction equation, weobtain

    (5.7)

    where the central difference operators and in two different spatial directions are

    defined by

    (5.8)

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_4.htm

    1 of 1 6/20/2012 12:24 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 5:

    The resulting system of linear algebraic equations is not tridiagonal because of the fiveunknowns and In order to examine this further, let us rewrite

    Eq. (5.7) as

    (5.9)

    where

    Figure 5.2: Two-dimensional grid on the ( ) plane.

    Eq. (5.9) can be applied to the two-dimensional (66) computational grid shown in Fig.5.2.

    A system of 16 linear algebraic equations have to be solved at time level, in order

    to get the temperature distribution inside the domain. The matrix equation will be as thefollowing:

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_5.htm

    1 of 2 6/20/2012 12:24 PM

  • (5.9)

    where

    The system of equations, described by Eq. (5.9) requires substantially more computertime as compared to a tridiagonal system. The equations of this type are usually solved byiterative methods. These methods will be described in a subsequent lecture. The quantity

    is the boundary value.

    Congratulations! You have finished Lecture 5. To view the next lecture select it from the

    left hand side menu of the page or click the next button.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_5.htm

    2 of 2 6/20/2012 12:24 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 6:

    The Lecture deals with:

    ADI Method

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_1.htm

    1 of 1 6/20/2012 12:24 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 6:

    ADI Method

    The difficulties described in the earlier section, which occur when solving thetwo-dimensional equation by conventional algorithms, can be removed by alternatingdirection implicit (ADI) methods. The usual ADI method is a two-step scheme given by

    (6.1)

    and

    (6.2)

    The effect of splitting the time step culminates in two sets of systems of linear algebraicequations. During step 1, we get the following

    or

    (6.3)

    Now for each j rows( j = 2,3...)we can formulate a tridiagonal matrix, for the varying iindex and obtain the values from i=2 to (imax-1) at (n+1/2) level Fig.6.1 (a).

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_2.htm

    1 of 2 6/20/2012 12:25 PM

  • Figure 6.1(a)

    Similarly, in step-2, we get

    or

    Now for each i rows ( i = 2,3...) we can formulate a tridiagonal matrix for the varying jindex and obtain the values from j =2 to (jmax-1) at nth level Fig. 2.5 (b).

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_2.htm

    2 of 2 6/20/2012 12:25 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 6:

    With a little more effort, it can be shown that the ADI method is also second- order

    accurate in time. If we use Taylor series expansion around on either direction, we

    shall obtain

    and

    Subtracting the latter from the former, one obtains

    or

    (6.5)

    The procedure above reveals that the ADI method is second-order accurate with a

    truncation error of

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_3.htm

    1 of 1 6/20/2012 12:25 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 6:

    Major advantages and disadvantages of explicit and implicit methods

    | Advantages | | Disadvantages |

    ExplicitMethod

    The solution algorithm is simpleto set up

    for a given must be less

    than a specific limit imposed bystability constraints.This requires many time steps tocarry out the calculations over agiven interval of t.

    ImplicitMethod

    Stability can be maintained overmuch larger values of .

    Fewer time steps are needed tocarry out the calculations over agiven interval.

    More involved producer is neededfor setting up the solutionalgorithm than that for explicitmethod.

    Since matrix manipulations areusually required at each timestep, the computer time per timestep is larger than that of theexplicit approach.

    Since larger can be taken, the

    truncation error is often large,and the exact transients (timevariations of the dependentvariable for unsteady flowsimulation) may not be capturedaccurately by the implicit schemeas compared to an explicitscheme.

    Apparently finite-difference solutions seem to be straightforward. The overall procedure isto replace the partial derivatives in the governing equations with finite differenceapproximations and then finding out the numerical value of the dependent variables ateach grid point. However, this impression is needed incorrect! For any given application,there is no assurance that such calculations will be accurate or even stable! We shall soondiscuss about accuracy and stability.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_4.htm

    1 of 1 6/20/2012 12:25 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 6:

    Polynomial-fitting Approach:

    By assuming a polynomial variation of the field variable in the neighborhood of the pointof interest, it is possible to obtain the difference expressions for the derivatives. For

    instance, degree polynomial can be fitted between n nodes, for the field variable

    and this polynomial can be used for evaluating upto the derivative.

    Using two points, say i and i+1 , a linear variation can be assumed for the variable

    and this leads to

    (6.6)

    For linear variation between i and

    (6.7)

    Similarly, the central difference expression

    (6.8)

    can be obtained by using a linear variation between and

    For parabolic variation between points, and one can set:

    (6.9)

    where , a, b, c, are obtained from

    (6.10)

    (6.11)

    (6.12)

    In matrix form,

    (6.13)

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_5.htm

    1 of 2 6/20/2012 12:25 PM

  • Inversion of Eqn. (6.13) leads to the values of a, b, c in terms of and . Having

    obtained the values of these coefficients, the derivative can be evaluated as:

    (6.14)

    where,

    The second derivative at i can also be evaluated from the polynomial expression of (2.32)and this is given by:

    (6.15)

    The polynomial fitting procedure can thus be extended for obtaining difference

    expressions for higher order derivatives also. By considering neighboring point in

    addition to i, derivatives upto th order can be calculated. The polynomial fitting

    technique is very useful when the boundary conditions of the problem are of a verycomplex nature and involve various derivatives of the unknown dependent variable.

    Congratulations! You have finished Lecture 6. To view the next lecture select it from the

    left hand side menu of the page or click the next button.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_5.htm

    2 of 2 6/20/2012 12:25 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 7:

    The Lecture deals with:

    Errors and Stability Analysis

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_1.htm

    1 of 1 6/20/2012 12:26 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 7:

    Introduction

    There is a formal way of examining the accuracy and stability of linear equations, and thisidea provides guidance for the behavior of more complex non-linear equations which aregoverning the equations for flow fields.

    Consider a partial differential equation, such as Eq. (3.3). The numerical solution of thisequation is influenced by the following two sources of error.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_2.htm

    1 of 1 6/20/2012 12:26 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 7:

    Discretization:

    This is the difference between the exact analytical solution of the partial differential Eq.(3.3) and the exact (round-off free) solution of the corresponding finite-differenceequation (for example, Eq.(3.4).

    The discretization error for the finite-difference equation is simply the truncation error forthe finite-difference equation plus any error introduced by the numerical treatment of theboundary conditions.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_3.htm

    1 of 1 6/20/2012 12:26 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 7:

    Round-off:

    This is the numerical error introduced for a repetitive number of calculations in which thecomputer is constantly rounding the number to some decimal points.

    If A= analytical solution of the partial differential equation,

    D= exact solution of the finite-difference equation

    N=numerical solution from a real computer with finite accuracy

    Then, Discretization error = A D = Truncation error + error introduced due to treatmentof boundary condition

    Round-of error

    or,

    (7.1)

    where, is the round-off error, which henceforth will be called error for convenience.

    The numerical solution N must satisfy the finite difference equation.

    Hence from Eq. (3.4)

    (7.2)

    By definition, D is the exact solution of the finite difference equation, hence it exactlysatisfies

    (7.3)

    Subtracting Eq. (2.44) from Eq. (2.43)

    (7.4)

    From Equation (7.4) we see that the error also satisfies the difference equation.

    If errors are already present at some stage of the solution of this equation, then the

    solution will be stable if the 's shrink, or at least stay the same, as the solution

    progresses in the marching direction, i.e from step n to n+1. If the 's grow larger during

    the progression of the solution from step n to n+1 , then the solution is unstable. Finally,

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_4.htm

    1 of 2 6/20/2012 12:26 PM

  • it stands to reason that for a solution to be stable, the mandatory condition is

    (7.5)

    For Eq. (3.4), let us examine under what circumstances Eq. (7.5) hold good.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_4.htm

    2 of 2 6/20/2012 12:26 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 7:

    Assume that the distribution of error along the x- axis is given by a Fourier series in x andthe time-wise distribution is exponential in t, i.e,

    (7.6)

    where I is the unit complex number and k the wave number. Since the difference is linear,when Eq. (7.6) is substituted into Eq. (7.4), the behavior of each term of the series is thesame as the series itself.

    Hence, let us deal with just one term of the series, and write

    (7.7)

    Substitute Eq. (7.7) into (7.4) to get

    (7.8)

    Divide Eq. (7.8) by

    or,

    (7.9)

    Recalling the identity

    Eq. (7.9) can be written as

    or,

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_5.htm

    1 of 2 6/20/2012 12:27 PM

  • (7.10)

    From Eq.(7.7), we can write

    (7.11)

    Combining Eqns. (7.10), (7.11) and (7.5), we have

    (7.12)

    Eq. (7.12) must be satisfied to have a stable solution. In Eq (7.12) the factor

    is called the amplification factor and is denoted by G.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_5.htm

    2 of 2 6/20/2012 12:27 PM

  • Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 7:

    Evaluating the inequality in Eq. (7.12), the two possible situations which must holdsimultaneously are

    Thus,

    Since is always positive, this condition always holds.

    The other condition is

    Thus,

    For the above condition to hold

    (7.13)

    Eq. (7.13) gives the stability requirement for which the solution of the difference Eq. (3.4)will be stable.

    It can be said that for a given the allowed value of must be small enough to

    satisfy Eq. (7.13). For the error will not grow in subsequent time

    marching steps in t, and the numerical solution will proceed in a stable manner. On thecontrary, if then the error will progressively become larger and the

    calculation will be useless.

    The above mentioned analysis using Fourier series is called as the Von Neumann stability analysis.

    Congratulations! You have finished Lecture 7. To view the next lecture select it from the

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_6.htm

    1 of 2 6/20/2012 12:27 PM

  • left hand side menu of the page or click the next button.

    Objectives_template file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_6.htm

    2 of 2 6/20/2012 12:27 PM

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_1.htm[6/23/2012 12:07:14 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 8:

    The Lecture deals with:

    Stability of Hyperbolic and Elliptic Equations

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_2.htm[6/23/2012 12:07:14 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 8:

    First-Order Wave Equation

    Before we proceed further, let us look at the system of first-order equations which arefrequently encountered in a class of fluid flow problems. Consider the second-order waveequation

    (8.1)

    Here c - wave speed and u - wave amplitude.

    This can be written as a system of two first-order equations. If and

    then we may write and

    Rather, the system of equations may be written as

    which is a first-order equation.

    It is implicit that and The eigenvalues of the matrix are

    found by

    det or

    Roots of the characteristic equation are and representing two traveling

    waves with speeds given by

    and

    The system of equations in this example is hyperbolic and it has also been seen that theeigenvalues of the A matrix represent the characteristics differential representation of thewave equations. Euler's equation may be treated as a system of first-order waveequations. For Euler's equations, in two dimensions, we can write a system of first order as

    (8.2)

    where

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_2.htm[6/23/2012 12:07:14 PM]

    and S

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_3.htm[6/23/2012 12:07:14 PM]

    Module 1:Introduction to Finite Difference Method and Fundamentals of CFD Lecture 8:

    Stability of Hyperbolic and Elliptic Equations

    Let us examine the characteristics of the first-order wave equation given by

    (8.3)

    Here we shall represent the spatial derivatively the central difference form

    (8.4)

    We shall replace the time derivative with a first-order difference, where u(t) is represented

    by an average value between grid points and i.e

    Then

    (8.5)

    Substituting Eqns. (8.4) and (8.5) into (8.3), we have

    (8.6)

    The time derivative is called Lax method of discretization, after the well knownmathematician Peter Lax who first proposed it.

    If we once again assume an error of the form

    (8.7)

    As done previously, and substitute this form into Eq. (8.6), following the same argumentsas applied to the analysis of Eq. (3.4), the amplification factor becomes

    (8.8)

    where

    The stability requirement is

    Finally the condition culminates in

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_3.htm[6/23/2012 12:07:14 PM]

    (8.9)

    In Eq. (8.9), C is the Courant number. This equation restricts for the solution of

    Eq. (8.9) to be stable.

    The condition posed by Eq. (8.9) is called the Courant-Friedrichs-Lewy condition,generally referred to as the CFL condition.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_4.htm[6/23/2012 12:07:14 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 8:

    Physical Example of Unstable Calculation

    Let us take the heat conduction once again

    (8.10)

    Applying FTCS discretization scheme depict simple explicit representationas

    (8.11)

    or

    where (8.12)

    This is stable only if

    Let us consider a case when For r =1 (which is greater than the stability

    restriction), we get (which is impossible). The

    values of u are shown in fig 8.1.

    Figure 8.1: Physical Violations Resulting from r =1

    Example demonstrating the application of Von Neumann method to multidimensionalelliptic problems

    Let us take the vorticity transport equation:

    (8.13)

    We shall extend the Von Neumann stability analysis for this equation, assuming u and v asconstant coefficient (within the framework of linear stability analysis). Using FTCS scheme

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_4.htm[6/23/2012 12:07:14 PM]

    (8.14)

    Let us consider with

    (8.15)

    where N is the numerical solution obtained from computer, D the exact solution of the FDEand error.

    Substituting Eq. (8.14) into Eq. (8.13) and using the trigonometric identities, we finallyobtain

    where

    where

    The obvious stability condition finally leads to

    and(8.16)

    when

    which means

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture8/8_4.htm[6/23/2012 12:07:14 PM]

    This is twice as restrictive as the one-dimensional diffusive limitation (compare with Eq.

    (8.9). Again for the special case and

    hence

    which is also twice as restrictive as one dimensional convective limitation (compare with Eq. (8.8).

    Congratulations, you have finished Lecture 8. To view the next lecture select it from the

    left hand side menu of the page or click the next button.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture9/9_1.htm[6/20/2012 4:35:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 9:

    The Lecture deals with:

    Stability and Fluid Flow Modeling

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture9/9_2.htm[6/20/2012 4:35:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 9:

    Let us look at the stability requirement for the second-order wave equation given by

    We replace both the special and time derivative with central difference scheme (which issecond-order accurate)

    (9.1)

    Again assume

    (9.2)

    and

    (9.3)

    Substituting Eq. (9.3) and (9.2) in (9.1) and dividing both side by we get

    (9.4)

    where

    C, the Courant number (9.5)

    From Eq. (9.4), using trigonometric identities, we get

    (9.6)

    and, the amplification factor

    (9.7)

    However, from Eq. (9.6) we arrive at

    (9.8)

    Which is a quadratic equation for This equation, quite obviously, has two roots, andthe product of the roots is equal to +1. Thus, it follows that the magnitude of one of theroots (value of ) must exceed 1 unless both the roots are equal to unity.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture9/9_2.htm[6/20/2012 4:35:57 PM]

    But is the magnification factor. If its value exceeds 1, the error will grow exponentiallywhich will lead to an unstable situation. All these possibilities mean that Eq (9.8) shouldpossess complex roots in order to both have the values of equal to unity.

    This implies that the discriminant of Eq. (9.8) should be negative.

    (9.9)

    or

    (9.10)

    which is always true if .

    Hence CFL condition , must again be satisfied for the stability of second-order hyperbolicequations.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture9/9_3.htm[6/20/2012 4:35:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 9:

    In light of the previous discussion, we can say that a finite-difference procedure will beunstable if for that procedure, the solution becomes unbounded, i.e the error growsexponentially as the calculation progresses in the marching direction.

    In order to have a stable calculation, we pose different conditions based on stabilityanalysis. Here we have discussed the Von Neumann stability analysis which is indeed alinear stability analysis.

    However, situations may arise where the amplification factor is always less than unity.These conditions are referred to as unconditionally stable. In a similar way for someprocedures, we may get an amplification factor which is always greater than unity. Suchmethods are unconditionally unstable.

    Over and above, it should be realized that such stability analysis are not really adequatefor practical complex problems. In actual fluid flow problems, the stability restrictions areapplied locally. The mesh is scanned for the most restrictive value of the stabilitylimitations and the resulting minimum is used throughout the mesh. For variable

    coefficients, the Von Neumann condition is only necessary but not sufficient. As such,stability criterion of a procedure is not defined by its universal applicability.

    For nonlinear problems we need numerical experimentation in order to obtain stablesolutions wherein the routine stability analysis will provide the initial clues to practicalstability. In other words, it will give tutorial guidance.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture9/9_4.htm[6/20/2012 4:35:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 9:

    Fundamentals of Fluid Flow Modeling

    We have discussed the finite-difference methods with respect to the solution of linearproblems such as heat conduction. The problems of fluid mechanics are more complex incharacter. The governing partial differential equations form a nonlinear system which mustbe solved for the unknown pressures, densitities, temperature and velocities.

    Before entering into the domain of actual flow modeling, we shall discuss some subtlepoints of fluid flow equations with the help of a model equation.

    The model equation should have convective, diffusive and time-dependent terms. Burgers(1948) introduced a simple nonlinear equation which meets the aforesaid requirements(Burger's equation).

    (9.11)

    Here, u is the velocity, is the coefficient of diffusivity and is any property which can

    be transported and diffused.

    If the viscous term (diffusive term) on the right-hand side is neglected, the remainingequation may be viewed as a simple analog of Euler's equation.

    (9.12)

    Now we shall see the behavior of Burger's equations for different discretization methods.In particular, we shall study their influence on conservative and transportive property, and artificialviscosity.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture9/9_5.htm[6/20/2012 4:35:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 9:

    Conservative Property

    A finite-difference equation posseses conservative property if it preserves integralconservation relations of the continuum. Let us consider the vorticity transport equation

    (9.13)

    where is nabla or differential operator,

    V the fluid velocity and the vorticity.

    If we integrate this over some fixed space region we get

    (9.14)

    The first term of the Eq. (9.14) can be written as

    The second term of the Eq (9.14) may be expressed as

    is the boundary of ,

    n is unit normal vector and

    dA is the differential element of .

    The remaining term of Eq. (9.14) may be written as

    As such

    Finally, we can write

    (9.15)

    which signifies that the time rate of accumulation of in is equal to net advective

    flux rate of across into plus net diffusive flux rate of across into .

    The concept of conservative property is to maintain this integral relation in finite differencerepresentation.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture9/9_5.htm[6/20/2012 4:35:57 PM]

    Congratulations, you have finished Lecture 9. To view the next lecture select it from the left hand sidemenu of the page or click the next button.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture10/10_1.htm[6/20/2012 4:30:53 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 10:

    The Lecture deals with:

    Conservative Property

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture10/10_2.htm[6/20/2012 4:30:54 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 10:

    Let us consider inviscid Burger's equation ((9.11)).

    This time we let vorticity, which means

    (10.1)

    The finite difference analog is given by FTCS method as

    (10.2)

    Let us consider a region running from to see (Figure10.1).

    Figure 10.1: Domain running from to .

    We evaluate the integral as

    (10.3)

    Summation of the right hand side finally gives

    (10.4)

    Eq. (10.4) state that the rate of accumulation of in is identically equal to the net

    advective flux rate across the boundary of running from to .

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture10/10_2.htm[6/20/2012 4:30:54 PM]

    Thus the FDE analog to inviscid part of the integral Eq. (10.2) has preserved theconservative property. As such, conservative property depends on the from of thecontinuum equation used.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture10/10_3.htm[6/20/2012 4:30:54 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 10:

    Let us take non-conservative form of inviscid Burger's equation (9.11) as

    (10.5)

    Using FTCS differencing technique as before, we can write

    (10.6)

    Now, the integration over running from to , yields

    (10.7)

    While performing the summation of the right-hand side of Eq. (10.7), it can be abservedthat terms corresponding to inner cell fluxes do not cancel out. Consequently anexpression in terms of fluxes at the inlet and outlet section, as it was found earlier, couldnot be obtained. Hence the finite-difference analog Eq. (10.6) has failed to preserve theintegral Gauss-divergence property, i.e. the conservative property of the continuum.

    The quality of preserving the conservative property is of special importance with regards tothe methods involving finite-volume approach (a special form of finite-differenceequation).

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture10/10_4.htm[6/20/2012 4:30:54 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 10:

    The use of conservative form depicts that the advective flux rate of out of a control

    volume at the interface is exactly equal to flux rate of I to the next control

    volume and so on.

    The meaning of calling Eq. (10.1) as conservative form is now clearly understood. However,the conservative form of advective part is of prime importance for modeling fluid flow andis often referred to as week conservative form. For the incompressible flow in Cartesiancoordinate this form is:

    (10.8)

    If all the terms in the flow equation are recast in the form of first-order derivative if and the equations are said to be in strong conservative form.

    We shall write the strong conservation form of Navier-Stokes equation in Cartesiancoordinate system:

    (10.9)

    Congratulations, you have finished Lecture 10. To view the next lecture select it from the

    left hand side menu of the page or click the next button.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_1.htm[6/20/2012 4:36:58 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 11

    The Lecture deals with:

    The upwind scheme

    Transportive Property

    Upwind Differencing and Artificial Viscosity

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_2.htm[6/20/2012 4:36:58 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 11:

    The Upwind Scheme

    Once again, we shall start with the inviscid Burger's equation. (9.12) Regardingdiscretization, we can think about the following formulations

    (11.1)

    (11.2)

    If Von Neumann's stability analysis is applied to these schemes, we find that both areunconditionally unstable.

    A well known remedy for the difficulties encountered in such formulations is the upwindscheme which is described by Gentry, Martin and Daly (1966) and Runchal and Wolfshtein(1969).

    Eq. (11.1) can be made stable by substituting the forward space difference by a backwardspace difference scheme, provided that the carrier velocity u is positive. If u is negative, aforward difference scheme must be used to assure stability. For full Burger's equation.(9.11), the formulation of the diffusion term remains unchanged and only the convectiveterm (in conservative form) is calculated in the following way (Figure 11.1):

    viscous term, for (11.3)

    viscous term, for (11.4)

    Figure 11.1: The Upwind Scheme

    It is also well known that upwind method of discretization is very much necessary inconvection (advection) dominated flows in order to obtain numerically stable results.

    As such, upwind bias retains transportative property of flow equation. Let us have a closerlook at the transportative property and related upwind bias.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_2.htm[6/20/2012 4:36:58 PM]

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_3.htm[6/20/2012 4:36:59 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 11:

    Transportive Property

    A finite-difference formulation of a flow equation possesses the transportive property if theeffect of a perturbation is convected (advected) only in the diprection of the velocity.

    Consider the model Burger's equation in conservation form

    (11.5)

    Let us examine a method which is central in space. Using FTCS we get

    (11.6)

    Consider a perturbation in .

    A perturbation will spread in all directions due to diffusion. We are taking an inviscidmodel equation and we want the perturbation to be carried along only in the direction of

    the velocity. So, for (perturbation at mth space location), all other .

    Therefore, at a point (m+1) downstream of the perturbation

    which is acceptable. However, at the point of perturbation ( i=m)

    which is not very reasonable. But at the upstream station ( i = m-1 ) we observe

    which indicated that the transportive property is violated.

    On the contrary, let us see what happens when an upwind scheme is used.

    We know that for u>0

    (11.7)

    Then for at the downstream location (m+1)

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_3.htm[6/20/2012 4:36:59 PM]

    which follows the rational for the transport property.

    At point m of the disturbance

    which means that the perturbation is being transported out of the affected region.

    Finally, at ( m-1) station, we observe that

    This signifies that no perturbation effect is carried upstream. In other words, the upwindmethod maintains unidirectional flow of information.

    In conclusion, it can be said that while space centred difference are more accurate thanupwind differences, as indicated by the Taylor series expansion, the whole system is notmore accurate if the criteria for accuracy includes the tranportive property as well.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_4.htm[6/20/2012 4:36:59 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 11:

    Upwind Differencing and Artificial Viscosity

    Consider the model Burger's equation. (9.11) and focus the attention on the inertia terms

    As seen, the simple upwind scheme gives

    for u > 0

    for u < 0

    From Taylor series expansion, we can write

    (11.8)

    (11.9)

    Substituting Eqns. (11.8) and (11.9) into (11.3) gives (dropping the subscript i andsuperscript n)

    [Diffusive terms]

    or

    which may be rewritten as

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_4.htm[6/20/2012 4:36:59 PM]

    higher order terms (11.10)

    where

    C (Courant number)

    In deriving Eq. (11.10), was taken as .

    However, the nonphysical coefficient leads to diffusion like term which is dependent onthe discretization procedure. This is known as the numerical or artificial viscosity.

    Let us look at the expression somewhat more critically..

    , for u > 0 (11.11)

    On one hand we have considered that u > 0 and on the other CFL condition demands thatC < 1 (so that the algorithm can work).

    As a consequence, is always a positive non-zero quantity ( so that the algorithm canwork).

    If, instead of analyzing the transient equation, we put in Eq. (11.3) and

    expand it in Taylor series, we obtain

    (11.12)

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture11/11_5.htm[6/20/2012 4:36:59 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 11:

    Let us now consider a two-dimensional convective-diffusive equation with viscous diffusionin both directions (Eq. (8.13) but with .

    For upwind differencing gives

    (11.13)

    The Taylor series procedure as was done for Eq. (11.10) will produce

    (11.14)

    where

    with

    As such for and CFL condition is

    This indicate that for a stable calculation, artificial viscosity will necessarily be present.However, for a steady-state analysis, we get

    (11.15)

    We have observed that some amount of upwind effect is indeed necessary to maintaintransportive property of flow equations while the computations based on upwinddifferencing often suffer from false diffusion (inaccuracy!). One of the plausibleimprovements is the usage of higher-order upwind method of differencing.

    In the next lecture we'll discuss this aspect of improving accuracy.

    Congratulations, you have finished Lecture 11. To view the next lecture select it from the

    left hand side menu of the page or click the next button.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture12/12_1.htm[6/20/2012 4:39:03 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 12:

    The Lecture deals with:

    Second Upwind Differencing or Hybrid Scheme

    Some more Suggestions for Improvement

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture12/12_2.htm[6/20/2012 4:39:03 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 12:

    Second Upwind Differencing or Hybrid Scheme

    According to the second upwind differencing, if u is the velocity in x direction and is anyproperty which can be convected or diffused, then

    (12.1)

    One point to be carefully observed from Eq. (12.1) is that the second upwind should bewritten in conservative form.

    Figure 12.1: Definition of uR and uL

    Definition of

    (12.2a)

    Definition of

    (12.2b)

    Now,

    for for (12.3)

    and

    for for (12.4)

    Finally, for and we get

    (12.5)

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture12/12_2.htm[6/20/2012 4:39:03 PM]

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture12/12_3.htm[6/20/2012 4:39:03 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 12:

    Second Upwind Differencing or Hybrid Scheme (Contd...)

    Let us discretize the second term of the convection part of unsteady x- directionmomentum equation. We have chosen this in order to cite a meaningful example of secondupwind differencing. Using Eq. (12.5), we can write

    (12.6)

    Here we introduce a factor which can express Eq. (12.6) as a weighted average of central andupwind differencing.

    Invoking this weighted average concept in Eq. (12.6), we obtain

    (12.7)

    where For Eq (12.7) becomes centred in space and for it becomes

    full upwind.

    Therefore brings about the upwind bias in the difference quotient. If is small, Eq.

    (12.7) tends towards centred in space. This upwind method was first introduced by Gentry,Martin and Daly (1966).

    Some more stimulating discussions on the need of upwind - and its minimization has beendiscussed by Roache (1972) who has also pointed out the second upwind- formulationpossesses both the conservative and transportive property provided the upwind factor(formally called donorcell factor) is not too large.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture12/12_3.htm[6/20/2012 4:39:03 PM]

    In principle, the weighted average differencing scheme can as well be called as hybridscheme (see Rairhby and Torrence, 1974) and the accuracy of the scheme can always beincreased by a suitable adjustment of value.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture12/12_4.htm[6/20/2012 4:39:03 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 12:

    Some More Suggestions for Improvements

    Several researches have tried to resolve the difficulty associated with the discretization ofthe first-order terms which need some amount of artificial viscosity for stability.Substantial progress has been made on the development of higher-order scheme which aresuitable over a large range of velocities. However, none of these prescriptions areuniversal. Depending on the nature of the flow and geometry one can always go for thebest suited algorithm. Now we shall discuss one such can algorithm which has beenproposed by Khosla and Rubin (1974).

    Consider the Burger's equation. (9.11) once again. The derivatives in this equation aredisceretizated in the following way.

    For

    (Forward time)

    This is modified central difference in space, which for a converged solution

    reduce to space centred scheme.

    Now, consider the diffusion term

    This is central difference in space. Substituting the above quotients in Eq. (9.11), one finds

    (12.8)

    where

    and

    (12.9)

    For and and .

    The system of equation produced from Eq. (12.8) is always diagonally dominant and

    capable of providing a stable solution. As the solution progresses ( i.e. ),the

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture12/12_4.htm[6/20/2012 4:39:03 PM]

    convective term approaches second-order accuracy.

    This method of implementing higher-order upwind is known as the deferred correction procedure.

    Congratulations, you have finished Lecture 12. To view the next lecture select it from the left hand sidemenu of the page or click the next button.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_1.htm[6/20/2012 4:39:56 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:

    The Lecture deals with:

    Some more Suggestions for Improvement of Discretization Schemes

    Some Non-Trivial Problems with Discretized Equations

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_2.htm[6/20/2012 4:39:56 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:

    Third-order Upwind Differencing

    Another widely suggested improvement is known as third-order upwind differencing (seeKawamura et al. 1986).

    The following example illustrates the essence of this discretization scheme.

    (13.1)

    Higher order upwind is an emerging area of research in Computational Fluid Dynamics.

    However, so far no unique suggestion has been evolved as an optimal method for a widevariety of problems. Interested readers are referred to Vanka (1987), Fletcher (1988) andRai and Moin (1991) for more stimulating information on related topics.

    One of the most widely used higher order schemes is known as QUICK (Leonard, 1979).

    The QUICK scheme may be written in a compact manner in the following way

    (13.2)

    The fifth-order upwind scheme (Rai and Moin, 1991) uses seven points stencil along withsixth-order dissipation. The scheme is expressed as

    (13.3)

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_3.htm[6/20/2012 4:39:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:

    Some Non-Trivial Problems with Discretized Equation

    The discussion in this section is based upon some ideas indicated by Hirt (1968) which areapplied to model Burger's equation as

    (13.4)

    From this, the modified equation becomes

    (13.5)

    We define

    Courant number

    It is interesting to note that the values and C=1 (which are extreme conditions of

    Von Neumann stability analysis) unfortunately eliminates viscous diffusion completely in

    Eq. (13.5) and produce a solution from Eq. (13.4) directly as which is

    unacceptable. From Eq. (13.5) it is clear that in order to obtain a solution for convectiondiffusion equation, we should have

    For meaningful physical result in the case of inviscid flow we require

    Combining these two criteria, for a meaningful solution

    (13.6)

    Here we define the mesh Reynolds-number or cell-peclet number as

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_3.htm[6/20/2012 4:39:57 PM]

    So, we get

    or

    (13.7)

    Figure 13.1: Limiting Line ( )

    The plot of C vs is shown in Fig. 13.1 to describe the significance of Eq. (13.7).

    From the CFL condition, we know that the stability requirement is Under such a

    restriction, below the calculation is always stable. The interesting information is

    that it is possible to cross the cell Reynolds number of 2 if C is made less than unity.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_4.htm[6/20/2012 4:39:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:

    Thomas algorithm

    In Crank Nicolson solution procedure, we get a system of algebraic equations whichassumes the form of a tridiagonal matrix problem. Here we shall discuss a very well knownsolution procedure known as Thomas algorithm (1949) which utilizes efficiently theadvantage of the tridiagonal form. A tridiagonal system is:

    The Thomas Algorithm is a modified Gaussian matrix-solver applied to a tridingonal system.

    The idea is to transform the coefficient matrix into a upper triangular form. Theintermediate steps that solve for x1, x2, ...xN .

    Change di and ci arrays as

    i = 2,3,....N

    and

    Similarly

    i = 2,3,....N

    and

    At this stage the matrix in upper triangular form. The solution is them obtained by backsubstitution as

    and

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_4.htm[6/20/2012 4:39:57 PM]

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_5.htm[6/20/2012 4:39:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:

    Problems

    (1) Consider the nonlinear equation

    (13.8)

    where is a constant and u the x component of velocity. The normal direction is y.

    (a) Is this equation in conservative from? If not, suggest a conservative from of the equation.

    (b) Consider a domain in to x ( x = 0 to x = L) and y (y = 0 to y = H) and assume that all thevalue of the dependent variable are known at x = 0 (along y = 0 to y = H at every y interval).Develop an implicit expression for determining u at all the points along (y=0 to y=H) at thenext (x+x)

    (2) Establish the truncation error of the following finite-difference approximation to

    at the point for a uniform mesh

    What is the order of the truncation error ?

    If you want to apply a second-order-accurate boundary condition for at the

    boundary (refer to Fig. 13.2), can you make use of the above mentioned expression? If

    yes, what should be the expression for at the boundary?

    (3) The lax-Wendroff finite difference scheme (Lax and Wendroff, 1960) can be derivedfrom a Taylor series expansion in the following manner:

    Using the wave equations

    the Taylor series expression may be written as

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_5.htm[6/20/2012 4:39:57 PM]

    Prove that the CFL condition is the stability requirement for the above discretization scheme.

    Figure 13.2: Grid points at a boundary

    (4) A three-level explicit discretization of

    can be written as

    Expand each term as a Taylor series to determine the truncation error of the completeequation for arbitary values of d. Suggest the general technique where for a functional

    relationship between d and the scheme will be fourth-order accurate in

    .

    (5) Consider the equation

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_5.htm[6/20/2012 4:39:57 PM]

    where T is the dependent variable which is convected and diffused. The independentvariable, x and y, are in space while t is the time (evolution) coordinate. The coefficientu,v and a can be treated as constant. Employing forward difference for the first-orderderivative and central-second difference for the second derivatives, obtain the finite-difference equation. What is the physical significance of the difference between the aboveequation and the equation actually being solved? Suggest any method to overcome thisdifference.

    (6) Write down the expression for the Finite Difference Quotient for the convective term ofthe Burger's Equation given by

    (13.9)

    Use upwind differencing on a week conservative from of the equation. The upwinddifferencing is known to retain the transportive property. Show that the formulation preservesthe conservative property of the continuum as well [you are allowed to exclude the diffusiveterm from the analysis].

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture13/13_6.htm[6/20/2012 4:39:57 PM]

    Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:

    Bibliography

    1. Anderson, D.A., Taannehill, J.C, and Pletcher, R.H., Computational Fluid Mechanicsand Heat Transfer, Hemisphere Publishing Corporation, New York, USA, 1984.

    2. Burgers, J.M., A Mathematical Model Illustrating the Theory of Turbulence, Adv. Appl.Mech., Vol. 1, pp. 171-199, 1948.

    3. Dufort, E.C. and Frankel, S.P., Stability Conditions in the Numerical Treatment ofParabolic Differential Equations, Mathematical Tables and Others Aids toComputation, Vol 7, pp. 135-152, 1953.

    4. Fletcher, C.a.j., Computational Techniques for Fluid Dynamics, Vol. 1 (Fundamentalsand General Techniques), Springer Verlag, 1988.

    5. Gentry, Ra., Martin, R.E. and Daly, B.J., An Eulerian Differencing Method forUnsteady Compressible Flow Problems, J. Comput. Phys., Vol.1, pp. 87-118,1966.

    6. Hirt, C.W., Heuristic Stability Theory of Finite Difference Equation, J. Comput. Phys.,Vol. 2, pp. 339-335, 1968.

    7. Kawamura, T., Takami, H. and Kuwahara, K., Computation of High Reynolds NumberFlow around a Circular Cylinder with Surface Roughness, Fluid Dynamics Research,Vol. 1. pp. 145-162, 1986.

    8. Khosla, P.K. and Rubin, S.G., A Diagonally Dominant Second Order Accurate LmplicitScheme, Computer and Fluids Vol. 2, pp. 2.7-209, 1974.

    9. Lax, P.D. and Wendroff, B. Systems of Conservation Laws, Pure Appl. Math, Vol. 13,pp. 217-237, 1960.

    10. Leonard, B.P., A Stable and Accurate Convective Modelling Procedure based onQuadratic Upstream Interpolation, Comp. Method Appl. Mech. Engr., Vol. 19, pp. 59-98, 1979.

    11. Rai, M.M. and Moin, P., Direct Simulations of urbulent Flow Using Finite DifferenceSchemes, J. Comput. Phys., Vol. 96, pp. 15-53, 1991.

    12. Raithby, G.D. and Torrance , K.E., Upstream-weighted Differencing Scheme andTheir Applications to Elliptic Problems Involving Fluid Flow, Computers and Fluids,Vol. 2, pp. 191-206, 1974.

    13. Roache, P.J., Computational Fluid Dynamics, Hermosa, Albuquerque , New Mexico ,1972 (revised printing 1985).

    14. Runchal, A.k. and Wolfshtein, M., Numerical Integration Procedure for the SteadyState Navier-Strokes Equations, J. Mech Engg. Sci., Vol. 11, pp. 445-452, 1969.

    15. Thomas, L.H., Elliptic Problems in Linear Difference Equations Over a Network,Waston Sci. Comput. Lab. Rept., Columbia University , New York , 1949.

    16. Vanka, S.P., Second-Order Upwind Differencing in a Recirculating Flow, AIAA J ., Vol25, pp. 1441, 1987.

    Congratulations, you have finished Lecture 13. To view the next lecture select it from the

    left hand side menu of the page or click the next button.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_1.htm[6/20/2012 4:40:30 PM]

    Module 2: Introduction to Finite Volume Method Lecture 14:

    The Lecture deals with:

    The Basic Technique

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_2.htm[6/20/2012 4:40:30 PM]

    Module 2: Introduction to Finite Volume Method Lecture 14:

    The Basic Technique

    We have introduced the finite difference method. In the context of the method of weightedresiduals, it can be said that the Finite Difference procedure is a collection method withpiecewise definition of the field variable in the neighborhood of chosen grid points (orcollection points).

    In a similar fashion the Finite Volume Method is a subdomain method with piecewisedefinition of the field variable in the neighborhood of chosen control volumes. The totalsolution domain is divided into many small control volumes which are usually rectangular(or arbitrary quadrilateral in shape. Nodal points are used within these control volumes forinterpolating the field variable and usually, a single node at the centre of the controlvolume is used for each control volume. This method was developed by Patankar and Spalding(1972) and they proposed the use of the physical approach (where possible) for deriving thenodal equations. We shall illustrate the technique with the help of the 2-D heat conductionproblem in rectangular geometry.

    Figure 14.1: Grid Arrangement for the Finite Volume Method

    Consider 2-D, steady heat conduction in rectangular geometry (Figure 14.1). The 2-D heatconduction equation is

    (14.1)

    where is the temperature field, is the thermal conductivity and Q is the heat

    generation per unit volume.

    At present we shall not consider any specific set of boundary conditions for the problem,but we shall discuss the handling of various type of boundary condition in due course.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_3.htm[6/20/2012 4:40:30 PM]

    Module 2: Introduction to Finite Volume Method Lecture 14:

    The Basic Technique

    The two alternative ways of setting up the nodal equations are the weighted residualapproach and the physical approach.

    Using the weighted residual approach, the 2-D heat conduction equation can beapproximately satisfied by:

    (14.2)

    where the weight

    within the control volume.

    outside the control volume.

    Thus, we get, for each i = 1, ....n

    (14.3)

    Interesting equation (14.3) by parts, we get:

    where the Gauss divergence theorem has been used to convert the volume integral to asurface integral.

    (14.4)

    The meaning of Eqn. (14.4) is that the net heat generation rate in the

    control volume is equal to the net sum of the rate of heat energy going out of the control

    volume where is the boundary of the control volume

    Equation (14.4) can be taken as an energy balance equation for the control volume.This balance equation can also be obtained physically, considering the balance of heat fluxin Figure 14.2.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_3.htm[6/20/2012 4:40:30 PM]

    Figure 14.2: Balance of Heat Flux in a Control Volume.

    For a typical node P with neighbors E,N,W,S (standing for east, north, west and south etc.)and corresponding control volume boundaries in those directions denoted by e,n,w,s etc.,the heat balance for the control volume can be written as follows (for unit depth in z-direction):

    when is the heat flux (per unit area) on the east face, is the heat flux on the west

    face etc., and the faces are taken to be one unit deep perpendicular to the plane of the

    figure. Thus, is the total heat flux through the east face. The fluxes are taken to

    be positive in the directions indicated by the arrows.

    Physically, the above equation is equivalent to saying :

    Net rate of heat energy leaving the control volume through the boundary = Rate of heatgeneration within the control volume (CV) at steady state

    Thus,

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_3.htm[6/20/2012 4:40:30 PM]

    (14.5)

    Which is the same statement as equation (14.4). In the implementation of the FVMprocedure, the heat fluxes are expressed in terms of the nodal temperatures (TE, etc. at

    the CV centers) using piecewise interpolation around the control volume for the fieldvariable (temperature in this case). Thus, assuming temperature to have linear variation

    between points E and P, the heat flux can be evaluated as follows:

    (14.6)

    while deriving (14.6) it has been assumed that the cell size is , constant in x-direction(equal to ).

    Similarly, is given by

    (14.7)

    Using similar expression for and also, the nodal equation for point P becomes:

    (14.8)

    This equation can be rewritten in the familiar form used in finite difference as:

    (14.9)

    where

    During numerical implementation, the subscripts E, W, etc. will be changed to numericalindices of i, j and solved in the same way (using point-by-point or line-by-line procedureetc.) as mentioned in previous lectures on finite differences.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_4.htm[6/20/2012 4:40:31 PM]

    Module 2: Introduction to Finite Volume Method Lecture 14:

    The boundary conditions of a typical heat transfer problem can be handled in the following

    way. When the heat flux at the boundary is prescribed, say the

    corresponding heat flux term in the balance Equation (14.5) is set equal to the appliedheat flux. For instance, for the control volumes adjacent to the x = 0 boundary as shownin Fig. 14.3, the term will be substituted by in equation (14.3). thus,

    (14.10)

    Equation (14.10) will be the nodal equation for such nodes.

    Figure 14.3: Prescribed Heat Flux at the Boundary.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_5.htm[6/20/2012 4:40:31 PM]

    Module 2: Introduction to Finite Volume Method Lecture 14:

    When the boundary temperature is specified, the control volume shapes near the boundarycan be changed to facilitate the implementation of the boundary conditions.

    For instance, consider the condition T = TL on the x = L boundary (see Fig. 14.4).

    For the nodes on the boundary, an imaginary extension of the control volumes outside theactual domain can be considered in line with the finite difference methodology describedearlier. The physical boundary is taken to be at the center of boundary cell of width

    (see Figure 14.4), while the widths if the adjacent cells are thus reduced to

    Consider a typical control volume i near the x = L boundary as shown in Fig. 14.4

    Figure 14.4: Boundary Condition, at x = L , T = TL.

    The boundary cells will need no nodal equation as the T = TL will be applied. The nodalequation for the adjacent cell P will be written considering a shortened control volume:

    (14.11)

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture14/14_5.htm[6/20/2012 4:40:31 PM]

    where Note that TL has been used instead of TE in the above equation. So,

    the boundary condition is being directly applied.

    In this fashion, by adjusting the control volume spacing and the placement of nodes, nodalequations can be obtained at all nodes and these can be solved simultaneously by thematrix inversion technique, line-byline technique or point-by-point technique as discussedearlier. Having done the above exercise, we may like to look at a more generalizeddescription of the finite volume method.

    Congratulations, you have finished Lecture 14. To view the next lecture select it from the left hand sidemenu of the page or click the next button.

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture15/15_1.htm[6/20/2012 4:41:37 PM]

    Module 2: Introduction to Finite Volume Method Lecture 15:

    The Lecture deals with:

    A Generalized Approach for Finite Volume Methods

    Equations with First Derivatives

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture15/15_2.htm[6/20/2012 4:41:37 PM]

    Module 2: Introduction to Finite Volume Method Lecture 15:

    A Generalized Approach

    As it has been observed, the Finite Volume method uses an integral form of the equationto be solved.

    The computational domain is divided into elementary volumes and the integration isperformed within these elementary volumes. The method enables one to handle complexgeometry without having the equation written in curvilinear coordinates. The method alsopreserves the conservative property. The elementary control volumes are described by thecoordinates of the vertices of the quadrilaterals (for 2-D) or hexahedrals (for 3-D).

  • Objectives_template

    file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture15/15_3.htm[6/20/2012 4:41:37 PM]

    Module 2: Introduction to Finite Volume Method Lecture 15:

    Equations with first derivatives

    Here the finite volume method will be illustrated for the general first-order equation

    (15.1)

    where appropriate choices of E, F and G represent the various equations of motion. Forexample, for and Eqn. (15.1) is the two-dimensional continuity

    equation and for , it is the inviscid momentum equation in

    the x-directions, and so on.

    In a similar manner, for x direction viscous momentum equation,

    (15.2)

    Assuming the finite volume (quadrilateral) ABCD shown in Fig. 14.5 is the representative ofthe control volume we consider the area integral of (15.1) over :

    (15.3)

    Recall the Green's theorem

    (15.4)

    Applying Green's theorem, (15.3) becomes

    H.n (15.5)

    where H and is the outward unit normal of segment (see Figure 14.5).

    For a segment On a counter-clockwise contour, the outward unit normal

    where For the continuity equation, and

  • Objectives_template

    file:///D|/chitra/nptel_p