Open access peer-reviewed chapter

The Basic Theory of CFD Governing Equations and the Numerical Solution Methods for Reactive Flows

Written By

Guozhao Ji, Meng Zhang, Yongming Lu and Jingliang Dong

Submitted: 17 April 2023 Reviewed: 20 September 2023 Published: 17 November 2023

DOI: 10.5772/intechopen.113253

From the Edited Volume

Computational Fluid Dynamics - Recent Advances, New Perspectives and Applications

Edited by Guozhao Ji and Jingliang Dong

Chapter metrics overview

133 Chapter Downloads

View Full Metrics

Abstract

The universal principles of fluid motion are the conservation of mass, momentum and energy. This chapter will introduce the CFD governing equations and describe how the continuity equation, component equation, Navier-Stokes equation and energy equation were derived from the principles above. With the expanding application of CFD simulation technology, some processes such as fluid-involved reactions, adsorption and permeation, which break the conservation of mass, momentum and energy for fluid phase, should be coupled to CFD model. In view of this, this chapter provided the theories about source terms for the mass equation, momentum equation and thermal energy equation. The technology for solving these governing equations remained a challenge for a long period due to the complexity. Thanks to the development of numerical methods, such as the finite difference method and the finite volume method, these equations can be solved and provide reasonable numerical results of flows, heat transfer and reactions. This chapter also demonstrates the basics of these two major numerical techniques.

Keywords

  • governing equations
  • finite-difference method
  • finite-volume method
  • reacting flow
  • multiphase flow
  • source term

1. Introduction

Using Computational Fluid Dynamics (CFD) simulation is of great importance in modeling reactive flows because it allows for the prediction and analysis of complex fluid dynamics and chemical reactions in a controlled and cost-effective environment [1]. In fluid reactors, the reaction rate depends on many factors such as concentrations of reactant fluid and product fluid, temperature and turbulence, and these key factors vary with time and space coordinate [2]. Knowing the evolution and distribution of the heat and mass transfer factors is important in reactor design and operating condition optimization. CFD simulations can be used to model and simulate the behavior of reactive flows, such as combustion [3], pyrolysis [4, 5, 6], gasification [7] and some other chemical reactions-driven fluid flow [8], and get detailed information on heat and mass transfer inside reactors.

There are many advantages of CFD over other traditional research methods. For example, CFD simulations can predict the behavior of combustion, which can be used to optimize combustion systems and reduce emissions. CFD simulations can also be used to optimize the design of reaction systems, such as gas combustion in turbines, boilers, and engines, pyrolysis or gasification in thermal reactors by predicting the performance of different designs and optimizing the operating conditions for maximum efficiency. Safety analysis can be performed by CFD simulations as well, by predicting the behavior of the system under different conditions and identifying potential risks. A distinct advantage of CFD simulations is that it can provide a cost-effective means of analyzing and optimizing reactive flow systems, as they can be used to simulate and analyze the behavior of the system under a wide range of conditions without the need for expensive physical testing [9].

The results of a CFD simulation are obtained through numerical methods that solve the fluid flow governing equations using a finite difference or a finite volume method. The numerical methods used in CFD simulations involve dividing the fluid domain into a grid or mesh of discrete cells and then solving the equations governing fluid flow and heat transfer at each of these grid points or cells. The numerical methods used in CFD simulations are complex and require high-performance computing resources. The accuracy of the results depends on the quality of the mesh, the numerical methods used and the convergence criteria [10]. Therefore, CFD simulations require a deep understanding of numerical methods with careful validation and verification to ensure that the results are accurate and reliable.

To better understand CFD simulations, learning the basics of CFD theory is essential for a few reasons. CFD basic theory provides a fundamental understanding of the governing equations and numerical methods used in CFD simulations. This understanding is essential for developing accurate and reliable CFD simulations. A thorough understanding of CFD theory allows for the development of more efficient and accurate simulations. This is because it enables the user to select appropriate numerical methods, grid sizes and convergence criteria. CFD simulations can be complex, and errors can arise due to various reasons. Understanding CFD theory allows the user to identify the source of the error and develop solutions to fix it. CFD theory is constantly evolving, and researchers are continually developing new methods and algorithms to improve the accuracy and efficiency of CFD simulations. A strong understanding of CFD theory is essential for contributing to the advancement of the field.

Advertisement

2. Governing equations

As fluid is one of the existing states of matter, it follows the laws of motion, such as mass conservation, momentum conservation and energy conservation. These laws govern the motion and force of fluid, and thus are called governing equations. These equations are generally expressed in differentiation forms.

2.1 Continuity equation

If our object is an infinitely small grid, continuity indicates that the mass of fluid entering this small grid equals the mass of fluid flowing out of this grid plus the mass of fluid accumulating in this grid. Since the continuity equation is derived from this mass conservation concept, it can also be regarded as a mass conservation equation which is expressed as Eq. (1).

dmdt=inṁoutṁE1

where m is the mass of this small grid and is defined as m = ρxyz. The mass entering and exiting the small grid in the Cartesian coordinate is demonstrated in Figure 1. In the actual scenario, the flow direction does not have to be the same as Figure 1 shows. Any reversed flow direction can be considered if a minus sign is in the front of a term. According to Figure 1, the mass entering this grid with the flow is

Figure 1.

The schematic of mass conservation in a control volume.

inṁ=ρuΔyΔz+ρvΔxΔz+ρwΔxΔyE2

Based on the Taylor series expansion for the ρu, ρv, and ρw terms by omitting the higher order terms, the mass exiting out of this grid is

