Professional Documents
Culture Documents
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
(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
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
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
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
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
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
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.
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,
in Fig.1.2, then the point immediately to the right is designated as and the point directly below 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
1 of 1
6/19/2012 4:36 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_2.htm
...
(2.1)
Mathematically, Eq. (2.1) is an exact expression for In practice, any function is small and any higher-order term of
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
(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
or
(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)
1 of 2
6/20/2012 12:16 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_3.htm
(2.8)
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
(2.9)
we obtain
(2.10)
Eq. (2.10) is a second-order central difference form for the derivative point Difference quotients for the
at grid
[Forward difference]
[Backward difference]
[Central difference]
of
second
1 of 1
6/20/2012 12:17 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture2/2_5.htm
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 .
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
1 of 1
6/20/2012 12:18 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture3/3_2.htm
Combinations of finite difference quotients for partial derivatives form finite difference expressions for the partial differential equations.
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
(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
Basic Aspects of Finite-Difference Equations Table 3.1: Difference Approximations for Derivatives
grid spacing
1 of 2
6/20/2012 12:19 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture3/3_4.htm
and
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
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
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
. Then if we reconstitute the PDE from FDE and TE, we shall obtain lim (PDE-FDE) = lim (TE) =
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
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
Examining Eq. (3.4) we see that it contains one unknown, namely Thus, the dependent variable at time of and
(4.2)
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
1 of 1
6/20/2012 12:22 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_2.htm
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
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).
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
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
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)
and
(5.8)
1 of 1
6/20/2012 12:24 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture5/5_5.htm
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
) 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
ADI Method
1 of 1
6/20/2012 12:24 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture6/6_2.htm
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
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
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
Explicit Method
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
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
can be obtained by using a linear variation between For parabolic variation between points, and
(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
(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
1 of 1
6/20/2012 12:26 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_2.htm
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
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
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)
(7.4)
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
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
(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
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)
or,
(7.9)
or,
1 of 2
6/20/2012 12:27 PM
Objectives_template
file:///D:/chitra/nptel_phase2/mechanical/cfd/lecture7/7_5.htm
(7.11)
(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
Evaluating the inequality in Eq. (7.12), the two possible situations which must hold simultaneously are
Thus,
Since
Thus,
(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
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
Objectives_template
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
Objectives_template
and S
Objectives_template
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)
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
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
Objectives_template
(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
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
finally leads to
(8.16)
when
which means
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.
Objectives_template
Objectives_template
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)
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.
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)
Objectives_template
Objectives_template
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.
Objectives_template
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
is the boundary of
, .
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 .
The concept of conservative property is to maintain this integral relation in finite difference representation.
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.
Objectives_template
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 10:
Conservative Property
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).
to
(10.3)
(10.4)
Eq. (10.4) state that the rate of accumulation of advective flux rate across the boundary of
in
running from
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.
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)
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).
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
(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.
Objectives_template
The Lecture deals with: The upwind scheme Transportive Property Upwind Differencing and Artificial Viscosity
Objectives_template
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 11:
(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)
(11.4)
Objectives_template
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 .
which is not very reasonable. But at the upstream station ( i = m-1 ) we observe
which indicated that the transportive property is violated. On the contrary, let us see what happens when an upwind scheme is used. We know that for u>0 (11.7) Then for at the downstream location (m+1)
Objectives_template
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.
Objectives_template
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 11:
(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
Objectives_template
(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
(11.12)
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.
Objectives_template
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 12:
Second Upwind Differencing or Hybrid Scheme Some more Suggestions for Improvement
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.
Definition of (12.2b) Now, for and for Finally, for and we get for (12.4) for (12.3)
(12.5)
Objectives_template
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)
(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.
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.
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
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.
Objectives_template
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:
Some more Suggestions for Improvement of Discretization Schemes Some Non-Trivial Problems with Discretized Equations
Objectives_template
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:
(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)
Objectives_template
Module 1: Introduction to Finite Difference Method and Fundamentals of CFD Lecture 13:
(13.4)
(13.5)
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
Objectives_template
So, we get
or (13.7)
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
that it is possible to cross the cell Reynolds number of 2 if C is made less than unity.
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
Objectives_template
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
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:
Objectives_template
Prove that the CFL condition is the stability requirement for the above discretization scheme.
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
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].
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.
Objectives_template
Objectives_template
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.
Objectives_template
(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.
Objectives_template
when
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,
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)
and
(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.
Objectives_template
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.
Objectives_template
(14.11)
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.
Objectives_template
A Generalized Approach for Finite Volume Methods Equations with First Derivatives
Objectives_template
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).
Objectives_template
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)
Applying Green's theorem, (15.3) becomes H.n (15.5) (see Figure 14.5).
and
On a counter-clockwise contour, the outward unit normal where For the continuity equation, and
Objectives_template
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.
Objectives_template
(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.
etc. If
(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.
Objectives_template
Objectives_template
Objectives_template
(16.1)
H.n
(16.2)
H. n
Objectives_template
Objectives_template
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
Objectives_template
and and
(16.6) or,
(16.7)
or,
(16.8) Therefore (16.4) becomes
(16.9)
(16.10)
(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.
Objectives_template
Objectives_template
(17.1)
(17.2)
and
Objectives_template
and
Substitution into eqn. (17.3) generates the following nine-points discretisation of Eqn. (16.1):
(17.4)
Objectives_template
and
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)
Objectives_template
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.
Objectives_template
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
(17.8)
Objectives_template
where
(17.9)
(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.
Objectives_template
Objectives_template
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
. The exact solution requires to satisfy Eqn. 18.1 at every that introduces an error
(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.
Objectives_template
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
(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.
Objectives_template
Objectives_template
Objectives_template
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
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)
(19.4) Substitutions for the boundary integral term in terms of the given boundary conditions
(19.5)
to
Objectives_template
Objectives_template
(19.10)
Objectives_template
(19.11)
where
Let
cofactor
Objectives_template
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.
Objectives_template
Objectives_template
and
as
(20.1)
(20.2)
(20.3)
and
And has some magnitude between 0 and 1 for intermediate point. Similarly,
at
at
or
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.
Objectives_template
(20.7)
where
and
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
For
and
we get
Objectives_template
finally for
and
we get
Objectives_template
or,
we can write
(20.11)
where
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.
Objectives_template
Objectives_template
(21.1)
(21.2)
where
Objectives_template
for i=2
So,
(21.4)
where
represent a line element which is subject to the heat flux boundary condition.
Objectives_template
can be obtained as
(21.5) where:
and
(21.6)
and
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).
Objectives_template
Objectives_template
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.
Objectives_template
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
element sizes are not too large. In such situations, one can set
(22.4)
where
and
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.
Objectives_template
Objectives_template
as
(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.
Objectives_template
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
Objectives_template
T = a x + b y +c x y +d
The shape functions and
(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.
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.
Objectives_template
Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 24:
Objectives_template
Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 24:
(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)
Objectives_template
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)
(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
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
be calculated from the axial velocity profile at that location. However, points may be taken as 4. Calculate everywhere and
where,
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).
7. Apply appropriate boundary conditions (which has been discussed, in details, in lecture 25).
Objectives_template
and
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.
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
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
Again,
[because
constant
].
Thus,
Objectives_template
with
gives
(25.2)
where wall].
to (
denotes at the
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
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
The stream function
to JMAX
(25.7)
(25.8) Vorticity also depends on inlet velocity profile. Pao and Daugherty (1969) used and then specified Greenspan (1969) fixed up which result in
(25.9)
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.
Objectives_template
Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 25:
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)
and
(25.17)
Instead of substitute
we shall write
or,
or,
(25.18)
Equation (25.18) is second order accurate boundary condition but it does not lead to
Objectives_template
Objectives_template
Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:
Objectives_template
Module 4: Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:
(26.1)
(26.2)
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
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)
Objectives_template
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
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)
Objectives_template
Module 4:Vorticity Stream Function Approach for Solving Flow Problems Lecture 26:
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.
(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
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.
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
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.
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.
Objectives_template
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:
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)
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
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
Objectives_template
Thus
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 27:
(27.7)
signifies all the convective and diffusive contributions and their coefficients at . The
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,
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.
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
Objectives_template
Module 5: Solution of Navier-Strokes Equation for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 28:
y- momentum equation
Here
and
Objectives_template
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 28:
Substituting
and
(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
will be obtainable. As
(28.3)
(28.4)
Objectives_template
Module 5: Solution of Navier-Strokes Equation for Incompressible Flow Using SIMPLE and MAC Algorithms Lecture 28:
Substituting
and
(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
(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.
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 29:
Solution Procedure
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
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)
(29.4)
where
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 29:
Now, substition
(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
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
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.
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 30:
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 30:
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
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 30:
The evaluation of
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
the next
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
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.
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 31:
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 31:
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:
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
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
Objectives_template the left hand side menu of the page or click the next button.
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 32:
MAC Formulation
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
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
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)
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.
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:
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.
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
the other hand, the corrected velocity component (unknown) will be related to the corrected pressure (also unknown) in the following way:
(33.4)
Hence, one cannot be calculated without the help of the other. Calculations are done in an iterative cycle and we write Corrected Estimate Correction
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:
(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
Objectives_template
Or
(33.13)
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 33:
(33.14)
where
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.
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 34:
Boundary Conditions
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).
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.
j =2 to jre
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
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
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.
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
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 35:
(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)
(35.3)
The final
(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.
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 35:
and
on a rectangular grid
be any property which can be convected and diffused. The may be represented as
(35.5)
Objectives_template
and
are defined as
or
(35.6)
and for
(35.7)
can be chosen to increase the accuracy or to alter the diffusion like corresponds to the QUICK scheme of
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)
(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
Objectives_template
for
(35.11)
for Where
(35.12)
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.
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
Objectives_template
Module 5: Solution of Navier-Stokes Equations for Incompressible Flows Using SIMPLE and MAC Algorithms Lecture 36:
(36.2)
where becomes
(36.3)
where
Objectives_template
or
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,
Hence,
or
and
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.
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
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.
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)
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
Objectives_template
Objectives_template
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.
Objectives_template
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)
Objectives_template
where
viscosity and is the Bulk viscosity, conventionally given by represents the component of the strain rate tensor, given by
(37.6)
(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)
Objectives_template
Objectives_template
and
and
a typical control volume together with the identification of the important points.
Objectives_template
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)
Objectives_template
. 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
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)
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.
Objectives_template
Objectives_template
and and
coordinates, see Eq. (37.7); these have to be expressed in terms of general coordinates
(38.1)
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
(38.3)
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
(38.4)
(38.5)
Objectives_template
The denominator in the above expressions represents the volume defined by the scalar product of and . This will be donated as hereafter.
Objectives_template
form (38.5) are used, the following expressions evolve for the diffusion fluxes
(38.6)
(38.7)
and
also
(38.8) For the V-momentum equation the convection and diffusion fluxes are obtained as:
(38.9)
and
(38.10)
(38.11)
Objectives_template
The source terms in the momentum equations are integrated over the control volume. The integral is evaluated as (38.12)
and
Objectives_template
(38.13)
The denominator in Eq. (38.13) is equal to the control volume vector product of the two vectors and
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.
Objectives_template
Scalar Transport
Objectives_template
(39.1) where represents the scalar quantity in question, is its diffusive flux
(39.2)
and
. This equation is integrated in the same way as has less terms than
(39.3)
The diffusion flux through the e face is evaluated as (refer to Eq. (37.13)):
(39.4)
and
(39.5)
Objectives_template
(39.6)
where
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
Objectives_template
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.
Objectives_template
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
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.
Objectives_template
Objectives_template
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
(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
Objectives_template
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 .
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
Objectives_template
Objectives_template
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.)
(40.6) The volume integrals are treated the same way as discussed earlier. Equation (40.5) can be written as:
(40.7)
Objectives_template
Objectives_template
(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.
Objectives_template
Calculation of Pressure
Objectives_template
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
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).
Objectives_template
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.
Objectives_template
(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)
Objectives_template
(41.10)
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)
Objectives_template
The
constant
has
value
between
and
1,
and
is
called pressure
underrelaxation factor .
Objectives_template
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.