## Chapter One Introduction

### 1.1 General

#### 1.1.1 Historical Background

The development of modern computational fluid dynamics (CFD) began with the advent of the digital computer in the early 1950s.
Finite difference methods (FDM) and finite element methods (FEM), which are the basic tools used in the solution of partial
differential equations in general and CFD in particular, have different origins. In 1910, at the Royal Society of London,
Richardson presented a paper on the first FDM solution for the stress analysis of a masonry dam. In contrast, the first FEM
work was published in the *Aeronautical Science Journal* by Turner, Clough, Martin, and Topp for applications to aircraft stress analysis in 1956. Since then, both methods have been
developed extensively in fluid dynamics, heat transfer, and related areas.

Earlier applications of FDM in CFD include Courant, Friedrichs, and Lewy [1928], Evans and Harlow [1957], Godunov [1959], Lax and Wendroff [1960], MacCormack [1969], Briley and McDonald [1973], van Leer [1974], Beam and Warming [1978], Harten [1978, 1983], Roe [1981, 1984], Jameson [1982], among many others. The literature on FDM in CFD is adequately documented in many text books such as Roache [1972, 1999], Patankar [1980], Peyret and Taylor [1983], Anderson, Tannehill, and Pletcher [1984, 1997], Hoffman [1989], Hirsch [1988, 1990], Fletcher [1988], Anderson [1995], and Ferziger and Peric [1999], among others.

Earlier applications of FEM in CFD include Zienkiewicz and Cheung [1965], Oden [1972, 1988], Chung [1978], Hughes et al. [1982], Baker [1983], Zienkiewicz and Taylor [1991], Carey and Oden [1986], Pironneau [1989], Pepper and Heinrich [1992]. Other contributions of FEM in CFD for the past two decades include generalized Petrov-Galerkin methods [Heinrich et al., 1977; Hughes, Franca, and Mallett, 1986; Johnson, 1987], Taylor-Galerkin methods [Donea, 1984; Löhner, Morgan, and Zienkiewicz, 1985], adaptive methods [Oden et al., 1989], characteristic Galerkin methods [Zienkiewicz et al., 1995], discontinuous Galerkin methods [Oden, Babuska, and Baumann, 1998], and incompressible flows [Gresho and Sani, 1999], among others.

There is a growing evidence of benefits accruing from the combined knowledge of both FDM and FEM. Finite volume methods (FVM), because of their simple data structure, have become increasingly popular in recent years, their formulations being related to both FDM and FEM. The flowfield-dependent variation (FDV) methods [Chung, 1999] also point to close relationships between FDM and FEM. Therefore, in this book we are seeking to recognize such views and to pursue the advantage of studying FDM and FEM together on an equal footing.

Historically, FDMs have dominated the CFD community. Simplicity in formulations and computations contributed to this trend. FEMs, on the other hand, are known to be more complicated in formulations and more time-consuming in computations. However, this is no longer the case in many of the recent developments in FEM applications. Many examples of superior performance of FEM have been demonstrated. Our ultimate goal is to be aware of all advantages and disadvantages of all available methods so that if and when supercomputers grow manyfold in speed and memory storage, this knowledge will be an asset in determining the computational scheme capable of rendering the most accurate results, and not be limited by computer capacity. In the meantime, one may always be able to adjust his or her needs in choosing between suitable computational schemes and available computing resources. It is toward this flexibility and desire that this text is geared.

#### 1.1.2 Organization of Text

This book covers the basic concepts, procedures, and applications of computational methods in fluids and heat transfer, known as computational fluid dynamics (CFD). Specifically, the fundamentals of finite difference methods (FDM) and finite element methods (FEM) are included in Parts Two and Three, respectively. Finite volume methods (FVM) are placed under both FDM and FEM as appropriate. This is because FVM can be formulated using either FDM or FEM. Grid generation, adaptive methods, and computational techniques are covered in Part Four. Applications to various physical problems in fluids and heat transfer are included in Part Five.

