Computational Fluid Dynamics

Chapter 2
Fluid Mechanics and Governing Conservation Laws

Post Graduate Program in Mechanical Engineering
Computational Fluid Dynamics   •   Post Graduate

2. Fluid Mechanics and Governing Conservation Laws

Introduction and context

Computational fluid dynamics (CFD) is not primarily a collection of meshing and software operations. It is the numerical solution of a mathematical model of fluid motion. The reliability of a CFD result therefore depends first on whether the governing equations represent the physical problem correctly, and then on whether those equations are discretized and solved appropriately. This chapter develops the physical and mathematical foundations on which later CFD procedures are built.

Fluid mechanics describes the behavior of liquids and gases under the action of forces, while conservation laws express restrictions that every physically admissible flow must satisfy. Mass cannot be created or destroyed in an ordinary flow; momentum changes in response to surface and body forces; and energy is transferred and transformed according to the first law of thermodynamics. These statements can be written for a fixed region in space, called a control volume, or for an identifiable collection of fluid particles, called a system. The resulting integral equations are particularly useful for engineering balances. Their differential forms provide the local partial differential equations solved in CFD.

The transition from physical principles to equations requires several ideas: continuum modeling, control volumes, material derivatives, constitutive relations, coordinate descriptions, and transport of scalar quantities. A sound understanding of these ideas is essential when selecting boundary conditions, interpreting residuals, assessing conservation errors, or deciding whether a result is physically credible.

Learning objectives

After studying this chapter, the reader should be able to:

1. distinguish between system and control-volume descriptions of fluid motion;

2. derive the integral and differential forms of mass, momentum, and energy conservation;

3. use the Reynolds transport theorem to relate material and spatial descriptions;

4. interpret the material derivative and its terms;

5. formulate the Navier–Stokes equations for a Newtonian fluid;

6. explain the role of constitutive relations and thermodynamic closure;

7. formulate a general convection–diffusion–source transport equation;

8. recognize the influence of coordinate systems and geometric conservation;

9. identify assumptions, limitations, and common modeling errors in CFD;

10. connect conservation equations with engineering applications and numerical practice.

The continuum description of a fluid

A fluid is a substance that deforms continuously under an applied shear stress. In fluid mechanics, matter is usually treated as a continuum: density, pressure, temperature, velocity, and other properties are assumed to vary smoothly in space and time. This approximation is valid when the characteristic length scale of the flow is much larger than the molecular mean free path. It is the basis of classical CFD and becomes questionable in rarefied gases, microscale flows, and certain non-equilibrium processes.

Two descriptions are useful. In the Lagrangian description, one follows individual fluid particles and records their changing position and properties. In the Eulerian description, one observes fixed locations in space and describes the flow variables as functions of position and time. CFD almost always uses the Eulerian description because a computational mesh is fixed or prescribed in space, although moving-mesh methods can also be formulated in an Eulerian or arbitrary Lagrangian–Eulerian framework.

Let the velocity field be

u = (u, v, w),

where u, v, and w are the velocity components in a Cartesian coordinate system. The principal field variables are density rho, pressure p, temperature T, and specific internal energy e. Additional variables may include enthalpy h, entropy s, species mass fractions Y_k, and turbulence quantities.

A property phi carried by the fluid changes for two distinct reasons: it may vary at a fixed point because of unsteadiness, and a fluid particle may move into a region where the property has a different value. The material derivative combines both effects:

Dphi/Dt = partial phi/partial t + u · grad(phi).

For a scalar,

Dphi/Dt = partial phi/partial t + u partial phi/partial x + v partial phi/partial y + w partial phi/partial z.

The first term is the local or temporal rate of change. The second term is the convective rate of change. For velocity itself,

Du/Dt = partial u/partial t + (u · grad)u,

which is the acceleration of a fluid particle. Convective acceleration can exist even in a steady flow because the velocity may vary from one location to another.

From a system to a control volume

A system is a fixed amount of matter. Its mass remains constant, although its shape and location may change. A control volume is a selected region in space bounded by a control surface. Fluid may cross the control surface, so the mass inside the control volume need not remain constant.

The Reynolds transport theorem provides the bridge between system laws and control-volume equations. For an extensive property B with corresponding intensive property beta = B/m, the theorem is

