You are on page 1of 259

Objectives_template

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

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

1 of 1

6/19/2012 4:29 PM

Objectives_template

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

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 of a 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) (do not 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 (highest) derivative. If the aforesaid equation is homogeneous, otherwise it is non-homogeneous. or its first derivative but not the second

1 of 1

6/19/2012 4:30 PM

Objectives_template

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

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 if if the equation is Parabolic the equation is Elliptic 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.

1 of 1

6/19/2012 4:30 PM

Objectives_template

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

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 flow and heat transfer problems.

Laplace equations: (1.2) Poisson equations: (1.3)

Laplace equations and Poisson equations are elliptic equations and generally associated with the steady-state problems. The velocity potential in steady, inviscid, incompressible, and irrotational flows satisfies the Laplace equation. The temperature distribution for steady-state, constant-property, two-dimensional condition satisfies the Laplace equation if no volumetric heat source is present in the domain of interest and the Poisson equation if a volumetric heat source is present.

1 of 1

6/19/2012 4:30 PM

Objectives_template

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

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 an initial condition are needed to solve such equations. The unsteady conduction problem in two-dimension is governed by an equation of the form (1.5) Here denotes the time variable, and a souce term S is included. By comparing the

highest derivatives in any two of the independent variables, with the help of the conditions given earlier, it can be concluded that Eq. (1.5) is parabolic in time and elliptic in space. An initial condition and two conditions for the extreme ends in each special coordinates is required to solve this equation. Fluid flow problems generally have nonlinear terms due to the inertia or acceleration component in the momentum equation. These terms are called advection terms. The energy equation has nearly similar terms, usually called the convection terms, which involve the motion of the flow field. For unsteady two-dimensional problems, the appropriate 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, and S is a source term. The pressure gradients in the momentum or the volumetric heating in the energy equation can be appropriately substituted in S. Eq. (1.6) is parabolic in time and elliptic in space. For very high-speed flows, the terms on the left side dominate, the second-order terms on the right hand side become trivial, and the equation become hyperbolic in time and space.

1 of 1

6/19/2012 4:31 PM

Objectives_template

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

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 interest and appropriate boundary conditions. An arbitrary domain and bounding surfaces are sketched 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 boundary conditions required is generally determined by the order of the highest derivatives appearing in each independent variable in the governing differential equations. The unsteady problems governed by a first derivative in time will require initial condition in order to carry out the time integration. The diffusion terms require two spatial boundary conditions for each coordinate in which a second derivative appears.

1 of 1

6/19/2012 4:31 PM

Objectives_template

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

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 general types. 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 are linear in the dependant variable . In Eqns. (1.7) to (1.9), is a vector denoting position on the boundary, and is

the directional derivative normal to the boundary, and functions. The normal derivative may be expressed as

are arbitrary

(1.10) Here is the unit vector normal to the boundary, is the nabla operator, [.] denotes and are the

the dot product,

are the direction-cosine components of

unit vectors aligned with the coordinates.

1 of 1

6/19/2012 4:31 PM

Objectives_template

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

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-form expressions which depict the variation of the dependent variable in the domain. The numerical solutions, based on finite differences, provide us with the values at discrete 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 given by . 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 between each successive pairs of grid points are as well.

directions, where different values of used. The same could be presumed for

However, often, problems are solved on a grid which involves uniform spacing in each direction, because this simplifies the programming, and often result in higher accuracy. In some class of problems, the numerical calculations are performed on a transformed

1 of 2

6/19/2012 4:31 PM

Objectives_template

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

computational plane which has uniform spacing in the transformed-independent-variables but 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 our consideration, and are constants, but it is not mandatory that be equal to

2 of 2

6/19/2012 4:31 PM

Objectives_template

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

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 and an index point which increases in the positive -direction. If - direction,

which increases in the positive

is the index of and

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

the point immediately to the left is

The basic philosophy of finite difference method is to replace the derivatives of the governing equations with algebraic difference quotients. This will result in a system of algebraic equations which can be solved for the dependent variables at the discrete grid points in the flow field. In the next lecture we'll look at some of the common algebraic difference quotients in order to be acquainted with the methods related to discretization of the partial differential equations.

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

1 of 1

6/19/2012 4:32 PM

Objectives_template

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

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

The Lecture deals with:

Elementary Finite Difference Quotients

1 of 1

6/19/2012 4:36 PM

Objectives_template

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

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 as can be expressed in terms of Taylor series expansion about point

...

(2.1)

Mathematically, Eq. (2.1) is an exact expression for In practice, any function is small and any higher-order term of

if the series converges. is smaller than . Hence, for

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 neglected. If terms if order

and higher have been

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 the Taylor series expansion of the corresponding derivative and reducing the magnitude of

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

Objectives_template

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

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 order of

is a formal mathematical nomenclature which means terms of expressed by Eq. (2.4)

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

accurate difference representation for the derivative 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

1 of 2

6/20/2012 12:16 PM

Objectives_template

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

(2.8)

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

at grid point

2 of 2

6/20/2012 12:16 PM

Objectives_template

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

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 point Difference quotients for the

at grid

derivatives are obtained in exactly the similar way. The derivatives.

results are analogous to the expression for the

[Forward difference]

[Backward difference]

[Central difference]

[Central difference derivative]

of

second

1 of 1

6/20/2012 12:17 PM

Objectives_template

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

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 the first order derivatives, with backward difference in terms of dependent variables for the first-order derivatives. This is because

or

or

The same approach can be made to generate a finite difference quotient for the mixed derivative Example, (2.11) In Eq. (2.11), if we write the derivative as a central difference of derivatives, at grid point .

and further make use of central differences to find out the

derivatives, we obtain

(2.12)

1 of 2

6/20/2012 12:17 PM

Objectives_template

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

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

2 of 2

6/20/2012 12:17 PM

Objectives_template

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

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

The Lecture deals with:

Basic Aspects of Finite -Difference Equations

1 of 1

6/20/2012 12:18 PM

Objectives_template

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

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

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

Example, The Laplace equation

in two dimensions, becomes

or (3.1) Where is the mesh aspect ratio will be

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

(3.2)

It can be said that many other forms of difference approximations can be obtained for the derivatives which constitute the governing equations for fluid flow and heat transfer. The basic procedure, however, remains the same. In order to appreciate some more finite difference representations see Tables 2.1 and 2.2.

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

1 of 1

6/20/2012 12:19 PM

Objectives_template

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

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. The dependent 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 spatial derivative with a central difference (usually called FTCS, Forward Time Central Space method 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 finite difference quotient has been taken from a truncated series. Considering Eqns. (3.3) and (3.4) and looking at the truncation error associated with the difference 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

1 of 1

6/20/2012 12:19 PM

Objectives_template

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

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

1 of 2

6/20/2012 12:19 PM

Objectives_template

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

With respect to Eq. (3.5), it can be said that as approach zero.

and

the truncation error

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

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

2 of 2

6/20/2012 12:19 PM

Objectives_template

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

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

The Lecture deals with: Consistency Convergence Explicit and Implicit ethod

1 of 1

6/20/2012 12:20 PM

Objectives_template

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

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 be consistent 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 explicitly or or higher orders.

and not

In such cases the scheme would not be formally consistent unless the mesh were refined in 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 complete equation:

The above expression for truncation for error meaningful if and way that .However, and

together with

may individually approach zero in such a

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

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

Objectives_template

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

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 for each 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.

1 of 1

6/20/2012 12:20 PM

Objectives_template

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

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 steps of 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 of and

is obtained directly from the known values

(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 side menu of the page or click the next button.

1 of 1

6/20/2012 12:20 PM

Objectives_template

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

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

The Lecture deals with:

Explicit and Implicit Methods

1 of 1

6/20/2012 12:22 PM

Objectives_template

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

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 equation given 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 . Hence Eq. (5.1) at a given grid

but also in terms of unknown quantities at time level point , cannot itself result in a solution of .

1 of 1

6/20/2012 12:22 PM

Objectives_template

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

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 algebraic equations, 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 be rewritten as (5.2) where or

or
(5.3)

1 of 2

6/20/2012 12:23 PM

Objectives_template

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

Eq. (5.3) has to be applied at all grid points, i.e., from algebraic will result (refer to Fig 5.1). at at at at Finally the equation will be of the form:

to

A system of

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 right-hand side. and

are transferred to the known

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

2 of 2

6/20/2012 12:23 PM

Objectives_template

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

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, ) is the thermal diffusivity.

(temperature) is a function of space

and (

)and (

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

(5.6)

When we apply the crank-Nicolson to the two-dimensional heat conduction equation, we obtain (5.7)

where the central difference operators defined by

and

in two different spatial directions are

(5.8)

1 of 1

6/20/2012 12:24 PM

Objectives_template

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

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 five unknowns Eq. (5.7) as (5.9) where and In order to examine this further, let us rewrite

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 the following:

1 of 2

6/20/2012 12:24 PM

Objectives_template

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

(5.9)

where

The system of equations, described by Eq. (5.9) requires substantially more computer time as compared to a tridiagonal system. The equations of this type are usually solved by iterative 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.

2 of 2

6/20/2012 12:24 PM

Objectives_template

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

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

The Lecture deals with:

ADI Method

1 of 1

6/20/2012 12:24 PM

Objectives_template

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

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 the two-dimensional equation by conventional algorithms, can be removed by alternating direction 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 algebraic equations. 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 i index and obtain the values from i=2 to (imax-1) at (n+1/2) level Fig.6.1 (a).

1 of 2

6/20/2012 12:25 PM

Objectives_template

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

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 j index and obtain the values from j =2 to (jmax-1) at nth level Fig. 2.5 (b).

2 of 2

6/20/2012 12:25 PM

Objectives_template

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

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 shall obtain on either direction, we

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

1 of 1

6/20/2012 12:25 PM

Objectives_template

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

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

Major advantages and disadvantages of explicit and implicit methods


| Advantages | | Disadvantages | for a given must be less

Explicit Method

The solution algorithm is simple to set up

than a specific limit imposed by stability constraints. This requires many time steps to carry out the calculations over a given interval of t.

Implicit Method

Stability can be maintained over much larger values of . Fewer time steps are needed to carry out the calculations over a given interval.

More involved producer is needed for setting up the solution algorithm than that for explicit method. Since matrix manipulations are usually required at each time step, the computer time per time step is larger than that of the explicit approach. Since larger can be taken, the

truncation error is often large, and the exact transients (time variations of the dependent variable for unsteady flow simulation) may not be captured accurately by the implicit scheme as compared to an explicit scheme.

Apparently finite-difference solutions seem to be straightforward. The overall procedure is to replace the partial derivatives in the governing equations with finite difference approximations and then finding out the numerical value of the dependent variables at each 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 soon discuss about accuracy and stability.

1 of 1

6/20/2012 12:25 PM

Objectives_template

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

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 point of 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 derivative. and this polynomial can be used for evaluating upto the

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 For parabolic variation between points, and

and one can set: (6.9)

where , a, b, c, are obtained from (6.10) (6.11) (6.12) In matrix form,

(6.13)

1 of 2

6/20/2012 12:25 PM

Objectives_template

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

Inversion of Eqn. (6.13) leads to the values of a, b, c in terms of obtained the values of these coefficients, the derivative

and

. Having

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 addition to i, derivatives upto neighboring point in th order can be calculated. The polynomial fitting

technique is very useful when the boundary conditions of the problem are of a very complex 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.

2 of 2

6/20/2012 12:25 PM

Objectives_template

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

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

The Lecture deals with:

Errors and Stability Analysis

1 of 1

6/20/2012 12:26 PM

Objectives_template

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

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 this idea provides guidance for the behavior of more complex non-linear equations which are governing the equations for flow fields. Consider a partial differential equation, such as Eq. (3.3). The numerical solution of this equation is influenced by the following two sources of error.

1 of 1

6/20/2012 12:26 PM

Objectives_template

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

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-difference equation (for example, Eq.(3.4). The discretization error for the finite-difference equation is simply the truncation error for the finite-difference equation plus any error introduced by the numerical treatment of the boundary conditions.

1 of 1

6/20/2012 12:26 PM

Objectives_template

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

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 the computer 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 treatment of 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 exactly satisfies

(7.3)

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

(7.4)

From Equation (7.4) we see that the error If errors

also satisfies the difference equation.

are already present at some stage of the solution of this equation, then the 's shrink, or at least stay the same, as the solution 's grow larger during

solution will be stable if the

progresses in the marching direction, i.e from step n to n+1. If the

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

1 of 2

6/20/2012 12:26 PM

Objectives_template

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

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.

2 of 2

6/20/2012 12:26 PM

Objectives_template

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

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 and the 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 the same 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,

1 of 2

6/20/2012 12:27 PM

Objectives_template

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

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

2 of 2

6/20/2012 12:27 PM

Objectives_template

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

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 hold simultaneously 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 satisfy Eq. (7.13). For the allowed value of must be small enough to

the error will not grow in subsequent time

marching steps in t, and the numerical solution will proceed in a stable manner. On the contrary, 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

1 of 2

6/20/2012 12:27 PM

Objectives_template

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

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

2 of 2

6/20/2012 12:27 PM

Objectives_template

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

The Lecture deals with:

Stability of Hyperbolic and Elliptic Equations

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

Objectives_template

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 are frequently encountered in a class of fluid flow problems. Consider the second-order wave equation (8.1) Here c - wave speed and u - wave amplitude. This can be written as a system of two first-order equations. If then we may write Rather, the system of equations may be written as and and

which is a first-order equation. It is implicit that found by det or and representing two traveling and The eigenvalues of the matrix are

Roots of the characteristic equation are waves with speeds given by and

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

(8.2) where

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

Objectives_template

and S

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

Objectives_template

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 known mathematician 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 arguments as applied to the analysis of Eq. (3.4), the amplification factor becomes (8.8) where The stability requirement is Finally the condition culminates in

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

Objectives_template

(8.9) In Eq. (8.9), C is the Courant number . This equation restricts 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. for the solution of

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

Objectives_template

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 This is stable only if Let us consider a case when restriction), we get values of u are shown in fig 8.1. For r =1 (which is greater than the stability (which is impossible). The (8.12)

Figure 8.1: Physical Violations Resulting from r =1 Example demonstrating the application of Von Neumann method to multidimensional elliptic 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 as constant coefficient (within the framework of linear stability analysis). Using FTCS scheme

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

Objectives_template

(8.14)

Let us consider

with

(8.15)

where N is the numerical solution obtained from computer, D the exact solution of the FDE and error. Substituting Eq. (8.14) into Eq. (8.13) and using the trigonometric identities, we finally obtain

where

where

The obvious stability condition and

finally leads to

(8.16)

when

which means

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

Objectives_template

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.

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

Objectives_template

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

The Lecture deals with:

Stability and Fluid Flow Modeling

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

Objectives_template

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 is second-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 From Eq. (9.4), using trigonometric identities, we get (9.6) and, the amplification factor (9.5)

(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, and the product of the roots is equal to +1. Thus, it follows that the magnitude of one of the roots (value of ) must exceed 1 unless both the roots are equal to unity.

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

Objectives_template

But is the magnification factor. If its value exceeds 1, the error will grow exponentially which will lead to an unstable situation. All these possibilities mean that Eq (9.8) should equal to unity. possess complex roots in order to both have the values of 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 equations.

. , must again be satisfied for the stability of second-order hyperbolic

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

Objectives_template

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 be unstable if for that procedure, the solution becomes unbounded, i.e the error grows exponentially as the calculation progresses in the marching direction. In order to have a stable calculation, we pose different conditions based on stability analysis. Here we have discussed the Von Neumann stability analysis which is indeed a linear 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 some procedures, we may get an amplification factor which is always greater than unity. Such methods are unconditionally unstable. Over and above, it should be realized that such stability analysis are not really adequate for practical complex problems. In actual fluid flow problems, the stability restrictions are applied locally. The mesh is scanned for the most restrictive value of the stability is used throughout the mesh. For variable limitations and the resulting minimum 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 stable solutions wherein the routine stability analysis will provide the initial clues to practical stability. In other words, it will give tutorial guidance.

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

Objectives_template

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 linear problems such as heat conduction. The problems of fluid mechanics are more complex in character. The governing partial differential equations form a nonlinear system which must be solved for the unknown pressures, densitities, temperature and velocities. Before entering into the domain of actual flow modeling, we shall discuss some subtle points 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 remaining equation 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. I n particular, we shall study their influence on conservative and transportive property, and artificial viscosity.

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

Objectives_template

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 integral conservation 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 flux rate of across into in is equal to net advective across into .

plus net diffusive flux rate of

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

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

Objectives_template

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

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

Objectives_template

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

The Lecture deals with:

Conservative Property

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

Objectives_template

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


We evaluate the integral as

to

(10.3)

Summation of the right hand side finally gives

(10.4)

Eq. (10.4) state that the rate of accumulation of advective flux rate across the boundary of

in

is identically equal to the net to .

running from

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

Objectives_template

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

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

Objectives_template

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 abserved that terms corresponding to inner cell fluxes do not cancel out. Consequently an expression in terms of fluxes at the inlet and outlet section, as it was found earlier, could not be obtained. Hence the finite-difference analog Eq. (10.6) has failed to preserve the integral Gauss-divergence property, i.e. the conservative property of the continuum. The quality of preserving the conservative property is of special importance with regards to the methods involving finite-volume approach (a special form of finite-difference equation).

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

Objectives_template

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 volume at the interface 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 and is often referred to as week conservative form. For the incompressible flow in Cartesian coordinate this form is: is exactly equal to flux rate of out of a control

I to the next control

(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 Cartesian coordinate 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.

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

Objectives_template

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

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

Objectives_template

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 discretization, we can think about the following formulations equation. (9.12) Regarding

(11.1)

(11.2) If Von Neumann's stability analysis is applied to these schemes, we find that both are unconditionally unstable. A well known remedy for the difficulties encountered in such formulations is the upwind scheme 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 backward space difference scheme, provided that the carrier velocity u is positive. If u is negative, a forward 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 convective term (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 in convection (advection) dominated flows in order to obtain numerically stable results. As such, upwind bias retains transportative property of flow equation. Let us have a closer look at the transportative property and related upwind bias.

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_2.htm[6/20/2012 4:36:58 PM]

Objectives_template

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 the effect 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 inviscid model 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)

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

Objectives_template

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 upwind method maintains unidirectional flow of information. In conclusion, it can be said that while space centred difference are more accurate than upwind differences, as indicated by the Taylor series expansion, the whole system is not more accurate if the criteria for accuracy includes the tranportive property as well.

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

Objectives_template

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 and superscript n)

[Diffusive terms]

or

which may be rewritten as

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

Objectives_template

higher order terms where C (Courant number)

(11.10)

In deriving Eq. (11.10),

was taken as

However, the nonphysical coefficient leads to diffusion like term which is dependent on is known as the numerical or artificial viscosity. the discretization procedure. This 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 that C < 1 (so that the algorithm can work). As a consequence, work). is always a positive non-zero quantity ( so that the algorithm can

If, instead of analyzing the transient equation, we put expand it in Taylor series, we obtain

in Eq. (11.3) and

(11.12)

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

Objectives_template

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 diffusion . in 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 maintain transportive property of flow equations while the computations based on upwind differencing often suffer from false diffusion (inaccuracy!). One of the plausible improvements 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.

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

Objectives_template

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

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

Objectives_template

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 property which can be convected or diffused, then is any

(12.1)

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

Figure 12.1: Definition of uR and uL


Definition of (12.2a)

Definition of (12.2b) Now, for and for Finally, for and we get for (12.4) for (12.3)

(12.5)

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_2.htm[6/20/2012 4:39:03 PM]

Objectives_template

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- direction momentum equation. We have chosen this in order to cite a meaningful example of second upwind differencing. Using Eq. (12.5), we can write

(12.6)

Here we introduce a factor upwind differencing.

which can express Eq. (12.6) as a weighted average of central and

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

(12.7) where full upwind. Therefore brings about the upwind bias in the difference quotient. If is small, Eq. For Eq (12.7) becomes centred in space and for it becomes

(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 been discussed by Roache (1972) who has also pointed out the second upwind- formulation possesses both the conservative and transportive property provided the upwind factor (formally called donorcell factor ) is not too large.

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

Objectives_template

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

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

Objectives_template

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 of the 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 are suitable over a large range of velocities. However, none of these prescriptions are universal. Depending on the nature of the flow and geometry one can always go for the best suited algorithm. Now we shall discuss one such can algorithm which has been proposed by Khosla and Rubin (1974). Consider the Burger's equation. (9.11) once again. The derivatives in this equation are disceretizated 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

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

Objectives_template

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 side menu of the page or click the next button.

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

Objectives_template

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

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

Objectives_template

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 (see Kawamura 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 wide variety of problems. Interested readers are referred to Vanka (1987), Fletcher (1988) and Rai 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 with sixth-order dissipation. The scheme is expressed as

(13.3)

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

Objectives_template

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 are applied 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 which is

Von Neumann stability analysis ) unfortunately eliminates viscous diffusion completely in Eq. (13.5) and produce a solution from Eq. (13.4) directly as unacceptable. From Eq. (13.5) it is clear that in order to obtain a solution for convection diffusion 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

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

Objectives_template

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). Under such a

From the CFL condition, we know that the stability requirement is 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.

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

Objectives_template

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 which assumes the form of a tridiagonal matrix problem. Here we shall discuss a very well known solution procedure known as Thomas algorithm (1949) which utilizes efficiently the advantage 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. The intermediate steps that solve for x 1, x 2, ... x N . Change di and c i 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 back substitution as

and

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_4.htm[6/20/2012 4:39:57 PM]

Objectives_template

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 the value 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 the next (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 yes, what should be the expression for at the boundary? at the

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

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

Using the wave equations

the Taylor series expression may be written as

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

Objectives_template

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 complete equation 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

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

Objectives_template

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

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

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

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

Objectives_template

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 Mechanics and 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 of Parabolic Differential Equations, Mathematical Tables and Others Aids to Computation, Vol 7, pp. 135-152, 1953. 4. Fletcher, C.a.j., Computational Techniques for Fluid Dynamics, Vol. 1 (Fundamentals and General Techniques), Springer Verlag, 1988. 5. Gentry, Ra., Martin, R.E. and Daly, B.J., An Eulerian Differencing Method for Unsteady 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 Number Flow 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 Lmplicit Scheme, 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 on Quadratic Upstream Interpolation, Comp. Method Appl. Mech. Engr., Vol. 19, pp. 5998, 1979. 11. Rai, M.M. and Moin, P., Direct Simulations of urbulent Flow Using Finite Difference Schemes, J. Comput. Phys., Vol. 96, pp. 15-53, 1991. 12. Raithby, G.D. and Torrance , K.E., Upstream-weighted Differencing Scheme and Their 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 Steady State 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 ., Vol 25, 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.

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

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 14:

The Lecture deals with:

The Basic Technique

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

Objectives_template

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 weighted residuals, it can be said that the Finite Difference procedure is a collection method with piecewise definition of the field variable in the neighborhood of chosen grid points (or collection points). In a similar fashion the Finite Volume Method is a subdomain method with piecewise definition of the field variable in the neighborhood of chosen control volumes. The total solution 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 for interpolating the field variable and usually, a single node at the centre of the control volume 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 the nodal equations. We shall illustrate the technique with the help of the 2-D heat conduction problem 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 heat conduction 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.

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

Objectives_template

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 residual approach and the physical approach. Using the weighted residual approximately satisfied by: approach, the 2-D heat conduction equation can be

(14.2) where the weight within the outside the control volume. 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 a surface 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 flux in Figure 14.2.

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

Objectives_template

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 zdirection):

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 heat generation within the control volume (CV) at steady state Thus,

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

Objectives_template

(14.5) Which is the same statement as equation (14.4). In the implementation of the FVM procedure, 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 field variable (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 numerical indices of i, j and solved in the same way (using point-by-point or line-by-line procedure etc.) as mentioned in previous lectures on finite differences.

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

Objectives_template

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 applied heat flux. For instance, for the control volumes adjacent to the x = 0 boundary as shown in 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.

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

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 14:


When the boundary temperature is specified, the control volume shapes near the boundary can 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 the actual domain can be considered in line with the finite difference methodology described earlier. 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 = T L .


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

(14.11)

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

Objectives_template

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, nodal equations can be obtained at all nodes and these can be solved simultaneously by the matrix inversion technique, line-byline technique or point-by-point technique as discussed earlier. Having done the above exercise, we may like to look at a more generalized description of the finite volume method.

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

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

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 15:

The Lecture deals with:

A Generalized Approach for Finite Volume Methods Equations with First Derivatives

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

Objectives_template

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 equation to be solved. The computational domain is divided into elementary volumes and the integration is performed within these elementary volumes. The method enables one to handle complex geometry without having the equation written in curvilinear coordinates. The method also preserves the conservative property. The elementary control volumes are described by the coordinates of the vertices of the quadrilaterals (for 2-D) or hexahedrals (for 3-D).

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

Objectives_template

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. For and Eqn. (15.1) is the two-dimensional continuity example, for 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 of : the 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) (see Figure 14.5).

where H For a segment

and

is the outward unit normal of segment

On a counter-clockwise contour, the outward unit normal where For the continuity equation, and

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

Objectives_template

Figure 15.1: Finite Volume Mesh system.


In Cartesian coordinates, H.n Equation (15.5) , is just (15.6) a statement of conservation. For the particular choice, in Eqn. (15.5) concides with an integral statement of the

conservation of mass. As mentioned, the finite volume method is a discretization of the governing equation in integral form, in contrast to the finite difference method, which is usually applied to the governing equation in differential form.

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

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 15:


An approximate evolution of Eqn. (15.5) would be

(15.7) where A is the area of the quadrilateral ABCD in Fig. 15.1, and the average value of E over the quadrilateral is represented by for the line integral over segments Further, Eqn. (15.8) follows, and and the remaining terms are approximations and respectively.

with similar expressions for

etc. If

is not a Function of time, Eqn. (15.8) becomes

(15.8) For the irregular grid-mesh the finite volume Eqn. (15.8) provides a discretisation

in Cartesian coordinates without introducing generalized coordinates. If the grid-mesh is and Eqn. (15.8) becomes uniform and coincides with line of constant

or,

(15.9)

Which coincides with a central difference representation for the spatial terms of (15.1). The finite volume method, which is extensively used for both incompressible and compressible flows, has the advantages of conservative property.

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

Objectives_template

Most importantly, it allows complex computational domains to be discretised in a simple way.


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

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

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 16:

The Lecture deals with:

Finite Volume Discretization of Equations with Second Derivatives

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture16/16_1.htm[6/20/2012 4:43:52 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 16:

Equations with Second Derivatives


In lecture 15, the finite volume method was applied to Eqn. (15.1), in which only first derivatives appeared, and produced a relatively straightforward discretization formula given by Eqn. (15.8). The finite volume method requires some modification, when the second derivatives are present in the governing equation. Let us consider Laplace 's equation

(16.1)

Figure 16.1: Finite Volume for a Curvilinear Grid.


The finite volume method follows the application of the subdomain method to Eqn. (16.1). For the finite volume ABCD as shown in Fig. 16.1, one can write the area integral of (16.1) as

H.n

(16.2)

where Green's theorem has again been used and now

H. n

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture16/16_2.htm[6/20/2012 4:43:52 PM]

Objectives_template

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture16/16_2.htm[6/20/2012 4:43:52 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 16:

Following the same steps as in lecture 15, the line integral in equation (16.2) can be evaluated approximately over the segment AB, BC, CD and DA, by

(16.3)

Various techniques for evaluating Peyret and Taylor (1983). Here in Fig. (16.1). Thus we can write (Fletcher, 1988).

etc. discussed by Fletcher (1988) and is evaluated as the mean value over the area

(16.4)

(16.5)

where Green's theorem has been used to obtain the final line integrals on the right, and

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture16/16_3.htm[6/20/2012 4:43:53 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 16:

A similar expression can be obtained for

If the mesh is not too distorted,

and and
(16.6) or,

(16.7)

or,
(16.8) Therefore (16.4) becomes

(16.9)

and (16.5) becomes

(16.10)

Now, the first two terms of (16.3) can be evaluated as

(16.11)

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture16/16_4.htm[6/20/2012 4:43:53 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 17:

The Lecture deals with:

Finite Volume Discretization of Equations with Second Derivatives

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture17/17_1.htm[6/20/2012 4:44:19 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 17:


In the similar manner, as explained in lecture 16, one can evaluated the following

(17.1)

(17.2)

and

If the mesh is not too distorted, and and

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture17/17_2.htm[6/20/2012 4:44:20 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 17:

The equivalent expression for (16.3), finally yields

and other similar terms in Eqn.

(17.3) where the geometrical parameters are

and

In Eqn.(17.3) values. Thus

are evaluated as the average of the four surrounding nodal

Substitution into eqn. (17.3) generates the following nine-points discretisation of Eqn. (16.1):

(17.4)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture17/17_3.htm[6/20/2012 4:44:20 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 17:

In Eqn. (17.4) the geometrical quantities

and

, ect. ) need to be evaluated

only once for a given grid and used for all subsequent calculations, Equation (17.4) is solved conveniently using a Successive Over-Relaxation (SOR) technique. Equation (17.4)is manipulated to give an estimate of thus

(17.5) and the improved better value is (17.6) where is the relaxation parameter .

One attractive feature if the finite volume method is that Neumann (derivative) boundary conditions can be handled as readily as Dirichlet boundary conditions by direct substitution into Eqn. (16.3). The discretised Equation (17.4) reduce to the centred finite difference scheme on a uniform rectangular grid (17.7)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture17/17_4.htm[6/20/2012 4:44:20 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 17:

References
1. Fletcher, C.A.J., Computational Techniques for Fluid Dynamics, Vol. 1 (Fundamentaland General Techniques) Springer Verlag, 1988. 2. Patankar, S.V., and Spalding, D.B., A Calculation Producer for Heat Mass and Momentum Transfer in Three Dimensional Parabolic Flows, Int. J. Heat Mass Transfer, Vol. 15, pp. 1787-1805,1972. 3. Peyret, R., and Taylor , T. D., Computational Methods for Fluid Flow, Springer Verlag, 1983. 4. Runchal, A.K., Convergence and Accuracy of three Finite Difference Scheme for a Twodimensional Conduction and Convection Problem, Int. J. Numer. Methods Eng. , Vol. 4, pp. 541-550,1972.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture17/17_5.htm[6/20/2012 4:44:20 PM]

Objectives_template

Module 2: Introduction to Finite Volume Method Lecture 17:

Problem
Consider the problem of diffusion in the annular region shown in Fig. 14.7, which is in solid body rotation at frequency . At the inner face at while at the outer face at in the square region R, using is In cylindrical coordinates, this is a one-dimensional problem whose exact solution can be obtained. However, we intend to solve for the coordinate system, and then the problem is two-dimensional. The quantity

the diffusion coefficient. Such a procedure for artificially formulating two-dimensional problems with known analytical and the present problem were introduced by Runchal (1972). The relevant dimensional variables are

the problem is governed by the equation

Figure 14.7: Diffusion in a rotating annular region.

(17.8)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture17/17_6.htm[6/20/2012 4:44:20 PM]

Objectives_template

where

(17.9)

the exact solution to the problem being

(17.10)

The grid layout on R may be a Cartesian grid-mesh. Compare the accuracy of the computed solution using a finite volume formation. The results are to be compared for an grid-mesh.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture17/17_6.htm[6/20/2012 4:44:20 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 18:

The Lecture deals with:

Introduction and Formulation

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2018/18_1.htm[6/20/2012 4:44:59 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 18:

Introduction
In finite element technique, the nodal equations for the field variables are obtained through an integral formulation, which may be set up through a variational principle (if one exists), or through the Galekin's weighted residual approach. Here we shall consider the Galerkin's approach, which has a general applicability. Let us consider a general representation of a differential equation on a region (18.1) For the one dimensional heat conduction equation, the governing differential equation is

(18.2) The symbol is an operator

that is operating on residual

. The exact solution requires to satisfy Eqn. 18.1 at every that introduces an error

points. called the

Let us seek for an approximate solution

(18.3) The approximate methods are centered around the concept of setting the residual relative to a weighting function to zero (18.4) The can be chosen based on the guiding philosophies of different variants of the are chosen from the basis . We shall deal with aspect, in detail, in the subsequent

weighted residual methods. In the Galerkin method, the functions used for constructing sections.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2018/18_2.htm[6/20/2012 4:44:59 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 18:

Formulation
Consider a steady 2-D heat conduction problem in an arbitrary-shaped two dimensional domain which is subject to various types of boundary conditions as shown in Fig. 18.1. Considering a uniform heat generation rate per unit volume (Q) in the entire solution, the governing equation for heat transfer is

Figure 18.1 Arbitrary 2D domain.

(18.5) where T(x,y) is the exact distribution of temperature. The boundary conditions are:

on on
on on and

(18.6)

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2018/18_3.htm[6/20/2012 4:44:59 PM]

Objectives_template

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2018/18_3.htm[6/20/2012 4:44:59 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 19:

The Lecture deals with:

Formulation of Weighted Residual Method

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2019/19_1.htm[6/20/2012 4:49:12 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 19:


The Galerkin's weighted residual minimization approach of Eq. (18.5) yields for where is the solution domain and (19.1) is the number of unknown temperatures. are the same as the interpolation

In the Galerkin's method, the weighting function (basis) function Let

which are used for defining the variation T between the nodal points.

be the trial solution. Thus the residual equation can be written as (19.2)

In the above form, the requirement on that a non-trivial can be weakened by integrating the

is that it must be atleast twice differentiable so operator by parts.

value can be obtained at all locations. However, this requirement

In addition to the convenience of using lower order interpolation functions, the weak formulation also introduces the boundary conditions of the problem in a suitable fashion. The intergration by parts can be carried out using the divergence theorem as follows:

(19.3)

where is the boundary of the domain (after a sign change)

. Thus the residue equations take a final form

(19.4) Substitutions for the boundary integral term in terms of the given boundary conditions

(19.5)

where the terms have been numbered as

to

for our future reference.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2019/19_2.htm[6/20/2012 4:49:12 PM]

Objectives_template

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2019/19_2.htm[6/20/2012 4:49:12 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 19:


After formulating the residue equation including all the boundary contributions, the next task is to evaluate the area and line integrals of Eq. (19.5). For this purpose, the domain is divided into small elements, each of which has a certain number of nodes placed on the boundary and inside, for interpolating field variables.

Figure 19.1: A typical triangular element.


Using a 3-noded triangular element (Fig. 19.1) for our 2D applications, the interpolation of the temperature can be obtained as follows: (19.6) where the constants element is given by (19.7) (19.8) (19.9) or, using matrix notation, we obtain depend on the nodal coordinates and the nodal temperature for a typical

value (and therefore vary from element to element). The values of

(19.10)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2019/19_3.htm[6/20/2012 4:49:12 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 19:


Since Eq. (19.7), (19.8) and (19.9) can be written as:

We get within the element (e)

(19.11)

where

Let

= Transpose of the matrix formed by cofactors of

cofactor

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2019/19_4.htm[6/20/2012 4:49:12 PM]

Objectives_template

To be noted that the area of the triangle is given by

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2019/19_4.htm[6/20/2012 4:49:12 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 20:

The Lecture deals with:

Shape Functions and their Evaluation

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2020/20_1.htm[6/20/2012 4:50:05 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 20:

Shape Function and Their Evaluation


Let us focus on evaluation of

Now, we can express

and

as

(20.1)

(20.2)

(20.3)

The interpolation function

and

can be thought of as influence or at an interior

function which determine the influence of the corresponding node point

of the element. An alternate name for these interpolation functions is shape

functions and they have the following properties: at at or

And has some magnitude between 0 and 1 for intermediate point. Similarly,

at

at

or

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2020/20_2.htm[6/20/2012 4:50:05 PM]

Objectives_template

at
As such, Eq 19.11 can be written as we shall use the notation

at

or
within each element. From now on, and to denote these shape

functions, where the number 1,2,3 stand for local numbers of the nodes assigned with respect to the element under consideration.

This gives
(20.4)

(20.5)

(20.6)

During the global solution of all the nodal temperatures, the nodes may be given any global number (with respect to the whole domain). The correspondence between the local and the global node numbers are usually stored in the arrays. Such arrays are called element connectivity in most of the FEM codes.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2020/20_2.htm[6/20/2012 4:50:05 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 20:

Let us now consider the issue of evaluating the term element

of Eq. (19.5), for a typical

(20.7)

where

and

for the element. Thus, the conduction contribution of an

element to the residual equation at a node takes the form of a 3 3 matrix multiplied by a 31 vector. Substituting for . and one can obtain all the

entries of the 3 3 matrix

For

and

we get

which yields (20.8) Next, for and we get

which yields (20.9)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2020/20_3.htm[6/20/2012 4:50:05 PM]

Objectives_template

finally for

and

we get

which yields (20.10)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2020/20_3.htm[6/20/2012 4:50:05 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 20:

The final expression for the term (i) of Eqn. (19.5) is

or,

we can write

(20.11)

where

and so on. The area of the element is given by

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2020/20_4.htm[6/20/2012 4:50:05 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 21:

The Lecture deals with:

More about Shape functions and their evaluation

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2021/21_1.htm[6/20/2012 4:50:39 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 21:

Shape Function and Their Evaluation


The fifth term of the equation (19.5) for typical element is

with For i=1

(21.1)

Similarly for N=2 and 3 can be evaluated and we can write

(21.2)

where

is the area of the element and

is the elemental generation vector.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2021/21_2.htm[6/20/2012 4:50:39 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 21:

Likewise, the boundary integral term with

for an element is (21.3)

for i=2

So,

(21.4)

where

represent a line element which is subject to the heat flux boundary condition.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2021/21_3.htm[6/20/2012 4:50:39 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 21:

The connective heat loss term

can be obtained as

(21.5) where:

and

(21.6)

The expression for 21.1):

and

can be obtained as explained below (see Figure

Figure 21.1: Treatment of Convective Boundary


The shape function for the vertices of the elemental domain are given as,

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2021/21_4.htm[6/20/2012 4:50:39 PM]

Objectives_template

Therefore ,

(21.7)

Now,

can be evaluated as

(21.8)

All the above mentioned elemental matrices and vectors have been obtained from the integration of the expressions for and as defined in Eq. (19.5).

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2021/21_4.htm[6/20/2012 4:50:39 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 22:

The Lecture deals with:

Boundary Conditions and Other Important Issues

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2022/22_1.htm[6/20/2012 4:51:12 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 22:


Let us, for the present, consider a problem with no radiating boundary. Thus, the nodal equation for any of the nodes of the FEM can be constructed by appropriately summing up the contributions form the heat conduction term convective boundary terms and the heat flux boundary heat generation term if the point lies on the

boundary. If the point lies on a known temperature boundary, the nodal equation is very simple, it takes the form temperature. The process of assembling all the contributions from the element in terms of nodal temperatures is done as follows. We try to obtain a global matrix equation in terms of nodal temperatures: (22.1) where The is conduction matrix and is the heat load vector. for the node where is the prescribed boundary

matrix is formed from the contribution of conduction resistances between the where the convective losses take place [Eq. (21.5)]. The heat load vector on the right

nodes of the triangular elements[Eq. (20.7)] and the convective resistance of the surface hand side receives contributions from [Eq. (21.1) for each triangular element and heat flux through boundary [Eq. (21.4)]. The nodes falling on radiative boundary (term in Eq. (19.1 ) requires special attention.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2022/22_2.htm[6/20/2012 4:51:12 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 22:


The radiation heat transfer process can be modeled (using the procedure of quasilinearization) as (22.2) where with denoting the guess value of calculated

from the previous iteration or the specified guess. Therefore, the radiation integral becomes: (22.3) which can be handled like a convection term. Although element due to variation in the value of varies over the length of the line

it may not be worth the trouble if the

element sizes are not too large. In such situations, one can set

(22.4)

where

and

are the nodes which make up the concerned boundary element.

A similar averaging procedure is often done for non-linear effects like temperature dependent properties, variable heat transfer coefficient at the boundary and variable heat flux at the boundary.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2022/22_3.htm[6/20/2012 4:51:12 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 23:

The Lecture deals with:

The unsteady problems Elements of higher orders

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2023/23_1.htm[6/20/2012 4:51:42 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 23:

The Unsteady Problems


We shall now discuss how to handle a transient, heat conduction problem. The governing equation for the problem is: (23.1) The residue equation can be set up as

Expanding temperature get:

as

within each element and proceeding as before, we

(23.2)

where the heat-flux integral for a known temperature boundary has been ignored, since it does not make any difference to our nodal equations.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2023/23_2.htm[6/20/2012 4:51:42 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 23:

The Unsteady Problems


It may be noted that are only spatially dependent functions and the time dependence

is reflected only in nodal temperature values. The resulting global matrix equation derived from Eq. (23.2) takes the form: (23.3) Eq. (23.3) can be solved using the explicit or semi-implicit schemes, (23.4) (23.5) (23.6) It is to be noted that Eqn. (23.4) is an explicit formulation, while Eqn. (23.5) and Eqn.(23.6) are implicit and semi-implicit schemes, respectively. For the implicit scheme, substituting for from Eq. (23.3), we get:

or, (23.7) Solving the matrix Eq. (23.7), the temperature vector at the obtained, knowing the level temperature vector. time level can be

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2023/23_3.htm[6/20/2012 4:51:42 PM]

Objectives_template

Module 3: Introduction to Finite Element Method Lecture 23:

Elements of Higher Order

Figure 23.1: A four nodded quadrilateral


For the higher-order elements, the interpolation will be performed using higher-order polynomials. For instance, for a 4-noded quadrilateral Fig. 23.1 the interpolation for temperature can be written as

T = a x + b y +c x y +d
The shape functions and

(23.8) for such a case will be obtained from

(23.9)

Similarly, for a 6-noded traingle the shape functions can be obtained through

(23.10)

with the temperature interpolation given by (23.11) The size of the elemental matrices will also be different for higher-order elements. For instance, for a 4-noded quadrilateral element will be a 4 4 matrix. The evaluation

of these matrices for the higher-order shape functions have to be performed using numerical integration. All the other procedures are similar to the problem that used 3noded triangular elements. Finally, the assembled global matrix equations can be solved to get the field variable at all nodes.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2023/23_4.htm[6/20/2012 4:51:42 PM]

Objectives_template

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2023/23_4.htm[6/20/2012 4:51:42 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 24:

The Lecture deals with:

Vorticity-stream function approach for solving Navier-Stokes Equations

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2024/24_1.htm[6/20/2012 4:52:09 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 24:

Vorticity-stream function approach


The vorticity-stream function method is one of the most popular methods for solving 2-D incompressible Navier-Strokes equations. The governing equations are (24.1)

(24.2) and (24.3) As it was discussed earlier, it is difficult to deal with equation (24.1 and 24.2) due to the lack of presence of a separate equation for pressure and vorticity as We introduce stream function

(24.4)

(24.5) We can readily see that existence of (24.4) automatically satisfies continuity equation (24.3) If we substitute the dependent variable with stream function, we shall not be concerned with equation (24.3) any more. Invoking equation (24.4) into (24.5) we obtain Poisson equation .

(24.6) Now we differentiate equation (24.1) with respect to and equation (24.2) with respect to . If we subtract differentiated equation (24.2) from differentiated equation (24.1) and rearrange the resulting equation, we shall obtain

(24.7)

This equation is the vorticity transport equation. Let us express the equation (24.6) in terms of finite difference quotient for and and putting

(24.8)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2024/24_2.htm[6/20/2012 4:52:09 PM]

Objectives_template

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2024/24_2.htm[6/20/2012 4:52:09 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 24:
Now for equation (24.7) we can write

(24.9)

If we put

we shall obtain

(24.10)

And we rewrite equation (24.4) as

(24.11)

(24.12) Thus we have now a system of simultaneous equation, (24.8), (24.10), (24.11) and (24.12) to be solved for and

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2024/24_3.htm[6/20/2012 4:52:09 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 24:
Let us discuss the solution procedure 1. Divide the physical domain by a mesh system where

Figure 24.1
2. Set the known boundary conditions for 3. Choose initial values of and and

at the interior grid points. Taking initial values for at each column of points can for interior

vorticity as zero is usually acceptable. Initial values for

be calculated from the axial velocity profile at that location. However, points may be taken as 4. Calculate everywhere and

using equation (24.8). Gauss-Seidel or overrelaxation type

calculation is done, for example:

where,

is the value from previous calculation,

is the most recent value, F is the

overrelaxation factor and 5. Calculate and

is newly adjusted better guess. at all the internal grid points using equations (24.11 and 24.12). at all interior mesh points using equation (24.10).

6. In a subsequent step, calculate

7. Apply appropriate boundary conditions (which has been discussed, in details, in lecture 25).

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2024/24_4.htm[6/20/2012 4:52:09 PM]

Objectives_template

8. Go back to step (4) and calculate values, where

with the help of current value of

and

denotes the pervious level. After, evaluating

at all points, find out

at all points which are indeed improved values. Start repeating steps 4 to 8 untill the desired degree of convergence is achieved.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2024/24_4.htm[6/20/2012 4:52:09 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 25:

The Lecture deals with: Boundary Condition Upper Boundary Inlet Boundary Outflow Boundary

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_1.htm[6/20/2012 4:52:47 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 25:

Boundary Condition
Now let us discuss about the boundary conditions.

Figure 25.1
Consider Fig. 25.1, we shall call B1 and B3 as bottom wall. Similar kind of boundary conditions are aplicable on B1 and B3. At the nodal points which are coinciding with the solid wall we can directly put streamline, any constant value of and Since the line B1-B2-B3 is a The is on it is acceptable. The usual choice is boundaries,

wall vorticity is an extremely important evaluation. At no-slip governs the physics. Using boundary B1 as an example, we expend series as

produced. It is the diffusion and subsequent advection of the wall produced vorticity which by a Taylor

(25.1)

But

by no-slip condition and

Again,

Along the wall,

[because

constant

].

Thus,

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_2.htm[6/20/2012 4:52:47 PM]

Objectives_template

Substituting this into (25.1) and solving for

with

gives

More general from regardless of the wall orientation or value of be written as

at the boundary, it can

(25.2)

where wall].

is the distance from

to (

) in the normal direction [

denotes at the

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_2.htm[6/20/2012 4:52:47 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 25:

Upper Boundary
The upper boundary B5 in Fig 25.1 is having the usual no-slip and impervious conditions for velocity components. i.e., But how to evaluate The value of at the upper wall? at the upper wall is constant and may be evaluated by integrating the For vorticity (25.2) will apply.

velocity profile at the inlet. Integration may be performed through Simpson's rule to get (25.3) If we want to model the condition of no boundary at B5, or, in other words, in y-direction, fluid at infinite extent is assumed, the problem is little more difficult. However, Thoman and Szewczyk (1966) used a treatment which specifies this far-field condition of with and Thus was applied through a Neumann

condition at the boundary along B5 as (25.4) where B5 is considered at

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_3.htm[6/20/2012 4:52:47 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 25:

Inlet Boundary
Inlet boundary in Fig. 25.1 cannot have any unique prescription. It will depend on the physical situation. For the axial velocity can be taken. Most widely used conditions are: uniform or parabolic or any possible profile

for
or,

to JMAX

(25.5)

(25.6)

For normal velocity

Formm and Harlow (1963) set

for
The stream function

to JMAX

(25.7)

can be obtained from the axial velocity profile at the inlet as

(25.8) Vorticity also depends on inlet velocity profile. Pao and Daugherty (1969) used and then specified Greenspan (1969) fixed up which result in

uniform axial velocity profile,

from axial velocity profile and assumed

(25.9)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_4.htm[6/20/2012 4:52:47 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 25:

Outflow Boundary
B4 is the outflow boundary (Fig. 25.1). If the outflow boundary conditions are know beforehand, then why are we computing? They are not known explicitly, but we can prescribe or set some gradients at the out let which are physically meaningful. We can imagine about continuative outflow conditions which will ensure smooth transition through the outlet boundary. For axial and normal velocities, we can impose less restrictive type condition, which are (25.10) Thoman and Szewczyk (1966) developed outflow boundary conditions through setting (25.11)

Then, from

they derived

For constant

at

this gives:

(25.12) (25.13) However, some difficulties were experienced if the coefficients of on the right hand

side of equation (24.10) have a sum greater than unity. In that case, the process will diverge.The quantities, such as and play a vital role in such cases. As a matter

of fact, these quantities are mesh Reynolds number. By taking very small grid size, they may be kept below a desired small value of 2. Another remedy which could be applied along with, is to introduce a upwind bias. So the difference quotients with respect to convective components become

for for

(25.14)

(25.15)

In a similar way,

can be evaluated. These are then used in equation (24.9) for the

subsequent development of equation (24.10) Regarding the vorticity boundary condition given by equation (25.2) it can be said that the condition is first order accurate. The accuracy can be increased and we can try for a second order accurate boundary condition.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_5.htm[6/20/2012 4:52:47 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 25:

Let us consider equation (25.1) once again.

is zero along the solid boundary and

If we want to increase the accuracy, we have to retain the fourth term on the right hand side of equation (25.1). Now we shall try to evaluate the fourth term. We know from the definition of vorticity:

or,

or,

(25.16)

invoking (25.16) and substituting the values for

and

in equation (25.1), we get

(25.17)

Instead of substitute

we shall write

to mean normal direction from the wall. We shall also

by a forward difference quotient as

or,

or,

(25.18)

Equation (25.18) is second order accurate boundary condition but it does not lead to

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_6.htm[6/20/2012 4:52:48 PM]

Objectives_template

stable computation for high Reynolds number flows.


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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2025/25_6.htm[6/20/2012 4:52:48 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:

The Lecture deals with:

Application to Curvilinear Geometries

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2026/26_1.htm[6/20/2012 4:53:13 PM]

Objectives_template

Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:

Application to Curvilinear Geometries

Figure 26.1: Flow Over a Circular Cylinder


Consider the steady, incompressible flow an infinitely long cylinder of radius The stream function and vorticity equation for this flow geometry are given in terms of the cylinder polar coordinate as:

(26.1)

(26.2)

where the redial and tangential velocity components are

and

(26.3)

The boundary conditions for stream function and vorticity have to be derived. The stream function must be a constant on the axis ( axisymmetry. On the solid surface, at the normal velocity and ) since by the virtue of a constant stream line is obtainable, since

on the cylinder. For this flow configuration, the axis as well as

the cylinder surface are the parts of the same streamline. The value of the stream function can be set equal to zero on these surfaces (Figure 26.1). Therefore, We can write

(26.4)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2026/26_2.htm[6/20/2012 4:53:13 PM]

Objectives_template

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2026/26_2.htm[6/20/2012 4:53:13 PM]

Objectives_template

Module 4:Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:

In the far field, velocity becomes uniform and equal to function, this condition is expressed as: for usually, a large cylinder surface

In terms of stream

(26.5) is considered for implementing the far field

condition (Figure 26.1). Therefore, the far field boundary condition (Equation (26.5)) is approximate as: (26.6) For the vorticity, the far field boundary condition is given below (26.7) Since the velocity is uniform and velocity gradients are zero, the above-mentioned condition is justified. On the axis for all Thus, from Equation (26.1) and (26.3) it can be seen that due to axisymmetry and

and

(26.8)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2026/26_3.htm[6/20/2012 4:53:13 PM]

Objectives_template

Module 4:Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:

On the solid surface

the vorticity is certainly not zero. Here, the wall vorticity has and

to be derived in the same way as in the backward facing step problem. Starting with Equation (26.1) and incorporating the impervious and no-slip conditions of (or alternatively, vorticity reduce to and for all ), the expression for the wall

(26.9) Now, the wall vorticity can be calculated using the image point method.

Figure 26.2: Finite Difference Grid for Flow Over a Cylinder


Considering a curvilinear grid as shown in Figure 26.2, the derivatives of steam function or vorticity can be replaced by their discrete (central difference) forms as:

(26.10) Similarly, expressions for stream function derivatives can also be obtained. Substituting these expression into the governing equations (26.1) and (26.2) the nodal equations of all ) are derived. Finally, the set of discretized interior nodes ( equation and boundary conditions are solved by iterative methods. For high Reynolds number flows, upwinding can also be implemented based on the magnitudes of in a similar manner as described earlier. The important fact to be kept in mind while simulating flows in curvilinear geometries is that due to curvature, certain terms in the governing equation or boundary conditions may take a form. In such cases, one can either resolve the form using let L' Hospital rule and

(if possible) or employ a local cartesian mesh at the point of singularity.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2026/26_4.htm[6/20/2012 4:53:13 PM]

Objectives_template

Module 4:Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:

References
1. Fromm, J.E., and Harlow ,F.H., Numerical Solution of the Problem of Vortex Street Development, The Physics of Fluids, Vol. 6, pp. 975-982, 1963. 2. Greenspan, D., Numerical Solution of Prototype Cavity Flow Problems, The Computer J., Vol. 12, pp 88-93, 1969 3. Pao, Y.H., and Daugherty, R., Time Dependent Viscous Incompressible Flow Past a Finite Flat Plate, Boeing Scientific Research Laboratories, D1-82-0822, 1969. 4. Thoman, D. C., and Szewczyk, A.A., Numerical Solution of Time Dependent Twodimensional Flow of a Viscous Incompressible Fluid Over Stationary and Rotating Cylinder, Tech. Rept. 66-14, Heat Transfer and Fluid Mechanics Lab., University of Notre Dame, Indiana, USA, 1966.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2026/26_5.htm[6/20/2012 4:53:13 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:

The Lecture deals with: Introduction Staggered Grid Semi Implicit Method for Pressure Linked Equations (SIMPLE) x - momentum equation

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_1.htm[6/20/2012 4:53:40 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:

Introduction
In Cartesian coordinates, the governing equations for incompressible three-dimensional flows are

(27.1)

(27.2)

(27.3)

(27.4)

In this module no assumption is made about the relative magnitude of the velocity components, consequently the full forms of the Navier-Stokes equations are solved. Methods described in this section will be based, basically, on finite-volume and finitedifference discretization and on the solution of a Poisson equation to determine the and pressure. It may be mentioned that these methods use primitive variables as function of and which are preferable in flow calculations.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_2.htm[6/20/2012 4:53:40 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:

Staggered Grid
As it has been seen, the major difficulty encountered during solution of incompressible flow is the non-availability of any obvious equation for the pressure. This difficulty can be resolved in the stream-function-vorticity approach. This approach losses it advantage when three-dimensional flow is computed because of the fact that a single scalar streamfunction does not exist in three-dimensional space. A three-dimensional problem demands a primitive-variable approach. Efforts have been made so that two-dimensional as well as three-dimensional problems could be computed following a primitive variable approach without encountering non-physical wiggles in the pressure distribution. As a remedy, it has been suggested to employ a different grid for each of the dependent variables. Such a staggered grid for the dependent variables in a flow field was first used by Harlow and Welch (1965), in their very well known MAC (Maker and Cell) method. Since then, it has been used by many researchers. Specifically, SIMPLE (Semi Implicit method for Pressure Linked equations) procedure of Patankar and Spalding (1972) has become popular. Figure 27.1 shows a two-dimensional staggered grid where dependent variables and

with the same indices are staggered to one another. Extension to three-dimensions is straight-forward. The computational domain is divided into a number of cells, which are shown as main control volume in Fig. 27.1. The location of the velocity components are at the center of the cell faces to which they are normal. If a uniform grid is used, the locations are exactly at the midway between the grid points. In such cases the pressure difference between the two adjacent the cells is the driving force for the velocity component located at the interface of these cells. The finite-difference approximation is now physically meaningful and the pressure field will accept a reasonable pressure distribution for a correct velocity foeld.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_3.htm[6/20/2012 4:53:40 PM]

Objectives_template

Figure 27.1: Staggered grid.


Another important advantage is that transport rates across the faces of the control volumes can be computed without interpolation of velocity components. The detailed outline of the two different solution producers for the full Navier-Stokes equations with primitive variables using staggered grid will be discussed in subsequent sections. First we shall discuss the SIMPLE algorithm and then the MAC method will be described.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_3.htm[6/20/2012 4:53:40 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:

Semi Implicit Method for Pressure Linked Equations (SIMPLE)


SIMPLE algorithm is based on finite-volume discretization of the Navier-Stokes equations. The method was introduced by Patankar and Spalding (1972). The discretization indicated below corresponds to a uniform grid. The more general case of a non-uniform grid can be obtained from Patanakr (1980). Consider the continuity equation

For the control volume shown in Fig. 27.2. The application of the finite-volume method to the continuity equation produces the following discretized form of the equation (27.5)

Figure 27.2: Control volume for continuity equation.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_4.htm[6/20/2012 4:53:41 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:

x momentum equation
The Navier-Stokes equations in x-direction in conservative form (using continuity equation) is given as

Figure 27.3: Control volume for x-momentum equation


Intergrading over the - control volume (Figure 27.3)

Application of the Green's theorem to the x-momentum equation (see Fig. 27.3) leads to

(27.6)

where

and

are defined as

and

and

are axial and transverse fluxes of x-momentum.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_5.htm[6/20/2012 4:53:41 PM]

Objectives_template

Thus

The linearized forms of these equations are

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_5.htm[6/20/2012 4:53:41 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:

Consequently, eq. (27.6) can be written as

(27.7)

In the above equation, from the neighboring and equals nodes

signifies all the convective and diffusive contributions and their coefficients at . The

coefficients The term

contain grid sizes, and the solution of

and

th time level.

In the following sub-section, equation (27.6) has , and in equation (27.7) can be clearly

been written term by term so that determined. Equation (27.6) can be expended as

or,

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_6.htm[6/20/2012 4:53:41 PM]

Objectives_template

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2027/27_6.htm[6/20/2012 4:53:41 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 28:

The Lecture deals with: Semi Implicit Method for Pressure Linked Equations (SIMPLE) y - momentum equation

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2028/28_1.htm[6/20/2012 4:56:06 PM]

Objectives_template

Module 5: Solution of Navier-Strokes Equation for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 28:

y- momentum equation

Using the control volume shown in Fig. 28.1, the

momentum equation can be written as

Figure 28.1: Control volume for y-momentum equation.


Application of Green's theorem leads to (28.1)

Here

and

are the axial and transverse fluxes of y-momentum

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2028/28_2.htm[6/20/2012 4:56:06 PM]

Objectives_template

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2028/28_2.htm[6/20/2012 4:56:06 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 28:

The linearized forms of these equations are

Substituting

and

in Eq. (6.8) yields

(28.2) At any intermediate stage, the solution is to be advanced from nth time level to th

time level. The velocity is advanced in two steps. First, the momentum equations (27.7) and (28.2) are solved to obtain the provisional values of obtain and continuity equation as yet. Making use of the approximate velocity solution which will give such, will correct continuity Eq. (27.5). In order to obtain Eqns. (27.7) and (28.2) are approximate as in such a manner that a pressure correction and will evolve will satisfy the and It is not possible to directly since the provisional velocities have not satisfied the

and also a velocity correction

will be obtainable. As

(28.3)

(28.4)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2028/28_3.htm[6/20/2012 4:56:06 PM]

Objectives_template

Module 5: Solution of Navier-Strokes Equation for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 28:

The linearized forms of these equations are

Substituting

and

in Eq. (6.8) yields

(28.2) At any intermediate stage, the solution is to be advanced from nth time level to th time level. The velocity is advanced in two steps. First, the momentum equations (6.7) and (6.9) are solved to obtain the provisional values of possible to obtain and satisfied the continuity equation as yet. Making use of the approximate velocity solution evolve which will give obtainable. As such, will correct will satisfy the continuity Eq. (27.5). In order to obtain Eqns. (27.7) and (28.2) are approximate as a pressure correction and will will be and It is not directly since the provisional velocities have not

and also a velocity correction in such a manner that

(28.3)

(28.4)

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2028/28_4.htm[6/20/2012 4:56:06 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 29:

The Lecture deals with:

Solution Procedure

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2029/29_1.htm[6/20/2012 4:57:19 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 29:

Solution Procedure
The Eqns. (28.3) and (28.4) can be evaluated in an implicit manner. For example, in Eq. (28.3) and all the neighbors, and are unknowns and they can to and

be expressed as a system of equations by substitution of to

. This will involve solution of a penta-diagonal matrix. Patankar (1980) splits

the evolution procedure. At the first place, he writes Eqns. (28.3) and (28.4) as tridiagonal grid line and solves them using Thomas algorithm. In a systems along each subsequent steps, Eqns. (28.3) and (28.4) are written as tridiagonal systems along each grid line and solve them using Thomas algorithm. This is equivalent to implicit evaluation using ADI scheme. Now, if we substract Eq. (28.3) from (27.7), we shall obtain

(29.1) In a similar manner, Eq. (28.4) is substracted from Eq. (28.2) to produce a correction equation for

(29.2) In order to make the link between and explicit, Eq. (29.1) can be reduced to

(29.3)

where An equivalent expression can be obtained for as

(29.4)

where

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2029/29_2.htm[6/20/2012 4:57:19 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 29:

Now, substition

into (27.5) and use of (29.3) and (29.4) produces (29.5)

where, Poisson equation that is equivalent to

Eq. (29.5) is basically a discrete form of

(29.6) It may be noted that the solution converges as represented as (29.7) The algorithm may be summarized as 1. 2. 3. 4. Eq. (29.3) and (29.4) can be also

u* is obtained from equations (28.3) and (28.4).


is obtained from equation (29.5)

uc is obtained from equations (29.3) and (29.4).


is obtained from where is a relaxation parameter.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2029/29_3.htm[6/20/2012 4:57:19 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 29:

Patankar (1980) introduced a revised algorithm, SIMPLER to improve the situation. The SIMPLER algorithm has the following steps.

1. A velocity field is computed form equations (28.3) and (28.4). 2. equation (29.5) then become a Poisson equation for rather than
replacing the terms in

with

3. The

(obtained from 2 steps) replace (as it was done in SIMPLE).

in equations (28.3) and (28.4), which but no

are solved for

4. Equation (29.5) is solved for


further adjustment is made to

and it is used to provide .

Van Doormal and Raithby (1984) proposed SIMPLEC which is a modified version of SIMPLE algorithm and give faster convergence.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2029/29_4.htm[6/20/2012 4:57:19 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 30:

The Lecture deals with:

Two-dimensional system of equations and line-by-line TDMA

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2030/30_1.htm[6/20/2012 4:57:57 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 30:

Two-dimensional System of equations and Line-by- line TDMA


Whether the discretized momentum Eqns. (28.3) and (28.4) or the pressure correction Eq. (29.5) the final outcome is a system of algebraic equation given by The current values of the dependent variables are to be evaluated from the known values of the coefficients (a's). The evaluation algorithm will be same for the momentum equations and the pressure correction equation.

Figure 30.1
On a rectangular grid, the dependent variables at one point terms of its neighbors (Fig. 30.1) as may be expressed in

where

is equivalent to

to

to

to

and

to

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2030/30_2.htm[6/20/2012 4:57:58 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 30:

The evaluation of

can be accomplished in the following ways:

(a) Vertical Sweep Upwards may be written in a pseudo FORTRAN code as

DO 10 DO 10 10
Here

J = 2, M 1 I = 2, L 1

is the currently available value in storage and all the coefficients including we shall get a system of equations if we substitute a tridiagonal matrix is available which can be solved for all Once one complete row is evaluated for any particular

are In row

known. For each of points at that

order words, for each

the next

will be taken up, and so on.

(b) Horizontal Sweep Forward may be written in pseudo FORTRAN code as

DO 20 DO 20 20
Again

I = 2, L 1 J = 2, M 1

is the currently available value in storage from previous calculations. for each A tridiagonal matrix is . Once one complete column of points are evaluated for any particular

we get a system of equation if we substitute available for each the next

will be taken up, and so on. The vertical sweep upward and downward are

repeated. Similarly the horizontal sweep forward and rearward are also repeated until convergence is achieved. For solving tridiagonal system, the tridiagonal matrix algorithm (TDMAS) due to Thomas (1949) is deployed. The above mentioned evaluation procedure is known as line-byline TDMA.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2030/30_3.htm[6/20/2012 4:57:58 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 31:

The Lecture deals with:

Solution of the unsteady Navier-Stokes Equations


Introduction to the MAC method

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2031/31_1.htm[6/20/2012 5:00:58 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 31:

Solution of the Unsteady Navier-Strokes Equations


The MAC method of Harlow and Welch is one of the earliest and most useful methods for solving the Navier-Stokes equations. This method necessarily deals with a Poisson equation for the pressure and momentum equations for the computation of velocity. It was basically developed to solve problems with free surface, but can be applied to any incompressible fluid flow problem. A modified version of the original MAC methods due to Hirt and Cook (1972) has been used by researchers to solve a variety of flow problems. he text discusses the modified MAC method and highlights the salient features of the solution algorithm so that the reader will be able to write a computer program with some confidence. The important ideas on which the MAC algorithm is based are: 1. Unsteady Navier-Strokes equations for incompressible flows in weak conservative form and the continuity equation are the governing equations. 2. Description of the problem is elliptic in space and parabolic in time. Solution will be marched in the time direction. At each time step, a converged solution in space is obtained but this converged solution at any time step may not be the solution of the physical problem. 3. If the problem is steady, in its physical sense, then after a finite number of steps in time direction, two consecutive time steps will show identical solutions. However, in a machine computation this is not possible hence a very small upper bound, say STAT is predefined. Typically, STAT may be chosen between 10 -3 and 10 -5. If the maximum discrepancy of any of the velocity components for two consecutive time steps for any location over the entire space does not exceed STAT, then it can be said that the steady solution has been evolved. 4. If the physical problem is basically unsteady in nature, the aforesaid maximum discrepancy of any dependant variable for two consecutive time steps will never be less than STAT. However, for such a situation, a specified velocity component can be stored over a long duration of time and plot of the velocity component against time (often called as signal) depicts the character of the flow. Such a flow may be labeled simply as unsteady. 5. With the help of the momentum equations, we compute explicitly a provisional value of the velocity components for the next time step.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2031/31_2.htm[6/20/2012 5:00:58 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 31:

Consider the weak conservative form of the nondimensional momentum equation in the xdirection:

It is assumed that at step

level, we have a coverged solution. Then for the next time

or (31.1) consists of convective and diffusive terms, and the pressure gradient. Similarly, the provisional values for and can be explicitly computed.

These explicitly advanced velocity components may not constitute a realistic flow field. A divergence-free velocity field has to exist in order to describe a plausible incompressible flow situation. Now, with these provisional equation is evaluated in each cell. If and values, continuity

produce a nonzero value, there must be some of that

amount of mass accumulation or annihilation in each cell which is not physically possible. Therefore the pressure at any cell is directly linked with the value of the cell. Now, on one hand the pressure has to be calculated with the help of the nonzero divergence value and on the other, the velocity components have to be adjusted. The correction procedure continue through an iterative cycle until the divergence-free velocity field is ensured. Details of the procedure will be discussed in the subsequent section. 6. Boundary conditions are to be applied after each explicit evaluation for the time step is accomplished. Since the governing equations are elliptic in space, boundary conditions on all confining surface are required. More over, the boundary conditions are also to be applied after every pressure-velocity iteration. The five principal kinds of boundary condition to be considered are 1. 2. 3. 4. 5. rigrid no-slip walls, free-slip walls inflow boundaries outflow boundaries, and periodic (repeating) boundaries.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2031/31_3.htm[6/20/2012 5:00:58 PM]

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2031/31_3.htm[6/20/2012 5:00:58 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 32:

The Lecture deals with:

MAC Formulation

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2032/32_1.htm[6/20/2012 5:00:24 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 32:

MAC Formulation
The region in which computations are to be performed is divided into a set of small cells and (Fig. 32.1). having edge lengths

Figure 32.1: Discretization of a three-dimensional domain.


With respect to this set of computational cells, velocity components are located at the centre of the cell faces to which they are normal and pressure and temperature are defined at the centre of the cells. Cells are labeled with an index the cell number as counted from the origin in the is the pressure at the centre of the cell velocity at the centre of the face between cells 32.2). and , while and which denotes is the x-direction and so on (Fig. directions respectively. Also

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2032/32_2.htm[6/20/2012 5:00:24 PM]

Objectives_template

Figure 32.2: Three-dimensional staggered grid showing the locations of the discretized variables.
Because of the staggered grid arrangements, the velocities are the nodal points, but whenever required, they are to be found by interpolation. For example, with uniform grids, we can write Where a product or square of such a quantity

appears, it is to be averaged first and then the product to be formed.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2032/32_2.htm[6/20/2012 5:00:24 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 32:

Convective terms are discretized using a weighted averaged of second upwind and space centered scheme (Hirt et al., 1975). Diffusive terms are discretized by a central differencing scheme. Let us consider the discretized terms of the x-momentum equation (Figure 32.2)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2032/32_3.htm[6/20/2012 5:00:25 PM]

Objectives_template

with

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2032/32_3.htm[6/20/2012 5:00:25 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:

The Lecture deals with:

MAC Formulation (contd...)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2033/33_1.htm[6/20/2012 5:01:26 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:

Factor

is chosen in such a way that the differencing scheme retains something of is between 0.2 and 0.3. As mentioned earlier, the quantity is now

second-order accuracy and the required up-winding is done for the sake of stability. A typical value of evaluated explicitly form the discretized form of equation (27.2) as

where

Similarly, we evaluate (33.1) (33.2) As discussed earlier, the explicitly advanced tilde velocities may not necessarily lead to a flow field with zero mass divergence in each cell. This implies that, at this stage the pressure distribution is not correct, the pressure in each cell will be corrected in such a way that there is no net mass flow in or out of the cell. In the original MAC method, the corrected pressures were obtained from the solution of a Poisson equation for pressure. A related technique developed by Chorin (1967) involved a simultaneous iteration on pressure and velocity components. Vieceli (1971) showed that the two methods as applied to MAC are equivalent. We shall make use of the iterative correction procedure of Chorin (1967) in order to obtain a divergence-free velocity field. The mathematical methodology of this iterative pressure-velocity correction procedure will be discussed herein.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2033/33_2.htm[6/20/2012 5:01:26 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:

The relationship between the explicitly advanced velocity component and velocity at the previous time step may be written as

(33.3)

where

is only the contribution from convection and diffusion terms. On

the other hand, the corrected velocity component (unknown) will be related to the corrected pressure (also unknown) in the following way:

(33.4)

Form Equations (33.3) and (33.4)

Where the pressure correction may be defined as

Neither the pressure correction nor is the quantity

is explicitly know at this stage.

Hence, one cannot be calculated without the help of the other. Calculations are done in an iterative cycle and we write Corrected Estimate Correction

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2033/33_3.htm[6/20/2012 5:01:27 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:

In a similar way, we can formulate the following array:

(33.5)

(33.6)

(33.7)

(33.8)

(33.9)

(33.10)

The correction is done through the continuity equation. Plugging-in the above relationship into the continuity equation (27.1) yields

(33.11)

Or

(33.12)

In deriving the above expression, it is assumed that the pressure corrections in the neighboring cells are zero. Back to be calculations, we can write

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2033/33_4.htm[6/20/2012 5:01:27 PM]

Objectives_template

Or

(33.13)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2033/33_4.htm[6/20/2012 5:01:27 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:

In order to accelerate the calculation, the pressure correction equation is modified as

(33.14)

where

is the overrelaxation factor. A value of

is commonly used. The value of

giving most rapid convergence, should be determined by numerical experimentation. After calculating , the pressure in the cell is adjusted as (33.15) Now the pressure and velocity components for each cell are corrected through an iterative procedure in such a way that for the final pressure field, the velocity divergence in each cell vanishes. The process is continued till a divergence-free velocity is reached with a prescribed upper bound; here a value of 0.0001 is recommended. Finally, we discuss another important observation. If the velocity boundary conditions are correct and a divergence-free converged velocity field has been obtained, eventually correct pressure will be determined in all the cells at the boundary. Thus, this method avoids the application of pressure boundary conditions. This typical feature of modified MAC method has been discussed in more detail by Peyret and Taylor (1983). However it was also shown by Brandt, Dendy and Ruppel (1980) that the aforesaid pressure-velocity iteration procedure of correcting pressure is equivalent to the solution of Poisson equation for pressure. As such from Eqn. (33.11) we can directly write as

(33.16)

The Eqn. (33.16) can be solved implicitly using appropriate boundary condition for p' at the confining boundaries.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2033/33_5.htm[6/20/2012 5:01:27 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 34:

The Lecture deals with:

Boundary Conditions

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2034/34_1.htm[6/20/2012 5:02:02 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 34:

Boundary Conditions
So far we have not discussed the boundary conditions. However, they are imposed by setting appropriate velocities in the fictitious cells surrounding the physical domain (Figure 34.1).

Figure 34.1; Boundary conditions and fictitious boundary cells


Consider, for example, the bottom boundary of the computational (physical) mesh. If this boundary is to be a rigid no-slip wall, the normal velocity on the wall must be zero and the tangential velocity components should also be zero. Here we consider a stationary wall. With reference to the Figure 34.1, we have for i =2 to ire and

k =2 kre

If the right side of the wall is a free-slip (vanishing shear) boundary, the normal velocity must be zero and the tangential velocities should have no normal gradient.

for i =2 to ire and

j =2 to jre

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2034/34_2.htm[6/20/2012 5:02:02 PM]

Objectives_template

If the fornt plane is provided with inflow boundary conditions, it should be specified properly. Any desired functional relationship may be recommended. Generally, normal velocity components are set to zero and a uniform or parabolic axial velocity may be deployed. Hence with reference to Fig. 34.1, we can write

for and

to jre to kre

where

is the horizontal midplane.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2034/34_2.htm[6/20/2012 5:02:02 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 34:
Continuative or outflow boundaries always pose a problem for low-speed calculations, because whatever prescription is chosen it can affect the entire flow upstream. What is needed is a prescription that permits fluid to flow out of the mesh with a minimum where of upstream influence. Commonly used conditions for such a boundary is is the unit normal vector. The boundary condition that has more generality at the outflow is described by Orlanski (1971). This condition allows changes inside the flow field to be transmitted outward, but not vice-versa:

where

is the average velocity at the outflow plane and

represents

or any

dependent variable.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2034/34_3.htm[6/20/2012 5:02:02 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 35:

The Lecture deals with: Numerical Stability Consideration Higher-order Upwind Differencing Sample Results

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2035/35_1.htm[6/20/2012 4:58:26 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 35:

Numerical Stability Considerations


For accuracy, the mesh size must be chosen enough to resolve the expected spatial variation in all dependent variables. Once a mesh has been chosen, the choice of the time increment is governed by two restrictions, namely, the Courant-Fredrichs-lewy (CFL) condition and the restriction on the basis of grid-Fourier numbers . According to the CFL condition, material connot move through more than one cell in one time step, because the difference equations assume fluxes only between the adjacent cells. Therefore, the time increment must satisfy the inequality.

(35.1)

where the minimum is with respect to every cell in the mesh. Typically,

is chosen

equal to one-fourth to one-third of the minimum cell transit time. When the viscous diffusion terms are more important, the condition necessary to ensure stability is dictated by the restriction on the Grid-Fourier numbers, which result in

(35.2)

in dimensional form. After non-dimensionilization, this leads to

(35.3)

The final

for each time increment is the minimum of the

's obtained from equations

(35.1) and (35.3) The last quantity needed to ensure numerical stability is the upwind parameter general, should be slightly larger than the maximum value of or occurring in the mesh, that is, . In

(35.4)

As a ready prescription, a value between 0.2 and 0.4 can be used for . If is too large, an unnecessary amount of numerical diffusion (artificial viscosity) will be introduced.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2035/35_2.htm[6/20/2012 4:58:26 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 35:

Higher-Order Upwind Differencing


More accurate solutions are obtained if the convective terms are discretized by higherorder schemes. Davis and Moore (1982) use the MAC method with a multidimensional third-order upwinding scheme. Needless to mention that their marching algorithm for the momentum equation is explicit and the stability restriction concerning the CFL condition and is satisfied. The multidimensional third-order upwinding is in principle similar to one dimensional quadratic upstream interpolation scheme introduced by Leonard (1979).

Figure 35.1: Dependent variables


Consider Fig. 35.1, let convective term

and

on a rectangular grid

be any property which can be convected and diffused. The may be represented as

(35.5)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2035/35_3.htm[6/20/2012 4:58:26 PM]

Objectives_template

where the variable

and

are defined as

or

(35.6)

and for

(35.7)

The parameter Leonard (1979).

can be chosen to increase the accuracy or to alter the diffusion like corresponds to the QUICK scheme of

characteristics. It may be pointed out

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2035/35_3.htm[6/20/2012 4:58:26 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 35:
Let us consider two-dimensional momentum equation in weak conservative form which is given by

(35.8)

In non-conservative form this may be written as

(35.9)

Here we introduce a term transport-velocity. The transport velocities for the second and and respectively. While dealing with the third terms on the left hand side are equations in the conservative form, we shall keep this in mind. For example, during discritization of the term of Eq. (35.8) we should remember that v is the transport-velocity associated with this term. It is customary to define the transportvelocity at the nodal point where the equation is being defined. In case of the term we have to refer to Fig. 35.2 and write down the product term as (35.10)

Figure 35.2: Definition of the transport velocity at a point where the momentum equation is being discretized.
Finally the discretization of the term accomplished in the following way: for the -momentum equation will be

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2035/35_4.htm[6/20/2012 4:58:27 PM]

Objectives_template

for

(35.11)

for Where

(35.12)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2035/35_4.htm[6/20/2012 4:58:27 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 35:

Sample Results
For unsteady laminar flow past a rectangular obstacle in a channel, Mukhopadhyay, Biswas and Sundararajan (1992) use MAC algorithm to explicitly march in time. Their results corroborated with the experimental observation of Okajima (1982). A typical example of numerical flow visualization depicting the development of von Karman Vortex Street is illustration in their work. The cross-stream velocity vectors behind a delta-winglet placed inside a channel are shown by Biswas, Torri et al. (1996) who used MAC to solve for three-dimensional flow field in a channel containing delta-winglet as a vortex generator. The MAC algorithm has been extensively used by the researchers to solve flows in complex geometry. Braza, Chassaing and Ha-Minh (1986) investigated the dynamic characteristics of the pressure and velocity fields of the unsteady wake behind a circular cylinder using MAC algorithm. Robichaux, Tafti and Vanka (1992) deployed MAC algorithm for large eddy Simulation (LES) of turbulent channel flows. Of course, they performed the time integration of the discretized equation by using a fractional step method (Kim and Moin, 1985). Another recent investigation by Kim and Benson (1992) suggests that the MAC method is significantly accurate and at the same time the computational effort is reasonable.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2035/35_5.htm[6/20/2012 4:58:27 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 36:

The Lecture deals with: Energy Equation Retention of Dissipation Solution Procedure

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_1.htm[6/20/2012 4:56:50 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 36:

Solutions of Energy Equation


The energy fir incompressible flows, neglecting mechanical work and gas radiation, may be written as (36.1) where is the viscous dissipation given as

Equation (36.1) mar be non-dimensionalzed in the following way:

Substituting the above variables in equation (36.1) we obtain

(36.2)

where becomes

is the nondimensional form of

. Finally, the normalized energy equation

(36.3)

where

the Peclet number is given as

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_2.htm[6/20/2012 4:56:50 PM]

Objectives_template

or

Further, Ec, the Eckert number is

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_2.htm[6/20/2012 4:56:50 PM]

Objectives_template

Module 5: Solution of Navier-Strokes Equation for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 36:

Retention of Dissipation
The dissipation term number, is frequently neglected while solving the energy equation for However, even at a low Mach is very small. Let us look at these aspects. Since incompressible flows. As the Mach number can be important if

and

where R is the Gas constant Let the local acoustic velocity Then,

and and Mach number

Hence,

or

In general for incompressible flows small temperature difference, i.e., if

and

Hence Ec is small. But for very

is slightly larger than 1, Ec might assume a

large value and importance of including dissipation arises. However, for computing incompressible convective flows, the viscous dissipation is neglected in this chapter and we continue with the steady state energy equation.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_3.htm[6/20/2012 4:56:50 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 36:

Solution Procedure
The steady state energy equation, neglecting the dissipation term, may be written in the following conservative form as

(36.4)

Equation (36.4) may be written as (36.5) Where (36.4) and value of is the discretized convective terms on the left-hand side of Equation stands for the iterative counter. To start with, we can assume any guess throughout the flow field. Since are known from the solution of

momentum equation hence Equation 36.4 is now a linear equation. However, from the and known correct values of and the left-hand side of Equation guess value if 36.4 is evaluated. A weighted average scheme or QUICK scheme may be adapted for discretization of the convective terms. After discretizing and evaluating right-hand side of Equation (36.5) we obtain a Poisson equation for the temperature with a source terms on the right hand side. Now, we shall follow SOR technique for solving Equation (36.5). Consider the discretized equation as

where

or

(36.6)

where

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_4.htm[6/20/2012 4:56:50 PM]

Objectives_template

in Equation (36.6) may be assumed to be the most recent value and it may be written as In order to accelerate the speed of computation we introduce an . Thus (36.7) where is the previous value, the most recent value and the calculated

overrelaxation factor

better guess. The procedure will continue till the required convergence is achieved. This is equivalent to Gauss-Seidel procedure for solving a system of linear equations.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_4.htm[6/20/2012 4:56:50 PM]

Objectives_template

Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 36:

The Flow/chart can be described in the following schematic diagrams (Figure 36.1)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_5.htm[6/20/2012 4:56:50 PM]

Objectives_template

MAIN: Main Program that calls all the modules and subroutines. CONTI : Module for solving continuity equation BCC: Boundary conditions for the confining surfaces BCD: Boundary condition for obstacte CEQCP: Continuity equation for constant property cases DIV: Velocity divergence in each cell E PSI: Pre-defined small numerical value ITI: Iterative counter for the continuity equation BCNS: Boundary conditions for the Navier-Stokes equations VELALT: Changes the converged velocity arrays, i.e., makes the converged values at (n+1)th in time step as nth time step to start the next time step. TICORR: Calculates dt DTMAX: Maximum discrepancy of the dependent variables between two time steps STAT: Predefined small numerical value NSEQCP: Discretized Navier-Stokes equations for constant property BCOV: Special Boundary conditions for obstacles TIGRAD: Calculation of change in dependent variables between two time steps ITA: Iterative counter for calculating the Navier-Stokes equations ENERGY: Module for calculation of ENERGY equation BCT: Boundary conditions for temperatures TEQCP: Discretized Energy equation for constant property cases DT: Maximum discrepancy of temperature in any cell between two iterative steps TSTAT: Predefined small numerical value TEMALT: Changes the temperature arrays from (m+1) iterative level m th iterative level to start the next iteration

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2036/36_5.htm[6/20/2012 4:56:50 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 37:

The Lecture deals with:

Overall Strategy for solving the Governing Equations

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_1.htm[6/20/2012 4:58:59 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 37:

Introduction
This chapter describes the strategy of Flow Analysis by solving transport equations in curvilinear coordinates. The prediction procedure in this text can be summarized as follows: Arbitrary two-dimensional (plane or axi-symmetric) geometries Incompressible flow of Newtonian fluids Steady or unsteady flow processes The numerical method employs a fully conservative finite volume (FV) method for the solution of the flow equations. The main features of the numerical method are: Non-orthogonal boundary fitted grids Collocated (non-staggered) arrangement of dependent variables Use of Cartesian vector and tensor components Pressure-correction approach of SIMPLE (Patankar and Spalding, 1972) for the coupled system of equations Strongly implicit method of Stone (1968) for solving the linear equations system The solution method is formally second-order accurate, since all approximations are performed in a central-difference manner. However, provision is made for switching from the central-difference scheme (CDS) to the first-order accurate upwind-differencing scheme (UDS) for the convection terms, or to combine the two in a specified ratio. For discretization with respect to time, a first order fully implicit scheme as well as a second order Crank-Nicolson scheme can be used.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_2.htm[6/20/2012 4:58:59 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 37:

Continuity and Momentum Equations


The equations describing fluid flow emerge from the conservation laws for mass, momentum and energy. In this section, the equations for the conservation of mass and momentum are discussed. The scalar equation for energy transport will be discussed in a section presented later.

Continuity Equation (Conservation of mass):


(37.1)

Momentum Equation (Conservation of momentum):


(37.2)

Here is the mass density, traction) and

is the velocity field,

is the diffusion flux vector (or surface

is the source vector from conservative forces (emerging from pressure

gradients and gravity). In Cartesian co-ordinates ( x 1, x2, x3 ) with orthonormal basis and can be expressed as, vectors i , j and k, the vectors ,

Here (with j as dummy index, j =1,2,3) and (37.4) Physically, si is the i-th component (i =1,2,3 ) of the diffusion flux vector (or surface traction) at a point on the surface of local unit normal of the infinitesimal element, and represents the stress tensor component acting on the j -th plane in the i-th direction. The can be interpreted as a conservative force arising out of the absolute source vector pressure gradients (in which gravity effects are included), and P represents absolute pressure. For any continuum where net distributive moments are absent, the stress tensor is symmetric ( = ). For a Newtonian fluid, the stress tensor components are given by (37.3)

(37.5)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_3.htm[6/20/2012 4:58:59 PM]

Objectives_template

where

is the Kronecker delta, (

=1 for i= j, and 0 for i j ), is the molecular . The term

viscosity and is the Bulk viscosity, conventionally given by represents the component of the strain rate tensor, given by

(37.6)

For incompressible fluid flow,

. Hence for incompressible flow of a Newtonian fluid,

the stress tensor components can be expressed as

(37.7) The continuity equation is a scalar equation, and can be expanded in the Cartesian system of co-ordinates ( x 1 = x , x 2 = y , x 3 = z ) into a single equation

(37.8) The momentum equation is a vector equation, and therefore is expandable into three independent equations,

(37.9a)

(37.9b)

(37.9c)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_3.htm[6/20/2012 4:58:59 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 37:

Discretization of the fluid domain for Continuity and Momentum equations


In this section, the discretization procedure for the continuity and momentum equations for fluid flow is described. The procedure for the scalar equation of energy transport will be illustrated subsequently. Thus, in general, the present method provides the possibility for computation of the following flow field variables, Velocity component in the x direction: U 1= U Velocity component in the y direction: U 2= V Velocity component in the z direction: U 3= W Pressure P Temperature T For two-dimensional flow, the flow field in the plane remains invariant in all the planes parallel to it. For axisymmetric cases, U , V and W respectively represent the axial, radial and circumferential components of the velocity field . For turbulent flow, averaged forms of the continuity and momentum equations together with the transport equations for turbulent kinetic energy and the dissipation rate can be solved. The flow field variables represent time averaged mean values. Turbulent flows, however, are not considered in this lecture.

Figure 37.1: Coordinate System and base Vectors

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_4.htm[6/20/2012 4:59:00 PM]

Objectives_template

Fig. 37.1 shows the Cartesian coordinate system

with base vector

and

and

a typical control volume together with the identification of the important points.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_4.htm[6/20/2012 4:59:00 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 37:


Equations (37.8) and (37.9) are to be integrated over a finite number of control volumes covering the solution domain. The time discretization will be discussed in a subsequent section. Here, Gauss' divergence theorem is used, which transforms the volume integral of a vector divergence into a surface integral: (37.10) V is the volume of an element, and A is the area of its surface, being the outward

directed surface vector normal to this surface. The right hand side of Eq. (37.10) represents the net flux of the transported quantity through the control volume surface. It must be equal to the net source given by the right hand sides of Eqs. (37.8) and (37.9). In the case of the continuity equation, there is no source, i.e the net mass flux must be zero. For the momentum equations the right hand side (pressure and gravitational force expressed by Eq. (37.4). The surface integrals are evaluated on each control volume face and summed up. For a two-dimensional case the third dimensional is unity, and the fluxes in this direction are zero. Since the third dimension is unity, the cell face areas are equal to the length of the line segments connecting the two vertices. The fluxes are by definition (Eq. (37.10)) taken positive when directed outwards. It should be noted that the outward flux through the e- cell face, I e , is the inward flux through the w-cell face of the neighbouring control volume, i.e, need to be calculated, namely then becomes (37.11) Where the I's represent the cell face fluxes, (37.12) The surface vector on the cell faces are defined as ( for e- and n- cell faces): and This can be represents the external force

advantageously used in the computer code, so that only two fluxes per control volume The general form of the discretized equation

(37.13)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_5.htm[6/20/2012 4:59:00 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 37:


The discretized representations of the continuity and momentum equations are as the following. In the case of continuity equation , the vector in Eqs. (37.10) and (37.12) stands for

. The positive, outward directed fluxes through the east and north cell faces become: (37.14)

F 1 and F 2 denote the average mass fluxes in the positive coordinate x1 , x2 , respectively. The continuity equation can be written as: (37.15)

U e ,Y e ,Un and

in Eqs. (37.14) represent the average values of the Cartesian velocity

components at the appropriate cell faces. The procedure of calculating these values from the nodal values are described later. The left hand side of the momentum equations (Eq.(37.2) has two parts: convection and diffusion. These will be treated separately. For the convection fluxes and (37.12) is substituted by for U - equation yielding: in Eqs. (37.10)

(37.16)

In the case of the diffusion fluxes, I D , the vector

stands in the U - equation for

see Eqs. (37.3) and (37.4). Thus according to Eq. (37.12) we get:

(37.17)

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2037/37_6.htm[6/20/2012 4:59:00 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 38:

The Lecture deals with:

Solution Procedure in curvilinear Coordinates

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2038/38_1.htm[6/20/2012 4:59:31 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 38:

The stresses .The quantities

and and

contain velocity derivatives with respect to Cartesian become

coordinates, see Eq. (37.7); these have to be expressed in terms of general coordinates

(38.1)

Where J is the Jacobian of the coordinate transformation

defined by:

(38.2) The Jacobian and the derivatives of Eq. (38.1) need to be evaluated at the cell face locations e and n (Fig 37.1). The relations for the e-face will be derived in the following text. The remaining equations follow by analogy. For the e face, the (from P to E), and coordinate refer Fig 37.1 is taken to connect the points P and E runs along the e cell face (form se to ne). The derivatives

etc., can be approximated as (refer Fig. 37.1):

(38.3)

The origin of the to

and

coordinates can be defined as desired. We can calculate is set equal . The Jacobian and

i.e the distance between points P and E; similarly, i.e. the length of the cell face between vertices

can then be approximated by:

(38.4)

Thus for an orthogonal grid

The derivatives in Eqs. (38.1) can now be

expressed by involving expressions (38.3) and (38.4) to yield:

(38.5)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2038/38_2.htm[6/20/2012 4:59:31 PM]

Objectives_template

The denominator in the above expressions represents the volume defined by the scalar product of and . This will be donated as hereafter.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2038/38_2.htm[6/20/2012 4:59:31 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 38:

When the expressions (37.7) for

are introduced in Eq. (37.17), and relations of the and

form (38.5) are used, the following expressions evolve for the diffusion fluxes

(38.6)

(38.7)

Note once again that analogously to vector

and

also

is defined and the distance

as the scalar product of the surface vector

(38.8) For the V-momentum equation the convection and diffusion fluxes are obtained as:

(38.9)

and

(38.10)

(38.11)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2038/38_3.htm[6/20/2012 4:59:31 PM]

Objectives_template

The source terms in the momentum equations are integrated over the control volume. The integral is evaluated as (38.12)

The gradients 37.1) now.

and

(refer. Eq. (37.4) ) need to be evaluated at point P ( Fig.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2038/38_3.htm[6/20/2012 4:59:31 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 38:


By analogy to Eqs. (38.1), (38.2) and (38.4), these gradients are calculated as:

(38.13)

The denominator in Eq. (38.13) is equal to the control volume vector product of the two vectors and

(it represents the

connecting the middle points of opposite

of control volume, which is equal to the area enclosed by the CV-faces). Therefore, the source terms for the two momentum equations can be approximated as:

(38.14)

Other source terms can be evaluated in the similar manner. In some cases cell face fluxes or parts therefore may also be included into the source term. For example, the wall shear stress may be integrated over the CV face and added to S. For example, the U-component: (38.15) where is the component of the wall shear stress in the direction of the U-velocity

component.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2038/38_4.htm[6/20/2012 4:59:31 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 39:

The Lecture deals with:

Scalar Transport

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2039/39_1.htm[6/20/2012 4:55:35 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 39:

Scalar Transport Equation


Often additional transport equations, such as temperature, species concentration, in the case of turbulent flows- turbulent kinetic energy and its dissipation rate are coupled with the flow equations and must be solved simultaneously. All these transport equations can be written in general form as:

(39.1) where represents the scalar quantity in question, is its diffusive flux

(39.2)

and

represents sources or sink of

. This equation is integrated in the same way as has less terms than

the momentum equations; it is simpler, since

The convective fluxes are, by analogy to Eq. (37.16), calculated as:

(39.3)

The diffusion flux through the e face is evaluated as (refer to Eq. (37.13)):

(39.4)

The derivatives to the expression:

and

are evaluated according to Eqns. (38.1) to (38.5), leading

(39.5)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2039/39_2.htm[6/20/2012 4:55:35 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 39:


The similarity with Eq. (38.6) for the U-equation, which has only some extra terms due to the presence of two derivatives in as opposed to one in

The above flux expressions can also be written as:

(39.6)

where

is the surface vector defining the segment of surface =constant bounded by

nodes P and E (Fig. 37.1) (39.7) The underlined part of is often called as cross-diffusion contribution . The term

vanishes if the grid is orthogonal, and is smaller than the remaining part if the grid nonorthogonality is not severe. In a similar manner, for the north cell face we obtain:

(39.8)

Usually, the source terms are integrated over the cell volume, (39.9) where is the volumetric unit source at the central node P. The source term can also : (39.10) This dependence on part of exists. is artificially introduced (see Patankar, 1980) when a negative

be split into two parts, one of which being a function of

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2039/39_3.htm[6/20/2012 4:55:35 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 39:

Final Form of Discretised Equations


Invoking the flux components in discretized form and the discretized sources in Eqn. (37.11), one obtains an algebraic counterpart of the differential equation. The values of the dependent variables at the cell boundary location (e, w, n, s, ne, nw, se, sw) can be expressed in terms of nodal values; this gives an equation which provides a linkage between the node in the cell centre and the surrounding nodes. A system of M such equations, where M is the total number of control volumes, can be arranged in a matrix equation to read: (39.11) where is a matrix, is the dependent variable vector of M nodal values, are

and {S} is a similar vector containing source terms. The matrix [A] is banded (i.e. it has non-zero coefficients only on some diagonals) if the values in the vector arranged in a given order (e.g. along lines of constant grid index I from J=1 to JMAX, starting from I =1 to IMAX). A banded coefficient matrix makes the iterative solution easier. The solution algorithm recommended for these linear systems is Strongly Implicit Procedure (SIP) of Stone (1968). Other methods (such as BI-CGSTAB of Van der Vorst, 1992) can also be used and easily incorporated in the computer program.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2039/39_4.htm[6/20/2012 4:55:36 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 39:


For an iterative solution algorithm it is usual to write Eg. (39.11) for the central point P (Cell center) as: (39.12) Where "nb" denotes the neighboring nodes. The coefficients are in Eg. (39.11). For the stability of an iterative Whether this condition is satisfied,

solution method it is sufficient to have

depends on the interpolation practice used to evaluate the convection terms (U e , U n in Eqn (37.16)) and cross-derivative diffusion terms (U ne , U se in Eqn (37.5)) For faster convergence of the overall solution procedure, under- relaxation (Patankar, 1980) may be deployed. The change of the dependent variable from one iteration to the next is multiplied by an under-relaxation factor

(39.13)

where superscript n+1 and n denote new and old iteration levels, and can be arranged in a form equivalent with Eqn. (39.12) to yield:

This

(39.14)

where superscript n+1 has been omitted. In the program, is simply taken to be and so that the

structure of Eqn (39.12) is preserved. The Coefficients and and contain contributions of the convection and diffusion fluxes

. Their exact form depends on the interpolation method for evaluating the CV

face values of the dependent variables.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2039/39_5.htm[6/20/2012 4:55:36 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 40:

The Lecture deals with:

Differencing Schemes Time Discretization

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2040/40_1.htm[6/20/2012 4:55:06 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 40:

Differencing Schemes
In the flux expressions (37.16), (38.6-38.11) and the pressure gradient terms (38.14) we calculate the values of the velocity components and pressure at the specified locations (e, w, n, s, ne, se, nw, sw) on the CV appear. These need to be expressed in terms of nodal values by means of suitable interpolation schemes. Several options are possible, the most natural one being linear interpolation, by which the values on the e- and n- CV faces are calculated as:

(40.1)

with

and

being linear interpolation factors:

(40.2)

Such interpolation is referred to as Central Differencing Scheme (CDS). An alternative interpolation practice, which is also widely used, is the Upwind Differencing Scheme (UDS) Yielding:

(40.3)

The CDS results in negative coefficients for the downstream neighbour nodes in Eqn (39.12) if convection dominates strongly over diffusion. The negative coefficients may cause unphysical oscillations in the solution. Sometimes the solution does not converge. The UDS, on the other hand, is unconditionally stable. However UDS introduces numerical errors known as artificial or false diffusion. One can chose the option between using CDS, UDS or a combination of the two. The combination can be achieved via the so called deferred correction approach, i.e. the convection flux is taken to be: (40.4) If the convection fluxes are calculated from UDS Expressions, and if the two fluxes are blended. the

CDS expressions are employed; for

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2040/40_2.htm[6/20/2012 4:55:06 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 40:


In order to improve the stability of the iterative solution procedure, only the UDS convection flux is treated implicitly, i.e. the coefficients The contribution of the flux part which is multiplied by contain only UDS contribution. (see Eq. (40.4)) is evaluated

which values from the previous iteration and added to the source term. The same is done with the cross diffusion (or stress) terms: these are also evaluated on each CV face, summed up and added to the source term. The implicitly treated part of Eqs. (39.5) and (39.8) is contained in the coefficients and respectively:

(40.5)

Similar Expressions follow for the w- and s-CV faces, where the explicit part of the flux would be denoted and respectively. In the code, however, for the CV around point P is taken to be for the CV around point W, and so on. The same gat the following form:

treatment is also applied to the momentum equations; see Eq. (38.6) for example, where the implicit parts are easily identified. Finally, the coefficients

(40.6)

The term into brackets corresponds to the continuity equation. After each outer iteration steps, the mass fluxes are corrected so that the bracketed term vanishes identically and, therefore, are not considered in the program. The pressure terms (Eq. (38.14)), the multiplied parts of the convection fluxes form the S-term in Eq .

(Eq. (40.4)), and the extra diffusion terms (39.12). and

are afterwards modified by the under-relaxation parameters as

described in the previous section. For the scalar equation, the source is taken instead of the pressure term. The latter is taken as a part of , and

may be split as in Eqs. (39.9) and (39.10); in this case is added to

. This improves the stability of the iterative solution algorithms, by

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2040/40_3.htm[6/20/2012 4:55:06 PM]

Objectives_template

enhancing the diagonal dominance (of course, only if

>0, cf. Patankar, 1980).

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2040/40_3.htm[6/20/2012 4:55:06 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 40:

Time Discretization
The generalized transport equation for unsteady flows may be written as (40.5) where is the transported variable (i.e. the velocity components, the temperature, the the coefficient of diffusivity and is the source term.

concentration etc.)

Fig. 40.1: Discretization in time coordinate


In addition to the spatial discretization a discretization in time direction in now required. Time may be regarded as an additional coordinate, therefore a spatial problem can be considered as a sequence of levels at several instants, called time levels (Fig. 40.1). Since time evolves in one direction, it is also called "one way" coordinate. In contrast to spatial discretization the variable values have to be known at a previous time level (starting from the given initial values). New time level are always extrapolated from the earlier one. Integration of Eq. (40.5) over a CV and the time interval (t n-1, t n) leads to:

(40.6) The volume integrals are treated the same way as discussed earlier. Equation (40.5) can be written as:

(40.7)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2040/40_4.htm[6/20/2012 4:55:06 PM]

Objectives_template

Carrying out the time integration leads to: (40.8)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2040/40_4.htm[6/20/2012 4:55:06 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 40:


The source and coefficients are assumed as average values taken at a time level and are therefore specified by the superscript quantities taken at the time level (40.8) may be taken as follows: and with

. They can be expressed by

respectively. The average values in Eqn..

(40.9) (40.10) The theoretical limiting values for the blending factor However, when are zero and one, respectively.

is set equal to zero the time average of the fluxes and sources are all fluxes are

taken completely at the old time level resulting in an explicit scheme. Therefore, may also be chosen in the interval (0,1]. Practically, in the case of calculated at the new time step, resulting in a fully implicit scheme (implicit Euler scheme) with very good stability properties. There is no restriction for the time step with respect to numerical stability. The equations for steady problems result from the limit For the Crank-Nicolson scheme , which is of second orde accuracy is obtained.

For this scheme there exists a limiting value for the time step ensuring numerical stability, but due to the complexity of the underlying differential equation it is not possible to estimate this limiting value in advance.

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

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2040/40_5.htm[6/20/2012 4:55:06 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 41:

The Lecture deals with:

Calculation of Pressure

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2041/41_1.htm[6/20/2012 4:54:35 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 41:

Calculation of Pressure
The method of pressure calculation can be derived from the SIMPLE algorithm of Patankar and Spalding (1972) . A detailed description can be found in Peric (1985) and Ferziger and Peric (1999). The velocity field obtained by solving the discretized form of the momentum equation (37.2) does not necessarily satisfy mass conservation. To check this, the mass fluxes through the CV faces (Eq. (37.14)) have to be calculated, requiring the evaluation of the velocity components at CV face locations e, w, n, and s. The method employed for the momentum equations, are not suitable for this purpose, since oscillatory pressure fields may then result from the SIMPLE algorithm. An interpolation practice which avoids this problem has been suggested by Patankar and successfully used by Hsu (1981), Rhie and chow (1983) and Peric (1985) . The discretized momentum equations serve as the basis for this interpolation. Equations (39.12) can , for this purpose, be rewritten as follows:

(41.1)

here the pressure terms are excluded from the rest of the source terms as and

and

and written explicitly, leaving

respectively. To obtain the velocity at the

e-cell face (Fig. 41.1), the terms on the right hand side of Eq. (41.1) are interpolated individually. All terms except the pressure difference across the cell face are interpolated linearly, using CDS expressions (40.1).

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2041/41_2.htm[6/20/2012 4:54:36 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 41:


The pressure difference is calculated from values at nodes P and E, ( actually for a control volume constructed around the e-location, for a staggered variable arrangement), as indicated in Fig. 41.1:

Fig. 41.1: Interpolation of velocity components for mass flux calculation: control volume around e-face

(41.2)

The overbar in Eqs. (41.2) denotes linear interpolation from values at nodes on either side of the cell face. For computing convenience, Equations (41.2) can be rewritten as following equation( Eqs. (41.1)):

(41.3)

Thus, the cell face velocities are made dependent on the pressure at neighbouring nodes, employing the basic idea of staggered grids which is successfully used for orthogonal grids (see Patankar, 1980) . The velocity components at the other cell faces are calculated in a similar manner.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2041/41_3.htm[6/20/2012 4:54:36 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 41:


Velocities calculated from Eqs. (41.2) or (41.3) are deployed to calculate the mass fluxes F 1 and F 2 using to Eq. (37.14). When substituted in the continuity equation (37.15), these fluxes leave a mass imbalance (source) i.e.: (41.4) Where the superscript * is used to denote the uncorrected values. Next, corrections are sought such that the corrected mass fluxes satisfy the continuity equation, i.e.: (41.5) where:

(41.6)

Flux corrections, according to Eg. (37.14), result from velocity corrections, which are again linked to the pressure corrections in the spirit of the SIMPLE algorithm, e.g. (see Eq. (41.1)):

(41.7)

Corrections to the cell face velocities are derived in an analogous way, see Egs. (41.3). in the flux expressions, however, the pressure difference across the face is dominating (in the above case ), and in case of an orthogonal grid the contribution from the cross-derivatives would be zero (see Eq. (37.14)). (In the expression for the velocity components U and V two pressure gradients are always present, unless the grid is Cartesian.) By neglecting the cross-derivative terms, the flux corrections reduce to (for e-face):

(41.8)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2041/41_4.htm[6/20/2012 4:54:36 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 41:


Similar expressions follow for the other cell faces. Combining Eqs. (41.4) and (41.5) yields a pressure-correction equation of the same structure as Eq. (39.12) (41.9) where the source term comes from Eq. (41.4), and the coefficients a nb are:

(41.10)

The cross-derivatives have been omitted in flux corrections (e.g.

that would

have appeared in expressions (41.8)). This reduces the pressure correction equation to a penta-diagonal one, which is relatively easy to solve. If, on the other hand, the full form of the corrections is taken into account, a nine-diagonal matrix is obtained. The expressions for the coefficients for such matrix are much more complex (see Peric, 1985). When the grid non-orthogonality is not severe (angle between grid lines in the range 45 0 to 1350 ), this simplification does not influence significantly the rate of convergence of the overall solution procedure. The final result is not affected by the simplifications introduced in deriving the pressure-correction equation, since this equation serves only to give corrections for the velocity and pressure fields. Finally at the , converged stage, all these corrections tend to zero. Hence, as long as the procedure converges, these simplifications are acceptable. Since the pressure-correction is derived from the continuity constraint, the corrected

pressure and velocity components do not, in general, satisfy the momentum equations. Therefore, there is the possibility for further pressure corrections, similar to Issa's (1986) PISO algorithm, which can improve the momentum balance without destroying the achieved mass conservation. The use of such additional corrections, whose number can be specified by the user, is recommended in the case of highly non-orthogonal grids. Usually, one additional correction is sufficient. In all correction steps, in order to stabilize the solution procedure, the pressure is , i.e.: corrected only by a fraction of (41.11)

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2041/41_5.htm[6/20/2012 4:54:36 PM]

Objectives_template

The

constant

has

value

between

and

1,

and

is

called pressure

underrelaxation factor .

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2041/41_5.htm[6/20/2012 4:54:36 PM]

Objectives_template

Module 6: Solution of Navier-Stokes Equations in Curvilinear Coordinates Lecture 41:

References
1. S. V. Patankar and D. B. Spalding, A Calculation Procedure for the Heat, Mass and Momentum Transfer in Three-Dimensional Parabolic Flows, Int. J. Heat and Mass Transfer, Vol. 15, pp. 1787-1806, 1972. 2. S. V. Patankar, Numerical Heat Transfer and Fluid Flow, Hemisphere Publishing Co., Washington D.C., 1980. 3. H.L. Stone, Iterative Solution of Implicit Approximations of Multidimensional Partial Differential equations, SIAM. J. Numerical Analysis, Vol. 5, pp. 530-558, 1968 4. M. Peric, A Finite Volume Method for the Prediction of Three-dimensional Fluid Flow in Complex Ducts, Ph.D. Thesis, University of London, 1985. 5. C. Hsu, A Curvilinear-coordinate Method for Momentum, Heat and Mass Transfer in Domains of Irregular Geometry, PhD Thesis, University of Minnesota, USA 1981 6. C.M. Rhie and W.L. Chow, A Numerical Study of the Turbulent Flow Past an Isolated Airfoil with Trailing Edge Separation, AIAA J. Vol 21, pp. 1525-1532, 1983. 7. H.A. Vander Vorst, BI- CGSTAB: A fast and smoothly converging variant of BI-CG for the solution of Nonsymmetric Linear Systems, SIAM. J. Sci Stat Comput., Vol 12, pp 631-644, 1992 8. J.H. Ferziger and M. Paric, Computational Method for Fluid Dynamics; Second Edition Springer - Verlag, Berlin-Heidelberg, 1999 9. R.I. Issa, A.D. Gosman, and A.P. Watkins, The Computation of Compressible and Incompressible Recirculating Flows by a Non-Iterative Implicit Scheme, J. Comput. Phys, Vol -62, pp 66-82, 1986.
Congratulations, you have finished Lecture 41.

file:///D|/chitra/nptel_phase2/mechanical/cfd/lecture%2041/41_6.html[6/20/2012 4:54:36 PM]

You might also like