Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The...

34
697 14 Computational Fluid Dynamics Outline 14.1 Introduction 14.2 Examples of Finite-Difference Methods 14.2.1 Discretization of the Domain 14.2.2 Discretization of the Governing Equations 14.2.3 Define Solution Algorithm 14.2.4 Comments on Choice of Difference Operators 14.3 Stability, Convergence, and Error 14.3.1 Consistency 14.3.2 Numerical Stability 14.3.3 Convergence 14.3.4 Numerical Errors 14.4 Solution of Couette Flow 14.5 Solution of Two-Dimensional, Steady-State Potential Flow 14.6 Summary Chapter Objectives The objectives of this chapter are to: Present an introduction to finite-difference methods. Present ideas on consistency, numerical stability, convergence, and errors. Present methods of finite differences. Present a finite-difference solution to transient couette flow. Present a finite-difference solution to steady-state potential flow. Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Transcript of Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The...

Page 1: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

697

14Computational Fluid Dynamics

Outline14.1 Introduction14.2 Examples of Finite-Difference Methods

14.2.1 Discretization of the Domain14.2.2 Discretization of the Governing Equations14.2.3 Define Solution Algorithm14.2.4 Comments on Choice of Difference Operators

14.3 Stability, Convergence, and Error14.3.1 Consistency14.3.2 Numerical Stability14.3.3 Convergence14.3.4 Numerical Errors

14.4 Solution of Couette Flow14.5 Solution of Two-Dimensional, Steady-State Potential Flow14.6 Summary

Chapter ObjectivesThe objectives of this chapter are to:

▲ Present an introduction to finite-difference methods.▲ Present ideas on consistency, numerical stability, convergence, and errors.▲ Present methods of finite differences.▲ Present a finite-difference solution to transient couette flow.▲ Present a finite-difference solution to steady-state potential flow.

67730_14_ch14_p696-731.qxd 12/2/10 4:55 PM Page 697

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 2: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

14.1 INTRODUCTIONThe equations governing fluid-flow problems are the continuity, the Navier–Stokes, and the energy equations. These equations, derived in Chapter 5, form asystem of coupled quasi-linear partial differential equations (PDEs). Because ofthe nonlinear terms in these PDEs, analytical methods can yield very few solu-tions. In general, analytical solutions are possible only if these PDEs can be madelinear, either because nonlinear terms naturally drop out (e.g., fully developedflows in ducts and flows that are irrotational everywhere) or because nonlinearterms are small when compared to other terms so that they can be neglected (e.g., flows where the Reynolds number is less than unity). Yih (1969) andSchlichting & Gersten (2000) describe most of the better-known analytical solu-tions. If the nonlinearities in the governing PDEs cannot be neglected, which isthe situation for most engineering flows, then numerical methods are needed toobtain solutions.

Computational fluid dynamics, or simply CFD, is concerned with obtainingnumerical solutions to fluid-flow problems by using the computer. The advent ofhigh-speed and large-memory computers has enabled CFD to obtain solutions tomany flow problems, including those that are compressible or incompressible,laminar or turbulent, chemically reacting or nonreacting, single- or multi-phase.Of the numerical methods developed to address equations governing fluid-flowproblems, finite-difference methods (FDMs) and finite-volume methods (FVMs)are the most widely used. In this chapter, we give an introduction to the FDMSand present the solutions to two classical fluid-flow. Problems using finite differ-ences (FD).

Since computers are used to obtain solutions, it is important to understandthe constraints that they impose. Of these constraints, four are critical. The firstof these is that computers can perform only arithmetic (i.e., !, ", #, and $)and logic (i.e., true and false) operations. This means non-arithmetic opera-tions, such as derivatives and integrals, must be represented in terms of arith-metic and logic operations. The second constraint is that computers representnumbers using a finite number of digits. This means that there are round-offerrors and that these errors must be controlled. The third constraint is thatcomputers have limited storage memories. This means solutions can beobtained only at a finite number of points in space and time. Finally, comput-ers perform a finite number of operations per unit time. This means solutionprocedures should minimize the computer time needed to achieve a computa-tional task by fully utilizing all available processors on a computer andminimizing the number of operations.

With these constraints, FD methods generate solutions to PDEs through thefollowing three major steps:

1. Discretize the domain. The continuous spatial and temporal domain ofthe problem must be replaced by a discrete one made up of grid pointsor cells and time levels. The ideal discretization uses the fewest num-ber of grid points/cells and time levels to obtain solutions of desiredaccuracy.

698 Chapter 14 / Computational Fluid Dynamics

CFD solutions pages 669–672, 807, 821

67730_14_ch14_p696-731.qxd 12/2/10 4:55 PM Page 698

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 3: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.2 / Examples of Finite-Difference Methods 699

2. Discretize the PDEs. The PDEs governing the problem must be replacedby a set of algebraic equations with the grid points/cells and the time lev-els as their domain. Ideally, the algebraic equations—referred to asfinite-difference equations (FDEs) should describe the same physics asthose described by the governing PDEs.

3. Specify the algorithm. The step-by-step procedure by which solutions ateach grid points/cells are obtained from the FD equations when advanc-ing from one time level to the next must be described in detail. Ideally,the algorithm should ensure not only accurate solutions but also effi-ciency in utilizing the computer.

These steps are illustrated through example problems in Sections 14.4 and 14.5.

14.2 EXAMPLES OF FINITE-DIFFERENCE METHODSTo illustrate FDMs, consider the unsteady, incompressible, laminar flow of a fluidwith constant kinematic viscosity n between two parallel plates separated by adistance H, as shown in Fig. 14.1. Initially, both plates are stationary, and the fluidbetween them is stagnant. Suddenly at time t % 0, the lower plate moves hori-zontally to the right (in the positive x-direction) at a constant speed of V0.

The equations governing this flow are the continuity equation and the x- andy-component Navier–Stokes equations. Since the flow is parallel (i.e., √ % 0) andthe pressure is the same everywhere, these equations reduce to the following sin-gle linear PDE:

(14.2.1)

The initial and boundary conditions for Eq. 14.2.1 are, assuming u % u(y, t),

(14.2.2)u(y, t % 0) % 0, u(0, t) % V0 u(y % H, t) % 0

u(y, 0) % 0 u(0, t) % V0 u(H, t) % 0

&''ut& % n &

''

2

yu2&

Fig. 14.1 Flow between stationary and moving parallel plates.

y

xV0

,H ρ ν

67730_14_ch14_p696-731.qxd 12/2/10 4:55 PM Page 699

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 4: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Since Eq. 14.2.1 is linear and the boundary conditions given by Eq. 14.2.2 arehomogeneous, separation of variables is able to provide the exact analyticalsolution

u/V0 % 1 " y/H " 2 !(

n%1

&n1p& sin (npy/H) exp ("n2p2nt/H2) (14.2.3)

This exact solution can be used to evaluate the accuracy of FDMs to be presented.As mentioned, three steps are involved in generating solutions to PDEs by

using an FDM. These three steps are illustrated below, one at a time for Eqs.14.2.1 and 14.2.2.

14.2.1 Discretization of the Domain

To discretize the domain, we note that the spatial domain is a line segmentbetween 0 and H, and that the temporal domain is a ray emanating from t % 0.Though the temporal domain is of infinite extent, the duration of interest is finite,say from t % 0 to t % T, where T is the time when steady state is achieved. Here,the spatial domain, 0 ) y ) H, is discretized by replacing it with J equally dis-tributed stationary grid points, and the temporal domain, 0 ) t ) T is discretizedby replacing it with equally incremented time levels (see Fig. 14.2). This dis-cretization of the domain is one of many instances. For example, the grid pointsdo not have to be uniformly distributed nor do they have to be stationary.

Each point in the discretized domain, shown in Fig. 14.2, has coordinates ( yj, tn), given by

