Skip to main content

2016 | Buch

The Finite Volume Method in Computational Fluid Dynamics

An Advanced Introduction with OpenFOAM® and Matlab

insite
SUCHEN

Über dieses Buch

This textbook explores both the theoretical foundation of the Finite Volume Method (FVM) and its applications in Computational Fluid Dynamics (CFD). Readers will discover a thorough explanation of the FVM numerics and algorithms used for the simulation of incompressible and compressible fluid flows, along with a detailed examination of the components needed for the development of a collocated unstructured pressure-based CFD solver. Two particular CFD codes are explored. The first is uFVM, a three-dimensional unstructured pressure-based finite volume academic CFD code, implemented within Matlab. The second is OpenFOAM®, an open source framework used in the development of a range of CFD programs for the simulation of industrial scale flow problems.

With over 220 figures, numerous examples and more than one hundred exercise on FVM numerics, programming, and applications, this textbook is suitable for use in an introductory course on the FVM, in an advanced course on numerics, and as a reference for CFD programmers and researchers.

Inhaltsverzeichnis

Frontmatter
Erratum to: The Finite Volume Method in Computational Fluid Dynamics
F. Moukalled, L. Mangani, M. Darwish

Foundation

Chapter 1. Introduction
Abstract
This chapter presents an overview of the book. It starts with a brief description of Computational Fluid Dynamics (CFD) and its use as a core design tool in a whole class of applications, and of the Finite Volume Method (FVM) and its role in the advancement of CFD. The chapter ends with a discussion of the book philosophy, structure, and content.
F. Moukalled, L. Mangani, M. Darwish
Chapter 2. Review of Vector Calculus
Abstract
This chapter sets the ground for the derivation of the conservation equations by providing a brief review of the continuum mechanics tools needed for that purpose while establishing some of the mathematical notations and procedures that will be used throughout the book. The review is by no mean comprehensive and assumes a basic knowledge of the fundamentals of continuum mechanics. A short introduction of the elements of linear algebra including vectors, matrices, tensors, and their practices is given. The chapter ends with an examination of the fundamental theorems of vector calculus, which constitute the elementary building blocks needed for manipulating and solving these conservation equations either analytically or numerically using computational fluid dynamics.
F. Moukalled, L. Mangani, M. Darwish
Chapter 3. Mathematical Description of Physical Phenomena
Abstract
The chapter provides an overview of the conservation principles governing fluid flow, heat and mass transfer, and other related transport phenomena of interest in this book. The physical laws controlling the conservation principles are translated into mathematical relations, written in the form of partial differential equations, representing the needed vehicle for their simulations. First the continuity, momentum, and energy equations (collectively known as the Navier-Stokes equations) expressing the principles of conservation of mass, momentum, and total energy, respectively, are derived. This is followed by the development of a typical conservation equation for a general scalar, vector, or tensor quantity. The mathematical properties of the various terms in these equations are also examined. Moreover, the common practice of writing the conservation equations in a non-dimensional form using dimensionless quantities is explained and some of the dimensionless groups resulting from the application of this procedure, which are very useful for performing parametric studies of engineering problems, are discussed.
F. Moukalled, L. Mangani, M. Darwish
Chapter 4. The Discretization Process
Abstract
This chapter introduces the different steps of the discretization process, which include: (i) modeling of the geometric domain and the physical phenomena of interest; (ii) discretization of the modeled geometric domain into a grid or mesh that forms the computational domain (this process, also known as meshing or domain discretization, results in a set of non-overlapping elements, denoted also by cells, that cover the computational domain); (iii) numerical or equation discretization that transforms the set of conservation partial differential equations governing the physical processes into an equivalent system of algebraic equations defined over each of the elements of the computational domain; and (iv) the solution of the resulting set of equations using an iterative solver to yield an intermediate or final solution field. Throughout the chapter, computer implementation issues are introduced.
F. Moukalled, L. Mangani, M. Darwish
Chapter 5. The Finite Volume Method
Abstract
Similar to other numerical methods developed for the simulation of fluid flow, the finite volume method transforms the set of partial differential equations into a system of linear algebraic equations. Nevertheless, the discretization procedure used in the finite volume method is distinctive and involves two basic steps. In the first step, the partial differential equations are integrated and transformed into balance equations over an element. This involves changing the surface and volume integrals into discrete algebraic relations over elements and their surfaces using an integration quadrature of a specified order of accuracy. The result is a set of semi-discretized equations. In the second step, interpolation profiles are chosen to approximate the variation of the variables within the element and relate the surface values of the variables to their cell values and thus transform the algebraic relations into algebraic equations. The current chapter details the first discretization step and presents a broad review of numerical issues pertaining to the finite volume method. This provides a solid foundation on which to expand in the coming chapters where the focus will be on the discretization of the various parts of the general conservation equation. In both steps, the selected approximations affect the accuracy and robustness of the resulting numerics. It is therefore important to define some guiding principles for informing the selection process.
F. Moukalled, L. Mangani, M. Darwish
Chapter 6. The Finite Volume Mesh
Abstract
A key ingredient in the implementation of the finite volume method is setting up the geometrical support framework for the problem at hand. This process starts with mesh generation, which replaces the continuous domain by a discrete one formed of a contiguous set of non overlapping elements or cells delimited by a set of faces, and the defining of the physical boundaries through the marking of the boundary faces. It continues with the computation of relevant geometric information for the various components of the computational mesh, and is completed by capturing the topology of these components, i.e., how they are related and located one with respect to the other. Thus the result of the domain discretization step is not only the set of non-overlapping elements and other related geometric entities and the generated information about their geometric properties, but also the topological information about their arrangement and relations. It is this combined information that defines the finite volume mesh. The objective of this chapter is to clarify the topological and geometric requirements of the finite volume mesh.
F. Moukalled, L. Mangani, M. Darwish
Chapter 7. The Finite Volume Mesh in OpenFOAM® and uFVM
Abstract
The implementation of the finite volume mesh can follow many directions whether in the definition of the mesh fields, the storing of the variables, or even in determining the connectivity relations. This chapter aims at outlining the design decisions that shape the implementation of two CFD codes, uFVM an educational unstructured Finite Volume code and OpenFOAM® an industrial-strength open source code. The two codes are thus presented, initially in terms of their data structure and memory management schemes, and then in terms of how cases are setup. Finally the format of the system of equations generated by each of the two codes are detailed. The reader will notice that while uFVM shares many of the implementation details with OpenFOAM®, its simplicity allows for the use of simpler implementation techniques and data structure.
F. Moukalled, L. Mangani, M. Darwish