The unique feature of this volume, which is addressed to the beginner and the practitioner alike, is an equal emphasis of these two major computational methods, FDM and FEM. Such a view stems from the fact that, in many cases, one method appears to thrive on merits of other methods. For example, some of the recent developments in finite elements are based on the Taylor series expansion of conservation variables advanced earlier in finite difference methods. On the other hand, unstructured grids and the implementation of Neumann boundary conditions so well adapted in finite elements are utilized in finite differences through finite volume methods. Either finite differences or finite elements are used in finite volume methods in which in some cases better accuracy and efficiency can be achieved. The classical spectral methods may be formulated in terms of FDM or they can be combined into finite elements to generate spectral element methods (SEM), the process of which demonstrates usefulness in direct numerical simulation for turbulent flows. With access to these methods, readers are given the direction that will enable them to achieve accuracy and efficiency from their own judgments and decisions, depending upon specific individual needs. This volume addresses the importance and significance of the in-depth knowledge of both FDM and FEM toward an ultimate unification of computational fluid dynamics strategies in general. A thorough study of all available methods without bias will lead to this goal.

Preliminaries begin in Chapter 1 with an introduction of the basic concepts of all CFD methods (FDM, FEM, and FVM). These concepts are applied to solve simple one-dimensional problems. It is shown that all methods lead to identical results. In this process, it is intended that the beginner can follow every step of the solution with simple hand calculations. Being aware that the basic principles are straightforward, the reader may be adequately prepared and encouraged to explore further developments in the rest of the book for more complicated problems.

Chapter 2 examines the governing equations with boundary and initial conditions which are encountered in general. Specific forms of governing equations and boundary and initial conditions for various fluid dynamics problems will be discussed later in appropriate chapters.

Part Two covers FDM, beginning with Chapter 3 for derivations of finite difference equations. Simple methods are followed by general methods for higher order derivatives and other special cases.

Finite difference schemes and solution methods for elliptic, parabolic, and hyperbolic equations, and the Burgers’ equation are discussed in Chapter 4. Most of the basic finite difference strategies are covered through simple applications.

Chapter 5 presents finite difference solutions of incompressible flows. Artificial compressibility methods (ACM), SIMPLE, PISO, MAC, vortex methods, and coordinate transformations for arbitrary geometries are elaborated in this chapter.

In Chapter 6, various solution schemes for compressible flows are presented. Potential equations, Euler equations, and the Navier-Stokes system of equations are included. Central schemes, first order and second order upwind schemes, the total variation diminishing (TVD) methods, preconditioning process for all speed flows, and the flowfield-dependent variation (FDV) methods are discussed in this chapter.

Finite volume methods (FVM) using finite difference schemes are presented in Chapter 7. Node-centered and cell-centered schemes are elaborated, and applications using FDV methods are also included.

Part Three begins with Chapter 8, in which basic concepts for the finite element theory are reviewed, including the definitions of errors as used in the finite element analysis. Chapter 9 provides discussion of finite element interpolation functions.

Applications to linear and nonlinear problems are presented in Chapter 10 and Chapter 11, respectively. Standard Galerkin methods (SGM), generalized Galerkin methods (GGM), Taylor-Galerkin methods (TGM), and generalized Petrov-Galerkin (GPG) methods are discussed in these chapters.

Finite element formulations for incompressible and compressible flows are treated in Chapter 12 and Chapter 13, respectively. Although there are considerable differences between FDM and FEM in dealing with incompressible and compresible flows, it is shown that the new concept of flowfield-dependent variation (FDV) methods is capable of relating both FDM and FEM closely together.

In Chapter 14, we discuss computational methods other than the Galerkin methods. Spectral element methods (SEM), least squares methods (LSM), and finite point methods (FPM, also known as meshless methods or element-free Galerkin), are presented in this chapter. Chapter 15 discusses finite volume methods with finite elements used as a basic structure.