outṁ=ρu+ρuxΔxΔyΔz+ρv+ρvyΔyΔxΔz+ρw+ρwzΔzΔxΔyE3

Substituting Eqs. (2) and (3) into Eq. (1), one can obtain Eq. (4).

ρΔxΔyΔzt=ρuΔyΔz+ρvΔxΔz+ρwΔxΔyρu+ρuxΔxΔyΔzρv+ρvyΔyΔxΔzρw+ρwzΔzΔxΔyE4

After canceling the identical terms with opposite signs, dividing ∆xyz on both sides, and taking the limit for ∆x → 0, ∆y → 0 and ∆z → 0, we have Eq. (5).

ρt+ρux+ρvy+ρwz=0E5

Then the continuity equation is derived. Sometimes it is also written in a concise vector form as Eq. (6).

ρt+ρu=0E6

2.2 Component balance equation

Even though the continuity equation governs the total mass balance of fluid during its flowing process, for a multi-component flow, the mass balance of each component must also be ensured. The mass transfer of a component is more complex than the total flow. In addition to convective flow, a component could also diffuse under the driving force of the concentration gradient from the high concentration region to the low concentration region.

Figure 2 is a demonstration of diffusive flow. Initially, a chamber is separated by a valve into two sub-chambers with equal volume and pressure. In the left sub-chamber, there are 8 moles of N2 and 2 moles of CO, while in the right chamber there are 2 moles of N2 and 8 moles of CO. Once the valve is open, there is no convective flow due to the equal pressure on both sides, but N2 would diffuse from left to right due to the concentration difference between the left and the right sides. In the meantime, CO would diffuse the other way around owing to the same reason. During this process, there is no convective flow at all, but the mass transfer of each component really occurred. Therefore, when considering the mass balance of a component in a multi-component flow, the diffusive flow or diffusion must be included. Generally, the diffusion follows Fick’s law [11]:

Figure 2.

Demonstration of diffusive flow.

Ji=DdρXidxE7

where Ji denotes the diffusive flux of component I, D is called diffusivity which is a function of temperature and pressure, and could be evaluated based on Fuller Eq. [12], ρ is the flow density and Xi is the mass fraction of component I in the fluid.

In multi-component flow, the ith component follows the mass balance of Eq. (8)

dmidt=inṁioutṁiE8

where mi is the mass of the ith component in a control volume. The ith component entering and exiting the control volume in terms of convective flow in Cartesian coordinate is demonstrated in Figure 3. Taking the x direction as an example, the total flow into this control volume from the upwind y-o-z surface is ρu∆y∆z (the left blue arrow). If the mass fraction of component I is Xi, the flow of component I into the control volume together with the total convective flow is Xiρu∆y∆z. The convective flow of ith component exiting from the downwind y-o-z surface (the right blue arrow) is then expressed by Taylor series expansion by omitting higher-order terms {Xiρu + [(Xiρu)/∂x]∆x}∆y∆z. Likewise, the ith component entering and exiting along y and z directions are Xiρv∆x∆z, Xiρw∆y∆x, {Xiρv + [(Xiρv)/∂y]∆y}∆x∆z, {Xiρw + [(Xiρw)/∂z]∆z}∆y∆x, respectively.

Figure 3.

The schematic of the convective flow of I component entering and exiting a control volume.

In addition to the convective flow depicted in Figure 3, there is also diffusive flow driven by the concentration gradient (Figure 4). According to Fick’s law, the diffusive flow of component I entering from the upwind surface of y-o-z is D[(ρXi)/∂x]∆y∆z. Then, the diffusive flow exiting from the opposite surface is D{(ρXi)/∂x + [2(ρXi)/∂x2]∆x}∆y∆z. Likewise, along the y direction, the diffusive flows entering and exiting are D[(ρXi)/∂y]∆x∆z and D{(ρXi)/∂y + [2(ρXi)/∂y2] ∆y}∆x∆z. Similarly, along the z direction, the diffusive flow entering and exiting are D[(ρXi)/∂z]∆x∆y and D{(ρXi)/∂z + [2(ρXi)/∂z2] ∆z}∆x∆y.

Figure 4.

The schematic of the diffusive flow of I component entering and exiting a control volume.

Substituting all the convective flow and diffusive flow expressions into Eq. (8), and canceling out the identical terms with opposite signs leads to Eq. (9).

tρXiΔxΔyΔz=D2ρXix2ΔxΔyΔz+D2ρXiy2ΔyΔxΔz+D2ρXiz2ΔzΔxΔyρuXixΔxΔyΔzρvXiyΔyΔxΔzρwXizΔzΔxΔyE9

After dividing ∆x∆y∆z for both sides, Eq. (9) could be rearranged to Eq. (10)

ρXit+ρuXix+ρvXiy+ρwXiz=D2ρXix2+2ρXiy2+2ρXiz2E10

which is the final expression of the component balance equation. Component equation is especially important in governing the flow with chemical reactions, because the reasonable prediction of reaction rates depends on accurate information about component distribution in a reactor.

2.3 Momentum equation

Newton’s second law is the principle to express the correlation between force and motion of the fluid. Namely, the force acting on an infinitesimal control volume equals the product of its mass and acceleration, which is given as (Eq. (11)).

F=maE11

Actually, both force and acceleration are vectors and should be expressed by the three components in the x, y and z directions. The acceleration of fluid motion is defined as the total differential with respect to time (Eq. (12)).

ax=DuDtE12
ay=DvDtE13
az=DwDtE14

Taking the x direction as an example, the acceleration in the x direction is

ax=DuDt=ut+uux+vuy+wuzE15