(dB_system/dt) = d/dt integral_CV rho beta dV + integral_CS rho beta (u · n) dA,

for a fixed control volume. Here n is the outward unit normal. The first term measures accumulation inside the control volume, while the second measures net outward flux across the control surface. For a moving control volume, the relative velocity between fluid and control-surface motion replaces u.

This theorem is central to CFD because finite-volume methods apply conservation laws directly to small control volumes. The volume integral represents storage, and face fluxes represent transport between neighboring cells.

Conservation of mass

For a system, mass conservation states

Dm_system/Dt = 0.

Applying the Reynolds transport theorem with B = m and beta = 1 gives the integral continuity equation for a fixed control volume:

partial/dt integral_CV rho dV + integral_CS rho (u · n) dA = 0.

The rate of mass accumulation plus the net outward mass flow must be zero. For a steady one-dimensional flow through two sections, this becomes rho_1 A_1 V_1 = rho_2 A_2 V_2. For incompressible flow with constant density, the volume flow rate is conserved.

Using the divergence theorem,

integral_CS rho u · n dA = integral_CV div(rho u) dV.

Because the control volume is arbitrary, the differential continuity equation is

partial rho/partial t + div(rho u) = 0.

An equivalent material form is

D rho/Dt + rho div(u) = 0.

Thus, a fluid particle changes density when the velocity field has nonzero divergence. For constant-density incompressible flow, the equation reduces to

div(u) = 0.

Incompressibility is a kinematic condition on the velocity field, not merely a statement that the fluid has a large density. Liquids are often modeled as incompressible, but gases may also be treated as incompressible when density variations are negligible for the problem under consideration.

Conservation of linear momentum

Newton’s second law applied to a system states that the rate of change of system momentum equals the resultant external force. The integral control-volume form is

partial/dt integral_CV rho u dV + integral_CS rho u (u · n) dA = integral_CV rho b dV + integral_CS t dA.

Here b is the body force per unit mass, such as gravitational acceleration, and t is the traction vector acting on the control surface. The traction may be decomposed into pressure and viscous contributions:

t = -p n + tau · n,

where tau is the viscous stress tensor. Consequently,

partial/dt integral_CV rho u dV + integral_CS rho u (u · n) dA = integral_CV rho b dV + integral_CS (-p I + tau) · n dA.

The differential momentum equation is

partial(rho u)/partial t + div(rho u tensor u) = rho b - grad p + div(tau).

The dyadic product u tensor u represents the momentum flux tensor. Using continuity, the conservative form can be written as

rho Du/Dt = rho b - grad p + div(tau).

This is the Cauchy momentum equation. It separates inertia, pressure forces, viscous forces, and body forces. The equation is vectorial; its three scalar component equations are solved in a three-dimensional Cartesian problem.

Stress and constitutive behavior

The total stress tensor is sigma = -p I + tau. Pressure contributes an isotropic normal stress. Viscous stress represents molecular momentum transport caused by velocity gradients. Conservation laws alone do not specify tau; a constitutive relation is required.

For a Newtonian fluid, viscous stress is linearly related to the rate of deformation:

tau = 2 mu S + lambda (div u) I,

where mu is dynamic viscosity, lambda is the second coefficient of viscosity, and

S = 1/2 [grad u + (grad u)^T]

is the strain-rate tensor. Under the Stokes hypothesis, lambda = -2mu/3. For a constant-viscosity incompressible fluid, div u = 0 and

div(tau) = mu nabla^2 u.

The momentum equation then becomes

rho [partial u/partial t + (u · grad)u] = -grad p + mu nabla^2 u + rho b.

This is the incompressible Navier–Stokes equation. It is nonlinear because of the convective acceleration term. The nonlinearity is a major source of multiple flow regimes, instability, and computational difficulty.

Newtonian behavior is an approximation. Polymer solutions, slurries, blood, paints, and many advanced fluids may be non-Newtonian, requiring models such as power-law, Carreau, Bingham, or Herschel–Bulkley relations. A CFD solution can be mathematically converged yet physically misleading if an unsuitable rheological model is used.

Conservation of energy

The first law of thermodynamics states that the rate of change of total energy of a system equals heat supplied to it plus work performed on it. Let the specific total energy be

