0% found this document useful (0 votes)
28 views23 pages

Introduction To CFD

The document is an introduction to Computational Fluid Dynamics (CFD), highlighting its evolution from analytical and experimental methods to modern numerical techniques enabled by advanced computing. It discusses the advantages of CFD, including cost-effectiveness and the ability to handle complex geometries, while also addressing common misconceptions and challenges faced by users. The text emphasizes the importance of understanding the CFD process, which includes pre-processing, solving, and post-processing stages, and the need for proper validation against experimental data.

Uploaded by

believetech86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views23 pages

Introduction To CFD

The document is an introduction to Computational Fluid Dynamics (CFD), highlighting its evolution from analytical and experimental methods to modern numerical techniques enabled by advanced computing. It discusses the advantages of CFD, including cost-effectiveness and the ability to handle complex geometries, while also addressing common misconceptions and challenges faced by users. The text emphasizes the importance of understanding the CFD process, which includes pre-processing, solving, and post-processing stages, and the need for proper validation against experimental data.

Uploaded by

believetech86
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/300628334

Introduction to CFD

Chapter · December 2015


DOI: 10.1016/B978-0-12-801567-4.00001-5

CITATIONS READS

5 11,163

1 author:

Shamoon Jamshed
Institute of Space Technology
20 PUBLICATIONS 30 CITATIONS

SEE PROFILE

All content following this page was uploaded by Shamoon Jamshed on 06 July 2018.

The user has requested enhancement of the downloaded file.


AUTHOR QUERY FORM

Please e-mail your responses and any


corrections to:
Book: JAMSHED-9780128015674 E-mail: LI.Jones@Elsevier.com
Chapter: 01

Dear Author,

Any queries or remarks that have arisen during the processing of your manuscript are listed below and are highlighted by
flags in the proof. (AU indicates author queries; ED indicates editor queries; and TS/TY indicates typesetter queries.)
Please check your proof carefully and answer all AU queries. Mark all corrections and query answers at the appropriate
place in the proof using on-screen annotation in the PDF file. For a written tutorial on how to annotate PDFs, click
http://www.elsevier.com/__data/assets/pdf_file/0016/203560/Annotating-PDFs-Adobe-Reader-9-X-or-XI.pdf. A video
tutorial is also available at http://www.screencast.com/t/9OIDFhihgE9a. Alternatively, you may compile them in
a separate list and tick off below to indicate that you have answered the query.
Please return your input as instructed by the project manager.

Location in Chapter Query / Remark

,
There are no queries in this article
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

CHAPTER 1

c0001 Introduction to CFD

s0010 1. COLORFUL DYNAMICS OR COMPUTATIONAL


FLUID DYNAMICS?
p0010 Computational fluid dynamics (CFD) is one of the most quickly emerging
fields in applied sciences. When computers were not mature enough to
solve large numerical problems, two methods were used to solve fluid
dynamics problems: analytical and experimental. Analytical methods were
limited to simplified cases such as solving one-dimensional (1D) or 2D
geometry, 1D flow, and steady flow. However, experimental methods
demanded a lot of resources such as electricity, expensive equipment, data
monitoring, and data post-processing. Sometimes for engineering analysis
work, it is not within the budget of a small organization to establish such a
facility. However, with the advent of modern computers and supercom-
puters, life has become much easier. With the passage of time numerical
methods got matured and are now used to solve complex fluid dynamics
problems in a short time. Thus, today, with a small investment, some good
configuration personal computers can be bought and used to run CFD code
that can handle complex flow geometries easily. The results can be achieved
more quickly if some of the computers are joined or clustered together.
p0015 From an overall perspective, CFD is more economical than experi-
ments. The twentieth century has seen the computer age move with
cutting-edge changes, and problems or experiments that had never been
thought possible to be performed experimentally or were difficult to
perform because of limited resources are now possible with the modern
technology. It can be said that CFD is more economical than experiments.
With the advent of modern computer technology, it has gained in popu-
larity as well because advanced methods for solving fluid dynamics equa-
tions can be analyzed quickly and efficiently.
p0020 In terms of accuracy, CFD lies in between the domain of theory and
experiments. Because experiments mostly replicate real phenomena, they
are accurate. Analytical method is second because of certain assumptions
involved while solving a particular problem. CFD is last because of it in-
volves truncation errors, rounding off errors, and machine errors in
Using HPC for Computational Fluid Dynamics
ISBN 978-0-12-801567-4 © 2015 Elsevier Inc.
http://dx.doi.org/10.1016/B978-0-12-801567-4.00001-5 All rights reserved. 1

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

2 Using HPC for Computational Fluid Dynamics