According to Newton’s second law, the acceleration in the x direction should equal the quotient of the forces along the x direction divided by mass.

ax=FxmE16

Basically, there are two types of forces. Namely, surface forces such as normal stress, shear stress, and body forces such as gravity force and magnetic force. Figure 5 depicts all the surface forces acting on a control volume along the x direction. Firstly, there is a pair of normal stresses imposed on the left and right surfaces that are indicated as blue arrows. This surface force is caused by internal pressure and velocity gradient in x direction. Secondly, there is a pair of shear stresses on the top and bottom surfaces that are marked as yellow arrows. This surface force is caused by the velocity gradient. Thirdly, a pair of shear stresses are also acting on the front and back surfaces shown as red arrows.

Figure 5.

The schematic of the surface forces along x direction on a control volume.

The summation of all the surface forces is

Fsurf=σxxxΔxΔyΔz+τyxyΔxΔyΔz+τzxzΔxΔyΔzE17

In fluid mechanics, the normal stress is related to the pressure and velocity gradient in the fluid, and is given as Eq. (18) [13]

σxx=p+2μuxE18

The shear stress follows Newton’s law of viscosity as depicted in Eq. (16) [13]

τxy=τyx=μuy+vxE19

Bringing Eqs. (18) and (19) to Eq. (17) yields Eq. (20) for the total surface forces in the x direction.

Fsurf=xp+2μuxΔxΔyΔz+μyuy+vxΔxΔyΔz+μzuz+wxΔxΔyΔzE20

In most cases, the body force only includes gravity force.

Fbody=ρΔxΔyΔzgxE21

Then, the total force in the x direction is

Fx=xp+2μuxΔxΔyΔz+μyuy+vxΔxΔyΔz+μzuz+wxΔxΔyΔz+ρΔxΔyΔzgxE22

Eqs. (22) and (16) yield

ax=1ρpx+μρ2ux2+μρ2uy2+μρ2uz2+μρxux+vy+wz+gxE23

The term inside the parenthesis is the expression of the continuity equation which equals zero

ux+vy+wz=0E24

Then, Eq. (23) could be further simplified to

ax=1ρpx+μρ2ux2+μρ2uy2+μρ2uz2+gxE25

Combining Eqs. (15) and (25), we have

ut+uux+vuy+wuz=1ρpx+μρ2ux2+2uy2+2uz2+gxE26

Finally, Eq. (26) is the formula of the momentum equation of fluid in the x direction. Likewise, in the y direction and z direction, the momentum equations of fluid flow could also be derived in a similar way as follows:

vt+uvx+vvy+wvz=1ρpy+μρ2vx2+2vy2+2vz2+gyE27
wt+uwx+vwy+wwz=1ρpz+μρ2wx2+2wy2+2wz2+gzE28

Since Eq. (26) was progressively developed by Claude-Louis Navier and George Gabriel Stokes, this equation is generally called the Navier-Stokes Equation.

2.4 Energy equation

The heat transfer of fluid should follow the law of energy conservation. The total energy of fluid includes internal energy, kinetic energy and gravitational energy. Practically, it is not convenient to consider the total energy of fluid during the calculation. A better way to include kinetic energy and gravitational energy is by adding source terms in the energy equation. In a CFD model, the main energy form considered is thermal energy, so the thermal energy balance is usually considered for the energy equation. The thermal energy accumulated in an infinitesimal control volume equals the heat entering the control volume in terms of work, convection, conduction and radiation minus the heat going out. As a tradition, radiation is always not taken into account in the energy equation. The rate of energy change in a control volume should equal the net rate of heat added plus the net rate of work done. The heat added and work done could be either positive or negative depending on the direction of energy flow. The energy conservation is given as

ρDEDtΔxΔyΔz=Q̇+ẆE29

where E is the energy contained in unit mass. For most fluid flow cases with heat exchange, reactions or adsorptions, temperature is the key parameter, so the energy of interest is usually thermal energy.

Since we have analyzed all the x-direction surface forces on a control volume when we derived the Navier-Stokes equation, the rate of heat generation due to work done by each normal force and shear force is shown in Figure 6. Likewise, there are also same number of normal forces and shear forces along y-direction and z-direction, and they generate heat as well.

Figure 6.

The schematic of the work done by surface forces on a control volume.

Heat conduction caused by temperature gradient is also happening in heat transfer. The thermal energy entering and exiting the control volume in x-direction is described in Figure 7. Besides this pair of heat fluxes, in the pairs of x-o-z surfaces and x-o-y surfaces the conductive heat fluxes also exist.

Figure 7.

The schematic of the conductive heat flow in a control volume.

Bring all the work heat and conductive heat into Eq. (29) and dividing ∆xyz, we have

ρDEDt=qxxqyyqzz+uσxxx+vσyyywσzzz+uτyxy+uτzxz+vτxyx+vτzyz+wτxzx+wτyzyE30

The heat flux q normally follows Fourier’s law of heat conduction which is given by [14]:

qx=λTxE31
qy=λTyE32
qz=λTzE33

Then, the energy balance equation (Eq. (30)) becomes Eq. (34)

ρDEDt=λxTx+λyTy+λzTz+ΦE34

where Φ is the dissipation function which includes all terms relating to the energy due to deformation work done on the control volume. In most practical cases, dissipation function Φ can be neglected, because the term is significantly small compared with heat conduction. Then, Eq. (34) is simplified as

ρDEDt=λxTx+λyTy+λzTzE35

If the energy E only refers to internal energy, the change of energy DE could be represented by CpDT. Then, Eq. (35) could be further rearranged to Eq. (36)