e_t = e + 1/2 |u|^2,

where e is specific internal energy and the second term is kinetic energy per unit mass. The integral control-volume equation is

partial/dt integral_CV rho e_t dV + integral_CS rho e_t (u · n) dA

= integral_CV rho b · u dV + integral_CS (t · u) dA - integral_CS q · n dA + integral_CV rho r dV.

Here q is heat flux, and r is volumetric heat generation per unit mass. With Fourier’s law,

q = -k grad T,

where k is thermal conductivity. Substitution of the traction expression gives the differential total-energy equation:

partial(rho e_t)/partial t + div(rho e_t u)

= div(k grad T) - div(pu) + div(tau · u) + rho b · u + rho r.

Equivalent forms are often used. An internal-energy equation can be expressed as

rho De/Dt = -p div(u) + tau : grad(u) - div(q) + rho r.

The term -p div(u) represents compression or expansion work, tau : grad(u) is viscous dissipation, and -div(q) is heat conduction. For an incompressible fluid with constant properties, viscous dissipation may be negligible in many ordinary flows, although it is important in highly viscous flows, lubrication, microflows, and high-shear processes.

An equation of state and thermodynamic relations are needed to close the energy system. For an ideal gas,

p = rho R T,

and often e = c_v T and h = c_p T, subject to the assumptions used for the specific heat capacities. In a liquid-flow calculation, temperature may be obtained from an energy equation or prescribed when thermal effects are unimportant.

General transport equation

Many CFD variables obey a common conservation structure. For a transported scalar phi, the conservative transport equation is

partial(rho phi)/partial t + div(rho u phi)

= div(Gamma grad phi) + S_phi.

The left side contains transient storage and convection. The first term on the right is diffusion, with Gamma as the diffusion coefficient, and S_phi represents sources or sinks. This equation is a framework rather than a universal physical law: the meaning of Gamma and S_phi depends on phi.

For temperature in a simple heat-conduction model, Gamma is related to thermal conductivity. For species mass fraction, Gamma may represent mass diffusivity and the source may include chemical reaction. For momentum components, convection and diffusion are supplemented by pressure-gradient and body-force terms. Turbulence models introduce additional transported variables, such as turbulent kinetic energy and its dissipation rate.

The equation can also be written in nonconservative form when continuity is satisfied:

rho Dphi/Dt = div(Gamma grad phi) + S_phi.

The conservative form is generally preferred for finite-volume discretization because fluxes across shared faces cancel exactly between adjacent cells. This property supports global conservation of mass, momentum, energy, and transported scalars.

Coordinate systems and geometric interpretation

Cartesian coordinates are convenient for rectangular domains and provide simple component equations. Cylindrical coordinates (r, theta, z) are natural for pipes, rotating machinery, and axisymmetric flows. Spherical coordinates are useful for droplets, particles, and astrophysical or geophysical problems. The physical conservation laws do not change, but the differential operators and component equations do.

For example, incompressibility in cylindrical coordinates is

1/r partial(ru_r)/partial r + 1/r partial u_theta/partial theta + partial u_z/partial z = 0.

The factor 1/r is a geometric contribution and cannot be omitted. Likewise, cylindrical momentum equations contain curvature terms such as -u_theta^2/r and u_r u_theta/r. These terms represent real changes in momentum direction associated with curved coordinates; they are not optional corrections.

Integral conservation laws are coordinate-independent when written with physical surface normals and volumes. In computational practice, mapped, curvilinear, and unstructured meshes require careful evaluation of cell volumes, face areas, and metric terms. A discretization that violates the geometric conservation law can produce spurious mass or momentum changes, especially on moving or deforming meshes.

Boundary and initial conditions

Conservation equations do not define a unique problem without initial and boundary conditions. A velocity boundary condition may prescribe no slip at a stationary solid wall, specify a moving-wall velocity, or impose a symmetry condition. At an inlet, velocity, mass flow rate, pressure, temperature, or turbulence quantities may be prescribed depending on the mathematical character of the problem. At an outlet, pressure is often specified, but the suitability of this choice depends on flow direction, recirculation, and compressibility.