Discretization

Frontmatter
Chapter 8. Spatial Discretization: The Diffusion Term
Abstract
This chapter describes in detail the discretization of the diffusion term represented by the spatial Laplacian operator. It is investigated separately from the convection term, because convection and diffusion represent two distinct physical phenomena. Thus from a numerical point of view, they have to be handled differently, requiring distinct interpolation profiles with disparate considerations. The chapter begins with the discretization of the diffusion equation in the presence of a source term over a two-dimensional rectangular domain using a Cartesian grid system. The adopted interpolation profile for the variation of the dependent variable between grid points and the basic rules that should be satisfied by the coefficients of the discretized equation are discussed. The chapter proceeds with a discussion on the implementation of the Dirichlet, Von Neumann, mixed, and symmetry boundary conditions. The discretization over a non-Cartesian orthogonal grid is then introduced, followed by a detailed description of the discretization on non-orthogonal structured and unstructured grid systems. The treatment of the non-orthogonal cross-diffusion contribution, which necessitates computation of the gradient, is clarified. Then anisotropic diffusion is introduced and handled following the same methodology developed for isotropic diffusion. The under-relaxation procedure needed for highly non-linear problems is outlined. The chapter ends with computational pointers explaining the treatment of diffusion in both uFVM and OpenFOAM®.
F. Moukalled, L. Mangani, M. Darwish
Chapter 9. Gradient Computation
Abstract
As was shown in the previous chapter, the discretization of the gradients of \( \phi \) at cell centroids and faces is fundamental to constructing the discretized sets of diffusion equations and, as will be revealed in later chapters, of equations involving the convection term. In addition, the evaluation of gradients is needed for the evaluation of various operators. For example, pressure derivatives are directly needed in the discretized momentum equations, while velocity gradients are required to compute the production term in turbulence models, and the strain rate in non-Newtonian viscosity models. This chapter describes several techniques for evaluating gradients on a general mesh topology. The chapter starts with a description of the techniques for computing the gradient on cartesian structured grids and proceeds with gradient evaluation on unstructured grids. The presented methods follow either the Green-Gauss or the least square approach. Methods to interpolate the gradient to element faces are also presented.
F. Moukalled, L. Mangani, M. Darwish
Chapter 10. Solving the System of Algebraic Equations
Abstract
The result of the discretization process is a system of linear equations of the form \( {\mathbf{A}}{\varvec{\upphi}} = {\mathbf{b}} \) where the unknowns \( {\varvec{\upphi}} \), located at the centroids of the mesh elements, are the sought after values. In this system, the coefficients of the unknown variables constituting matrix A are the result of the linearization procedure and the mesh geometry, while vector b contains all sources, constants, boundary conditions, and non-linearizable components. Techniques for solving linear systems of equations are generally grouped into direct and iterative methods, with many sub-groups in each category. Since flow problems are highly non-linear, the coefficients resulting from their linearization process are generally solution dependent. For this reason and since an accurate solution is not needed at each iteration, direct methods have been rarely used in CFD applications. Iterative methods on the other hand have been more popular because they are more suited for this type of applications requiring lower computational cost per iteration and lower memory. The chapter starts by presenting few direct methods applicable to structured and/or unstructured grids (Gauss elimination, LU factorization, Tridiagonal and Pentadiagonal matrix algorithms) to set the ground for discussing the more widely used iterative methods in CFD applications. Then the performance and limitations of some of the basic iterative methods with and without preconditioning are reviewed. This include the Jacobi, Gauss-Siedel, Incomplete LU factorization, and the conjugate gradient methods. This is followed by an introduction to the multigrid method that is generally used in combination with iterative solvers to help addressing some of their important limitations.
F. Moukalled, L. Mangani, M. Darwish
Chapter 11. Discretization of the Convection Term
Abstract
So far, the discretization of the general steady diffusion equation has been formulated on orthogonal, non-orthogonal, structured, and unstructured grids. Another important term, the convection term represented by the divergence operator, is the focus of this chapter. Initially this term is discretized using a symmetrical linear profile similar to the one adopted for the discretization of the diffusion term. The shortcomings of this profile are delineated and a remedy is suggested through the use of an upwind profile. Even though it leads to physically plausible predictions, the upwind profile is shown to be highly diffusive generating results that are first order accurate. To increase accuracy, higher order profiles that are upwind biased are introduced. While reducing the discretization error, higher order profiles are shown to give rise to another type of error known as the dispersion error. Methods dealing with this error will be dealt with in the next chapter. Moreover, the flow field, which represents the driving catalyst of the convection term, is assumed to be known. The computation of the flow field will be the subject of later chapters.
F. Moukalled, L. Mangani, M. Darwish
Chapter 12. High Resolution Schemes
Abstract
This chapter continues the development of convection schemes and discusses approaches by which boundedness is enforced on High Order (HO) convection schemes to produce High Resolution (HR) schemes. The recipe for a HR scheme is shown to involve a combination of a HO profile and a Convection Boundedness Criterion (CBC) ensuring that no oscillatory behavior is experienced in the solution. The Normalized Variable Formulation (NVF) and the Total Variation Diminishing (TVD) frameworks for developing HR schemes are introduced. Even though the two approaches look very different they are shown to be almost identical. The Normalized Variable Diagram (NVD) and Sweby’s (or \( r - \psi \)) diagram for visualizing HR schemes in the NVF and TVD formulation, respectively, are presented. The functional relationships for several HR schemes are specified in the context of both the NVF and TVD formulations. In addition to the Deferred Correction (DC) procedure discussed in the previous chapter, two additional techniques for the implementation of HO and HR schemes in structured and unstructured grids are introduced, namely the Downwind Weighing Factor (DWF) method and the Normalized Weighing Factor (NWF) method.
F. Moukalled, L. Mangani, M. Darwish
Chapter 13. Temporal Discretization: The Transient Term
Abstract
The discussions in previous chapters assumed steady state conditions, which did not require the discretization of the transient term. Accounting for transient phenomena adds a new dimension to the problem. However since transient variations are parabolic by nature, there is no need to define a field in the time dimension, as is the case for the spatial domain. In general only one or two additional variable fields, or time levels, are stored (depending on the numerical order of the selected scheme). Another difference with steady state configurations is that transient systems are modeled using a time stepping procedure. Starting with an initial condition at time \( t = t_{0} \), the solution algorithm marches forward and finds a solution at time \( t_{1} = t_{0} +\Delta t_{1} \). The solution found is the initial condition for the next time step and is used to obtain the solution at time \( t_{2} = t_{1} +\Delta t_{2} \). The process is repeated until the required time is reached. The focus of this chapter is on techniques used for the discretization of the transient term. Two approaches for developing transient schemes are presented. In the first one Taylor expansions are used to express the transient term with the aid of nodal values. This is in effect a finite difference discretization. In the second approach the finite volume method is used on a pseudo time element in a similar fashion to what was done to the convection term. Several transient schemes are presented and their characteristics discussed.
F. Moukalled, L. Mangani, M. Darwish
Chapter 14. Discretization of the Source Term, Relaxation, and Other Details
Abstract
This chapter is devoted to a number of “small” numerical details that may have “big” effects on the solution behavior. First the treatment of the source term in the general case when it is solution dependent (i.e., when \( Q^{{\phi}} = Q^{{\phi}} \left({\phi}\right) \)) is examined. The source is linearized in terms of the dependent variable and split into two parts, one treated explicitly and the second treated implicitly. This is followed by a discussion of explicit and implicit techniques for under-relaxing the algebraic equations. Several implicit under-relaxing approaches are presented, starting with the well known implicit under relaxation method of Patankar (Numerical heat transfer and fluid flow, 1980) [1], the E-factor method of van Doormaal and Raithby (Numerical Heat Transfer 7:147–163, 1984) [2], and the false transient approach of Mallinson and de Vahl Davis (Journal of Computational Physics 12(4):435–461, 1973) [3]. Then the residual form of the discretized algebraic equation is introduced. The chapter ends with the presentation of convergence indicators used to evaluate the solution convergence status.
F. Moukalled, L. Mangani, M. Darwish

