Module 2: Physics and Governing Equations for CFD
Deriving the fundamental equations of fluid dynamics from conservation principles. Explore mass, momentum, and energy conservation, constitutive laws, the Navier–Stokes equations, and the physical assumptions behind common CFD models.
Before a CFD solver can calculate velocity, pressure, or temperature, we need mathematical equations that describe how these quantities behave. In Module 1, we explored the mathematical language of CFD: fields, derivatives, vector calculus, and numerical approximations. Now we connect that mathematics to the physical laws governing fluid motion.
Whether we are simulating airflow around an aircraft, cooling inside a data centre, or fluid flow through a packed-bed reactor, the same fundamental principles apply: mass is conserved, momentum changes under the action of forces, and energy is transferred or converted.
This module derives the governing equations from these conservation principles and explains how they form the foundation of CFD solvers.
Learning Objectives
By the end of this module, you should be able to:
- Explain how conservation laws lead to governing equations.
- Understand the continuity equation and conservation of mass.
- Interpret the momentum equation and the physical meaning of its terms.
- Understand the energy equation and heat-transfer mechanisms.
- Distinguish conservation laws from constitutive laws.
- Recognize the Navier–Stokes equations and their underlying assumptions.
- Explain how governing equations become the starting point for numerical discretization.
1. From Physical Laws to Governing Equations
CFD begins with physical laws, not numerical algorithms. Before discretizing an equation or writing a solver, we must determine which physical quantities are conserved and how they change.
The three fundamental conservation principles are:
- Conservation of mass: Mass cannot be created or destroyed in an ordinary fluid-flow calculation.
- Conservation of momentum: Changes in momentum are caused by forces acting on the fluid.
- Conservation of energy: Energy is transferred or converted between different forms, but the total energy is conserved.
These principles can be applied to a finite region in space called a control volume. Fluid can enter and leave this region, and physical quantities can accumulate or be transported across its boundaries.
A general conservation statement can be written conceptually as:
This idea applies to mass, momentum, and energy, although the mathematical form of each equation differs.
Control-volume analogy — Imagine a water tank with an inlet and an outlet. If more water enters than leaves, the water level rises. If the inflow equals the outflow, the stored mass remains constant. CFD applies the same reasoning to fluid quantities throughout a computational domain.
Conservation laws can be expressed in two important forms:
- Integral form: Describes the overall balance across a finite region and its boundary.
- Differential form: Describes how the physical quantity behaves locally at each point.
The differential equations are especially useful for developing numerical methods, while integral conservation is central to finite-volume CFD.
2. Conservation of Mass: The Continuity Equation
Mass conservation states that the rate of mass accumulation inside a control volume equals the net mass entering it.
For a fixed control volume, the integral form is:
Here:
- is the fluid density.
- is the velocity vector.
- is the outward-pointing unit normal to the control-volume surface.
- is the control volume.
- is its boundary surface.
The first term represents the rate of mass accumulation. The second represents the net mass flow leaving through the boundary. Their sum must be zero when there are no mass sources or sinks.
Using the divergence theorem, the integral equation can be converted into its local differential form:
This is the continuity equation.
Understanding the Continuity Equation
The equation contains two contributions:
If mass flows out of a small region faster than it flows in, the local density must decrease unless another mechanism compensates for that imbalance.
For a constant-density incompressible flow, the continuity equation simplifies to:
In Cartesian coordinates:
Here, , , and are the velocity components in the , , and directions.
This means that the velocity field has zero divergence: fluid does not locally expand or contract in volume under the constant-density incompressible assumption.
A Practical Example: Flow Through a Narrowing Pipe
Consider water flowing steadily through a pipe that becomes narrower. For incompressible flow, mass conservation gives:
Since density is constant:
If the cross-sectional area decreases, the average velocity must increase to maintain the same mass flow rate.
This is the physical principle behind many flow calculations, from pipe systems to cooling channels.
3. Conservation of Momentum: Newton’s Second Law
Momentum conservation applies Newton’s second law to a fluid. The momentum of a fluid can change because it is transported by the flow or because forces act on it.
For a Newtonian fluid, a common conservative form of the momentum equation is:
The terms represent:
- — Local rate of momentum accumulation.
- — Momentum transported by fluid motion.
- — Force per unit volume due to pressure gradients.
- — Force per unit volume due to viscous stresses.
- — Body force per unit volume, such as gravity.
Here, is pressure, is the viscous stress tensor, and is the body force per unit mass.
The equation expresses a simple physical idea: momentum changes because momentum is transported and forces act on the fluid.
The Role of Pressure
Pressure forces act normal to surfaces. A pressure gradient accelerates fluid from regions of higher pressure toward regions of lower pressure, all else being equal.
For example, in a pipe, a pressure difference between the inlet and outlet can drive the flow against viscous resistance.
The Role of Viscosity
Viscosity describes a fluid’s resistance to deformation and the resulting viscous stresses. These stresses transport momentum between neighbouring regions of fluid.
In a typical pipe flow, viscous effects are responsible for the velocity gradient near the walls and contribute to the pressure drop along the pipe.
For an incompressible, constant-viscosity Newtonian fluid, the momentum equation can be written as:
Here, is the dynamic viscosity.
This form makes the acceleration of the fluid explicit.
Understanding Material Acceleration
The acceleration of a fluid particle is expressed using the material derivative:
The first term represents local acceleration, caused by velocity changing with time at a fixed point.
The second term represents convective acceleration, caused by a fluid particle moving through regions with different velocities.
A steady flow can therefore still have acceleration. For example, water flowing steadily through a narrowing pipe accelerates because its velocity increases along the pipe, even when the velocity at each fixed point no longer changes with time.
The convective term is also one reason the Navier–Stokes equations are nonlinear: velocity interacts with its own spatial variation.
4. Conservation of Energy: The Thermal Equation
Energy conservation describes how energy is stored, transported, and converted. In thermal CFD, temperature is often the main quantity of interest.
For a stationary solid with constant specific heat, a common heat-conduction equation is:
Here:
- is temperature.
- is specific heat capacity.
- is thermal conductivity.
- is volumetric heat generation, measured in watts per cubic metre.
The left-hand side represents the rate of thermal energy storage. The right-hand side accounts for heat conduction and internal heat generation.
Fourier’s Law of Heat Conduction
Heat conduction is described by Fourier’s law:
The heat-flux vector points in the direction of heat transfer. The negative sign indicates that heat flows from higher temperatures toward lower temperatures.
If thermal conductivity is constant, the conduction term becomes:
Dividing the heat equation by gives:
where
is the thermal diffusivity. It measures how quickly temperature differences spread through a material by conduction.
Heat Transfer in Moving Fluids
In a moving fluid, energy is also transported by fluid motion. For constant properties, negligible viscous dissipation, and a simplified thermal model, the temperature equation can be written as:
The additional term represents convective heat transport.
This distinction is important in applications such as data-centre cooling. Heat can spread through a solid heat sink by conduction, while moving air transports thermal energy through convection. A conjugate heat-transfer (CHT) simulation couples the temperature field in the solid to the flow and temperature fields in the fluid.
5. Conservation Laws and Constitutive Laws
Conservation laws describe balances, but they do not always provide enough information to determine every unknown. We also need relationships that describe how materials behave.
These relationships are called constitutive laws.
| Relationship | What it describes | Example |
|---|---|---|
| Conservation of mass | How mass is balanced | Continuity equation |
| Conservation of momentum | How momentum changes under forces | Momentum equation |
| Conservation of energy | How energy is stored and transferred | Energy equation |
| Newton’s law of viscosity | How viscous stress relates to deformation | Newtonian fluid model |
| Fourier’s law | How heat flux relates to temperature gradients | Heat-conduction model |
| Equation of state | How thermodynamic variables are related | Ideal-gas relation |
| Fick’s law | How species diffusion relates to concentration gradients | Mass-transfer model |
For a Newtonian fluid, the viscous stress depends linearly on the rate of deformation, subject to the appropriate material assumptions. Fourier’s law relates heat flux to the temperature gradient, while an equation of state can connect density, pressure, and temperature in a compressible-flow model.
The specific relationships needed depend on the problem. A compressible reacting flow, for example, requires additional thermodynamic and chemical models. A turbulent simulation requires a strategy for representing turbulent effects, such as a Reynolds-averaged Navier–Stokes (RANS) model or a large-eddy simulation (LES) model.
The key idea is that conservation laws provide the balances, while constitutive laws close the mathematical model.
6. The Navier–Stokes Equations
The Navier–Stokes equations combine momentum conservation with a constitutive model for viscous stress. Together with the continuity equation, they form the foundation of many fluid-flow simulations.
For an incompressible Newtonian fluid with constant density and viscosity, the equations are commonly written as:
Continuity:
Momentum:
These equations describe how the velocity and pressure fields are constrained by mass conservation and momentum conservation.
However, they are not a complete numerical solution by themselves. To solve a practical CFD problem, we also need:
- Initial conditions for transient simulations.
- Boundary conditions, such as inlet velocity, outlet pressure, and wall conditions.
- Material properties, such as density and viscosity.
- A computational domain and mesh representing the geometry.
- A numerical method for approximating the equations.
Why Pressure–Velocity Coupling Matters
In incompressible flow, pressure helps enforce the constraint . It is not generally determined by an independent equation of state in the same way as in a compressible gas model.
Numerical methods must therefore coordinate the calculation of pressure and velocity. Algorithms such as SIMPLE and PISO are widely used for this purpose in pressure-based CFD solvers. We will explore these methods later in the series.
7. Physical Assumptions: Choosing the Right Model
The governing equations used in a CFD simulation depend on the physical assumptions that are appropriate for the problem. Simplifying the model can reduce computational cost, but an unsuitable assumption can produce misleading results.
| Assumption or model choice | Meaning | Typical consideration |
|---|---|---|
| Steady flow | Flow variables do not change with time at fixed locations | Suitable when the target behaviour is time-independent |
| Incompressible flow | Density changes are negligible for the problem | Often suitable for low-speed liquid flows |
| Newtonian fluid | Viscous stress follows a linear relationship with deformation rate | Appropriate for many common gases and liquids |
| Constant properties | Properties such as viscosity and conductivity are treated as fixed | May be reasonable over a limited temperature range |
| Negligible viscous dissipation | Viscous conversion of mechanical energy to internal energy is neglected | Often reasonable when viscous heating is small |
| Laminar-flow model | The flow is solved without a turbulence closure model | Appropriate when the flow physics and regime support it |
| Turbulence model | Turbulent effects are represented using a modelling approach | Needed for many practical turbulent-flow calculations |
These assumptions are not interchangeable. For example, steady flow does not necessarily mean that the flow is laminar, and incompressible flow does not mean that velocity is constant everywhere.
The appropriate model should be selected using the physics, operating conditions, and quantities of interest—not simply because a particular solver is convenient.
8. From Governing Equations to a Numerical Solver
We now have the physical equations that describe mass, momentum, and energy. But these equations contain continuous fields and derivatives, whereas a computer works with a finite collection of numerical values.
The next step is discretization: approximating the continuous equations using values associated with a computational mesh.
The overall process is:
- Physical laws: Identify the conservation principles and material behaviour.
- Governing equations: Express those principles mathematically.
- Discretization: Approximate derivatives, fluxes, and integrals using a numerical method.
- Algebraic system: Convert the discretized equations into equations involving a finite number of unknowns.
- Numerical solution: Solve those equations to obtain approximations to pressure, velocity, temperature, or other fields.
- Verification and validation: Assess whether the numerical implementation is correct and whether the model represents the physical problem adequately.
For example, a finite-volume solver evaluates fluxes across the faces of each cell. The net fluxes, sources, and accumulation are combined to form a discrete balance for that cell.
The principle remains the same as the original conservation law. What changes is how the continuous quantities are represented and calculated.
Key Takeaways
- CFD governing equations originate from conservation of mass, momentum, and energy.
- The continuity equation expresses mass conservation; for constant-density incompressible flow, it reduces to .
- The momentum equation accounts for momentum transport, pressure forces, viscous stresses, and body forces.
- The energy equation describes energy storage and transfer, including conduction and, in moving fluids, convection.
- Constitutive laws describe material behaviour and help close the governing equations.
- Physical assumptions determine which form of the equations is appropriate for a particular simulation.
- A numerical solver discretizes the governing equations and solves the resulting algebraic system.
What’s Next?
In Module 3: Discretization from Scratch, we will move from continuous equations to numerical approximations. We will explore how derivatives become finite-difference formulas, how Taylor series helps us understand numerical error, and how these ideas lead toward the discrete equations used in CFD solvers.
The goal is to connect the mathematics to actual numerical algorithms—and eventually to implementing a simple solver in C++.