numerical methods. To avoid making it “colorful dynamics,” it is the


responsibility of the CFD analyst to fully understand the logic of the
problem and correctly interpret results.
p0025 There are many benefits to performing CFD for a particular problem. A
typical design cycle now contains two and four wind-tunnel tests of wing
models instead of the 10–15 that were once routine. Because our main focus
is High-Performance Computing (HPC), we can say that if CFD is the rider,
HPC is the ride. Through HPC complex simulations (such as very
high-speed flow) are possible that otherwise would have required extreme
conditions for a wind tunnel. For hypersonic flow in the case of a re-entry
vehicle, for example, the Mach number is 20 and CFD is the only viable tool
with which to see flow behavior. For these vehicles, which cross the thin and
upper atmosphere levels, nonequilibrium flow chemistry must be used.
p0030 Consider the example of a jet engine whose entire body is filled with
complex geometries, faces, and curvature. CFD helps engineers design the
after-burner mixers, for example, which provide additional thrust for
greater maneuverability. Also, it is helpful in designing nacelles, bulbous,
cylindrical engine cowlings, and so forth.

s0015 2. CLEARING MISCONCEPTIONS ABOUT CFD


p0035 An obvious question is why so many CFD users seem unhappy. Sometimes
the problem lies in beliefs regarding CFD. Many organizations do not place
value on CFD and rely on experiments. According to their view, the use of
experiments is customary even though experiments are also prone to errors.
p0040 In addition, CFD has captured the research market more quickly than
experiments owing to the worldwide economic crisis, and it is the obvious
choice over experiments for a company when a sufficient budget is scarce. It is
also unfortunate that many people do not trust CFD, including the heads of
companies and colleagues who sometimes do not understand the complexity
of fluid dynamics problems. The analyst must first dig for errors, if any, and
then examine how he or she should portray it to higher management. If
management is spending money buying expensive hardware and software and
hiring people, the importance of CFD is clear. If management still does not
recognize the importance of CFD facts, it becomes the job of analysts to
educate and mentor the bosses. If it is desired that the statements/arguments
related to CFD remain unquestioned, they must be provided either with some
scientific or mathematical proof or with some acknowledgment by those who
have understanding and firm believe in the truth of the results.

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 3

p0045 One should compromise for less reliable CFD results when it is known
that not enough computational resources are available. This brings us to a
question regarding the control of uncertainties. Certain numerical schemes
result in dissipation error, such as first order. Other schemes such as
second-order result in dispersion error. Then there is machine error, grid
accuracy error, human error, and truncation error, to name a few. Thus,
unexpected predictions could cause the question, “Did I do something
wrong?.” In this case, it is essential to familiarize the user completely with
CFD tool(s) and avoid allowing him or her to use the tool as a black box.
p0050 Many engineers do not pursue product development, design, and
analysis as deeply as do CFD engineers. They do not understand turbulence
modeling, convergence, mesh, and such. To sell something in the market
using CFD, one should be smart and clever enough to say something the
customer can understand.
p0055 It is also annoying when software does not correspond the way it
should. This occurs when results do not converge or when there is some
complex mesh to deal with. At first, one should:
o0010 1. Carefully make assumptions if required.
o0015 2. Try to make the model simpler (such as using a symmetric or periodic
boundary condition).
o0020 3. Use reasonable boundary conditions. With an excellent mesh, results do
not converge mostly owing to incorrect boundary conditions.
o0025 4. Monitor convergence.
o0030 5. If not satisfied, go to mesh.
o0035 6. If experimental data are unavailable, perform a grid convergence study.
p0090 In this way, the efforts will not change skeptics’ perceptions overnight but
if a history of excellent CFD solutions is delivered, they will start to believe it.
p0095 Although CFD has been criticized, there are many great things about it.
A CFD engineer enjoys writing code and obtaining results, which increases
his confidence level. From a marketing point of view, people are mostly
attracted to the colorful pictures of CFD, which is how one can make a
presentation truly overwhelming. If one can produce good results but
cannot present the work convincingly, then all of the effort is useless.
p0100 From this discussion, it can be concluded that there are two important
points to remember. One is that the problem does not lie in CFD but could
be in the limitation of resources, lack of experimental data, or wrong
interpretation of results. Second, skepticism regarding CFD exists but one
should be smart enough to present the results in an attractive and evocative
manner. Remember the saying that a drop falling on a rock over a long

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

4 Using HPC for Computational Fluid Dynamics

time can create a hole in it. That philosophy will definitely work here, as
well. CFD can be colorful dynamics or computational fluid dynamics with
colorful, meaningful results. It is your choice: What do you want to see and
what do you see?