Algorithms

Frontmatter
Chapter 15. Fluid Flow Computation: Incompressible Flows
Abstract
In previous chapters the procedure for discretizing and solving the general transport equation for the variable \( \phi \) in the presence of a known velocity field was formulated. In general, the velocity field is not known and has to be computed by solving the set of Navier-Stokes equations. For incompressible flows this task is complicated by the strong coupling that exist between pressure and velocity and by the fact that pressure does not appear as a primary variable in either the momentum or continuity equations. The focus of this chapter is on presenting a method that addresses these two issues, and computes the flow field for incompressible fluid flows. This is accomplished initially on a one dimensional staggered grid, then on a collocated one dimensional grid and finally on a collocated three dimensional unstructured grid. In addition to fully deriving the SIMPLE, SIMPLEC, PRIME and PISO algorithms, the Rhie-Chow interpolation and its extension to transient, relaxation and body force terms are clearly formulated. Finally, the implementation details for a number of frequently encountered boundary conditions are presented.
F. Moukalled, L. Mangani, M. Darwish
Chapter 16. Fluid Flow Computation: Compressible Flows
Abstract
The previous chapter presented the methodology for solving incompressible flow problem using pressure based algorithms. In this chapter these algorithms are extended to allow for the simulation of compressible flows in the various Mach number regimes, i.e., over the entire spectrum from subsonic to hypersonic speeds. While incompressible flow solutions do not generally require solving the energy equation, compressibility effects couple hydrodynamics and thermodynamics necessitating the simultaneous solution of the continuity, momentum, and energy equations. The dependence of density on pressure and temperature, a relation expressed via an equation of state, further complicates the velocity-pressure coupling present in incompressible flows. The derivation of the pressure correction equation now involves a density correction that introduces to the equation a convection-like term, in addition to the diffusion-like term introduced by the velocity correction. Another difficulty is introduced by the complex boundary conditions that arise in compressible flow problems. Details on resolving all these issues are presented throughout this chapter.
F. Moukalled, M. Darwish