ρCpDTDt=λxTx+λyTy+λzTzE36

Expanding the total derivative of T, we get

Tt+uTx+vTy+wTz=λρCp2Tx2+2Ty2+2Tz2E37

Eq. (37) is the final expression of the energy equation. The first term on the left-hand side is called the transient term, the second to the fourth terms are called advection terms, and the terms on the right-hand sides are diffusion terms. Energy equation related temperature to time and space coordinate. With the energy equation, obtaining the temperature evolution and distribution in a fluid field becomes possible.

2.5 Summary of the governing equations

Previously, we have derived the continuity equation, component equation, momentum equation and energy equation based on the conservation principles.

ρt+ρux+ρvy+ρwz=0E38
ρXit+ρuXix+ρvXiy+ρwXiz=D2ρXix2+2ρXiy2+2ρXiz2E39
ρut+ρuux+ρvuy+ρwuz=px+μ2ux2+2uy2+2uz2+gxE40
ρvt+ρuvx+ρvvy+ρwvz=py+μ2vx2+2vy2+2vz2+gyE41
ρwt+ρuwx+ρvwy+ρwwz=pz+μ2wx2+2wy2+2wz2+gzE42
ρTt+ρuTx+ρvTy+ρwTz=λCp2Tx2+2Ty2+2Tz2E43

If we introduce a universal variable ϕ, a generic form of the governing equations could be written as follows,

ρϕt+ρuϕx+ρvϕy+ρwϕz=Γ2ϕx2+2ϕy2+2ϕz2E44

where Γ is the diffusion coefficient. If ϕ = 1, Eq. (44) is the continuity equation. If ϕ = Xi, and Γ = D, Eq. (44) transforms to the component equation. If ϕ = u, v or w, Γ = μ, and the pressure term and gravity term are represented by source terms, Eq. (44) becomes the Navier-Stokes equation. If ϕ = T, and Γ = λ/Cp, Eq. (44) turns out to be the energy equation.

2.6 Governing equations in cylindrical coordinate

In some common cases, fluid flows through pipes or reactors which are mostly in cylindrical shape, so it is more convenient to express the flow in a cylindrical coordinate. Writing CFD code based on the governing equations expressed in cylindrical coordinate is also more suitable than those in Cartesian coordinate [10].

The continuity equation could be derived from analyzing the mass balance in the fluid microelement as shown in Figure 8. The blue arrows represent the flow in radial direction. The red color arrows represent the flow in the tangential direction, and the yellow arrows stand for the flow in the axial direction. Therefore, the conservation of mass in the control volume in Figure 8 is given as

Figure 8.

The schematic of mass flux of a control volume in cylindrical coordinate.

ρrΔrΔθΔzt=urrΔθΔzur+urrΔrr+ΔrΔθΔz+uθΔrΔzuθ+uθθΔθΔrΔz+uzr+Δr2ΔrΔθuz+uzzΔzr+Δr2ΔrΔθE45

Dividing rrθz on both sides, and taking the limit for ∆r → 0, ∆θ → 0 and ∆z → 0, Eq. (45) can be simplified to Eq. (46), which is the continuity equation in cylindrical coordinate.

ρt+1rrurr+1ruθθ+uzz=0E46

The momentum equation in cylindrical coordinate is also derived from Newton’s second law.

ρa=FV=Fsurf+FbodyV=FsurfV+ρgE47

which is then expressed by velocity vector as

DuDt=1ρFsurfV+gE48

In cylindrical coordinate, the velocity vector is given as

urθzt=urrθzter+uθrθzteθ+uzrθztezE49

And the acceleration is then given by

a=DuDt=ut+urdrdt+uθdθdt+uzdzdtE50

The partial derivative of velocity vector with respect to time can be expressed as the summation of three vectors in radial ®, tangential (θ) and axial (z) directions (Figure 9) and the definition of ur, uθ and uz is.

Figure 9.

The schematic of ∂u/∂t in cylindrical coordinate.

ut=urter+uθteθ+uztezE51
ur=drdtE52
uθ=rdθdtE53
uz=dzdtE54

With the definitions in Eq. (52), Eq. (50) is then transformed to

DuDt=ut+urur+uθruθ+uzuzE55

The partial derivatives of velocity vector with respect to r, θ and z are

ur=urer+uθeθ+uzezr=urrer+urerr+uθreθ+uθeθr+uzrez+uzezrE56
uθ=urer+uθeθ+uzezθ=urθer+urerθ+uθθeθ+uθeθθ+uzθez+uzezθE57
uz=urer+uθeθ+uzezz=urzer+urerz+uθzeθ+uθeθz+uzzez+uzezzE58

Particularly, in cylindrical coordinate the unit vectors in radial (r), tangential (θ) and axial (z) directions have the following correlations

err=eθr=ezr=0E59
erθ=eθE60
eθθ=erE61

Employing the correlations in Eq. (59), Eq. (56) would become

ur=urrer+uθreθ+uzrezE62
uθ=urθuθer+ur+uθθeθ+uzθezE63
uz=urzer+uθzeθ+uzzezE64

Bringing Eqs. (51) and (62) to Eq. (55), we can obtain

DuDt=ut+urdrdt+uθdθdt+uzdzdt=urter+uθteθ+uztez+ururrer+uθreθ+uzrez+uθrurθuθer+ur+uθθeθ+uzθez+uzurzer+uθzeθ+uzzez=urt+ururr+uθrurθuθ2r+uzurzer+uθt+uruθr+uθruθθ+uθurr+uzuθzeθ+uzt+uruzr+uθruzθ+uzuzzezE65