The no-slip condition is appropriate for most continuum Newtonian flows adjacent to a stationary solid wall, giving u = 0 at the wall. Impermeability requires zero normal velocity even when tangential slip is permitted. Thermal boundaries may be isothermal, adiabatic, or specified by heat flux. Species boundaries may prescribe concentration, flux, or a reactive condition.

Boundary data must be physically compatible. Prescribing both pressure and all velocity components at the same boundary may overconstrain an incompressible problem, while prescribing too little information may make it underdetermined. Boundary conditions also influence conservation: an apparent mass imbalance may originate from incompatible inlet and outlet specifications rather than from the discretization alone.

Nondimensional interpretation

Nondimensionalization reveals the relative importance of terms. Choose characteristic length L, velocity U, density rho_0, and pressure rho_0 U^2. The momentum equation leads to the Reynolds number

Re = rho_0 U L / mu.

The ratio of inertial to viscous effects is represented by Re. Low-Reynolds-number flow is strongly influenced by viscosity, whereas high-Reynolds-number flow may contain thin shear layers, separation, and turbulence.

For compressible flows, the Mach number

Ma = U/a

compares flow speed with the speed of sound a. Mach number influences density variation, pressure-wave propagation, and the suitability of incompressible approximations. Other important groups include the Prandtl number Pr, comparing momentum and thermal diffusivity, and the Schmidt number Sc, comparing momentum and mass diffusivity. Nondimensional analysis assists model selection, mesh design, and interpretation of simulation results.

An illustrative applied case: thermal flow through a heated channel

Background

Consider steady flow of a fluid through a long rectangular channel whose lower wall is maintained at a uniform temperature higher than the inlet fluid temperature. The purpose is to predict the outlet temperature and the wall heat-transfer coefficient.

Situation and modeling decisions

The channel dimensions are much larger than molecular scales, and the fluid is assumed Newtonian. If the expected temperature difference produces only small density changes, an incompressible formulation may be suitable. Otherwise, density, viscosity, thermal conductivity, and specific heat must be treated as temperature-dependent, and buoyancy may need to be included.

A two-dimensional model may be used only if the geometry and boundary conditions justify it. The inlet requires a velocity or mass-flow specification and an inlet temperature. The wall requires no-slip velocity and either prescribed temperature or heat flux. An outlet pressure condition is applied sufficiently far downstream to reduce artificial influence on the heated region.

Governing equations

The continuity equation is

div(u) = 0

for constant-density flow. Momentum is governed by

rho (u · grad)u = -grad p + mu nabla^2 u.

The thermal field satisfies

rho c_p u · grad T = div(k grad T),

for steady flow with constant properties and no volumetric heat generation.

Analysis and expected behavior

Near the inlet, the thermal boundary layer grows from the heated wall. The wall-normal temperature gradient is initially large and decreases downstream as the fluid becomes warmer. The local heat flux is

q_w = -k partial T/partial n.

A simulation should satisfy a global energy balance: the heat added at the wall should equal the increase in bulk-fluid enthalpy, subject to any heat losses through other boundaries. If the calculated outlet temperature is inconsistent with this balance, possible causes include incorrect boundary flux signs, insufficient convergence, an inadequate outlet location, or an inconsistent property model.

Outcome and learning points

The case illustrates that the energy equation cannot be selected independently of the momentum and continuity equations. The velocity field determines convective transport, while temperature-dependent properties may feed back into momentum. It also demonstrates why an integral balance is a valuable verification tool: local contours may appear plausible even when the global heat balance is wrong.

Common errors, limitations, and professional practice

Several errors recur in the formulation and use of governing equations. The first is confusing steady flow with uniform flow. Steady means partial differentiation with respect to time is zero at fixed locations; convective acceleration can still be substantial. The second is treating incompressibility as an automatic material property rather than checking whether density variations are dynamically important. The third is omitting pressure work, viscous dissipation, or body forces without assessing their scale.

Another error is using a constitutive relation outside its range of validity. Constant viscosity may be unsuitable for large temperature ranges, and Newtonian behavior may be inappropriate for suspensions or polymers. In compressible flow, solving momentum and continuity without a thermodynamic closure leads to an incomplete system. In rotating or curved coordinates, missing geometric terms can generate apparently mysterious forces or incorrect pressure distributions.