s0020 3. CFD INSIGHT


p0105 CFD mainly deals with the numerical analysis of fluid dynamics problems,
which embodies differential calculus. The equations involved in fluid
dynamics are Navier–Stokes equations. Until now, solutions to Navier–
Stokes equations have not been explicitly found except for some cases such
as Poiseuille flow, Couette flow, and Stokes flow with certain assumptions.
Therefore, several engineers and scientists have spent their lives devising
methods to solve these differential equations so as to give a meaningful
solution for a particular set of geometry and initial conditions. Thus, CFD is
the process of converting the partial differential equations of fluid dynamics
into simple algebraic equations and then solving them numerically to obtain
some meaningful result.

s0025 3.1 Comparison with Computational Structure Mechanics


p0110 Because it is a numerical tool, CFD relies heavily on experimental or
analytical data for validation. In the author’s experience, people who are in
the field of computational structure mechanics (CSM) using Finite Element
Analysis (FEA) codes for structural deformation in solids do not bother
much about creating the grid. This is because the field of FEA is more
mature than CFD. For example, there are no complex issues to solve such
as the boundary layer, so meshing efforts are reduced. No monster exists
such as yþ, so life is easier.
p0115 In addition, CFD and CSM have two features in common: they both
require meshing and they both require HPC when the mesh size is
increased. In FEA, as the mesh is increased or the number of nodes
increases, the size of the matrices to be solved increases. Similarly, when
CFD problems are solved, the number of iterations or calculations increases
with the number of grid points, which ultimately need more computational
power.

s0030 3.2 CFD Process


p0120 The entire CFD process consists of three stages: pre-processing, solving,
and post-processing. These are diagrammed in Figure 1.1.

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 5

f0010 Figure 1.1 The computational fluid dynamics process.

p0125 All three processes are interdependent. As much as 90% of effort is used
in the meshing (preprocessing) stage. This requires the user to be dexterous
and there must be the idea of creating an understandable topology. The
next stage is to solve the governing equations of flow, which is the com-
puter’s work. Remember that an error embedded in the mesh will prop-
agate in the solving stage as well, and if you are lucky enough, you may get
a converged solution. However, mostly, owing to only one culprit cell, the
solution diverges. The next phase after solving equations is post-processing.
There, the results of whatever was input and solved are obtained; colorful
pictures showing contours are interpreted for product design, development,
or optimization. For validation, the results are compared with experimental
data. If any experimental data are absent, the grid convergence study better
judges the authenticity of the results. In that case, the mesh is refined two or
three times, each time solving and getting results, until a never-changing
result (asymptotically converged solution) is obtained.
p0130 Post-processing has its own delights, and you can impress people by
showing flow simulations such as path lines, flow contours, vector plots,
flow ribbons, cylinders, and so forth. In unsteady flows, such as for direct
numerical simulation (DNS) and large eddy simulation (LES), the
iso-surface of Q-criterion or l-criterion is also shown sometimes. Post-
processing software such as Tecplot has the ability to see multiple things
simultaneously in a single picture. As examples, the stream line and flow
contours are shown simultaneously in Figure 1.2 for Ariane5 base flow [2]
and Figure 1.3 [1] shows the flow over a delta wing. There, the iso-surface
of constant pressure is shown over the wing, which is colored by the Mach
number. An iso-surface is a surface formed by a collection of points with
the same value of a property (such as temperature pressure).
p0135 We will focus on turbulent flows in this text because these problems are
mostly solved with HPC machines. Turbulence is caused by instabilities in
flow and is nondeterministic. There is a range of scales in turbulent flows that
can be as large as half the size of the body that causes the turbulence or
smaller than one-tenth of a millimeter. In current CFD techniques, in which
we use mesh to solve the flow, the mesh size must be such that it contains
cells not larger than the size of the smallest scale. Thus, the total mesh size

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

6 Using HPC for Computational Fluid Dynamics

f0015 Figure 1.2 Flow structure at the base of Ariane5 ESA Satellite Launch Vehicle [2].

becomes too large for these problems: It could be over 30 million cells. A
case for benchmarking such a problem is discussed in Chapter 6, where the
mesh size is 111 million cells. The question is where to solve them. That is
the purpose of this book, and why we need HPC. HPC solves these
problems for us. Figure 1.4 shows an image of the vortices formed behind a
truck body. The vortices obviously form as a result of the turbulence in the
wake region. A corridor of low velocity often forms behind bodies, called

Figure 1.3 Iso-surfaces of pressure colored by the Mach number [1].


f0020

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 7

f0025 Figure 1.4 Eddies form and computed in the wake owing to the technique of De-
tached Eddy Simulation (DES), which cannot be seen with conventional Reynolds
Averaged Navier Stokes (RANS) methods.