Now, we took the radial direction as an example to derive its momentum equation. The acceleration in the radial direction is defined as

ar=DurDt=urt+ururr+uθrurθuθ2rE66

According to Newton’s law, the acceleration also equals to

ar=1ρFrδV+grE67

The surface tensions in the radial direction are described in Fig. 10. The summation of all the surface tensions along the radial direction is

Figure 10.

The schematic of the surface tensions along radial direction on a control volume in cylindrical coordinate.

Fr=σrrr+ΔrΔθΔz+σrrrΔrr+ΔrΔθΔzσrrrΔθΔz+σθrΔrΔzcosΔθ2+σθrθΔθΔrΔzcosΔθ2σθrΔrΔzcosΔθ2+σzrr+Δr2ΔrΔθ+σzrzΔzr+Δr2ΔrΔθσrzrzr+Δr2ΔrΔθσθθΔrΔzsinΔθ2σθθθΔθΔrΔzsinΔθ2σθθΔrΔzsinΔθ2E68

Taking the limit for ∆r → 0, ∆θ → 0 and ∆z → 0, Eq. (68) is then achieved to Eq. (69) which is the continuity equation in cylindrical coordinate.

Fr=σrrΔrΔθΔz+σrrrΔrr+ΔrΔθΔz+σθrθΔθΔrΔzcosΔθ2+σzrzΔzr+Δr2ΔrΔθ2σθθΔrΔzΔθ2σθθθΔθΔrΔzΔθ2E69

Bringing ∆V = rrθz into Eq. (69) gives

FrΔV=σrrr+σrrr+1rσθrθ+σzrzσθθrE70

Combining Eqs. (66), (67) and (70), we can obtain

urt+ururr+uθrurθuθ2r+uzurz=1ρσrrr+σrrr+1rσθrθ+σzrzσθθr+grE71

In fluid mechanics, the definitions of the surface tensions in Eq. (70) are given as follows:

σrr=p+2μurrE72
σθθ=p+2μ1ruθθ+urrE73
σzz=p+2μuzzE74
σ=σθr=μ1rurθ+uθruθrE75
σrz=σzr=μurz+uzrE76
σθz=σ=μ1ruzθ+uθzE77

Combining Eqs. (70) and (71) yields

urt+ururr+uθrurθuθ2r+uzurz=1ρpr+μρurr2+1rrrurr+1r22urθ2+2urz22r2uθθ+grE78

Finally, Eq. (78) is the momentum equation of fluid in the radial direction. Likewise, in the tangential and axial directions, the momentum equations of fluid flow could also be derived in a similar way as follows:

uθt+uruθr+uθruθθuruθr+uzuθz=1ρpθ+μρuθr2+1rrruθr+1r22uθθ2+2uθz2+2r2urθ+gθE79
uzt+uruzr+uθruzθ+uzuzz=1ρpz+μρ1rrruzr+1r22uzθ2+2uzz2+gzE80

The energy equation could be derived from analyzing the energy balance in the fluid control volume as shown in Figure 11.

Figure 11.

The schematic of the conductive heat fluxes in a control volume in cylindrical coordinate.

According to Figure 11 for cylindrical coordinate, the heat energy balance is expressed as the energy accumulated in the control volume equals the heat into this control volume minus the heat out of the control volume

ρDEDtrΔrΔθΔz=qr+qrrΔrr+ΔrΔθΔz+qrrΔθΔzqθ+qθθΔθΔrΔzcosΔθ2+qθΔrΔzcosΔθ2qz+qzzΔzr+Δr2ΔrΔθ+qzr+Δr2ΔrΔθE81

Which can be further transformed to Eq. (82) by canceling out identical terms with opposite signs.

ρDEDt=1rrqrr1rqθθqzzE82

If the change of thermal energy is all induced by temperature change, then Eq. (82) is expressed as:

ρCpTt+urTr+uθrTθ+uzTz=1rrqrr1rqθθqzzE83

By applying Fourier’s law of heat conduction (Eq. 84), Eq. (89) is then derived as the energy equation in cylindrical coordinate.

qr=λTrE84
qθ=λrTθE85
qz=λTzE86
ρCpTt+urTr+uθrTθ+uzTz=λ1rrrTr+1r2θTθ+zTzE87
Advertisement

3. Source and sinks

The expansion of CFD applications to the fields such as chemical engineering, environmental engineering, thermal engineering and pharmaceutical engineering was based on the development of multiscale and multiphase models which benefited from the coupling of source or sink terms to the conservation equations. A sink term is actually a negative source term, so both source terms and sink terms could be called by a joint name—source terms.

3.1 Source term for the continuity equation

Processes such as solid gasification or combustion, and gas adsorption by solid sorbents would break the mass conservation of the fluid phase. If there are reactions are generating additional fluid or remove the existing fluid in a control volume, the mass balance in this control volume must be disrupted by these reactions. The rate of fluid entering a control volume minus the rate of fluid flowing out equals the rate of fluid accumulating in this control volume and the net gain of fluid generated inside the control volume. If in the control volume there is a reaction generating fluid at a rate of r, Eq. (1) for mass balance will be altered to

dmdt=rdxdydz+inṁoutṁE88

Eq. (45) could also include the case where there is a depletion of fluid by using a negative value for r. Therefore, the continuity equation is adjusted by a source term as follows.

ρt+ρux+ρvy+ρwz=ScontinuityE89