At the numerical level, conservation should be monitored through integrated mass, momentum, and energy balances, not only through residual reduction. A residual measures the algebraic imbalance of discrete equations, but a small residual does not guarantee correct boundary conditions, adequate mesh resolution, or a valid physical model. Verification asks whether the equations were solved correctly; validation asks whether those equations represent reality adequately.

Professional CFD work also requires transparent documentation of assumptions, property data, coordinate conventions, boundary conditions, and source terms. Engineering decisions based on simulation should identify uncertainty arising from turbulence modeling, mesh resolution, material properties, and boundary data. Safety-critical applications require independent checks and, where possible, comparison with analytical, experimental, or benchmark solutions.

Contemporary computational perspective

Modern CFD increasingly combines conservation laws with adaptive meshes, high-order discretization, reduced-order models, and data-assisted methods. Machine learning can accelerate closure models or surrogate predictions, but it does not remove the need for conservation and dimensional consistency. Physics-informed and hybrid approaches are most credible when physical constraints are explicitly embedded and predictions are tested outside the calibration data.

For moving geometries, fluid–structure interaction, free surfaces, and additive manufacturing, conservation laws must be applied on changing domains. Arbitrary Lagrangian–Eulerian methods, cut-cell methods, level-set techniques, and conservative interface-capturing schemes address such problems. The underlying requirements remain unchanged: fluxes must be correctly defined, source terms must be consistent, and global balances must be checked.

Best practices for formulating a CFD model

A disciplined formulation usually follows this sequence:

  • define the system, domain, geometry, and relevant scales;
  • identify the unknown fields and select conservation equations;
  • state assumptions such as steady, incompressible, inviscid, laminar, or adiabatic;
  • select constitutive laws and thermodynamic properties;
  • choose a coordinate system consistent with the geometry;
  • specify initial and boundary conditions without over- or under-constraining the problem;
  • nondimensionalize or estimate dominant terms to justify simplifications;
  • establish integral balance checks before interpreting detailed contours;
  • verify mesh, discretization, and solver performance separately from model validation.

This sequence prevents a common professional mistake: using software settings to make decisions that should have been made from physics.

Chapter Summary

Fluid mechanics in CFD is founded on conservation of mass, linear momentum, and energy. The Reynolds transport theorem converts system laws into control-volume equations, while the divergence theorem produces local differential equations. Continuity describes mass accumulation and flux; momentum produces the Cauchy and Navier–Stokes equations; and energy accounts for internal, kinetic, thermal, pressure, viscous, and body-force effects. Because conservation laws do not determine stress, heat flux, or thermodynamic behavior by themselves, constitutive relations such as Newtonian viscosity and Fourier heat conduction are required.

The material derivative distinguishes local change from convection, and coordinate systems introduce geometric terms that must be retained. The general convection–diffusion–source equation provides a common structure for scalar transport. A complete CFD formulation also requires appropriate boundary and initial conditions, property models, and checks on nondimensional parameters and global balances. These foundations determine whether later numerical results are meaningful, conservative, and professionally defensible.

Key Terms

Continuum hypothesis: Treating fluid properties as smoothly varying fields rather than tracking individual molecules.

Eulerian description: Description of flow variables at fixed locations in space.

Lagrangian description: Description obtained by following identifiable fluid particles.

Control volume: A specified region in space through which fluid may flow.

System: A fixed quantity of matter followed through time.

Reynolds transport theorem: Relation between the rate of change of a system property and accumulation and flux in a control volume.

Material derivative: Rate of change experienced by a moving fluid particle.

Continuity equation: Differential or integral statement of mass conservation.

Incompressible flow: Flow satisfying zero velocity divergence, commonly with constant density.

Cauchy momentum equation: Local balance between fluid acceleration and surface and body forces.

Navier–Stokes equations: Momentum equations with a constitutive model for viscous stress.

Newtonian fluid: Fluid whose viscous stress is linearly related to strain rate.

Stress tensor: Tensor describing force per unit area acting on surfaces of arbitrary orientation.

Constitutive relation: Material law that supplements conservation equations.

Viscous dissipation: Conversion of mechanical energy into internal energy through viscous action.

Fourier’s law: Relation stating that heat flux is proportional to the negative temperature gradient.

Convection: Transport caused by bulk fluid motion.

