Governing Equations
At the heart of CFD lie three fundamental conservation laws: mass, momentum, and energy. These laws, expressed as partial differential equations, govern all fluid motion — from blood flow in arteries to supersonic jets.
Understanding these equations is essential. CFD doesn't invent new physics; it solves these equations numerically where analytical solutions don't exist.
The Control Volume Approach
All conservation laws in fluid mechanics derive from a simple idea: track what enters and leaves a small region of space.
Reynolds Transport Theorem
For any conserved quantity $\phi$ (mass, momentum, energy):
$$\frac{d}{dt}\int_{V_{sys}} \rho\phi\, dV = \frac{\partial}{\partial t}\int_{CV} \rho\phi\, dV + \oint_{CS} \rho\phi(\mathbf{u}\cdot\mathbf{n})\, dA$$
This connects the Lagrangian view (following a particle) to the Eulerian view (fixed control volume) that CFD uses.
Conservation of Mass (Continuity)
The Physical Principle
Mass cannot be created or destroyed. For a fixed control volume:
$$\text{Rate of mass accumulation} = \text{Mass inflow rate} - \text{Mass outflow rate}$$
Integral Form
$$\frac{\partial}{\partial t}\int_{CV} \rho\, dV + \oint_{CS} \rho(\mathbf{u}\cdot\mathbf{n})\, dA = 0$$
Differential Form
Applying the divergence theorem and shrinking to a point:
$$\boxed{\frac{\partial \rho}{\partial t} + \nabla \cdot (\rho \mathbf{u}) = 0}$$
Or in component form:
$$\frac{\partial \rho}{\partial t} + \frac{\partial (\rho u)}{\partial x} + \frac{\partial (\rho v)}{\partial y} + \frac{\partial (\rho w)}{\partial z} = 0$$
Special Cases
Incompressible flow ($\rho = \text{constant}$):$$\nabla \cdot \mathbf{u} = 0 \quad \text{or} \quad \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} + \frac{\partial w}{\partial z} = 0$$
This is the divergence-free constraint that makes incompressible CFD challenging — there's no explicit equation for pressure!
Steady compressible flow:$$\nabla \cdot (\rho \mathbf{u}) = 0$$
Conservation of Momentum (Navier-Stokes)
The Physical Principle
Newton's second law for a fluid element:
$$m\frac{d\mathbf{u}}{dt} = \sum \mathbf{F}$$
Forces on a fluid element:
- Pressure forces (normal to surfaces)
- Viscous forces (shear and normal stresses)
- Body forces (gravity, electromagnetic)
The Navier-Stokes Equations
$$\boxed{\frac{\partial (\rho \mathbf{u})}{\partial t} + \nabla \cdot (\rho \mathbf{u} \mathbf{u}) = -\nabla p + \nabla \cdot \boldsymbol{\tau} + \rho \mathbf{g}}$$
Understanding Each Term
| Term | Mathematical | Physical Meaning |
|---|---|---|
| $\frac{\partial (\rho \mathbf{u})}{\partial t}$ | Unsteady | Rate of momentum change |
| $\nabla \cdot (\rho \mathbf{u} \mathbf{u})$ | Convection | Momentum carried by flow |
| $-\nabla p$ | Pressure gradient | Normal force on fluid |
| $\nabla \cdot \boldsymbol{\tau}$ | Viscous diffusion | Shear and friction |
| $\rho \mathbf{g}$ | Body force | Gravity, buoyancy |
Component Form (x-direction)
$$\frac{\partial (\rho u)}{\partial t} + \frac{\partial (\rho u^2)}{\partial x} + \frac{\partial (\rho uv)}{\partial y} + \frac{\partial (\rho uw)}{\partial z} = -\frac{\partial p}{\partial x} + \frac{\partial \tau_{xx}}{\partial x} + \frac{\partial \tau_{xy}}{\partial y} + \frac{\partial \tau_{xz}}{\partial z} + \rho g_x$$
The Stress Tensor
For a Newtonian fluid:
$$\tau_{ij} = \mu \left( \frac{\partial u_i}{\partial x_j} + \frac{\partial u_j}{\partial x_i} \right) - \frac{2}{3}\mu(\nabla \cdot \mathbf{u})\delta_{ij}$$
Where:
- $\mu$ = dynamic viscosity
- $\delta_{ij}$ = Kronecker delta
For incompressible flow ($\nabla \cdot \mathbf{u} = 0$), this simplifies the viscous term:
$$\nabla \cdot \boldsymbol{\tau} = \mu \nabla^2 \mathbf{u}$$
Incompressible Navier-Stokes
The most common form in CFD:
$$\frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u} \cdot \nabla)\mathbf{u} = -\frac{1}{\rho}\nabla p + \nu \nabla^2 \mathbf{u} + \mathbf{g}$$
Where $\nu = \mu/\rho$ is the kinematic viscosity.
Conservation of Energy
The First Law of Thermodynamics
Energy cannot be created or destroyed, only transformed:
$$\frac{\partial (\rho E)}{\partial t} + \nabla \cdot (\rho E \mathbf{u}) = \nabla \cdot (k \nabla T) - \nabla \cdot (p\mathbf{u}) + \nabla \cdot (\boldsymbol{\tau} \cdot \mathbf{u}) + \rho \mathbf{g} \cdot \mathbf{u} + \dot{q}$$
Where:
- $E = e + \frac{1}{2}|\mathbf{u}|^2$ = total energy (internal + kinetic)
- $e$ = internal (thermal) energy
- $k$ = thermal conductivity
- $\dot{q}$ = volumetric heat source
Temperature Form
For many CFD applications, we solve for temperature:
$$\rho c_p \left( \frac{\partial T}{\partial t} + \mathbf{u} \cdot \nabla T \right) = \nabla \cdot (k \nabla T) + \Phi + \dot{q}$$
Where $\Phi$ is the viscous dissipation:
$$\Phi = \mu \left[ 2\left(\frac{\partial u}{\partial x}\right)^2 + 2\left(\frac{\partial v}{\partial y}\right)^2 + 2\left(\frac{\partial w}{\partial z}\right)^2 + \left(\frac{\partial u}{\partial y} + \frac{\partial v}{\partial x}\right)^2 + ... \right]$$
This represents mechanical energy converted to heat by viscous friction.
Equation of State
For compressible flows, we need to close the system:
Ideal gas:$$p = \rho R T$$
Internal energy:$$e = c_v T$$
This couples density, pressure, and temperature.
The Material Derivative
A key concept in fluid mechanics:
$$\frac{D\phi}{Dt} = \frac{\partial \phi}{\partial t} + \mathbf{u} \cdot \nabla \phi$$
This is the rate of change of $\phi$ following a fluid particle:
- $\frac{\partial}{\partial t}$ = local change at fixed point
- $\mathbf{u} \cdot \nabla$ = change due to motion (convection)
Using the material derivative, the momentum equation becomes:
$$\rho \frac{D\mathbf{u}}{Dt} = -\nabla p + \mu \nabla^2 \mathbf{u} + \rho \mathbf{g}$$
Dimensionless Form
Scaling the equations reveals key dimensionless groups:
$$\frac{\partial \mathbf{u}^}{\partial t^} + (\mathbf{u}^ \cdot \nabla^)\mathbf{u}^ = -\nabla^ p^ + \frac{1}{Re} \nabla^{2} \mathbf{u}^* + \frac{1}{Fr^2}\hat{\mathbf{g}}$$
Where:
- $Re = \frac{\rho U L}{\mu}$ = Reynolds number (inertia/viscosity)
- $Fr = \frac{U}{\sqrt{gL}}$ = Froude number (inertia/gravity)
Other important numbers:
- $Pr = \frac{\mu c_p}{k}$ = Prandtl number (momentum/thermal diffusivity)
- $Ma = \frac{U}{c}$ = Mach number (flow speed/sound speed)
Summary: The Complete System
Incompressible Flow (most common)
| Equation | Purpose |
|---|---|
| $\nabla \cdot \mathbf{u} = 0$ | Continuity |
| $\rho \frac{D\mathbf{u}}{Dt} = -\nabla p + \mu \nabla^2 \mathbf{u} + \rho \mathbf{g}$ | Momentum (x,y,z) |
| $\rho c_p \frac{DT}{Dt} = k \nabla^2 T + \Phi + \dot{q}$ | Energy (if needed) |
Compressible Flow
| Equation | Unknowns |
|---|---|
| Continuity | $\rho$ |
| Momentum (3) | $u, v, w$ |
| Energy | $T$ or $e$ |
| Equation of state | $p$ |
Why These Equations Are Hard
- Nonlinearity: The convection term $(\mathbf{u} \cdot \nabla)\mathbf{u}$ is nonlinear — velocity appears squared
- Coupling: All equations are coupled through $\mathbf{u}$, $p$, $\rho$
- No general solution: Except for trivial cases, no closed-form analytical solutions exist
- Turbulence: At high Reynolds numbers, flow becomes chaotic and multiscale
This is why we need CFD — numerical methods to solve what mathematics cannot.
Key Takeaways
- Continuity equation: Conservation of mass → $\nabla \cdot (\rho\mathbf{u}) = 0$
- Navier-Stokes: Newton's second law for fluids → balance of pressure, viscous, and body forces
- Energy equation: First law of thermodynamics → heat conduction, convection, viscous dissipation
- Incompressible constraint: $\nabla \cdot \mathbf{u} = 0$ creates the pressure-coupling challenge
- Reynolds number: The key parameter determining flow character (laminar vs turbulent)
- No analytical solution: CFD exists because these equations cannot be solved exactly for general cases
What's Next
With the governing equations understood, the next lesson introduces Finite Difference Basics — the mathematical foundation for converting continuous derivatives into discrete approximations that computers can solve.