where the source term is the reaction rate Scontinuity = r (kg m−3 s−1) if the reaction is a body reaction. For a surface reaction, the source term is the multiplication of the surface reaction rate (kg m−2 s−1) with the reaction area in unit volume (Areact/Vbody, m2 m−3) [10].

3.2 Source term for component equation

Similar to the imbalance for total mass conservation, the conservation of each component in a multi-component flow with reactions could also be broken. The components participating as reactants would be deemed as sinks and the components generated as products would be regarded as sources. If a component is generated at a rate of ri, then Eq. (7) is adjusted accordingly as follows

dmidt=ridxdydz+inṁioutṁiE90

After a similar derivation from Eq. (7) to Eq. (9), the component equation should include a source term as expressed by Eq. (91)

ρXit+ρuXix+ρvXiy+ρwXiz=D2ρXix2+2ρXiy2+2ρXiz2+SiE91

where Si is the source term of the component equation, and it equals reaction rate ri if it is a body reaction. If it is a surface reaction, the source term of Eq. (91) equals the multiplication of the surface reaction rate (kg m−2 s−1) with the reaction area in unit volume (Areact/Vbody, m2 m−3).

3.3 Source term for the momentum equation

When it comes to cases with a multiphase flow such as gas-solid flow in fluidized bed, momentum conservation still holds, but interphase interactions need to be taken into account [15]. There might be extra forces between different phases, which can affect the momentum transfer between different phases. Therefore, in multiphase flow, appropriate interphase force terms need to be introduced to correct the momentum equation.

When the fluid phase and solid phase interact with each other, a reactive force that causes flow resistance is generated, known as drag force. If the drag force is expressed as FD,i, Eq. (13) can be expanded as follows

DuDt=Fxm=Fsurf+Fbody+FD,imE92

The drag force FD,I is calculated by:

FD,i=βfsθfusufE93

where us is the solid phase velocity, uf is the fluid phase velocity, θf is the volume fraction of the fluid phase and βfs is the drag coefficient. Many researchers have proposed the models for drag coefficients. The most widely used is the Gidaspow model which combines Ergun and Wen-Yu equations to accurately simulate the gas-solid multiphase flow:

βp,f=150θs2μfθf2ds+1.75θsρfθfdsusufθf<0.834CDθsρfdsusufθf2.65θf0.8E94
CD=241+0.15Rep0.687RepRep10000.44Rep>1000E95

θs is the particle volume fraction, θf is the fluid volume fraction, μf is the fluid phase viscosity, ρf is the fluid density, ds is the particle diameter of the solid phase and CD is the drag coefficient. Particle Reynolds number Rep is described by

Rep=θfρfdsusuf/ufE96

Therefore, Eq. (40), the momentum equation in the x direction, is adjusted by a source term as follows

ut+uux+vuy+wuz=1ρpx+μρ2ux2+2uy2+2uz2+gx+Smom,xE97

where Smom is the source term for momentum which can be expressed as:

Smom,x=FD,i,x/ρdxdydzE98

Similarly, the momentum equation in the y direction (Eq. 41) and the momentum equation in the z direction (Eq. 42) are adjusted as follows

vt+uvx+vvy+wvz=1ρpy+μρ2vx2+2vy2+2vz2+gy+Smom,yE99
wt+uwx+vwy+wwz=1ρpz+μρ2wx2+2wy2+2wz2+gz+Smom,zE100

3.4 Source term for the energy equation

As discussed in the energy equation section, the energy equation ensures the thermal energy conservation. In some cases, chemical reactions occur in the fluid domain, and these reactions are either exothermic or endothermic. If the reaction is exothermic, it could release heat to the surrounding fluid and increase the temperature. If the reaction is endothermic, it consumes the heat from the surrounding fluid and decreases the temperature. Even though total energy is conserved, the thermal energy is not. In order to consider the imbalance of thermal energy in fluid, the source term of heat must be included in the energy equation. By considering reaction heat, the energy balance is

ρDEDtΔxΔyΔz=Q̇+rΔhΔxΔyΔzE101

where ∆h (J kg−1) is the heat generated when unit mass reactant is converted to products. Bringing Fourier’s law of heat conduction and dividing both sides by ∆xyz, the energy equation with source term Senerg = rh is

ρDEDt=λxTx+λyTy+λzTz+rΔhE102

With the inclusion of source terms, processes with chemical reactions or multiphase interactions could be accurately simulated in CFD models.

Advertisement

4. Numerical methods to solve governing equations

The governing equations discussed above are almost impossible to solve analytically. The only feasible pathway to solve these partial differential equations is employing numerical methods. This is the reason most CFD software need to discretize the fluid domain to generate a mesh or grid. The core idea of numerical methods is transforming differential to difference quotient. The commonly used numerical methods in most CFD software include the finite difference method and the finite volume method.

4.1 Finite difference method

The finite difference method is the first method for solving partial differential equations. In finite difference method, the Taylor series is employed to generate approximations to the partial derivatives of the CFD governing equations. According to the Taylor series, the value of a general variable ϕ at node i + 1 (Figure 12) could be expressed as:

Figure 12.

One-dimensional grids for the finite-difference method.

ϕi+1=ϕi+ϕxiΔx+2ϕx2iΔx22+3ϕx3iΔx36+Higher Order TermsE103

And the value of a general variable φ at node i-1 is:

ϕi1=ϕiϕxiΔx+2ϕx2iΔx223ϕx3iΔx36+Higher Order TermsE104

If we subtract Eq. (104) from Eq. (103), we get

ϕxi=ϕi+1ϕi12Δx+Δx3/33ϕ/x32ΔxE105

