refinement increases the computational costs (the number of equations to be solved and
the time it takes to compute the entire simulation). If one tends toward the other end of
the model-resolve spectrum models all turbulence of all length and time scales, the
computational costs decrease but one loses accuracy in the simulation. CFD researchers
usually tend to resolve a range of turbulent length and time scales and model the rest.
Usually the range is related to the range of interest of the flow simulation. For instance, if someone is simulating gas dynamics in the inner-ballistics of a particular weapon, it
Computational Fluid Dynamics
11
would be best to resolve turbulence on the length range of the chamber inside the weapon
and model anything much larger and much smaller. Likewise, any turbulence that occurs
over a longer period than the time it takes to fire the weapon would have smaller effects
on the simulation; it would be best to model turbulence on longer time scales and much
shorter time scales.
The most expensive turbulence scheme is Direct Numerical Simulation (DNS) (32). In DNS,
all length scales of the turbulence are resolved and little or no modeling is done. It is not used in cases of extremely complex geometries which can create prohibitive expense in
resolving the turbulence especially in special geometrically complex portions of the domain.
Less expensive than DNS, the Large Eddy Simulation (LES) resolves turbulence on large
length scales as the name suggests (33). A model is used to represent sub-grid scale effects of turbulence. The computational cost of turbulence at small length scales is reduced through
modeling.
Reynolds-averaged Navier-Stokes (RANS) is the oldest approach to turbulence modeling
and it is cheaper than LES. It involves solving a version of the transport equations with new Reynolds stresses introduced. This addition brings a 2nd order tensor of unknowns to be
solved as well. Examples of RANS methods are K-ε methods (34), Mixing Length Model
(35), and the Zero Equation model (35).
The Detached-eddy simulation (DES) is a version of the RANS model in which portions of
the grid use RANS turbulence modeling and portions of the grid (or mesh) use an LES
model (36). Since RANS is usually cheaper to implement than LES, DES is usually more
expensive than using RANS throughout the entire domain or grid and usually cheaper than
using LES throughout the entire grid. If the turbulent length scales fit within the grid
dimensions or the particular portion of the grid is near a boundary or wall, a RANS model is used. However, when the turbulence length scale exceeds the maximum dimension of the
grid, DES switches to an LES model. Care must be taken when creating a mesh over which
DES will be used to model turbulence due to the switching between RANS and LES.
Therefore thought must be given to proper refinement to minimize computation while
maximizing accuracy (especially refinement near walls). DES itself does not utilize zonal
functions; there is still one smooth function used across the entire domain regardless of the use of RANS or LES in certain regions.
There are many more turbulence models including the coherent vortex simulation which
separates the flow field turbulence into a coherent part and a background noise part,
somewhat similar to LES (37). Many of the contributions today are coming through different
versions of RANS models.
3.4 Linear algebraic equation system
Once the mathematical equation has been chosen in the pre-processing stage, the mesh has
been partitioned and distributed, and the numerical discretization is chosen and coded, the
last part of the computer program is to solve the resulting algebraic system for the
unknowns. Remember in CFD we are calculating the unknowns (velocity and pressure, for
instance) at all nodes in the domain. The algebraic system usually looks like Ax = b. Usually with many steady problems, Ax is a linear equation system. Therefore we can just invert the
matrix A to find the vector x of unknown values. The problem is that for large
computations, for instance a computation involving 500 million nodes, inverting the matrix
A takes too long. Remember that the number of nodes does not necessarily equal the
12
Applied Computational Fluid Dynamics
number of unknowns. If you’re calculating 5 unknowns at every node, than you must
multiply the number of nodes by the number of unknowns per node to get the value of
actual number of unknowns and the length of the unknown vector x. So for such large
problems, we solve the equation system iteratively. These systems are solved iteratively
with iterations such as Newton or the Picard iteration.
In many cases with unsteady flows, Ax represents a system of ordinary or partial
differential equations. In this case, CFD researchers must choose either an implicit method
or an explicit method to deal with the time integration. An explicit method calculates the
solution at a later time based on the current solution. Another way to rephrase that is that it calculates the current solution based on an earlier solution in time. An implicit method
calculates the solution at a later time based on both the solution at a later time and the
current solution. Rephrasing that, an implicit method calculates the current solution based
on both the current solution and the solution at an earlier time. Once a method is chosen and the time derivatives have been expanded using an implicit or explicit method, Ax is usually
a nonlinear algebraic system.
As stated earlier, for large problems, it may be too time-consuming or too costly
(computationally) to compute this directly by inverting A. Usually, then, the linear system is solved iteratively as well (38).
One must then choose which type of iterative solver to employ to find the unknown vector.
Depending on the characteristics of this equation system, an appropriate solver is chosen
and employed to solve the system. The major implication of all computational research in
this area is that there is no one perfect iterative solver for every situation. Rather there are solvers that are better for certain situations and worse for others. When operating and
computing with no information about the equation system, there are, however, general
solvers that are quite robust at solving many types of problems though may not be the
fastest to facilitate the specific problem one may be working on at the moment.
A popular class of iterative solvers for linear systems includes Krylov subspace methods of
which GMRES appears to be the most general and robust (38) (39). Its robustness makes it a
great choice for a general solver especially when a researcher has no specific information
about the equation system she is asked to solve. GMRES minimizes residuals over
successively larger subspaces in an effort to find a solution.
Still, in recent years, the Multigrid method has shown better optimal performance than
GMRES for the same problems, motivating many to use this method in place of GMRES.
The Multigrid method minimizes all frequency components of the residual equally
providing an advantage over conventional solvers that tend to minimize high-frequency
components of the residual over low-frequency components of the residual. Operating on
different scales, the Multigrid method completes in a mesh-independent number of
iterations (40) (41).
CFD experts also employ methods to simplify the ability of a solver to solve an algebraic
equation system by pre-conditioning the matrix. The point of preconditioning is to
transform the matrix closer to the identity matrix which is the easiest matrix to invert.
Though we rarely invert matrices for such large problems, matrices that are invertible or
closer to being invertible are also easier to solve iteratively.
Preconditioning is an art, involving the correct choice of preconditioner according to the
type of linear system (just as in choosing the correct solver or iterative method). Examples include lumped preconditioners, diagonal preconditioners, incomplete LU, Conjugate-Gradient, Cholesky or block preconditioners such as block LU or Schwarz (38) (42) (43). The
Computational Fluid Dynamics
13
best preconditioners are those that take advantage of the natural structure of the algebraic system in order to facilitate the transformation of A to a matrix closer to the identity matrix, thereby facilitating the solving of the system.
The condition number roughly measures at what rate the solution x will change with respect
to a change in b. Low conditions numbers imply more ease in inverting and solving the
system. Characteristics such as condition number and even definite-ness of systems become
important in choosing a preconditioner.
3.5 Libraries
Many CFD programs require thousands of lines of code for one specific simulation. To
avoid writing a different program for every application, researchers often write general
programs and software packages that can be used for a variety of situations. This generality greatly increases the lines of code even more.
To help, there are many CFD and computational solid dynamics (CSD) libraries and applied
mathematics libraries for the solving of such differential equations. They include code libraries such as OFELI (44), GETFEM (45), OOFEM (46), deal.ii (47), fdtl (48), RSL (49), MOUSE (50),
OpenFOAM (51), etc. Sometimes a CFD engineer may use a package like ANSYS Fluent (52) to
do a simulation, and sometimes a CFD researcher may find that the software does not give
him the freedom to do what he would like to do (usually for very specific research
applications). In these cases, he can write his own code or piece code together using these
libraries. The most general Finite Element Library is deal.ii which is written in C++. It contains great support but currently does not support triangles or tetrahedral.
3.6 Moving problems
Moving problems are another class of CFD challenges. One can either use a body-fitted
mesh approach (an approach where the mesh fits around the solid body of interest), an
overlapping mesh method, or a meshless method. Body-fitted mesh methods must actual
move the mesh elements or cells. Overlapping methods have the option of moving the mesh
but capture the movement of interest in the overlapping regions. Meshless methods avoid
the need to move the mesh as moving the mesh has the ability to introduce error. Usually
when a mesh is moving the aspect ratio of the mesh elements must be checked. If the ratio
goes beyond some limit, the mesh must be reordered and remade, and the solution from the
old mesh must be projected to the new mesh in order to continue the simulation. Each of
those steps has the ability to introduce error. Therefore it is best to limit mesh distortion or concentrate it in elements that have the ability to absorb the deformation without reaching
the aspect ratio limit for the computation (7) (53).
There are also numerous methods that avoid meshes. Due to the problems and errors that
poor refinement and mesh distortion introduce, some people avoid mesh methods
altogether. Some meshless methods (54) include spectral methods (55), the vortex method
(meshless method for turbulent flows), and particle dynamics methods (56).
4. Post-processing
This is the final stage when the computations are complete. This involves taking the output
files full of velocity, pressure, density, and similar. information at each node for each time step and displaying the information visually, hopefully with color. Many CFD engineers
also animate the results so as to better show what happens in time or to follow a fluid particle or a streamline.
14
Applied Computational Fluid Dynamics
4.1 Engineering
Up to this point, all of the work we have spoken about deals with the computer
science/electrical engineering part or the computational and applied mathematics part of
CFD. The mechanical and chemical engineering part of CFD comes in the post-processing
and analysis.
The interpretation of the visualized results is also another point at which error can be
introduced. CFD scientists and engineers must therefore take care in not overextending the
analysis and simultaneously not missing important implications or conclusions that can be
drawn from it. Engineers also make sure to corroborate the results with physical
experiments and theoretical analysis. Additionally, the choice of problem and the
motivation can come from the engineering side of CFD at the very beginning before any pre-
processing work. Finally, the engineering analysis of the phenomenon directs the feedback
loop of the research work. At this point the CFD worker must decide what values to change,
whether it should be run again, what parameters should be maintained at current values,
etc. He must decide which parameters’ effect should be tested. He must determine if the
results make sense and how to properly communicate those results to other engineers,
scientists, scientists outside of the field, lay persons, and policy makers.
CFD work has taken exciting directions and comes to bear in many ways in society. When
the fluid is water, CFD workers study hydrodynamics. When the fluid is air, they study
aerodynamics. When it is air systems, they study meteorology and climate change. When it
is the expanding universe, astronomy and cosmology; blood, medicine; oil and fossil flows,
geology and petroleum engineering. CFD workers work with zoologists studying the
mechanics of bird flight, paleontologists studying fossils, and chemists studying mixing
rates of various gases in chemical reactions and in cycles like the nitrogen cycle.
Because of the importance and presence of fluids everywhere, the interaction of fluids with
structures throughout the real world, and the application of mechanics and chemical
engineering everywhere, CFD remains important. Moreover, the computational tools CFD
engineers use can be utilized to solve and help other computational fields. Since the advent and continual innovation of the computer, all scientific fields have become computational—
computational biology, computational chemistry, computational physics, etc. The same
computational tools used in CFD can often be applied in other areas (predicting the weather
involves a linear algebraic system for instance). This allows CFD engineers and scientists to move in and out of fields and bring their engineering analytical skills and critical reasoning to bear in other situations. CFD engineers and scientists are even used to make video games
and animations look more physically realistic instead of simply artistic (57).
5. Closing
There are a host of other interesting areas in CFD such as two-phase or multi-phase flow
(58), vorticity confinement techniques (similar to shock capturing methods) (59), probability density function methods (60), and fluid-structure interaction (FSI) (61). Other chapters in this book address those, so we will not talk specifically about them here. It is simply
important to understand that as computing capability increases as computer scientists
increase the clock speed of the microchip all the time, our ability to solve real-life problems increases. Problems involving two liquids or two phases occur all the time, and there are
many instances of fluids interacting with deforming solids—in fact that is the general
reality. So combining CFD with computational solid dynamics is an important partnership
that lends itself well to solving the major challenges facing us in the 21st century.
Computational Fluid Dynamics
15
6. References
[1] Phing, Anselm Ho Yen. Simulating Combustion Flow in a Rocket Chamber. Lulea: Lulea University of Technology, 2008.
[2] A Study of Sharkskin and its Drag Reducing Mechanism. Freidmann, Elfriede, Portl, Julia and Richter, Thomas. Berlin: Springer-Verlag, 2010.
[3] Three-Dimensional Aerodynamic Simulations of Jumping Paratroopers and Falling Cargo Payloads. Udoewa, Victor. 5, Reston, Virginia: AIAA, 2009, Vol. 46. 0021-8669.
[4] Blood Flow in Arteries. Ku, David N. 1, Palo Alto, CA: Annual Reviews, 1997, Vol. 29.
[5] Outflow boundary conditions for three-dimensional finite element modeling of blood flow and pressure in arteries. Vignon-Clementel, Irene E., et al., et al. 29-32, Stanford : Elsevier, 2006, Vol. 195.
[6] Numerical investigation of transitional and weak turbulent flow past a sphere. Tomboulides, Ananias G. and Orszag, Steven A. Cambridge: Cambridge University Press, 2000,
Vol. 416.
[7] Mesh Generation and Update Techniques for 3D Aerodynamic Simulations. Udoewa, Victor. 7, s.l.: Wiley, 2009, Vol. 29.
[8] Slip formulation for numerical simulations of jumping paratroopers. Udoewa, Victor. 7, Johannesburg: Academic Journals, 2009, Vol. 2.
[9] Models and Finite Element Techniques for Blood Flow Simulation. Behr, Marek. s.l.: International Journal for Computational Fluid Dynamics, 2006, Vol. 20.
[10] Sawley, Mark L. Numerical Simulation of the Flow around a Formula 1 Racing Car.
EPFL Supercomputing Review. [Online] November 1, 1997. [Cited: July 13, 2011.]
http://ditwww.epfl.ch/SIC/SA/publications/SCR97/scr9-page11.html.
[11] Computational study of flow around a simplified car body. Guilmineau, Emmanuel. 6-7, Ottowa, Canada: Elevier, 2008, Vol. 96.
[12] Top 500. Top 500 Supercomputing Sites. Top500.org. [Online] Top 500, June 1, 2011.
[Cited: July 13, 2011.] www.top500.org/lists/2011/06.
[13] Salisbury, David F. News Release. Stanford News Service. [Online] November 19, 1997.
[Cited: July 13, 2011.]
http://news.stanford.edu/pr/97/971119supercomp.html.
[14] MESHPART a Matlab Mesh Partitioning and Graph Separator Toolbox. Cerfacs. [Online]
Cerfacs, February 8, 2002. [Cited: July 13, 2011.]
http://www.cerfacs.fr/algor/Softs/MESHPART/.
[15] Karypis, George and Kumar, Vipin. METIS - Unstructured Graph Partitioning and Sparse Matrix Ordering System, Version 2.0. Minneapolis: s.n., 1995.
[16] Karypis, George, Schloegel, Kirk and Kumar, Vipin. PARMETIS - Parallel Graph
Partitioning and Sparse Matrix Ordering. Minneapolis: University of Minnesota,
2003.
[17] Applying Parmetis To Structured Remeshing For Industrial CFD Applications. Laflamme, S., et al., et al. 1, s.l.: Spring: International Journal of High Performance Computing
Applications, 2003, Vol. 17.
[18] OpenMP. OpenMP News. OpenMP. [Online] OpenMP, July 9, 2011. [Cited: July 13,
2011.] http://openmp.org/wp/.
16
Applied Computational Fluid Dynamics
[19] Pacheco, Peter S. Parallel Programming with MPI. San Francisco: Morgan Kaufmann Publishers, Inc., 1997.
[20] Manticore: A heterogeneous parallel language. Fluet, Matthew, et al. Nice, France: DAMP
2007, ACM 2007, 2007.
[21] NESL: A Parallel Programming Language. Computer Science at Carnegie Mellon
University. [Online] Scandal Lab, August 1, 2005. [Cited: July 13, 2011.]
http://www.cs.cmu.edu/~scandal/nesl.html.
[22] Kaw, Autar and Kalu, E. Eric. Numerical Methods with Applications. s.l.: Lulu Self-published, 2008.
[23] Oliver, Rubenkonig. The Finite Difference Method (FDM) - An introduction. Freiburg: Albert Ludwigs University of Freiburg, 2006.
[24] Leveque, Randall. Finite Volume Methods for Hyperbolic Problems. Cambridge: Cambridge University Press, 2002.
[25] Huebner, K. H., Thornton, E. A. and Byron, T. D. The Finite Element Method for Engineers.
s.l.: Wiley Interscience, 1995.
[26] Ang, W. T. A Beginner's Course in Boundary Element Methods. s.l.: Universal Publishers, 2007. 978-1581129748.
[27] Beer, Gernot, Smith, Ian and Duenser, Christian. The Boundary Element Method with
Programming: For Engineers and Scientists. s.l.: Springer, 2008. ISBN 978-
3211715741.
[28] The immersed boundary method. Peskin, C. S. s.l.: Acta Numerica, 2002, Vol. 11.
[29] Wesseling, P. Principles of Computational Fluid Dynamics. s.l.: Springer-Verlag, 2001.
[30] Uniformly High Order Accurate Essentially Non-Oscillatory Schemes III. Harten, A., et al., et al. s.l.: Journal of Computational Physics, 1987, Vol. 71.
[31] The Piecewise parabolic Method (PPM) for Gasdynamical Simulations. Colella, P. and Woodward, P. s.l.: Journal of Computational Physics, 1984, Vol. 54.
[32] Pope, S. B. Turbulent Flows. Cambridge : Cambridge University Press, 2000. ISBN 978-0521598866.
[33] Garnier, E., Adams, N. and Sagaut, P. Large eddy simulation for compressible flows. s.l.: Springer, 2009. 978-90-481-2818-1.
[34] The Numerical Computation of Turbulent Flows. Launder, B. E. and Spalding, D. B. 2, s.l.: Computer Methods in Applied Mechanics and Engineering, 1974, Vol. 3.
[35] Wilcox, David C. Turbulence Modeling for CFD (3 ed.). s.l.: DCW Industries, Inc., 2006.
978-1928729082.
[36] Comments on the feasibility of LES for wing and on a hybrid RANS/LES approach. Spalart, P.
R. Arlington, TX: 1st ASOSR CONERFENCE on DNS/LES, 1997.
[37] Coherent Vortex Simulation (CVS), A Semi-Deterministic Turbulence Model Using Wavelets.
Farge, Marie and Schneider, Kai. 4, s.l.: Flow Turbulence and Combustion, 2001,
Vol. 66.
[38] Saad, Y. Iterative Methods for Sparse Linear Systems, 2nd edition. s.l.: SIAM, 2003. ISBN 978-0-89871-534-7.
[39] GMRES: A generalized minimal residual algorithm for solving nonsymmetric linear systems.
Saad, Y. and Schultz, M. H. s.l.: SIAM Journal of Scientific and Statistical
Computing, 1986, Vol. 7.
Computational Fluid Dynamics
17
[40] Wienands, Roman and Joppich, Wolfgang. Practical Fourier analysis for multigrid methods.
s.l.: CRC Press, 2005. 1584884924.
[41] Trottenberg, U., Oosterlee, C. W. and Schüller, A. Multigrid. s.l.: Academic Press, 2001.
ISBN 012701070X.
[42] Trefethen, Lloyd N. and Demmel, James W. Numerical Linear Algebra. s.l.: SIAM, 1997.
0898713617.
[43] Golub, Gene H. and Van Loan, Charles F. Matrix Computations 3rd Edition. s.l.: John Hopkins University Press, 1996. 0801854148.
[44] OFELI. OFELI An Object Oriented Finite Element Library. OFELI. [Online] OFELI, June 1, 2011. [Cited: July 13, 2011.] http://www.ofeli.net/.
[45] Renard, Yves; Pommier, Julien. GETFEM++. GNA. [Online] GETFEM, June 1, 2010.
[Cited: July 13, 2011.] http://download.gna.org/getfem/html/homepage/.
[46] OOFEM. OOFEM - free object oriented finite element solver. OOFEM. [Online]
OOFEM, March 29, 2011. [Cited: July 13, 2011.]
http://www.oofem.org/en/oofem.html.
[47] Dealii. Dealii Homepage. Dealii. [Online] Dealii, January 9, 2011. [Cited: July 13, 2011.]
http://www.dealii.org/.
[48] Google. FDTL - Finite Difference Template Library. FDTL. [Online] Google, June 2, 2011. [Cited: July 13, 2011.] http://code.google.com/p/fdtl/.
[49] Michalakes, John. A Runtime System Library for Parallel Finite Difference Models with
Nesting. Argonne National Laboratory. [Online] May 18, 1995. [Cited: July 13, 2011.]
http://www.mcs.anl.gov/~michalak/RSL/.
[50] MOUSE team. MOUSE. USASK. [Online] University of Duisburg, January 7, 2010.
[Cited: July 13, 2011.]
http://homepage.usask.ca/~ijm451/finite/fe_resources/node563.html.
[51] OpenFOAM. OpenFOAM - The Open Source CFD Toolbox. OpenFOAM. [Online]
OpenFOAM, June 2, 2011. [Cited: July 13, 2011.] http://www.openfoam.com/.
[52] Ansys. Features of Ansys Fluent. Ansys. [Online] Ansys, June 3, 2011.
[Cited: July 13, 2011.]
http://www.ansys.com/Products/Simulation+Technology/Fluid+Dynamics/ANS
YS+FLUENT/Features.
[53] Huang, Weizhang and Russell, Robert D. Adaptive Moving Mesh Methods. s.l.: Springer, 2011. 978-1-4419-7915-5.
[54] Liu, G. R. Mesh Free Methods, 2nd ed. s.l.: CRC Press, 2009. 978-1-4200-8209-9.
[55] Hesthaven, J., Gottlieb, S. and Gottlieb, D. Spectral methods for time-dependent problems.
Cambridge: Cambridge University Press, 2007.
[56] Belytschko, T. and Chen, J.S. Meshfree and particle methods. s.l.: John Wiley and Sons, Ltd., 2007. 0-470-84800-6.
[57] Gourlay, Michael J. "Fluid Simulation for Video Gam