Applications

Frontmatter
Chapter 17. Turbulence Modeling
Abstract
This chapter addresses some of the challenges that arise when solving turbulent flow problems. It is not intended to provide a comprehensive account on turbulence modeling, rather, the intention is simply to introduce the subject and focus on the implementation details of some of the most popular turbulence models. The presentation is limited to incompressible turbulent fluid flow and begins with a general introduction to turbulence modeling. Then the Reynolds stress tensor that originates from the adopted averaging procedure and the Boussinesq hypothesis used in modeling the Reynolds stresses are presented. This is followed by a review of the k − ε and k − ω two-equation models. These are the most popular of the high Reynolds number and low Reynolds number turbulence models, respectively. The BSL and SST models are then introduced, both are derived by combining the k − ε and k − ω models so as to address their respective weaknesses. Finally the treatment of the near wall region is presented in detail.
F. Moukalled, L. Mangani, M. Darwish
Chapter 18. Boundary Conditions in OpenFOAM® and uFVM
Abstract
This chapter reviews the implementation of boundary conditions in OpenFOAM® and uFVM. Details on the data structure needed for their implementation are presented along with information on how to add new boundary conditions. The procedure is illustrated through the implementation of the no-slip wall boundary condition. This is shown to differ from the Dirichlet type currently implemented in OpenFOAM®.
F. Moukalled, L. Mangani, M. Darwish
Chapter 19. An OpenFOAM® Turbulent Flow Application
Abstract
The OpenFOAM® solvers and boundary conditions developed in previous chapters are used here to solve a small scale turbulent incompressible flow problem. Details on the case structure, mesh, and solver setup are presented along with information on monitoring convergence and post processing results.
F. Moukalled, L. Mangani, M. Darwish
Chapter 20. Closing Remarks
F. Moukalled, L. Mangani, M. Darwish
Backmatter
Metadaten
Titel
The Finite Volume Method in Computational Fluid Dynamics
verfasst von
F. Moukalled
L. Mangani
M. Darwish
Copyright-Jahr
2016
Electronic ISBN
978-3-319-16874-6
Print ISBN
978-3-319-16873-9
DOI
https://doi.org/10.1007/978-3-319-16874-6

    Marktübersichten

    Die im Laufe eines Jahres in der „adhäsion“ veröffentlichten Marktübersichten helfen Anwendern verschiedenster Branchen, sich einen gezielten Überblick über Lieferantenangebote zu verschaffen.