the wake. The scales I was talking about are the length of these vortices,
often called eddies. These eddies frequently form and are miscible near the
wall of the truck, whereas far from the truck body they mix with outside air
and dissipate in the form of heat. If exhaust from the truck is also considered,
a more realistic flow would be formed but computationally it would be more
complex to solve. An attractive picture of vortices is shown in Figure 1.4.

s0035 3.3 Governing Equations


p0140 While we are talking about CFD, the discussion is incomplete without
mentioning the governing equations. These equations are the life blood of
CFD. The famous equations of fluid dynamics are also known as the
Navier–Stokes equation. These equations were discovered independently
more than 150 years ago by the French engineer Claude Navier and the
Irish mathematician George Stokes. Application of supercomputers to solve
these equations introduced the field of CFD. The basis of these equations
lies in the assumption that a fluid particle deforms under shear stress. Then,
using the second law of motion and energy conservation, the dynamics of
the particle is described by its mass, momentum, and energy. In principle,
all three parameters must be conserved:
o0040 1. Conservation of mass
o0045 2. Conservation of momentum
o0050 3. Conservation of energy

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

8 Using HPC for Computational Fluid Dynamics

p0160 These set of equations constitute the Navier–Stokes equations. We will


not explore the derivation of each of these equations. Instead, the equations
are mentioned and complex terms are elaborated.

s0040 3.3.1 Conservation of Mass


p0165 The conservation of mass equation says that the mass is conserved. It is also
known as the continuity equation. The continuity equation is written as:
vr  !
þ V$ rU ¼ 0 (1.1)
vt

where
!
U ¼ ½u; v; w

s0045 3.3.2 Conservation of Momentum


p0170 The conservation of momentum is based on Newton’s second law that
F ¼ ma, where m is the mass of the fluid particle and a is its acceleration.
p0175 When applied to a fluid particle under the action of pressure, viscous and
body forces constitute a set of momentum equations. In the x-direction,
 
vru vruu vruv vruw vp v vu vu vu
þ þ þ ¼ þm þ þ þ rfx
vt vx vy vz vx vx vx vy vz
(1.2a)
p0180 In the y-direction,
 
vrv vrvu vrvv vrvw vp v vv vv vv
þ þ þ ¼ þm þ þ þ rfy (1.2b)
vt vx vy vz vy vy vx vy vz

and in the z-direction,


 
vrw vrwu vrwv vrww vp v vw vw vw
þ þ þ ¼ þm þ þ þ rfz
vt vx vy vz vz vz vx vy vz
(1.2c)
p0185 In 1845, Stokes obtained a relation for the shear stress of Newtonian
fluids. With some modification in the viscosity terms, these equations are
given as follows:
 ! vu
sxx ¼ l V$U þ 2m (1.2d)
vx

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 9

 ! vv
syy ¼ l V$U þ 2m (1.2e)
vy
 ! vw
szz ¼ l V$U þ 2m (1.2f)
vz
p0190 Asymmetric stress tensors are given as:
 
vv vu
sxy ¼ syx ¼ m þ (1.2g)
vx vy
 
vv vw
syz ¼ szy ¼ m þ (1.2h)
vz vy
 
vw vu
szx ¼ szx ¼ m þ (1.2i)
vx vz

where m is the dynamics viscosity and l is the second viscosity coefficient,


given by Stokes as:

2
l¼ m (1.2j)
3

s0050 3.3.3 Energy Equation


p0195 The energy equation is based on the principle that energy is conserved. It is
also called the First Law of Thermodynamics. Its general form is given in
Eqn (1.3):
     
vðrEÞ  ! v vT v vT v vT
þ V$ rE U ¼ rq_ þ k þ k þ k
vt vx vx vy vy vz vz
"    2
!  !2 vu
2
vv
 pV$U þ l V$U þ m 2 þ2
vx vy
 2  2  2
vw vu vv vv vw
þ2 þ þ þ þ
vz vy vx vz vy
 2 #
vw vu
þ þ
vx vz
(1.3)

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

10 Using HPC for Computational Fluid Dynamics

p0200 These three governing equations, i.e., continuity, momentum, and