Diffusion: Transport caused by gradients in a field variable.

Source term: Local production or removal term in a transport equation.

Reynolds number: Dimensionless ratio of inertial to viscous effects.

Review Questions

Short Answer Questions

1. What is the difference between a system and a control volume?

2. Separate the local and convective contributions in the material derivative.

3. State the differential continuity equation for a compressible fluid.

4. What physical effects are represented by pressure and viscous stress?

5. Why is a constitutive relation required in addition to conservation laws?

Long Answer Questions

1. Derive the integral and differential forms of mass conservation using the Reynolds transport theorem.

2. Develop the Cauchy momentum equation and show how the incompressible Navier–Stokes equation follows for a constant-viscosity Newtonian fluid.

3. Derive the total-energy control-volume equation and explain the roles of heat conduction, pressure work, and viscous dissipation.

4. Explain the general convection–diffusion–source equation and relate its terms to scalar transport in CFD.

5. Discuss how coordinate choice, boundary conditions, and thermodynamic closure affect the formulation of a CFD problem.

Analytical / Application Questions

1. A steady flow enters a channel at uniform velocity and exits through a smaller area. Explain, using continuity and momentum concepts, how velocity and pressure may change, and identify the additional information required for a quantitative prediction.

2. A CFD model of a heated channel produces plausible temperature contours but violates the global energy balance. Diagnose at least four possible formulation or numerical causes.

3. A polymer solution is simulated using constant-viscosity Newtonian equations. Explain why the result may be unreliable and propose a more appropriate modeling procedure.

22. Multiple Choice Questions with Answers

Question 1

Which expression represents the material derivative of a scalar phi in Cartesian coordinates?

A. partial phi/partial t only

B. u · grad(phi) only

C. partial phi/partial t + u · grad(phi)

D. grad(phi) / partial t

Correct Answer: C. partial phi/partial t + u · grad(phi)

Question 2

For a fixed control volume, the integral mass balance states that

A. mass accumulation equals net outward mass flux

B. mass accumulation plus net outward mass flux is zero

C. net outward mass flux is always zero

D. density must be constant

Correct Answer: B. mass accumulation plus net outward mass flux is zero

Question 3

For constant-density incompressible flow, continuity requires

A. grad(p) = 0

B. div(u) = 0

C. D rho/Dt = 1

D. curl(u) = 0

Correct Answer: B. div(u) = 0

Question 4

Which term is responsible for the nonlinearity of the incompressible Navier–Stokes equations?

A. pressure gradient

B. viscous diffusion

C. convective acceleration (u · grad)u

D. constant body force

Correct Answer: C. convective acceleration (u · grad)u

Question 5

For a Newtonian fluid, viscous stress is primarily related to

A. absolute pressure only

B. velocity and temperature values only

C. the rate of deformation of the fluid

D. the total control-volume mass only

Correct Answer: C. the rate of deformation of the fluid

Question 6

In the general scalar transport equation, Gamma grad(phi) represents

A. convective flux

B. diffusive flux

C. pressure work

D. body-force acceleration

Correct Answer: B. diffusive flux

Question 7

A steady flow can still have nonzero fluid-particle acceleration when

A. the velocity varies spatially

B. density is constant

C. pressure is uniform everywhere

D. the flow is incompressible

Correct Answer: A. the velocity varies spatially

Question 8

Which relation is required to close an ideal-gas compressible-flow formulation?

A. p = rho R T

B. div(u) = 0 in every case

C. tau = 0 for all flows

D. q = 0 regardless of temperature

Correct Answer: A. p = rho R T

Question 9

In a heated-channel simulation, the most direct global energy check is to compare

A. mesh size with Reynolds number

B. wall heat input with fluid enthalpy increase

C. pressure gradient with molecular mass

D. velocity divergence with thermal conductivity

Correct Answer: B. wall heat input with fluid enthalpy increase

Question 10

Why must curvature terms be retained in cylindrical-coordinate momentum equations?

A. They are numerical artifacts that improve convergence

B. They account for geometric changes in momentum direction

C. They replace the continuity equation

D. They apply only when density is constant

Correct Answer: B. They account for geometric changes in momentum direction

Computational Fluid Dynamics
Chapter 2 of 15