Finally, the overall comparison between FDM and FEM is presented in Chapter 16, wherein analogies and differences between the two methods are detailed. Furthermore, a general formulation of CFD schemes by means of the flowfield-dependent variation (FDV) algorithm is shown to lead to most all existing computational schemes in FDM and FEM as special cases. Brief descriptions of available methods other than FDM, FEM, and FVM such as boundary element methods (BEM), particle-in-cell (PIC) methods, Monte Carlo methods (MCM) are also given in this chapter.

Part Four begins with structured grid generation in Chapter 17, followed by unstructured grid generation in Chapter 18. Subsequently, adaptive methods with structured grids and unstructured grids are treated in Chapter 19. Various computing techniques, including domain decomposition, multigrid methods, and parallel processing, are given in Chapter 20.

Applications of numerical schemes suitable for various physical phenomena are discussed in Part Five (Chapters 21 through 27). They include turbulence, chemically reacting flows and combustion, acoustics, combined mode radiative heat transfer, multiphase flows, electromagnetic flows, and relativistic astrophysical flows.

### 1.2 One-Dimensional Computations by Finite Difference Methods

In this and the following sections of this chapter, the beginner is invited to examine the simplest version of the introduction of FDM, FEM, FVM via FDM, and FVM via FEM, with hands-on exercise problems. Hopefully, this will be a sufficient motivation to continue with the rest of this book.

In finite difference methods (FDM), derivatives in the governing equations are written in finite difference forms. To illustrate, let us consider the second-order, one-dimensional linear differential equation,

Display matter not available in HTML version | (1.2.1a) |

*u*specified at the boundaries),

Display matter not available in HTML version | (1.2.1b) |

*u*=

*x*

^{2}−

*x*.

It should be noted that a simple differential equation in one-dimensional space with simple boundary conditions such as in this case possesses a smooth analytical solution. Then, all numerical methods (FDM, FEM, and FVM) will lead to the exact solution even with a coarse mesh. We shall examine that this is true for this example problem.

The finite difference equations for *du*/*dx* and *d*^{2}*u*/*dx*^{2} are written as (Figure 1.2.1)

Display matter not available in HTML version | (1.2.2a) |

Display matter not available in HTML version | (1.2.2b) |

Display matter not available in HTML version | (1.2.2c) |

Display matter not available in HTML version | (1.2.3) |

Image not available in HTML version |

Display matter not available in HTML version | (1.2.4) |

*u*

_{i − 1}= 0,

*u*

_{i + 1}= 0, as specified by the given boundary conditions, the solution at

*x*= 1/2 with Δ

*x*= 1/2 becomes

*u*= − 1/4. This is the same as the exact solution given by

_{i}Display matter not available in HTML version | (1.2.5) |

In what follows, we shall demonstrate that the same exact solution is obtained, using other methods: FEM and FVM.

### 1.3 One-Dimensional Computations By Finite Element Methods

For illustration, let us consider a one-dimensional domain as depicted in Figure 1.3.1a. Let the domain be divided into subdomains; say two local elements (*e* = 1, 2) in this example as shown in Figure 1.3.1b,c. The end points of elements are called nodes.

Image not available in HTML version |

**(a)**Given domain (Ω) with boundaries (Γ

_{1}(

*x*= 0), Γ

_{2}(

*x*= 1)).

**(b)**Global nodes (α, β = 1, 2, 3).

**(c)**Local elements (

*N*,

*M*= 1, 2).

**(d)**Local trial functions.

*u*

^{(e)}(

*x*) is a linear function of

*x*

Display matter not available in HTML version | (1.3.1) |

*x*= 0 (node 1) and for

*x*=

*h*(node 2) in terms of the nodal values of variables,

*u*

^{(e)}

_{1}and

*u*

^{(e)}

_{2}, solve for the constants α

_{1}and α

_{2}, and substitute them back into (1.3.1). These steps lead to

Display matter not available in HTML version | (1.3.2) |