energy, constitute the Navier–Stokes equations. Some authors refer to only
momentum equations as Navier–Stokes equations. These equations are
important in CFD and the reader should memorize them to understand the
methods of CFD. In CFD these equations are discretized along with points
in space and then solved algebraically.
p0205 To solve these, various approaches are used, such as the finite difference
method (FDM), finite volume method (FVM), and finite element method.
These equations can be modified for inviscid, incompressible, or
compressible and steady or unsteady fluid flow. For an inviscid flow field,
the viscous terms would be neglected and the leftover equations would
then be referred to as Euler equations.
p0210 In theory, the Navier–Stokes equations describe the velocity and
pressure of fluid accelerating by any point near the surface of a body. If we
consider an aircraft body as an example; these data can be used by engineers
to compute, for various flight conditions, all aerodynamic parameters of
interest, such as the lift, drag, and moment (twisting forces) exerted on the
airplane. Drag is particularly important with respect to the fuel efficiency of
an aircraft because it is one of the largest operating expenses for most
airlines. It is not surprising that many aircraft companies spend a large
amount of money for drag reduction research even if it results in one-tenth
of a percent. Computation-wise, drag is the most difficult to compute
compared with moment and lift.
p0215 To make these equations understandable to a computer, it is essential to
represent the aircraft’s surface and the space around it in a form that is usable
by the computer. To do this, codes are developed in which the aircraft and
its surroundings are represented as a series of regularly spaced points called a
computational grid. These are then supplied to the solver code that applies
Navier–Stokes equations to the grid data. The computer then computes the
values of air velocity, pressure, temperature, and so forth, at all points. In
effect, the computational grid breaks up the computational problem in
space; the calculations are carried out at regular intervals to simulate the
passage of time, so the simulation is temporally discretized as well. The
closer the gird points are, the more often they will be computed and the
more accurate and realistic the simulation is.
p0220 The problem is still not straightforward. The Navier–Stokes equations
are in fact nonlinear, so many variables in these equations vary with respect
to each other by powers of two or greater. Interaction of these nonlinear
variables creates newer terms, which makes the solution difficult to solve. In

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 11

addition, the global dependence of variables augments the complexity, such


as the pressure which at a point depends on the flow at many other points.
Because the different parts of a single problem are so intermingled, the
solution must be obtained at many points simultaneously.
p0225 While we are dealing with CFD, keep in mind that our main focus in
the CFD area is turbulence. This is because turbulence is currently the door
for which HPC is the key. Only computational solutions give a detailed
prediction of turbulence, which is not possible through other experimental
or analytical means.

s0055 4. METHODS OF DISCRETIZATION


p0230 There are several methods of discretization that are programmed in
commercial codes. ANSYS FLUENT and ANSYS CFX both use FVM.
This is because FVM has certain advantages and the scheme is robust. The
most popular methods are FDM and FVM, and we will discuss them
next.

s0060 4.1 Finite Difference Method


p0235 Of all methods, FDM is the simplest. It can be said that CFD started from
FDM. Initially, mathematicians derived simple formulas to calculate
derivatives and then the methods improved and CFD advanced to more
advanced methods. Currently, computations such as DNS and LES are only
theoretical. The rationale of FDM can be understood from the concept of a
derivative. The derivative of a function gives the slope of the function. For
a function of x-component of velocity u, the slope of u with respect to x
can be determined numerically as:
vu uiþ1  ui
¼ (1.4)
vx Dx

where the subscripts i and i þ 1 are the points for calculating the u values.
Here, Dx denotes the grid spacing. The method for calculating the first de-
rivative is also called the forward difference method, as we will soon observe.

s0065 4.2 Taylor Series Expansion and Forward Difference


s0070 4.2.1 Forward Difference Scheme
p0240 All of the derivatives are derived numerically using Taylor series expansion.
The number of points used to evaluate the derivative is called the stencil.

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

12 Using HPC for Computational Fluid Dynamics

The higher the number of points is, the more accurate will be the nu-
merical result. Consequently, the spacing reduction between points also
improves accuracy, but with some limitations. For a forward difference
approximation the stencil would be i and i þ 1. Hence, for function u the
value at i þ 1, i.e., ui þ 1, would be:
 2  3
vu v2 u Dx v3 u Dx
uiþ1 ¼ ui þ Dx þ 2 þ 3 þ/ (1.5)
vx vx 2! vx 3!

p0245 This formulation is then modified to evaluate the derivative. Divide


each term by Dx and manipulate the terms:
vu uiþ1  ui
¼ þ OðDxÞ (1.6)
vx Dx
p0250 This equation is called the first-order forward difference scheme. The
last term, O(Dx), indicates that the formulation is first order. This means
that when the Taylor series formula was divided by Dx, the least derivative
term containing the Dx term was of the order of 1 (power of 1).

s0075 4.2.2 Backward Difference Scheme


p0255 The backward difference scheme is as straightforward as the forward dif-
ference scheme. The stencil is reversed, i.e., i and i  1. The Taylor series
expansion is:
 2  3