Since ∆x is approaching zero, the second term is very small compared to the first term. By omitting the ∆x3 term, the central difference is achieved

ϕxi=ϕi+1ϕi12ΔxE106

From Eq. (103) and assuming ∆x is approaching zero, we can get the forward difference

ϕxi=ϕi+1ϕiΔx+OΔxE107

From Eq. (104) and assuming ∆x is approaching to zero, we can get the backward difference

ϕxi=ϕiϕi1Δx+OΔxE108

Eqs. (106)(108) successfully approximated the first-order derivative by difference quotient. First-order derivative is actually a slope of a variable. Figure 13 geometrically represents the slopes by backward difference, central difference and forward difference. It is clear that the slope by central difference (blue line) is closer to the real slope (black line), so the central difference could represent the exact partial differential with a higher accuracy.

Figure 13.

Finite-difference representation of the derivative for ∂ϕ/∂x.

In CFD governing equations, there are second-order partial derivatives in diffusion terms, so the second-order derivatives should also be approximated by finite difference method. Adding Eqs. (103) and (104) together yields

ϕi+1+ϕi1=2ϕi+2ϕx2iΔx2+4ϕx4iΔx424E109

By omitting higher-order terms, the difference quotient form in finite difference method for second-order derivative is

2ϕx2=ϕi+12ϕi+ϕi1Δx2E110

In a 3-D fluid domain such as Figure 14, Taylor series expansion also applies for y and z directions. The central differences for first- and second-order derivatives are:

Figure 14.

Three-dimensional grids for the finite-difference method.

ϕyj=ϕj+1ϕj12ΔyE111
ϕzk=ϕk+1ϕk12ΔzE112
2ϕy2=ϕj+12ϕj+ϕj1Δy2E113
2ϕz2=ϕk+12ϕk+ϕk1Δz2E114

For time term derivatives, only the first-order derivative needs to be approximated by the finite difference method. In most cases, the backward difference is used (Eq. (115)). This is because the variable value at the previous time step has already been calculated, and then, it is available to calculate the current time step in explicit expression. Since the computation performs in chronological order, the variable values at future steps are not available. Forward difference and central difference involve the variable at future steps (Eqs. (116) and (117)), so it is not recommended to be used in explicit solver. It can only be solved in an implicit solver.

ϕt=ϕi,j,knϕi,j,kn1ΔtE115
ϕt=ϕi,j,kn+1ϕi,j,knΔtE116
ϕt=ϕi,j,kn+1ϕi,j,kn12ΔtE117

As we know it is easy to transform difference quotient to linear equation. With the finite element method, all the CFD partial differential equations can be converted to linear equations. By applying the techniques of solving linear equations, the numerical solutions of fluid field could be obtained.

4.2 Finite volume method

For structured mesh (Figure 14), it is ideal to use the finite difference method introduced above. However, most CFD simulations have to use an unstructured mesh (Figure 15) due to the complexity of geometries, so it is difficult to define the node sequence i, j and k. Therefore, it is almost impossible to use the finite difference method. In the case of unstructured mesh, we can resort to another popular numerical method which is called the finite volume method.

Figure 15.

Examples of unstructured mesh.

Finite volume method is derived from Gauss’s divergence theorem. In divergence theorem, the integration of a variable divergence over a body equals the integration of the variable over the surface which encloses the body.

Ωϕxx+ϕyy+ϕzzdV=ΣϕxyzdS=Σϕxdydz+Σϕydxdz+ΣϕzdxdyE118

It can also be written in x, y, z directions as follows

ΩϕzdV=ΣϕxyzdxdyE119
ΩϕxdV=ΣϕxyzdydzE120
ΩϕydV=ΣϕxyzdxdzE121

In CFD, we assume ∂ϕ/∂x only has variation between different grids. Inside a single grid, it has only a constant value of ∂ϕ/∂x. The variation inside a single grid is very small and could be neglected. Therefore, for a grid, the left side of Gauss’s divergence theorem could be simplified as

ΩϕxdV=ϕxΩdV=ϕxΔVE122

Similarly, the variation of ϕ on a grid surface could also be neglected if we assume a grid surface is too small to have variation of ϕ. The right side of Gauss’s divergence theorem could be simplified as well

Σϕdydz=ϕAxE123

The divergence theorem correlated the ∂ϕ/∂x to ϕ, and we can utilize this correlation to get the approximation of the first-order derivative in a tetrahedral grid (Figure 16) as follows

Figure 16.

The representation of a tetrahedral grid.

ϕx=1ΔVΔVϕxdV=1ΔVAϕdAx=1ΔVϕ1A1x+ϕ2A2x+ϕ3A3x+ϕ4A4x=1ΔVi=1NϕiAixE124

where Aix is the projected area to the y-o-z surface.

The first-order derivative with respect to y and z can be similarly obtained as follows

ϕy=1ΔVΔVϕydV=1ΔVAϕdAy=1ΔVϕ1A1y+ϕ2A2y+ϕ3A3y+ϕ4A4y=1ΔVi=1NϕiAiyE125
ϕz=1ΔVΔVϕzdV=1ΔVAϕdAz=1ΔVϕ1A1z+ϕ2A2z+ϕ3A3z+ϕ4A4z=1ΔVi=1NϕiAizE126

In the same way, the second-order derivative can be approximated by the first-order derivative

2ϕx2=1ΔVΔV2ϕx2dV=1ΔVAϕxdAx=1ΔVϕx1A1x+ϕx2A2x+ϕx3A3x+ϕx4A4x=1ΔVi=1NϕxiAixE127
2ϕy2=1ΔVi=1NϕyiAiyE128
2ϕz2=1ΔVi=1NϕziAizE129