*u*

^{(e)}

_{N}represents the nodal value of

*u*at the local node

*N*for the element (

*e*), and Φ

^{(e)}

_{N}(

*x*) are called the local domain (element)

*trial functions*(alternatively known as interpolation functions, shape functions, or basis functions),

Display matter not available in HTML version | (1.3.3a) |

Display matter not available in HTML version | (1.3.3b) |

There are many different ways to formulate finite element equations (as detailed in Part Three). One of the simplest approaches
is known as the Galerkin method. The basic idea is to construct an inner product of the residual *R*^{(e)} of the local form of the governing equation (1.2.1a) with the *test functions* chosen the same as the trial functions given by (1.3.3) and in (1.3.2):

Display matter not available in HTML version | (1.3.4) |

Display matter not available in HTML version |

Display matter not available in HTML version | (1.3.5) |

This is known as the variational equation or *weak form* of the governing equation. Note that the second derivative in the given differential equation (1.2.1) has been transformed
into a first derivative in (1.3.5), thus referred to as “weakened.” This implies that, instead of solving the second order differential equation directly, we are to solve the first order (weakened)
integro-differential equation as given by (1.3.5), thus leading to a *weak solution*, as opposed to a *strong solution* that represents the analytical solution of (1.2.1). The derivative *du*/*dx* in the first term is no longer the variable within the domain, but it is the Neumann boundary condition (constant) to be specified at *x* = 0 or *x* = *h* if so required. Likewise, the test function is no longer the function of *x*, thus given a special notation Image not available in HTML version, called the Neumann boundary test function, as opposed to the domain test function Φ^{(e)}_{N}(*x*). The Neumann boundary test function assumes the value of 1 if the Neumann boundary condition is applied at node *N*, and 0 otherwise, similar to a Dirac delta function. This represents one of the limit values given by (1.3.3b) at *x* = 0 or *x* = *h*, indicating that it is no longer the function of *x* within the domain. Furthermore, appropriate direction cosines must be assigned, reduced from two-dimensional configurations
(Figure 8.2.3). Depending on the Neumann boundary condition being applied on either the left-hand side (*x* = 0) or the right-hand side (*x* = *h*), we obtain

Display matter not available in HTML version | (1.3.6a) |

Display matter not available in HTML version | (1.3.6b) |

*x*=

*h*, θ = 180○ for

*x*= 0). This represents the simplification of 2-D geometry into a 1-D problem.

Using a compact notation, we rewrite (1.3.5) as

Display matter not available in HTML version | (1.3.7) |

*x*) in the domain trial and test functions will be omitted for simplicity unless confusion is likely to occur]:

###### Stiffness (Diffusion *or* Viscosity) Matrix (associated with the physics arising from the second derivative term)

Display matter not available in HTML version |

###### Source Vector

Display matter not available in HTML version |

###### Neumann Boundary Vector

Display matter not available in HTML version |

Contributions of local elements calculated above (*e* = 1, 2) can be assembled into global nodes (α, β = 1, 2, 3) simply by summing the adjacent elemental contributions to the
global node shared by both elements. In this example, global node 2 is shared by local node 2 of element 1 and local node
1 of element 2.

Display matter not available in HTML version | (1.3.8) |

Display matter not available in HTML version | (1.3.9) |

Display matter not available in HTML version | (1.3.10) |

*du*/

*dx*is not zero.

If the Neumann boundary conditions are to be applied, then the boundary test function Image not available in HTML version assumes the value of one and the *du*/*dx* as given is simply imposed at the node under consideration. This is a part of the FEM formulation that makes the process
more complicated than in FDM, but it is a distinct advantage when the Neumann boundary conditions are to be specified exactly.

Notice that the 2 × 2 local stiffness matrices for element 1 and element 2 are overlapped (superimposed) at the global node 2 with the contributions algebraically summed together,

Display matter not available in HTML version |

Display matter not available in HTML version |

© Cambridge University Press