vu v2 u Dx v3 u Dx
ui1 ¼ ui  Dx þ 2  3 þ/ (1.7)
vx vx 2! vx 3!

p0260 Divide each term by Dx and manipulate the terms:


vu ui  ui1
¼ þ OðDxÞ (1.8)
vx Dx
p0265 It should be noted that forward and backward schemes are first-order
accurate.

s0080 4.2.3 Central Difference Scheme


p0270 The central differencing scheme is obtained by combining the forward
series and backward series. This is done by subtracting the backward from
the forward scheme. Subtracting Eqn (1.7) from Eqn (1.5), the following
formulation is obtained:
vu uiþ1  ui1
¼ þ OðDxÞ (1.9)
vx 2Dx

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 13

f0030 Figure 1.5 Graphical representation of three basic finite difference schemes.

p0275 The last term indicates the order of the central difference scheme. The
central difference scheme is second-order accurate. Therefore, it is widely
used in the calculations. The error that arises owing to the truncation
(cutting) of the higher-order derivatives of the Taylor series terms is called
the truncation error.

s0085 4.2.4 Second-Order Derivative


p0280 To obtain the second-order derivative, the method is slightly tedious.
Because it involves more and more terms, the equations become more and
more complex mathematically. By adding Eqns (1.5) and (1.7), we get:
v2 u uiþ1  2ui þ ui1
¼ þ OðDx2 Þ (1.10)
vx2 Dx2
p0285 The three methods mentioned above are shown in Figure 1.5.

s0090 4.3 Finite Volume Method


p0290 The FVM is widely used in CFD codes because of its various advantages
over FDM. The FVM can be used for any sort of grid, i.e., structured or
unstructured, clustered or non-clustered, and so forth. It can also be used in
cases where there is discontinuity in the flow where FDM fails to calculate.

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

14 Using HPC for Computational Fluid Dynamics

In the FVM the computational domain is divided into a number of control


volumes. The values are calculated at cell centers. The values of fluxes at the
cell interface are determined through interpolation using the values at the
cell centers. For each control volume an algebraic equation is obtained, and
thus a number of equations appear that are then solved using numerical
methods. The FVM should not be confused with geometric volume
definition. It has nothing to do with physical volume. Both schemes, i.e.,
FDM and FVM, can be used in 2D and 3D flow fields.
p0295 The term “volume” refers to the fact that, to solve fluid dynamics
equations, the domain is discretized using control volumes (which could be
2D, as well) instead of taking discrete points as for the FDM. This is also a
paramount reason to accommodate unstructured grids in FVM. One
disadvantage of the FVM method is that higher-order schemes greater than
second order are difficult to handle in three dimensions. This is because of
dual approximations: that is, interpolation between the cell centers and the
interfaces and the integration of all surfaces.

s0095 4.3.1 Simplest Approach: Gauss’s Divergence Theorem


p0300 We begin by considering Gauss’s divergence theorem for a control volume.
The mesh for FVM can be structured or unstructured. Figures 1.6 and 1.7
show the structured and unstructured mesh for FVM. The normal n
represents the vector normal to the surface. The function f can be any
perimeter such as velocity, temperature, or pressure. The first-order
derivative in x-direction is:
Z Z
vf 1 vf 1 1 X N
¼ dV ¼ fdAx ¼ f Ax (1.11)
vx DV vx DV DV i¼1 i i
V A

where fi is the variable value at the elemental surfaces and N denotes the
number of bounding surfaces on the elemental volume. Equation (1.11)
applies for any type of finite volume cell that can be represented within
the numerical grid. For the structured mesh shown in Figure 1.6, N has
a value of 4 because there are four bounding surfaces of the element. In
3D, for a hexagonal element, N becomes 6. Similarly, the first-order deriv-
ative for f in the y-direction is obtained, which can be written as:
Z Z
vf 1 vf 1 1 X N
¼ dV ¼ fdAy ¼ f Ay (1.12)
vy DV vy DV DV i¼1 i i
V A

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 15

Figure 1.6 Structured mesh for finite volume method.


f0035

f0040 Figure 1.7 Unstructured mesh for finite volume method.

b0010
Problem
This problem describes the discretization of continuity equation using FVM. The results are
shown and compared with the FDM solution of the same equation. The 2D continuity
equation must be discretized:

vu vv
þ ¼0 (1.13)
vx vy
on a structured grid.

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

16 Using HPC for Computational Fluid Dynamics

f0045 Figure 1.8 Stencil of finite volume method grid for the problem.

Solution: The stencil used for the problem is shown in Figure 1.8. Introducing control
volume integration, that is, applying Eqns (1.11) and (1.12), yields the following expressions,
which are applicable to both structured and unstructured grids:
  remove braces and '1'