From the equations above, it is clear that the finite volume method has better conservativeness of the CFD governing equations. Meanwhile it is more adaptive to complicated geometries. In most CFD commercial software, the finite volume method is the mainstream technique to solve the CFD governing equations.

Advertisement

5. Conclusion

Understanding the basic theory of CFD governing equations and numerical solutions is the key to developing CFD simulation codes as well as using CFD packages. Basically, all flows can be universally described by the continuity equation, component equation, momentum equation and energy equation, because fluid follows mass conservation, momentum conservation and energy conservation. With source terms, CFD applications were broadened to a wider field like chemical engineering, environmental engineering or thermal engineering. However, these equations are almost impossible to be solved analytically, thus we have to resort to the numerical method to get the approximate results. This involves using the finite difference method and finite volume method. The numerical methods offered a feasible way to get the solutions from the governing equations, which facilitated the analysis of complex phenomena associated with fluid flow, heat transfer and chemical reactions.

Advertisement

Acknowledgments

Authors appreciate the financial support from teaching reform fund for postgraduate students in Dalian University of Technology (No. 20), Liao Ning Revitalization Talents Program (grant number: XLYC2007179) and the Australian Research Council (grant number DE210101549).

References

  1. 1. Hasse C, Debiagi P, Wen X, Hildebrandt K, Vascellari M, Faravelli T. Advanced modeling approaches for CFD simulations of coal combustion and gasification. Progress in Energy and Combustion Science. 2021;86:100938. DOI: 10.1016/j.pecs.2021.100938
  2. 2. Ramos A, Monteiro E, Rouboa A. Numerical approaches and comprehensive models for gasification process: A review. Renewable and Sustainable Energy Reviews. 2019;110:188-206. DOI: 10.1016/j.rser.2019.04.048
  3. 3. Tu Q, Wang H, Ocone R. Application of three-dimensional full-loop CFD simulation in circulating fluidized bed combustion reactors – A review. Powder Technology. 2022;399:117181. DOI: 10.1016/j.powtec.2022.117181
  4. 4. Luo H, Wang X, Liu X, Wu X, Shi X, Xiong Q. A review on CFD simulation of biomass pyrolysis in fluidized bed reactors with emphasis on particle-scale models. Journal of Analytical and Applied Pyrolysis. 2022;162:105433. DOI: 10.1016/j.jaap.2022.105433
  5. 5. Lu L, Gao X, Dietiker J-F, Shahnam M, Rogers WA. MFiX based multi-scale CFD simulations of biomass fast pyrolysis: A review. Chemical Engineering Science. 2022;248:117131. DOI: 10.1016/j.ces.2021.117131
  6. 6. Xiong Q, Yang Y, Xu F, Pan Y, Zhang J, Hong K, et al. Overview of computational fluid dynamics simulation of reactor-scale biomass pyrolysis. ACS Sustainable Chemistry & Engineering. 2017;5(4):2783-2798. DOI: 10.1021/acssuschemeng.6b02634
  7. 7. Ku X, Li T, Løvås T. CFD–DEM simulation of biomass gasification with steam in a fluidized bed reactor. Chemical Engineering Science. 2015;122:270-283. DOI: 10.1016/j.ces.2014.08.045
  8. 8. Ji G, Zhao M, Wang G. Computational fluid dynamic simulation of a sorption-enhanced palladium membrane reactor for enhancing hydrogen production from methane steam reforming. Energy. 2018;147:884-895. DOI: 10.1016/j.energy.2018.01.092
  9. 9. Ji G, Wang G, Hooman K, Bhatia S, Diniz da Costa JC. Computational fluid dynamics applied to high temperature hydrogen separation membranes. Frontiers of Chemical Science and Engineering. 2012;6(1):3-12. DOI: 10.1007/s11705-011-1161-5
  10. 10. Ji G, Wang G, Hooman K, Bhatia S, Diniz da Costa JC. The fluid dynamic effect on the driving force for a cobalt oxide silica membrane module at high temperatures. Chemical Engineering Science. 2014;111:142-152. DOI: 10.1016/j.ces.2014.02.006
  11. 11. Khan M, Hussain A, Malik MY, Salahuddin T, Aly S. Numerical analysis of Carreau fluid flow for generalized Fourier’s and Fick’s laws. Applied Numerical Mathematics. 2019;144:100-117. DOI: 10.1016/j.apnum.2019.05.018
  12. 12. Ji G, Wang G, Hooman K, Bhatia S, Diniz da Costa JC. Simulation of binary gas separation through multi-tube molecular sieving membranes at high temperatures. Chemical Engineering Journal. 2013;218:394-404. DOI: 10.1016/j.cej.2012.12.063
  13. 13. Kundu PK, Cohen IM, Dowling DR. Fluid Mechanics. Academic Press; 2015 Amsterdam
  14. 14. Bernardin C, Olla S. Fourier’s law for a microscopic model of heat conduction. Journal of Statistical Physics. 2005;121(3):271-289. DOI: 10.1007/s10955-005-7578-9
  15. 15. Zhang M, Zhang Y, Ma D, Li A, Fu W, Ji G, et al. Numerical investigation on the heat transfer of plastic waste pyrolysis in a rotary furnace. Chemical Engineering Journal. 2022;445:136686. DOI: 10.1016/j.cej.2022.136686

Written By

Guozhao Ji, Meng Zhang, Yongming Lu and Jingliang Dong

Submitted: 17 April 2023 Reviewed: 20 September 2023 Published: 17 November 2023