yj % ( j " 1) *y, j % 1, 2, 3, . . . , J (14.2.4)

tn % n *t, n % 0, 1, 2, . . . (14.2.5)

700 Chapter 14 / Computational Fluid Dynamics

n

n + 1

0

1

2

1 2

t

t

y

y∆

tn = n t∆

y = 0 y = H

J−1 Jj−1 j + 1j

yj = (j−1) y, y = ——∆ ∆ HJ−1

• • •

• • •

• • •

Fig. 14.2 Grid system and time levels for problem depicted in Figure 14.1.

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 700

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 5: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.2 / Examples of Finite-Difference Methods 701

where *y % H/(J " 1) is the distance between two adjacent grid points (or thegrid spacing), and *t is the time-step size. The sizes of the grid spacing and thetime step depend on the length and time scales that need to be resolved and onthe properties of the discretized PDEs used to obtain solutions.

The solution sought—u(y, t) in Eq. 14.2.1—will be obtained only at the gridpoints and the time levels. That solution is denoted as

(14.2.6)

where subscripts denote the locations of the grid points and superscripts denotetime levels.

14.2.2 Discretization of the Governing Equations

With the domain discretized, the next step is to replace the PDEs governing theproblem by a set of algebraic or FDEs that use the grid points and time levels asthe domain. With FDMs, PDEs are discretized by replacing derivatives with dif-ference operators. Thus, discretization involves two parts. First, derive differenceoperators. Then, select difference operators.

Derive Difference Operators. There are many different ways to derivedifference operators. For problems with smooth solutions (i.e., solutions withoutdiscontinuities such as shock waves), a method based on the following theoremis often used: If a function, u, and its derivatives are continuous, single-valued, andfinite, then the value of that function at any point can be expressed in terms of uand its derivatives at any other point by using a Taylor series expansion, providedthe other point is within the radius of convergence of the series. With this theorem,uj!1 and uj"1 can be expressed in terms of uj and its derivatives as

uj!1 % uj ! "&''uy&#j

*y ! "&''

2

yu2&#j

&*2y!

2

& ! "&''

3

yu3&#j

&*3y!

3

& ! + + + (14.2.7)

uj"1 % uj " "&''uy&#j

*y ! "&''

2

yu2&#j

&*2y!

2

& " "&''

3

yu3&#j

&*3y!

3

& ! + + + (14.2.8)

From the above two Taylor series, we can readily derive the following four dif-ference operators by solving for ('u/'y)j and ('2u/'y2)j either directly or byadding or subtracting the two equations:

"&''uy&#j

% &uj!

*

1 "

yuj

& ! O(*y) (14.2.9)

"&'

'

uy&#j

% &uj "

*yuj"1& ! O(*y) (14.2.10)

"&'

'

uy&#j

% &uj!1

2"

*yuj"1

& ! O(*y2) (14.2.11)

"&'

'

2

yu2&#j

%&uj!1 "

*

2uy2

j ! uj"1&! O(*y2) (14.2.12)

ujn % u(yj, tn)

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 701

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 6: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

In the above difference operators, O(*y) and O(*y2) denote the truncationerrors (i.e., terms in the Taylor series that have been truncated). In Eqs. 14.2.9 and14.2.10, the power of *y in O(*y) is one because the leading term of the trunca-tion errors for these two difference operators is multiplied by *y raised to thefirst power. Such difference operators are said to be first-order accurate. In Eqs. 14.2.11 and 14.2.12, that power is two because the leading term in the trun-cation errors is multiplied by *y raised to the second power. Such differenceoperators are said to be second-order accurate. The higher the order of accuracy,the greater is the number of terms retained in the truncated Taylor series. For suf-ficiently small *y, a higher-order accurate difference operator is a more accuraterepresentation of a smooth function than a lower-order accurate difference oper-ator. In general, second-order accuracy is adequate.

The grid points used to construct a difference operator form the stencil ofthat difference operator. If the stencil for a difference operator at yj involves onlygrid points with indices greater than or equal to j such as Eq. 14.2.9, then that dif-ference operator is said to be a forward-difference operator. If grid points allhave indices less than or equal to j such as Eq. 14.2.10, then that difference oper-ator is said to be a backward-difference operator. If the number of grid pointsbehind and ahead of j are exactly the same such as Eqs. 14.2.11 and 14.2.12, thatdifference operator is said to be a central-difference operator. If the number ofgrid points ahead of and after j are not the same, that difference operator is saidto be either biased backward or biased forward.

Taylor series can be used to derive difference operators for any derivative toany order of accuracy and using any stencil. To illustrate, consider the derivationof a difference operator for a first-order derivative, ('u/'y)j, with the followingspecifications: third-order accurate, O(*y3), with a stencil that includes only onedownstream grid point. The derivation of this difference operator involves thefollowing four steps:

Step 1: Determine the number of terms to be kept in each Taylor series.That number, denoted as N, is equal to the order of the derivativefor which a difference operator is sought plus the order of accuracydesired. For this case, the order of the derivative is 1, and the orderof accuracy desired is 3. Thus, N is 4.

Step 2: Decide on a stencil based on N points for the difference operator at point j. For this case with N % 4 and u , 0, the 4 points of thestencil are j " 2, j " 1, j, j ! 1. Other possible stencils include: ( j " 3,j " 2, j " 1, j) or completely backward, ( j " 1, j, j ! 1, j ! 2) orbiased forward, and ( j, j ! 1, j ! 2, j ! 3) or completely forward.

Step 3: Construct N " 1 truncated Taylor series about uj from u at all pointsof the stencil except point j. Performing this operation gives

uj!1 % uj ! "&'

'

uy&#j

*y ! "&'

'

2

yu2&#j

&*

2y!

2

& ! "&'

'

3

yu3&#j

&*

3y!

3

& ! O(*y4) (14.2.12)

uj"1 % uj " "&'

'

uy&#j

*y ! "&'

'

2

yu2&#j

&*

2y!

2

& " "&'

'

3

yu3&#j

&*

3y!

3

& ! O(*y4) (14.2.13)

uj"2 % uj " "&'

'

uy&#j

2*y ! "&'

'

2

yu2&#j

&(2*

2!y)2

& " "&'

'

3

yu3&#j

&(2*

3!y)3

& ! O(*y4) (14.2.14)

702 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 702

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 7: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.2 / Examples of Finite-Difference Methods 703

In the above three equations, the unknowns are the first, second,and third derivatives, and they must be expressed in terms of u atpoints in the stencil.

Step 4: Solve N " 1 coupled linear equations for the difference operatorsought. For the first derivative, solving the above three equationsgives

"&'

'

uy&#j

% ! O(*y3) (14.2.15)

Difference operators for the second and third derivatives are alsoderived in the process of solving for the above difference operator.The orders of accuracy of these difference operators are second orderfor the second derivative and first order for the third derivative.

In Table 14.1, some commonly used difference operators are summarized.Note that if j and *y are replaced by n and *t, then the difference operators canalso be used for time derivatives.

2uj!1 ! 3uj " 6uj"1 ! uj"2&&&

6*y

TABLE 14.1 Summary of Commonly Used Difference Operators

Description Finite-Difference Stencil

First Derivative: ('u!'y)j

central, O(*y2) (uj!1 " uj"1)/2*y

backward, O(*y) (uj " uj"1)/*y

forward, O(*y) (uj!1 " uj)/*y

backward, O(*y2) (3uj " 4uj"1 ! uj"2)/2*y

forward, O(*y2) ("3uj ! 4uj!1 " uj!2)/2*y

Second Derivative: ('2f !'y2) % ('u!'y)j, u % 'f !'y

central, O(*y2) ( fj!1 " 2fj ! fj"1)/*y2

backward, O(*y) ( fj " 2fj"1 ! fj"2)/*y2

forward, O(*y) ( fj " 2fj!1 ! fj!2)/*y2

j-1 j j+1

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 703

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 8: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Select Difference Operators. To select difference operators, we apply thegoverning PDE to be discretized (Eq. 14.2.1) at an arbitrary interior grid point(a grid point not on the boundary) and at a time between tn and tn!1:

"&''ut& % n &

''

2

yu2&#

n-

j(14.2.16)

where n- is n, n ! 1, or some value between n and n ! 1. In this equation, it isassumed that the solution at time t n is known and that the solution at t n!1 issought. This assumption is generally applicable because the solution is alwaysknown at the previous time level. For example, at the zeroth time level (n % 0),the solution is the initial condition.

An Explicit Method. If n-% n in Eq. 14.2.16, then all spatial derivatives areevaluated at time tn, the previous time level where the solution is known. If wechoose the forward-difference operator given by Eq. 14.2.9 for ('u/'t)j

n (exceptreplace y and j with t and n) and the central-difference operator given by Eq. 14.2.12 for ('2u/'y2)j

n, then Eq. 14.2.16 becomes

&uj

n!1

*

"

tu j

n

& % n&un

j!1 "

*

2uy

jn

2

! unj"1

&! O(*t, *y2) (14.2.17)

The above FDE is first-order accurate in time and second-order accurate in spaceas indicated by O(*t, *y2). In this equation, uj

n!1 is the unknown sought, andsolving for it gives

ujn!1 % bun

j"1 ! (1 " 2b)ujn ! bun

j!1, b % n *t/*y2 (14.2.18)

The FDE in the form of Eq. 14.2.17 or 14.2.18 can be applied at any interior gridpoint ( j % 2, 3, . . . , J " 1). The FDEs at the boundary grid points ( j % 1 and J)are obtained by using boundary conditions (BCs). For this simple problem, theBCs, given by Eq. 14.2.2, readily yield the following FDEs:

u1n % u1

n!1 % V0 (14.2.19)

unJ % uJ

n!1 % 0 (14.2.20)

Note that the FDEs given by Eqs. 14.2.17 and 14.2.20 have only oneunknown in them, namely, uj

n!1, a consequence of setting n- % n in Eq. 14.2.16.A method made exclusively of such FDEs is said to be explicit. This particularexplicit method with a first-order accurate forward-time differencing is known asthe Euler explicit scheme.

An Implicit Method. If n- % n ! 1 in Eq. 14.2.16, then all spatial deriva-tives are evaluated at tn!1, the new time level where the solution is unknown. Ifwe choose the backward-difference operator given by Eq. 14.2.10 for ('u/'t)j

n!1

to couple tn!1 to tn and the central-difference operator given by Eq. 14.2.11 for('2u/'y2) j

n!1, then Eq. 14.2.16 becomes

704 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 704

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 9: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.2 / Examples of Finite-Difference Methods 705

&uj

n!1

*

"

tuj

n

& % n ! O(*t, *y2) (14.2.21)

which can be rewritten as

"buj"1n!1 ! (1 ! 2b)uj

n!1 " buj!1n!1 % uj

n, b % n *t/*y2 (14.2.22)

Similar to Eq. 14.2.18, the above equation is first-order accurate in time andsecond-order accurate in space. But it differs in that there are three unknowns,uj"1

n!1, ujn!1, and uj!1

n!1, instead of one in the FDE. This difference is a consequenceof evaluating spatial derivatives at tn!1 instead of tn. By applying Eq. 14.2.22 atevery interior grid point and by using Eqs. 14.2.19 and 14.2.20 for the boundarygrid points, we obtain the following system of equations:

Ax % b (14.2.23)

where

(14.2.24)

In the above system of equations, the FDEs at j % 1 and 2 and at j % J " 1 and Jhave been combined. A method in which each FDE contains more than oneunknown—so that solutions of simultaneous equations are needed—is said to beimplicit. This particular implicit method with a first-order accurate backward-time differencing is known as the Euler implicit scheme.

A Generalized Method. If n- is a value between n and n ! 1, then Eq. 14.2.16 can be written as

&uj

n!1

*

"

tu j

n

& % u "&'

'

ut&#

n!1

j! (1 " u) "&

'

'

ut&#

n

j, 0 < u < 1 (14.2.25)

where the time derivatives are set equal to the spatial derivatives according tothe PDE being solved (e.g., 'u/'t % n'2u/'y2). If we choose the central-differenceoperator given by Eq. 14.2.11 for ('2u/'y2), then the above equation becomes

&uj

n!1

*

"

tuj

n

& % un " # ! (1 " u)n " #(14.2.26)

unj!1 " 2uj

n ! unj"1

&&&*y2

uj!1n!1 " 2uj

n!1 ! uj"1n!1

&&&*y2

uj!1n!1 " 2uj

n!1 ! uj"1n!1

&&&*y2

1 ! 2b "b u2n!1 u2

n ! bV0

"b 1 ! 2b "b u3n!1 u3

n

"b 1 ! 2b "b u4n!1 u4

n

A % . . . , x % . b % .. . . . , .

. . . . ."b 1 ! 2b "b un!1

J"2 unJ"2

"b 1 ! 2b un!1J"1 un

J"1

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 705

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 10: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

It can readily be seen that the above equation reduces to the explicit schemegiven by Eq. 14.2.18 and the implicit scheme given by Eq. 14.2.22 when u % 0 and1, respectively. When u % &

12

&, the above equation is second-order accurate in spaceand in time. The resulting time-differencing formula is known as the trapezoidalor Crank-Nicolson method.

14.2.3 Define Solution Algorithm

With the domain and the governing equations discretized, the final step is tospecify the solution algorithm (i.e., the step-by-step process of obtaining a solu-tion). Since three sets of FDEs have been derived for Eqs. 14.2.1 and 14.2.2 thereare three different solution algorithms.

For the explicit method given by Eqs. 14.2.18 and 14.2.20, the solution algo-rithm is as follows:

1. Specify the problem by inputting values for H, V0, and n.2. Specify the number of grid points desired by inputting J. As noted, the

more the number of grid points, the higher the accuracy.3. Specify the time-step size *t and the duration of interest T. Later, we

will find that specification of *t depends not only on the temporal accu-racy sought but also on *y.

4. Calculate the grid spacing with *y % H/(J " 1).5. Calculate constants: b % n *t/*y2 and N % T/*t.6. Set the time level counter n to 0.7. Specify the solution at every grid point at time level n by using the ini-

tial condition given by Eq. 14.2.2 (ujn % 0 for all j).

8. Calculate ujn!1 at every interior grid point ( j % 2, 3, . . . , J " 1) by using

Eq. 14.2.18.9. Calculate uj

n!1 at every boundary grid point ( j % 1 and J) by using Eq. 14.2.18 and 14.2.20.

10. Write the solution at time level n to disk for data analysis if desired.11. Increment the time level counter by 1; i.e., set n to n ! 1.12. If n . N, repeat Steps 7 to 12.

For the implicit method given by Eqs. 14.2.22, 14.2.19, and 14.2.20, the solu-tion algorithm is identical to the one described above for the explicit methodexcept that Step 8 is replaced by the following:

8. Calculate ujn!1 at every interior grid point by solving the linear system of

equations given by Eq. 14.2.24.

For the FDEs given by Eqs. 14.2.26 and 14.2.19, and 14.2.20, the solutionalgorithm depends on the value of u. If u % 0 or 1, then the solution algorithmsare identical to those just summarized. If u greater than 0 but less than 1, then thesolution algorithm is identical to one given for the implicit method except thatthe elements in the matrix A and the vector b in Eq. 14.2.24 must be replaced bythose corresponding to Eq. 14.2.26 instead of Eq. 14.2.22.

706 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 706

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 11: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.2 / Examples of Finite-Difference Methods 707

The exact solution given by Eq. 14.2.3 can be used to evaluate the accuracyof the Euler explicit, the Euler implicit, and the Crank-Nicolson methods as wellas give guidelines on grid spacing and time-step size needed to obtain solutionsof the desired accuracy.

Before leaving this section, we present the Thomas algorithm, which is ahighly efficient method for solving linear systems of equations with coefficientmatrices that are tridiagonal such as Eq. 14.2.24. Such systems of equations areoften encountered in CFD. To illustrate the Thomas algorithm, consider the fol-lowing system of N independent linear equations:

A x % b (14.2.27)

where

The elements of A and b are known, and the elements of x are sought. The firststep in the Thomas algorithm is to factor the coefficient matrix A into two bidi-agonal matrices L and U:

L1 1 Q1

P2 L2 1 Q2

P3 L3 1 Q3A % LU % . . . .. . . .. . . .PN"1 LN"1 1 QN"1

PN LN 1

(14.2.29)

L1 L1Q1

P2 P2Q1 ! L2 L2Q2

%P3 P3Q2 ! L3 L3Q3. . .

. . .. . .

. . .PN"1 PN"1QN"2 ! LN"1 LN"1QN"1

PN PNQN"1 ! LN

(14.2.30)

From the above, it can be seen that the product of the two bidiagonal matrices isa tridiagonal matrix. The next step is to determine the elements of L and U. Thiscan be accomplished by equating Eq. 14.2.30 to A of Eq. 14.2.28 and comparingterm by term. This gives the following recursive formula for computing the ele-ments in L and U, provided Li / 0 for i % 1, 2, . . . , N:

A1 B1 x1 b1

C2 A2 B2 x2 b2

C3 A3 B3 x3 b3A % . . . , x % . , b % .. . . . .. . . . .CN"1 AN"1 BN"1 xN"1 bN"1

CN AN xN bN

(14.2.28)

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 707

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 12: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Pi % Ci, i % 2, 3, . . . , N; L1 % A1; Q1 % B1!L1 (14.2.31)Li % Ai " PiQi"1 and Qi % Bi !Li, i % 2, 3, . . . , N

The third step is to substitute the LU factorization of A into Eq. 14.2.27:

A x ! L U x ! b (14.2.32)

and then split as

L z ! b (14.2.33)

U x ! z (14.2.34)

The fourth and final step is to solve for z in Eq. 14.2.33 by forward substitution:

z1 % b1!L1; zi % (bi " Pizi"1)!Li, i % 2, 3, . . . , N (14.2.35)

and to solve for xin Eq. 14.2.34 by backward substitution; i.e.,

xN % zN; xi % zi " Qixi!1, i % N " 1, N " 2, . . . , 1 (14.2.36)

This completes the Thomas algorithm, which requires only (5N " 4) arithmeticoperations to obtain a solution. If A given by Eq. 14.2.28 is diagonally dominant(i.e., "Ai" , "Bi" ! "Ci" for i % 1, 2, . . . , N), then it can be shown that round-offerrors will not grow, which implies that N can be very large (up to 100 000 ormore) and still generate very accurate solutions.

14.2.4 Comments on Choice of Difference Operators

From Section 14.2.2, it is clear that the FDE for a given PDE is not unique becausea variety of difference operators can be used for each derivative. If the highest-ordertime derivative is one (which is the case for the continuity, Navier– Stokes, and ener-gy equations), then second-order spatial derivatives represent diffusion, and first-order spatial derivatives represent convection or advection. Since diffusion spreadsa disturbance in all directions, second-order spatial derivatives are replaced by cen-tral-difference operators. Since convection is directional, upwind and biased-upwindoperators are preferred for the first-order spatial derivatives. Upwind and biased-upwind operators are operators whose stencils have more grid points on one sidethan the other. The side with more grid points is the one from which the flow iscoming. For example, if u , 0, then a backward or biased-backward differenceoperator should be used. If u . 0, then a forward or biased-forward difference oper-ator should be used. See Hirsch (1991) and Tannehill, et al. (1997) for furtherdiscussion.

The difference operator used to replace the time derivative is very important,because it determines whether the FDEs for a PDE at different grid points will becoupled to each other or not (i.e., implicit or explicit). In Section 14.2.2, a

708 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 708

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 13: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.2 / Examples of Finite-Difference Methods 709

generalized time-difference operator involving two time levels is given by Eq. 14.2.25. A generalized time-difference operator involving three time levels isas follows (Beam & Warming (1978)):

&uj

n!1

*

"

tu j

n

& % &1 !

ug

& "&'

'

ut&#j

n!1

! &(11

!

"

gu)

& "&'

'

ut&#

n

j! &

1 !

gg

& "&ujn "

*

ut

jn"1

&# (14.2.37)

where u and g are constants specified by the user. The above formula includesEq. 14.2.25 as a special case (g % 0). Similar to Eq. 14.2.25, Eq. 14.2.37 is explicitwhen u equals 0 and implicit otherwise. Also, it is second-order accurate in timewhen u % g ! &

12

& and first-order accurate otherwise. Some commonly used time-difference operators that can be obtained from Eq. 14.2.37 by choosing appro-priate values of u and g are as follows: Euler explicit (u % g % 0), Euler implicit(u % 1 and g % 0), Crank-Nicolson (u % 1/2 and g % 0), and three-points back-ward (u % 1 and g % 1/2).

The time-difference operators in Eqs. 14.2.25 and 14.2.37 belong to the classof “single-stage” operators used to integrate ordinary differential equations(ODEs) that are initial-value problems (IVPs). In fact, any method for integratingODEs that are IVPs, whether single-stage or multi-stage, can be used or general-ized for use as difference operators for the time derivatives in PDEs. Thus, onecould use any of the single-stage ODE integration operators given by the Adams-Bashforth or the Adams-Moulton formulas. The Adams-Bashforth formulas areexplicit and can be written as

&uj

n!1

*

"

tuj

n

& % !m

k%0

amk "&'

'

ut&#

n"k

j! O(*tm!1) (14.2.38)

The coefficients amk in the above equation for up to fourth-order accuracy are asfollows: For first-order accuracy, m % 0 and a00 % 1, which gives the Euler explicitformula. For second-order accuracy, m % 1, a10 % 3/2, and a11 % "1/2. For third-order accuracy, m % 2, a20 % 23/12, a21 % "16/12, and a22 % 5/12. For fourth-order accuracy, m % 3, a30 % 55/24, a31 % "59/24, a32 % 37/24, and a33 % "9/24.

The Adams-Moulton formulas are implicit and can be written as

&uj

n!1

*

"

tu j

n

& % !m

k%0

bmk "&'

'

ut&#j

(n!1)"k! O(*tm!1) (14.2.39)

The coefficients bmk in the above equation for up to fourth-order accuracy are asfollows: For first-order accuracy, m % 0 and b00 % 1, which gives the Euler implicitformula. For second-order accuracy, m % 1, b10 % 1/2, and b11 % 1/2, which is theCrank-Nicholson formula. For third-order accuracy, m % 2, b20 % 5/12, b21 % 8/12,and b22 % "1/12. For fourth-order accuracy, m % 3, b30 % 9/24, b31 % 19/24,b32 % "5/24, and b33 % 1/24.

When using the Adams-Bashforth and Adams-Moulton formulas, note that thehigher-order formulas are not “self-starting” so that lower-order formulas must beused to start the computations. Also, note that the higher the order of accuracy, thegreater is the number of time levels involved, which increases the amount of

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 709

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 14: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

computer memory required since solutions at each of those time levels must bestored.Typically, we want to store solutions at no more than two to three time levels.

As an alternative to the single-stage operators, one could use “multi-stage”IVP, ODE integration operators such as Runge-Kutta. The Runge-Kutta formu-las are constructed by interpolating and extrapolating previously computedderivatives. All Runge-Kutta methods are explicit and self-starting, regardless ofthe order of accuracy. One second-order Runge-Kutta operator is as follows:

&uj

n!

*

1/2

t/2" uj

n

& % "&'

'

ut&#

n

j(14.2.40)

&uj

n!1

*

"

tu j

n

& % "&'

'

ut&#

n!12

j(14.2.41)

Note that the 'u!'t terms in Eqs. 14.2.25 and 14.2.37 to 14.2.41 are to be replaced by spatial derivatives according to the PDE as illustrated by Eqs. 14.2.25 and 14.2.26.

In summary, a wide variety of single- and multi-stage operators can be usedto approximate the time derivatives in PDEs. Which one to use depends onwhether steady or unsteady solutions are sought. When only steady-state solu-tions are of interest, temporal accuracy is meaningless, and the time-differenceoperator is chosen to accelerate convergence to steady state. Typically, thelowest-order accurate time implicit operator is used, which is the Euler implicitoperator.When unsteady solutions are of interest, either explicit or implicit oper-ators could be used.The order of accuracy in time is typically two for single-stagedifference operators to avoid self-starting problems and increased memoryrequirements. For multi-stage operators such as Runge-Kutta, order of accuracycan be higher than two without increasing memory requirements, thoughrequirements in CPU time do increase somewhat.

14.3 STABILITY, CONVERGENCE, AND ERRORIn the previous section, a number of FDEs were obtained for the PDE given byEq. 14.2.1. The question now is how can we judge whether a FDE is an algebraicanalog of a PDE? Also, how can we be sure that round-off errors do not growwhen the solution is advanced from time level to time level? Finally, how can weassess the errors in the computed solutions?

The answers to these questions can be found by examining consistency,numerical stability, convergence, and numerical errors, which are explained in thenext four subsections. To facilitate the presentation of these concepts, we definethe following:

ujn % exact solution of PDE at grid point yj and time level tn

U jn % exact solution of the FDE at grid point yj and time

level tn (i.e., round-off errors do not exist)

710 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 710

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 15: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.3 / Stability, Convergence, and Error 711

N jn % numerical solution of the FDE at grid point yj and

time level tn (i.e., round-off errors exist)

Based on the above definitions, the total error Ejn of a solution at grid point

yj and time level tn is given by

(14.3.1)

From the above equation, it can be seen that the total error is made up of twoparts. The first part, uj

n " Ujn, is the error from discretizing the domain and the

PDE. Hence, it is referred to as the discretization error:

ujn " Uj

n % discretization error (14.3.2)

The second part, Ujn " Nj

n, is concerned with the propagation of round-off errors.This error is referred to as the stability error:

Ujn " Nj

n % stability error (14.3.3)

Note that the stability error depends only on the FDE, and is independent of thePDE that it is supposed to represent.

The truncation error, TE, of a FDE is defined as

TE % FDE " PDE (14.3.4)

14.3.1 Consistency

An FDE is said to be consistent if for every j and n, the following is true:

lim*y,*t !0

TE jn % 0 or lim

*y,*t !0FDEj

n % PDEjn (14.3.5)

Thus, consistency measures how well an FDE approximates a PDE in the limit ofzero grid spacing and time-step size.

To illustrate how consistency is analyzed, consider the FDE given by Eq. 14.2.17 for the PDE given by Eq. 14.2.1. For convenience, that FDE isrepeated:

&uj

n!1

*

"

tuj

n

& % n (14.3.6)

Since the FDE given above is algebraic, it is necessary to convert it into a PDEbefore it can be substituted into Eq. 14.3.5. This can be accomplished byexpanding all terms in the FDE about a common grid point and time level byusing Taylor series. For Eq. 14.3.6, we choose to expand u j

n!1, u nj!1, and u n

j"1

about ujn:

unj!1 " 2uj

n ! unj"1

&&&*y2

Ejn % uj

n " Njn % (uj

n " Ujn) ! (Uj

n " Njn)

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 711

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 16: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

ujn!1 % uj

n ! "&''ut&#

n

j*t ! "&

''

2

tu2&#

n

j&*2t!

2

& ! "&''

3

tu3&#

n

j&*3t!

3

& ! + + + (14.3.7)

unj!1 % uj

n ! "&''uy&#

n

j*y ! "&

''

2

yu2&#

n

j&*

2y!

2

& ! "&''

3

yu3&#

n

j&*

3y!

3

& ! + + + (14.3.8)

unj"1 % uj

n " "&''uy&#

n

j*y ! "&

''

2

yu2&#

n

j&*

2y!

2

& " "&''

3

yu3&#

n

j&*

3y!

3

& ! + + + (14.3.9)

Substituting the above three equations into Eq. 14.3.6 yields

"&''ut&#

n

j! "&

''

2

tu2&#

n

j&*2!

t& ! "&

''

3

tu3&#

n

j&*3t!

2

& ! + + + % n $"&''

2

yu2&#

n

j! 2 "&

''

4

yu4&#

n

j&*

4y!

2

& ! + + +%(14.3.10)

which becomes in the limit as *t and *y approach zero

"&''ut& % n &

''

2

yu2&#

n

j(14.3.11)

Since the above equation is identical to the PDE given by Eq. 14.3.1 at (yj, tn),the FDE given by Eq. (14.3.6) is said to be consistent.

On consistency, it is important to differentiate between unconditional and con-ditional consistency. Unconditional consistency implies that the FDE approachesthe PDE regardless of how *t and *y approach zero, which is the case for Eq. 14.3.10. Conditional consistency refers to FDEs that will approach the PDEonly if *t and *y approach zero in a certain prescribed fashion (e.g., *t mustapproach zero first before *y can approach zero). A conditionally consistent FDEmay approach a PDE that is fundamentally different from the PDE that it is intend-ed to represent as the grid spacing and time-step size are reduced (see Problem14.10 for an example). Thus, for a conditionally consistent FDE, reducing the gridspacing or the time-step size could increase instead of decrease errors because theFDE is approaching a different PDE.Also, note that any term multiplied by *xp or*t p (e.g., *y4ui

n, *t2uin) can be added to any FDE without violating consistency.

Finally, since *y and *t are never zero, a consistent FDE is very different from theoriginal PDE (contrast Eqs. 14.3.10 and 14.3.11). Thus, consistency, though impor-tant, is clearly inadequate in ensuring accuracy.

14.3.2 Numerical Stability

An FDE is said to be stable if the stability error given by Eq. 14.3.3 approacheszero or is bounded as n approaches infinity. That is, the round-off error eitherdecays or does not grow as the solution is advanced from time level to time level.Note that this definition is only valid for PDEs with a time-like coordinate. Also,note that stability depends only on the FDE and is independent of the PDE thatthe FDE is intended to represent.

712 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 712

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 17: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.3 / Stability, Convergence, and Error 713

It turns out that the stability of a FDE depends on whether some parameterf relating grid spacing and time-step size is satisfied or not:

f ) fcr (14.3.12)

As an example, for the explicit Euler method given by Eq. 14.2.18, stability isensured if *y and *t satisfy the following criteria:

&*n*

y2t

& ) &12

& (14.3.13)

Thus, f % n *t/*y2 and fcr % &12

&. For this equation, if the grid spacing is *y1, thenthe largest time-step size permitted is *tmax % (*y1)2/2n. If *t used is greater than*tmax, then the solution will oscillate wildly from grid point to grid point with theamplitude of the oscillations increasing from time level to time level so that“blow-up” will eventually take place (the numbers get so large that the computercan no longer represent them). Such solutions in which the round-off errors keepgrowing are said to be unstable. If *t used is less than or equal to *tmax, then thesolution obtained will either have round-off errors that approach zero or staybounded. Such solutions are said to be stable. Note, however, though stable solu-tions are free of round-off errors, they may still be inaccurate from discretizationerrors (see Eqs. 14.3.1 and 14.3.2), a topic to be addressed in Section 14.3.4.

For the stability criterion given by Eq. 14.3.13, fcr % 1/2, which is finite andgreater than zero. FDEs, whose stability criteria have finite and nonzero fcr, aresaid to be conditionally stable. FDEs of most explicit methods are conditionallystable. If fcr is infinite, then the FDE is said to be unconditionally stable. For suchFDEs, there are no restrictions on the time-step size as far as stability is con-cerned. For accuracy, however, the time-step size should be small enough toresolve the temporal physics. FDEs of most implicit methods are unconditional-ly stable (this can only be proven if the PDE is linear). If fcr equals zero, then theFDE is said to be unconditionally unstable since for a given grid spacing, there isno time-step size, other than zero, that can be used. Clearly, unconditionallyunstable FDEs are useless. Problem 14.14 shows a method that appears reason-able but is unconditionally unstable.

There are many ways to analyze the numerical stability of FDEs. One popu-lar and versatile method is the Fourier method. The Fourier method analyzesnumerical stability via the following three steps. First, introduce an arbitrary dis-turbance at every grid point at some arbitrary time level tn. This disturbance rep-resents a random round-off error. Next, expand that disturbance into a Fourierseries. Finally, follow the evolution of each Fourier component separately. If anyFourier component grows, then the FDE is said to be unstable. If none grow, thenthe FDE is said to be stable.

To illustrate the Fourier method for analyzing stability, consider the FDEgiven by Eq. 14.2.17, which is repeated for convenience:

&uj

n!1

*

"

tu j

n

& % n (14.3.14)un

j!1 " 2ujn ! un

j"1&&&

*y2

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 713

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 18: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

As mentioned, the first step is to introduce an arbitrary disturbance into the solu-tion at every grid point at tn. Doing so yields

% n (14.3.15)

Subtracting Eq. 14.3.14 from Eq. 14.3.15 gives an evolution equation for the dis-turbance, 0:

&0 j

n!1

*

"

t0j

n

& % n&0n

j!1 "

*

20

yjn

2

! 0nj"1

& (14.3.16)

The next step is to represent the disturbance in a Fourier series. Since thedomain has a finite number of equally distributed grid points (see Fig. 14.2), themost general Fourier series is finite and is given by

0jn % !

M

m%"M

Anm exp (Ikmxj) (14.3.17)

where I % &"1' is the imaginary number; M % (IL " 1)/2 is the maximumnumber of Fourier components that can be resolved on a grid with IL equallyspaced grid points; and km % pm!(M *y) is the wave number, which is related tothe wavelength by lm % 2p!km. By substituting Eq. (14.3.17) into Eq. (14.3.16)and by noting that yj11/2 % yj 1 *y and exp(yj11/2) % exp(yj)exp(1 *y), weobtain

!M

m%"M$ " n %% 0

(14.3.18)

Since there are no interactions between the Fourier components (i.e., no multipli-cation of two different Fourier components), Eq. (14.3.18) requires every Fouriercomponent to be zero. This coupled with exp(1 If) % cos f 1 I sin f gives

Amn!1 % An

m ! &*n*

y2t

& Anm (eIkm*y " 2 ! e"Ikm*y)

% Anm $1 " 2 &

*n*

y2t

&(1 " cos(km*y))%% An

m $1 " 4 &*n*

y2t

& sin2 "&km

2*y&#% (14.3.19)

Now, define the amplification factor as

Gm % Amn!1!An

m (14.3.20)

(AnmeIkm*y " 2An

m ! Anme"Ikm*y)eIkmyj

&&&&&*y2

(Amn!1 " An

m)eIkmyj

&&&*t

(u ! 0)nj!1 " 2(u ! 0)j

n ! (u ! 0)nj"1

&&&&*y2

(u ! 0)jn!1 " (u ! 0)j

n

&&&*t

714 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 714

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 19: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.3 / Stability, Convergence, and Error 715

The third and final step is to follow the evolution of the amplification factoras n approaches infinity. For numerical stability, it is clear that the following con-dition must be satisfied for every Fourier component:

"Gm" ) 1 (14.3.21)

From Eqs. (14.3.19) and (14.3.20), the above equation implies the following forevery m:

"1 ) 1 " 4 &*

n*

y2

t& sin2 "&km

2*y&# ) 1, (14.3.22)

This inequality becomes critical when sin2 (km*y/2) reaches a maximum of unity.At this critical point, we get the correct stability criteria, which is (see Eq. (14.3.13))

&*n*

y2t

& ) &12

& (14.3.23)

From the above example, we make a number of observations. First, the mostunstable Fourier component is m % M, which corresponds to the largest wavenumber, but shortest wavelength. This turns out to be generally true for mostFDEs. Second, this analysis assumes periodic boundary conditions because of theuse of Fourier series.Thus, it cannot account for FDEs on the boundaries. If FDEsat boundary grid points can impose a more stringent stability criteria, then thematrix stability method can be used. Third, this analysis can be applied only to lin-ear FDEs since only then can each Fourier component be analyzed separately.Nonlinear FDEs must be linearized before they can be analyzed. Finally, An

m in theFourier series expansion of 0n

m in Eq. (14.3.17) can be replaced by (Gm)(n)A0m

because Amn!1 % GmAn

m % GmGmAmn"1 % +++ % (Gm)(n!1)A0

m, where (n) and (n ! 1)denote to the power of (see Eq. (14.3.20)). For methods involving more than twotime levels, this will be more convenient. For FDEs that involve two dimensions,replace Eq. (14.3.17) by

0ijn % !

Mx

mx%"Mx

!My

my%"My

Anmxmy

exp [I(kmxxi ! kmy

yj)] (14.3.24)

The three-dimensional form of the above equation is a straightforwardextension.

14.3.3 Convergence

A FDE is said to be convergent if its solutions approach the exact solution of thePDE in the limit of infinitesimal *y and *t:

lim*y,*t!0

Njn % uj

n (14.3.25)

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 715

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 20: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Equation (14.3.25) indicates that for a convergent FDE, one can get anumerical solution to any desired accuracy by simply reducing the grid spacingand time-step size. For FDEs of linear PDEs, convergence can always be ana-lyzed analytically though the process can be tedious. Fortunately, there is a gen-eral theory known as the Lax equivalence theorem, which states that an FDE ofa well-posed, linear PDE is convergent, if that FDE is consistent and stable. Withthis theorem, an FDE of a well-posed, linear PDE is guaranteed to be convergentif we can show that it is consistent and stable, as explained in Sections 14.3.1 and14.3.2. Since consistency and stability are much easier to analyze than conver-gence, the Lax equivalence theorem is quite useful.

For FDEs of PDEs that are not linear (e.g., quasi-linear or nonlinear PDEs),we do not know how to prove convergence. But, this inability to prove conver-gence does not imply that these FDEs are not convergent. For these FDEs, theLax equivalence theorem is still useful, except it becomes a necessary but not asufficient condition for convergence. For these FDEs, a comparison betweennumerical solutions and experimental measured values may be needed.

14.3.4 Numerical Errors

From the discussions on consistency, numerical stability, and convergence givenin the previous three subsections, we note the following. First, if is stable, then thetotal error given by Eq. (14.3.1) reduces to

(14.3.26)

That is, discretization error dominates with stability error being negligible.Second, when grid spacing and time-step size are finite, which is always the case,then consistency analyses show the FDEs to differ considerably from the originalPDEs that they are supposed to represent (compare Eqs. (14.3.10) and (14.3.11)).It turns out that the FDEs are, in general, much more complex.They contain spu-rious modes (solutions not contained in the original PDEs).Thus, even if an FDEis convergent, we still need to ask the following questions to ensure that physi-cally meaningful solutions are obtained:

• What are some of the most important properties that an FDE must possesswhen grid spacing and time-step sizes are finite?

• How does one choose the grid spacing and the time-step size to ensureaccurate solutions?

The answers to some of these questions are briefly described below.Conservative Property. One of the most important properties of PDEs

governing fluid-flow problems is the conservation principle. For example, masscannot be created or destroyed; momentum must be balanced; and total energy isconserved. Thus, it is important for the FDEs to represent this principle correctly.Fortunately, this is easy to do. Just make sure that at every common face betweentwo abutting cells, what leaves one cell must enter the other. But, to do thisrequires the PDE to be written in what is referred to as the conservative form.A PDE is written in conservative form if all coefficients outside of the outermost

Enj % uj

n " N jn % (uj

n " Ujn) ! (Uj

n " N jn) # uj

n " Ujn

716 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 716

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 21: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.4 / Solution of Couette Flow 717

derivatives are constants. If any coefficient is a variable, then that PDE is writtenin non-conservative form. Thus, for example, 'u/'t ! &

12

&'u2/'x % 0 is written in con-servative form, but 'u/'t ! u'u/'x % 0 is not. Problems 14.16 and 14.17 illustratedifficulties associated with using PDEs cast in non-conservative form.

Transportive Property. For a fluid, a disturbance at any location in theflow field can spread to other locations by convection due to fluid motion, by dif-fusion due to random molecular motion, and by pressure waves. Convection cantransport a disturbance only in the direction of fluid velocity. Diffusion and pres-sure waves can spread a disturbance in every direction. FDEs should possess thesame transportive properties as the PDEs that they are intended to represent.Otherwise, there is transportive error. It turns out that this is not easy to do cor-rectly.As noted in Section 14.2.4, derivatives representing convection are upwindor biased-upwind differenced, and derivatives representing diffusion and pressureare centrally differenced. For compressible flows, the convective and pressureterms should be treated collectively, and differencing is based on characteristictheory (see Hirsch (1991)). Unfortunately, the theory on upwind differencing isrigorous only for one-dimensional flows.

Dissipative Property. One major error in many FDEs is excessive artifi-cial or numerical diffusion (i.e., the “effective” diffusion coefficients such as vis-cosity or conductivity in the FDEs are much higher than the ones in the PDEs).This can cause shear layers, viscous forces, surface heat transfer, and conversionof mechanical to thermal energy to be computed incorrectly. There are two mainculprits of high numerical diffusion. The first is how convective terms are differ-enced. If upwind differencing is used, then first-order formulas can produceexcessive numerical diffusion. If second-order upwind differencing formulas areused, then reasonable results can be obtained. High-resolution differencingschemes such as flux-difference splitting with limiters are aimed at getting thetransportive properties correct with minimal artificial diffusion (see Hirsch(1991)). The second culprit is having cells with high aspect ratios and not aligningthe grid lines with the flow directions.

Grid-Independent Solution. Even for a convergent set of FDEs, manydifferent solutions can be obtained, some totally wrong, some qualitatively cor-rect but quantitatively wrong, and some sufficiently accurate. Which solution isobtained depends on the grid spacing and time-step size used. Thus, once gener-ating a solution on a grid, it is important to generate another solution on a finergrid and correspondingly smaller time-step size. Ideally, this process should berepeated until the relative difference between successive solutions obtained onfiner and finer grids approach the level of the round-off errors. Unfortunately,for complicated engineering problems, it is often not feasible to obtain grid-independent solutions because of resource constraints. If the solution generatedis not grid-independent, then its interpretation must be handled with extreme care.

14.4 SOLUTION OF COUETTE FLOWLet us consider the Couette flow problem of Section 14.2. The governing differ-ential equation is

(14.4.1)0u0t

% v 02u

0y2

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 717

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 22: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

with boundary conditions

(14.4.2)

(14.4.3)

and initial condition

(14.4.4)

First, non-dimensionalize the problem by defining the following dimensionlessvariables:

(14.4.5)

The differential equation is then written as

(14.4.6)

Similarly, the boundary and initial conditions become

(14.4.7)(14.4.8)

(14.4.9)

Using finite differences (see Table 14.1) and the explicit method described inSection 14.2, Eq. 14.4.6 becomes (see Eq. 14.2.17)

(14.4.10)

Rearranging the above equation for , the PDE (Eq. 14.4.1) takes the finite-difference form

(14.4.11)

where R = *2/*Y2. The only unknown in the above equation is , since theterms on the right-side of the equation are known from the previous time-step,where the initial values of Un (for n = 0) are known from the initial condition.Hence, the solution is obtained by solving Eq. 14.4.11 at every interior node atevery time step. The next example demonstrates the use of finite differences toobtain the solution of a Couette flow.

Example 14.1Stagnant water at 20°C is contained between two parallel plates 2 cm apart. The lowerplate is suddenly moved with a constant velocity at 0.5 m/s. Solve this Couette flowproblem using finite differences and the explicit method. Use 10 space increments anda time interval of 1.6 s. Plot the velocity profile at various values of time and comparewith the exact solution given in Eq. 14.2.3.

Ujn!1

Ujn!1 % RUj!1

n ! (1 " 2R)Ujn ! RUj"1

n

Ujn!1

Ujn!1 " Uj

n

¢u %

Uj!1n " 2Uj

n ! Uj"1n

¢Y2

U % 0 at u % 0

U % 0 at Y % 1 U % 1 at Y % 0

0U0u

% 02U

0Y2

Y % yH

u % v t

H2 U % u

V0

u % 0 at t % 0

u % 0 at y % H

u % V0 at y % 0

718 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 718

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 23: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.4 / Solution of Couette Flow 719

Solution

First, calculate *Y and *2. They are

Then R = 0.004 / 0.012 = 0.4. Note that R must be less than 0.5 (see Eq. 14.3.23) in orderfor the method to be stable. Since *Y = 0.1, as shown in Fig. E14.1, and the domainlength (spacing between the plates) is 1, using dimensionless quantities, the number ofgrid points is J = 1 ! 1 / 0.1 = 11. However, since the velocity is specified at the bound-aries, then U1 = 1 and U11 = 0. Hence, we only need to solve for the velocity at the inte-rior points (j = 2, 3, . . ., 10). This is done by solving Eq. 14.4.11 for j = 2, 3, . . . , 10.

¢Y % ¢yH

% 0.0020.02

% 0.1 ¢u % v¢tH2 %

10"6 # 1.60.022 % 0.004

U11 = 0

U1 = 1

j = 3

∆Y

Y

Fig. E14.1

The solution is started by using the initial condition at the grid points. Forexample, for grid point 2, Eq. 14.4.11 provides

Starting with n = 0 (2 = 0), the above equation yields

The procedure is repeated for the other grid points. After the velocity has been calcu-lated at all grid points, the procedure is repeated for n = 1 (2 = 0.004) and then for n = 2and so on until, for example, steady state is achieved. For this example steady state isachieved at n = 180. Note that this solution is consistent with the steady-state analyti-cal solution given by U = Y or u(y) = V0 (1 " y/H). The table that follows lists the solu-tion at the grid points at various values of 2.

U21 % 0.4U3

0 ! 0.2U20 ! 0.4U1

0 % 0.4U10 % 0.4

U2n!1 % 0.4U3

n ! (1 " 0.8)U2n ! 0.4U1

n

Uj0 % 0

2

j % 1 j % 2 j % 3 j % 4 j % 5 j % 6

Y % 0 Y % 0.1 Y % 0.2 Y %0.3 Y % 0.4 Y % 0.5

0.000 (n % 0) 1.000 0.000 0.000 0.000 0.000 0.000

0.064 (n % 16) 1.000 0.784 0.583 0.410 0.271 0.167

0.140 (n % 35) 1.000 0.851 0.707 0.573 0.451 0.344

0.280 (n % 70) 1.000 0.888 0.777 0.669 0.563 0.461

0.716 (n % 180) 1.000 0.900 0.800 0.700 0.600 0.500

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 719

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 24: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

720 Chapter 14 / Computational Fluid Dynamics

2

j % 7 j % 8 j % 9 j % 10 j % 11

Y % 0.6 Y % 0.7 Y % 0.8 Y % 0.9 Y % 0.10

0.000 (n % 0) 0.000 0.000 0.000 0.000 0.000

0.064 (n % 16) 0.096 0.051 0.024 0.010 0.000

0.140 (n % 35) 0.252 0.175 0.109 0.052 0.000

0.280 (n % 70) 0.363 0.269 0.109 0.088 0.000

0.716 (n % 180) 0.400 0.300 0.200 0.100 0.000

2

Y = 0.3 Finite Difference

Y = 0.3 Exact Solution Difference Percent

Error

0.064 0.410 0.402 0.008 1.99

0.140 0.573 0.569 0.004 0.700.280 0.669 0.668 0.001 0.15

0.716 0.700 0.700 0.000 0.00

Figure E14.2 shows additional comparisons between the exact and the finite differencesolutions for the entire domain and the same number of time steps. The solid lines arefor the exact solution, and the dots are for the finite difference solution.

10.90.80.7

t=0.064FDt=0.064ESt=0.014FDt=0.014ESt=0.028FDt=0.028ES

0.60.5Y

0.40.30.20.100

0.1

0.2

0.3

0.4

0.5U

0.6

0.7

0.8

0.9

1

Fig. E14.2

The analytical solution given in Eq. 14.2.3 is written in dimensionless form as

The table shows a comparison between values of the velocity at Y = 0.3 obtained fromthe exact solution and the finite difference solution for different values of 2.The numbersshow that the finite difference solution is reasonably accurate. The percent error is thedifference between the two solutions expressed as a percentage of the exact solution.

U % 1 " Y " aq

n% 1

2np

sin(npY) exp("n2p2u)

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 720

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 25: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.5 / Solution of Two-Dimensional Steady-State Potential Flow 721

14.5 SOLUTION OF TWO-DIMENSIONAL STEADY-STATEPOTENTIAL FLOW

Two-dimensional steady flow of an incompressible non-viscous fluid satisfiesLaplace’s Equation; using the stream function 3 (see Eq. 8.5.10), it is

(14.5.1)

Using the notation and central differencing (refer to Table 14.1) forthe second derivative, Eq. 14.5.1 is represented in discretized form by

(14.5.2)

Rearranging the above equation yields

(14.5.3)

Eq. 14.5.3 shows that the value of 3i, j is related to the values of the streamfunction at the surrounding points, as shown in Figure 14.5.

2ci, ja 1¢x2 !

1¢y2 b %

ci!1, j ! c i"1, j

¢x2 ! c i, j!1 ! c i, j"1

¢y2

ci!1, j " 2ci, j ! ci"1, j

¢x2 ! ci, j!1 " 2ci, j ! ci, j"1

¢y2 % 0

ci,j % c(xi,yj)

02c

0x2 ! 02c

0y2 % 0

i–1

j+1

j–1

j

i+1

∆y

y

x

∆x

i

Fig. 14.5 A uniform rectangular grid.

Equation (14.5.3) is written for each of the N grid points selected. This results in asystem of N linear algebraic equations that can be represented in matrix form as

(14.5.4)A" % b

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 721

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 26: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

where

Note that in general, each row will have at most five nonzero elements. Hence,matrix A will be a sparse matrix with many zero elements. The system can besolved using either direct or iterative methods. An example of a direct method ismatrix inversion, where the solution vector is expressed as

(14.5.5)

However, this method is suitable for systems with a small number of equationsand is computationally inefficient for large numbers of equations since itrequires excessive computer resources. For large systems, iterative methods aremore suitable to use since they are more computationally efficient than directmethods.

Consider the Gauss-Seidel iterative method. It is one of the most efficientmethods for solving a system of linear algebraic equations resulting from thefinite difference approximation of an elliptic partial differential equation. Therate of convergence of the method is maximized when the coefficient matrix A isdiagonally dominant; that is, if

This means that a sufficient condition for convergence is to require for eachequation that the coefficient on the diagonal be greater than or equal to the sumof the other coefficients in the equation. The “greater than” condition must holdat least for one equation (node point near a boundary).

The method may still converge even if the system is not diagonally dominant,but the rate of convergence will be slower. Fortunately, the differencing of Eq.14.5.1 produces a diagonally dominant coefficient matrix, such that in Eq. 14.5.3the coefficient of 3i, j is always larger than the coefficients of the other unknownsin the equation.

In order to demonstrate the iterative procedure, Eq. 14.5.3 is rewritten as

(14.5.6)

where 4 = *x/*y and the superscript k represents the iteration level. The proce-dure for solving the system consists of the following steps:

1. An initial guess is made for all unknown values of at all grid points.This corresponds to iteration level k = 0.

c i,jk

c i,jk!1 %

c i!1,jk ! c i"1, j

k!1 ! b2(ci,j!1k ! c i,j"1

k!1 )

2(1 ! b2)

0aii 0 5 aN

j%1j/ 1

|aij| for all i, and if |aij| 7 aN

j%1j/ 1

|aij| for at least one i

" % A"1b

A % Ea11 a12 p a1N

a21 a22 p a2N

o o o oaN1 aN2 p aNN

U, " % Ec1

c2

ocN

U, b % Eb1

b2

obN

U

722 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 722

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 27: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.5 / Solution of Two-Dimensional Steady-State Potential Flow 723

(k = 0) and most recently computed values (k ! 1 = 1).3. Repeat Step 2 until convergence is achieved; that is, the newly comput-

ed values are not much different from the values of the previousiteration. This convergence criterion can be expressed as

ε (14.5.7)

where 0 is a very small number, usually less than 10"3.In summary, the Gauss-Seidel procedure is often written as

(14.5.8)

where i = 1, 2, ..., N is the node number. Eq. 14.5.8 shows that new values of cik!1

cik!1 %

1aii

°bi " ai"1

j%1aijcj

k!1 " aN

j%i!1aijcj

` c i,jk!1 " c i, j

k

c i,jk ` )

2. Using Eq. 14.5.6, calculate new values of based on the initial guess ci,jk

are calculated from the values of from the current iteration for 1 ) j ) i " 1,cjk!1

and values of from the previous iteration for i ! 1 ) j ) N.

Example 14.2Consider a steady potential flow of air over a square block, as shown in Figure E14.2a.Estimate the streamline pattern and the velocity field around the block.

SolutionThe stream function is described by Eq. 14.5.1. Since the flow is symmetrical we willconsider only one quarter of the domain, as shown in Figure E14.2b. This domainextends, far upstream of the block where the flow is uniform and the free streamvelocity U( = 10 m/s, and far above the block where the flow is expected to beuniform as well. The exact distances where the left and top boundaries need to belocated depend on the block dimensions and fluid velocity. For the purpose ofdemonstrating the method of using finite differences for solving two-dimensional,steady potential flows we will select a domain with a reasonable number ofgrid points with *x = *y, as shown in Figure E14.2c. For this domain, we will specify3 = 0 on the lower boundary; 3 = U(H on the top boundary; 3 = U( y on the leftboundary, since the flow is assumed to be uniform; and '3/'x = 0, due to symmetry,on the right boundary. The problem is non-dimensionalized by defining the follow-ing dimensionless variables:

, ,

The dimensionless form of Eq. 14.5.1 is '26 / 'X2 ! '26 /'Y2 = 0 with the boundaryconditions shown in Figure E14.2.c. Similarly, Eq. 14.5.3 is rewritten, with *x = *y,using the dimensionless stream function 6 as

°i,j % 14

3°i"1,j ! °i,j"1 ! °i!1,j ! °i,j!14

° % c

Uq H X %

xH

Y % yH

cjk

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 723

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 28: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

724 Chapter 14 / Computational Fluid Dynamics

29282726252423

22 = 0212019181716

1514131211109

8765

4321

∆y

∆x

ψ = 1

(a)(b)

(c)

U∞

ψ = Y

∂ψ∂X

y

Y

X

L

H

x

y

hx

ψ = 0

The grid shown in Figure E14.2c has 29 grid points. In order to demonstrate themethod, the difference equation will be written for nodes 1, 9, 11, and 22 only.Similarly, difference equations can be written for the other grid points. Hence,

where we have used central differences to represent the right boundary condition as

After writing the difference equations at all 29 grid points, a system of 29 linearalgebraic equations results. The system can be represented in matrix form as

A° % b

0°i

0X %

°i!1 " °i"1

2¢X % 0 ∴ °i!1 % °i"1

Node 22: °15 ! 2°21 ! °29 " 4°22 % 0

Node 11: °7 ! °10 ! °12 ! °18 " 4°11 % 0

Node 9: °5 ! °10 ! °16 ! 3¢Y " 4°9 % 0

Node 1: °2 ! °5 ! ¢Y " 4°1 % 0

Fig. E.14.2

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 724

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 29: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.5 / Solution of Two-Dimensional Steady-State Potential Flow 725

A % E"4 1 0 0 1 0 0 p 01 "4 1 0 0 1 0 p 0o o o o o o o o o

aN1 aN2 aN3 aN4 aN5 aN6 aN7 p "4

U ° % E°1

°2

o°N

U b % Eb1

b2

obN

U

23 0.825 24 0.815 25 0.803 26 0.788 27 0.774 28 0.765 29 0.762

16 0.651 17 0.632 18 0.607 19 0.576 20 0.542 21 0.524 22 0.519

9 0.480 10 0.455 11 0.419 12 0.365 13 0.295 14 0.271 15 0.265

5 0.315 6 0.290 7 0.249 8 0.171

1 0.155 2 0.140 3 0.115 4 0.072

The solution is also shown in Fig. E14.2-1 as a plot of the 6 contours in the domainselected. The plot shows the variation in the values of 6 as a function of X and Y.

For the given example the values of the bi + s are as follows:

Starting with an initial guess of 6 i = 0 at all grid points and using the Gauss-Seideliterative method, the following solution results.The grid point numbers are listed in theshaded columns, and the values of 6 at the corresponding grid points are listed in theadjacent columns.

b2 % b3 % b4 % b6 % b7 % b8 % b10 p b15 % b17 p b22 % 0

b1 % "¢Y, b5 % "2¢Y, b9 % "3¢Y, b16 % "4¢Y, b23 % "5¢Y " 1, b24 p b29 % "1

0–0.2–0.4–0.6X

Y

–0.8–10

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0.10.1

0.30.30.40.40.50.50.60.60.70.70.80.80.90.9

0.10.10.20.2

0.30.3

0.40.40.50.5

0.60.6

0.70.7

0.80.8

0.90.9

0.10.10.10.1

0.20.20.20.2

0.30.3

0.40.4

0.50.5

0.60.6

0.70.7

0.80.8

0.90.9

0.1

0.30.40.50.60.70.80.9

0.10.2

0.3

0.40.5

0.6

0.7

0.8

0.9

0.10.1

0.20.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Fig. E14.2-1. Contour plot of 6 in the solution domain. The contour numbers are thevalues of 6 .

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 725

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 30: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

The velocity filed can be obtained by calculating the u and v velocity components usingthe stream function and Eq. 8.5.11 as follows:

In terms of dimensionless quantities, the velocity components can be calculated as

Using finite differences, the derivatives are approximated as

For example to determine the velocity at grid point 11 we write:

Similarly, we could have used central differences to calculate the velocity componentsat grid point 11 as follows:

Note that these calculated values are slightly different from the previous ones, sincecentral difference approximations are more accurate than forward difference approxi-mations. Values of u and v at all grid points can be determined in a similar way usingthe calculated values of 6 .

14.6 SUMMARYComputational fluid dynamics (CFD) in general involves a three-step process:grid-generation, flow calculation, and post-processing. The grid-generationprocess is the first step involved in solving fluid-flow problems. It can be atime-consuming and tedious process especially when creating grids for com-plicated three-dimensional geometries. However, it is worthwhile to spend thetime and effort that is needed to generate a well-constructed grid since itgreatly improves the accuracy of the results. A poorly constructed grid veryoften produces poor results. Moreover, many numerical difficulties in obtain-ing a solution or achieving convergence to a solution are very often due to apoorly constructed grid.

v11 % "Uq a °12 " °10

2¢X b % "10 a 0.365 " 0.455

2/6 b % 2.7 m/s

u11 % Uqa °18 " °7

2¢Y b % 10 a 0.607 " 0.249

2/6 b % 10.74 m/s

v11 % "Uqa °12 " °11

¢X b % "10 a 0.365 " 0.419

1/6 b % 3.24 m/s

u11 % Uqa °18 " °11

¢Y b % 10 a 0.607 " 0.419

1/6 b % 11.28 m/s

` 0°0Y

`i,j

% °i,j!1 " °i,j

¢Y and ` 0°

0X `

i,j%

°i!1,j " °i,j

¢X

u % Uq 0°0Y

and v % "Uq 0°0X

u % 0c0y

and v % " 0c0x

726 Chapter 14 / Computational Fluid Dynamics

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 726

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 31: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Sec. 14.6 / Summary 727

Grids can be of the structured, unstructured, or hybrid form. In a structuredgrid system, the geometry must be segmented into blocks and each block ismeshed in a way so the grid at its boundaries is consistent with the grid at theboundaries of the attaching blocks. The grid elements in structured grids have arectangular shape in two-dimensional space, such as shown in Figure 14.3a, andare hexahedral in three-dimensional space. Unstructured grids are formed byusing triangular elements in 2D, as shown in Figure 14.3b, and tetrahedrals in 3D.Hybrid grids use a combination of structured and unstructured grids. The advan-tages of using a unstructured grids is that the process can be automated using acomputer and hence, can be less time-consuming than generating a structuredgrid, which is more labor intensive. However, unstructured grids will requiremore computer memory and CPU time than structured grids. But, the increase inCPU time for unstructured grids may still be less than the work hours needed togenerate structured grids. That depends on the solver efficiency though, since inunstructured grids grid point locations and connectivity are more random than instructured grids. Other factors to consider include the flow geometry and theability to generate dense grids where required, such as in boundary layers. In gen-eral, it is easier to use structured grids near solid boundaries and unstructuredgrids elsewhere in the flow. Readers interested in learning more about thesetypes of grids will find more information on the subject in Thompson et al. (1998).

(a) Structured (b) Unstructured

Fig. 14.3 Schematic of structured and unstructured grids in a converging duct.

When used correctly CFD can be a very useful and powerful tool forsolving complex fluid-flow problems, especially when experimental methodscannot be used or are not possible. For example, Figure 14.4 shows how CFDwas used to determine the effect of adding a shroud to an intake valve tocontrol air flow into an engine. Figure 14.4a shows the velocity vectorsaround an unshrouded valve, and Figure 14.4b shows velocity vectors for ashrouded valve.

CFD allows solving transient, three-dimensional, compressible or incom-pressible, laminar or turbulent, reacting or non-reacting flows. CFD can helpidentify the controlling variables in an engineering system to provide guidelines

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 727

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 32: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

728 Chapter 14 / Computational Fluid Dynamics

for more rational and hence less costly experimental development efforts. CFDsimulations may predict a system behavior over a wide range of design variablesand operating conditions and to screen concepts prior to major hardware con-struction to determine trends, trade-offs, and optimize design and control. Recentdevelopments of computer systems have made it more possible to solve complexfluid-flow problems on today’s computers. Computer processing power andmemory storage capabilities have improved significantly and continue to do so,which will improve accuracy and reduce computational time. However, the solu-tion obtained using CFD may not be the right answer, and hence it is alwaysimportant for the CFD user to understand the physics of the problem beingsolved, using the appropriate governing equations and boundary and initial con-ditions. Moreover, when solving transient three-dimensional flows, the amount ofdata generated by CFD can be overwhelming and interpreting the results can bechallenging and time-consuming. In addition, the CFD results should always beverified with theoretical or experimental solutions if possible.

REFERENCESBeam, R.M. and Warming, R.F., “An Implicit Factored Scheme for Compressible

Navier–Stokes Equations,” AIAA Journal, Vol. 16, 1978, pp. 393–402.Hirsch, C., Numerical Computation of Internal and External Flows—Vol 2:

Computational Methods for Inviscid and Viscous Flows, John Wiley,Chichester, Utc, 1991.

Schlichting, H. and Gersten, K., Boundary Layer Theory, 8th Revised andEnlarged Ed., Springer, Berlin, 2000.

Tannehill, J.C.,Anderson,A.A., and Pletcher, R.H., Computational Fluid Mechanicsand Heat Transfer, 2nd Ed., Taylor & Francis, Washington, D.C., 1997.

Thompson, J.F., Soni, B., and Weatherill, N., Ed., Handbook on Grid Generation,CRC Press, Boca Raton, Fierida,1998.

Yih, C.-S., Fluid Mechanics, A Concise Introduction, McGraw-Hill, New York, 1969.

(a) (b)

Fig. 14.4 Velocity vectors shown for (a) an unshrouded valve, and (b) a shrouded valve.

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 728

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 33: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

Problems 729

14.1 Expand y % exp(x) into a Taylor series about x % 0. What is the radius of convergence of thisseries? Suppose that only the first three termsof the series are added. Compare that sumagainst the exact solution from a calculatorevaluation of exp(x) by computing the relativeerror for x % 0.1, 1, and 2. Explain why theerror increases as x increases. If you want a 1% relative error in the evaluation of exp(x),where x % 1, how many terms in the series mustbe included?

14.2 Write a computer program to evaluate exp(x), usingsingle precision (use seven digits to represent anumber). Afterwards, use the program to evaluateexp(!20) and exp("20). Explain why the results forexp(!20) are correct and the results for exp("20)are incorrect, when compared to the correspondingsolution from the calculator. Note that programmingis not trivial. Hint: If n is large, xn!1 and (n ! 1)! arehuge numbers, but xn!1/(n ! 1)! may be small. Thus:xn!1/(n ! 1)! % [x/(n ! 1)] [x/n!] or [x/(n ! 1)] #[previous term].

14.3 For ('u/'y), derive a forward-difference and abackward-difference operator that is second-orderaccurate in space.

14.4 Program the Thomas algorithm given by Eqs. (14.2.28 to 14.2.36). Use the program tocompute Ax % b, where A and b are

A %

14.5 Solve the following system of equations using theGauss elimination method or the Thomas algorithm.

2x1 ! 2x2 % 164x1 " x2 ! 2x3 % 3

5x2 " 3x3 " 6x4 % "10" 4x3 ! 3x4 % 6

14.6 Derive Ax % b for Eq. (14.2.26) applied at j % 2,3, . . . , J " 1 along with Eq. (14.2.19 and 14.2.20).

14.7 Derive the FDEs for Eqs. (14.2.1 and 14.2.2) witha second-order Runge-Kutta time differencingformula.

b % £ 123§£ 20 5

8 15 412 14

§

14.8 Program the solution algorithm for the explicitmethod in Section 14.2.3. Generate solutions withH % 0.1 m, V0 % 0.5 m/s, n % 10"3 m2/s. Try severaldifferent values of J. In all cases, set *t % *y2/2n.Compare the solutions generated with Eq. (14.2.3).

14.9 Modify the FDEs and the program developed inProblem 14.8 by making the bottom plate oscillatewith time; i.e., u(0, t) % V0 sin (2ps t). Obtainsolutions with different values of s. Examine thelimiting cases of high and low s.

14.10 Analyze the consistency of Eqs. (14.2.21).

14.11 Analyze the consistency of the following FDE:

&uj

n!1

2"

*tuj

n"1

& % n

! O"*t2, *y2, &*

*

yt4

2&#Show that it can converge to the following PDEas grid spacing and time-step size approach zero:

&''ut& ! an &

''

2

tu2& % n &

''

2

yu2&

14.12 For the program developed for Problem 14.7,generate solutions for different time-step sizes toexamine stability and accuracy (i.e., remove therequirement that *t % *y2/2n).

14.13 Program the solution algorithm for the implicitmethod in Section 14.2.3. Generate solutionswith H % 0.1 m, V0 % 0.5 m/s, n % 10"3 m2/s. Tryseveral different values of J and *t. Compare thesolution generated with Eq. (14.3.3). If only thesteady-state solution is of interest, then what isthe optimum *t (the time-step size that willenable steady-state to be achieved with thefewest time steps)?

14.14 Analyze the numerical stability of the FDEs givenby Eqs. (14.2.21).

14.15 Analyze the numerical stability of the followingFDE:

unj!1 " (uj

n!1 ! ujn"1) ! un

j"1&&&&

*y2

PROBLEMS

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 729

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

Page 34: Universiti Teknologi Malaysiasyahruls/resources/SKMM2323/5-CFD-2.pdf · 14.1 INTRODUCTION The equations governing fluid-flow problems are the continuity,the Navier– Stokes,and the

730 Chapter 14 / Computational Fluid Dynamics

Iteration Number

1c 2c 3c 4c 5c 6c 7c 8c 9c

0 0.450 0.440 0.430 0.400 0.390 0.370 0.350 0.320 0.300

1 0.457 0.443 0.435 0.431 0.412 0.387 0.366 0.307 0.289

2 0.459 0.445 0.437 0.434

t V1 V2 V3 V4

0 25 25 25 25

10 100 58 34 27

20 120 30

&uj

n!1

2"

*tu j

n"1

& % n ! O(*t2, *y2)

&uj

n!1

2"

*tu j

n"1

& % n

! O"*t2, *y2, &*

*

yt4

2&#14.16 For the FDE given by Eq. (14.2.26), show that

it is unconditionally stable if u#(0.5, 1) and conditionally stable if u#[0, 0.5].

14.17 Though the PDEs 'u/'t ! &12

&'u2/'x % 0 and'u/'t ! u'u/'x % 0 are identical analytically, they

differ when finite-differenced. If Euler explicit isused for the time derivative, and first-order backwarddifferencing is used for the spatial derivative, whichFDE will maintain the conservative property?

14.18 Program the FDEs derived in Problem 15.16.Obtain solutions for the following initial conditions:(a) u % 0 when x . "1 and , 1; u % 1, u % x ! 1when x is between "1 and 0; u % "x ! 1 when x isbetween 0 and 1. (b) u ! 0, when x . "1 and , 1;u % 1, when x is between "1 and 1.

14.19 Consider a two-dimensional transient fluid flowgoverned by the equation

Using finite differences, write the discretizedform of the above PDE using (a) the explicit

0u0t

% v c 02u

0x2 ! 02u

0y2 d

unj!1 " (uj

n!1 ! ujn"1) ! un

j"1&&&&

*y2

unj!1 " 2uj

n ! unj"1

&&&*y2

method, (b) the implicit method, and (c) theCrank-Nicolson method. Adopt the notationU(n)

i,j = u(xi, yj, tn).14.20 The steady-state values associated with selected

nodal points of a two-dimensional potential flow areshown on the sketch below. Use *x = *y = 0.1 m.(a) Write the finite differences equations for

nodes 1, 2, and 3.(b) Use your result in part (a) and calculate the

values of 3 at nodes 1, 2, and 3.

7

4

1

8

5

2

9

6

3

0.670.67

0.46

1.04Symmetry Boundary

Symmetry Boundary

1.37

1.29

1.38

ψ

= 2.25 on lower boundaryψ

3

ψ2

ψ1

14.21 Consider a one-dimensional transient fluid-flowsystem. The table that follows shows the values ofthe velocity at selected nodes as a function oftime. Determine V3 at t = 20 s using (a) the explic-it method, (b) the implicit method, and (c) theCrank-Nicolson method. Velocities are given inm/s. (Use R = 0.3)

14.22 In a two-dimensional steady-state flow system the values of the stream function at selected nodes are listed in thetable that follows. An iterative method was used to determine these values up to iteration number 2. Determine 35

at the current iteration using the Gauss-Seidel method and (*x = *y).

67730_14_ch14_p696-731.qxd 12/2/10 4:56 PM Page 730

Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s). Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.