vf 1 X
N
1 ue Axe  uw Axw þ un Axn  us Axs
¼ fA ¼
x
(1.14)
vx DV i¼1 i i DV
Similarly,

vf 1 X
N
¼ f Ay (1.15)
vy DV i¼1 i i

Remove this line, as the


p0305 For the structured uniform grid arrangement, the projection areas Axn problem is continued until
and Axs in the x-direction and the projection areas Aye and Ayw in the the next page
y-direction are zero. One important aspect demonstrated here by the FVM
is that it allows direct discretization in the physical domain (or in a body-
fitted conformal grid) without the need to transform the continuity

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 17

equation from the physical domain to a computational domain as required


in the FDM.
p0310 Because the grid has been considered to be uniform, face velocities ue,
uw, vn, and vs are located midway between each of the control volume
centroids, which allows us to determine the face velocities from the values
located at the centroids of the control volumes. This implies:
uE þ uP uP þ uW vN þ vP vP þ vS
ue ¼ ; uw ¼ ; vn ¼ ; vs ¼
2 2 2 2
p0315 By substituting these expressions into the discretized form of the ve-
locity first-order derivatives, the final form of the discretized continuity
equation becomes:
uE þ uP x uP þ uW x vN þ vP y vP þ vS y
Ae  Aw þ An  As
2 2 2 2
p0320 Putting this into the above equation and manipulating, we get:
   
uE  uW vN  vS Problem
þ ¼0 (1.16)
2Dx 2Dy solution ends
here
p0325 This is the continuity equation obtained with the FVM. It is interesting
to check the results with the FDM. The above formulation has 2Dx and
2Dy in the denominator, which indicates the second-order accuracy of the
scheme. If the central difference is used for the continuity equation which
discretized just above, a similar formulation will be obtained. Using the
stencil of Figure 1.8, the formulation can be made by applying the forward
difference between E and P:
 2  3
vu v2 u Dx v3 u Dx
uE ¼ uP þ Dx þ 2 þ 3 þ/ (1.17)
vx vx 2! vx 3!

and the backward difference between P and W:


 2  3
vu v2 u Dx v3 u Dx
uW ¼ uP  Dx þ 2  3 þ/ (1.18)
vx vx 2! vx 3!

p0330 Because we know that the central difference is obtained by subtracting


the backward from the forward formulation. Subtracting Eqn (1.18) from
Eqn (1.17) implies:
uE  uW
(1.19)
2Dx

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

18 Using HPC for Computational Fluid Dynamics

p0335 Similarly, for the y-component, performing this operation again with N
and S cell centers and v as the velocity component, we get:
vN  vS
(1.20)
2Dy
p0340 Summing both Eqns (1.19) and (1.20) and equating to zero to get the
continuity equation:
   
uE  uW vN  vS
þ ¼0 (1.21)
2Dx 2Dy

p0345 Comparing Eqn (1.21) with Eqn (1.16), there is no difference between
them. Both schemes are second-order accurate.

s0100 5. TURBULENCE SHOULD NOT BE TAKEN FOR GRANTED


p0350 For a turbulent flow case, the variation in length scales, often represented
by the ratio of the largest to the smallest eddy size, can be computed from
the Reynolds number raised to the power 3/4. We will see in Chapter 4
that this ratio can be used to calculate the number of cells required for a
reasonably accurate simulation. Because a practical problem is 3D, the
number of grid points becomes proportional to the Reynolds number
raised to the power 9/4. Thus, in simpler terms, doubling the Reynolds
number increases the grid points five times.
p0355 Let us consider an aircraft that is 50 m long and wings with a chord
length (the distance from the leading edge to the trailing edge) of about
5 m. It is cruising at 250 m/s at an altitude of 10 km. For this, 1016 grid
points are needed to simulate turbulence near the surface with sufficient
detail [3]. We will explore this in detail in Chapter 4, but for the time being
note that currently, even with a supercomputer capable of performing 1012
floating point operations/second, it would take several thousand years to
compute the flow for 1 s of flight.
p0360 In fact, engineers are rarely interested about detailed turbulent quantities
such as small eddy dissipation; their main concern is usually with mean flow
quantities, or in the case of aircraft, the lift and drag forces and heat transfer. In
the case of an internal combustion engine (ICE), they could be interested in the
rates at which the fuel and oxidizer mix. Including turbulence means including
the fluctuating terms in the coupled Navier–Stokes equations. These fluctu-
ating terms are mostly time-averaged, thereby smoothing the flow. This
practice dramatically reduces the number of grid points. Some models used to

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

Introduction to CFD 19

model the terms arise as a result of the averaging procedure in Navier–Stokes.


All of the models carry some assumptions and contain coefficients based on
experimental findings. Therefore, it would be too good to be true to accept
that a turbulent flow simulation could be as good as the model it contains.

s0105 6. TECHNOLOGICAL INNOVATIONS


p0365 Fluid dynamicists are able to find a way to directly simulate the greater
portions of turbulent eddies with the advent of the fast computer era. In this
way, there is a compromise between DNS and turbulence-averaged
quantities simulation. The compromise has resulted in LES. With this
technique, large eddies are resolved while small eddies are modeled. The
technique emerged from meteorology, in which the large-scale turbulent
motion of clouds was of particular interest. Currently, engineers are able to
use the technique widely in other areas of fluid sciences such as for gases
inside combustion chambers of ICE. DNSs are no longer theoretical.
Simple cases such as pipe flow offer deep insight into turbulence through
DNS. These simulations have also helped engineers fine-tune the
coefficients used in models of turbulence.
p0370 A study was done by P. Moin [3,4] regarding the control of turbulence.
The study was conducted on drag reduction for civilian aircraft. The concept
of riblets was used, adopted from tooth-like structures on the skin surface of
sharks. Numerical simulations using DNS showed that riblets tend to reduce
the motion of eddies, preventing them from coming close to the surface of
the body (within about 50 mm). This preserves the transportation of a
high-speed fluid close to the surface. Another technology that employs this
development is active control. Converse to the passive technology of riblets,
this technology uses control surfaces to move against the turbulent
fluctuations of an incoming fluid. The wing surface contains several
micro-electromechanical systems that respond to pressure fluctuations to
control the small eddies that cause turbulence. Fluid dynamicists are able to
become involved in all of these efforts only by seeing nature in the form of a
shark’s skin movement. They are trying to build smarter aircrafts using this
technique. This drag effect is not limited to aircraft skins; the technology is
also used in golf balls. The drag exerted on the ball mostly results from
pressure, which is more in front than behind the ball. Golf balls have dimples
on their surface that increase turbulence and hence reduce drag, thereby
increasing the ability to travel about two and half times farther than a
plane-surface ball (Figure 1.9).

10001-JAMSHED-9780128015674
To protect the rights of the author(s) and publisher we inform you that this PDF is an uncorrected proof for internal business use only by
the author(s), editor(s), reviewer(s), Elsevier and typesetter TNQ Books and Journals Pvt Ltd. It is not allowed to publish this proof
online or in print. This proof copy is the copyright property of the publisher and is confidential until formal publication.

20 Using HPC for Computational Fluid Dynamics

f0050 Figure 1.9 Flow behind a plane ball and a golf ball, a laminar boundary layer expe-
riences more drag than a turbulent one.

Thus, CFD helps us in many complicated cases for which we cannot easily
p0375 judge or analyze based on experimental or analytical data. The growing
popularity of CFD is solely due to the rapid increase in computational power
and the efficacy that is reflected by the field itself. However, because humanity’s
desires do not rest, as computational power crosses a quadrillion floating-point
operations per second, scientists and fluid dynamicists will begin to float new
complex problems that are currently thought to be impossible to solve.

REFERENCES
[1] Jamshed S, Hussain M. Viscous flow simulations on a delta rectangular wing using Spalart
Allmaras as a turbulence model. In: Proceedings of the 8th international Bhurban
conference on applied sciences & technology. (Islamabad, Pakistan): January 2011.
[2] Jamshed S, Thornber B. Numerical analysis of transonic base-flow of Ariane5. In: 7th
International Bhurban conference on applied sciences & technology. (Islamabad,
Pakistan): Centre of excellence on science and technology (CESAT); January 7, 2010.
[3] Moin P, Kim J. Tackling turbulence with supercomputers. Scientific American January
1997, pp 62–68.
[4] Moin P, Kim J, Choi H. Direct numerical simulation of turbulent flow over riblets.
Journal of Fluid Mechanics October 1993;Vol. 255:503–39. http://dx.doi.org/10.1017/
S0022112093002575.

10001-JAMSHED-9780128015674
JAMSHED: 01

Non-Print Items

Abstract:
This chapter is an introduction to Computational Fluid Dynamics (CFD). Many organizations implement CFD in the
computer-aided engineering phase. However, most of the time, higher management is not interested, perhaps because of
the lengthy simulations or uncertainty regarding results. These issues are discussed and various misconceptions about CFD
are explored and cleared up. The basics of CFD with governing equations are also discussed.

Keywords:
CFD; Governing equations; Simulations; Uncertainty.

View publication stats

You might also like