Conservation Laws
Mass, momentum, and energy - the fundamental equations of fluid motion
Introduction
The motion of fluids is governed by conservation laws - mass, momentum, and energy cannot be created or destroyed, only transported and converted. These fundamental principles, combined with constitutive relations, give us the complete equations of fluid dynamics.
We present both integral forms (useful for control volume analysis) and differential forms (useful for detailed flow field solutions).
Conservation of Mass (Continuity)
Integral Form
The rate of change of mass in a control volume equals the net mass flux through the surface:
For steady flow: ∮ρ(v·n)dA = 0 → Mass in = Mass out
Differential Form
Using the divergence theorem:
Or equivalently, using the material derivative:
Incompressible Flow
When Dρ/Dt = 0 (density of a fluid particle doesn't change), continuity simplifies to:
Valid for liquids and low-speed (Ma < 0.3) gas flows.
Conservation of Momentum
Integral Form (Control Volume)
Newton's second law applied to a control volume:
Forces include pressure, gravity, viscous stresses, and external forces.
Cauchy Momentum Equation
General differential form (valid for any continuous medium):
where τ is the deviatoric stress tensor (viscous stresses for Newtonian fluids).
Navier-Stokes Equations
For incompressible Newtonian fluids with constant viscosity:
∂v/∂t
Unsteady
(v·∇)v
Convection
μ∇²v
Diffusion
-∇p + ρg
Pressure + Gravity
Euler Equations (Inviscid)
When viscous effects are negligible (high Re, away from boundaries):
Conservation of Energy
First Law for a Control Volume
Energy balance including work and heat transfer:
where e = u + v²/2 + gz is specific energy (internal + kinetic + potential)
Differential Energy Equation
For a compressible fluid:
Terms: heat conduction, pressure work, viscous dissipation
For Incompressible Flow
Often temperature can be treated separately from mechanics (weak coupling), and the energy equation simplifies to tracking temperature evolution via heat conduction and advection.
Bernoulli Equation
A special case of energy/momentum conservation for steady, inviscid, incompressible flow along a streamline:
p
Static pressure
½ρv²
Dynamic pressure
ρgz
Hydrostatic pressure
Extended Forms
Unsteady Bernoulli
With Head Loss (Engineering)
hL accounts for viscous losses (friction, minor losses)
Applications
Pitot Tube
Velocity from Bernoulli: v = √(2(p₀-p)/ρ) where p₀ is stagnation pressure
Venturi Meter
Flow rate from pressure difference using continuity + Bernoulli
Siphon
Flow driven by elevation difference - must stay above vapor pressure
Jet Propulsion
Momentum flux from nozzle provides thrust: F = ṁ(vexit - vinlet)
Interactive Simulations
Bernoulli Equation: Flow Through a Converging Nozzle
PythonClick Run to execute the Python code
Code will be executed with Python 3 on the server
Mass and Momentum Conservation in a Pipe Junction
FortranClick Run to execute the Fortran code
Code will be compiled with gfortran and executed on the server
Detailed Derivations
Derivation: Continuity Equation from Mass Conservation
Consider a fixed, infinitesimal control volume dx dy dz in a flow field. Mass is conserved: the rate of mass increase inside equals the net mass flux inward through the surfaces.
Rate of mass increase inside the element:
Net mass flux through x-faces: mass in at x minus mass out at x+dx:
Similarly for y-faces and z-faces.
Set rate of accumulation equal to net influx, cancel the volume element:
In vector notation:
For incompressible flow (ρ = const): ∇·v = 0.
Derivation: Navier-Stokes Equations from Newton's Second Law
Apply Newton's second law to an infinitesimal fluid element of mass dm = ρ dx dy dz:
Body forces (gravity): dFbody = ρg dV.
Surface forces (pressure + viscous stress): the net force in the x-direction from the stress tensor σij:
Decompose the stress tensor into pressure and deviatoric (viscous) parts: σij = −pδij + τij. For a Newtonian fluid:
where λ = −2μ/3 (Stokes hypothesis).
Combining and dividing by dV, for incompressible flow (∇·v = 0):
The x-component written fully:
Three coupled, nonlinear, second-order PDEs plus the continuity constraint — together they are four equations for four unknowns (u, v, w, p).
Derivation: Bernoulli Equation Along a Streamline
Start with the Euler equation (inviscid, μ = 0) for steady flow (∂/∂t = 0):
Project along a streamline direction ds (where ds is tangent to v). Let v = |v| and note that (v·∇)v · ds = v dv:
For incompressible flow (ρ = const), integrate along the streamline:
Carrying out the integration:
Assumptions: (i) Steady flow, (ii) Inviscid (frictionless), (iii) Incompressible (ρ = const), (iv) Along a single streamline, (v) No shaft work or heat transfer. Violations of any assumption require corrections (head loss, unsteady term, etc.).
Derivation: Energy Equation from the First Law of Thermodynamics
The first law for a fluid element (specific internal energy e, specific enthalpy h = e + p/ρ):
Heat flux by conduction (Fourier's law): q = −k∇T. Net heat added to the element per unit volume:
Work by surface stresses on the element: −p(∇·v) (compression work) + Φ (viscous dissipation):
Viscous dissipation is always non-negative — it converts kinetic energy to heat.
Combining all terms:
For incompressible flow, ∇·v = 0 and the compression work term vanishes.
Derivation: Darcy-Weisbach Equation from Momentum Integral
Consider fully developed, steady flow in a horizontal pipe of diameter D and length L. The flow is driven by a pressure difference ΔP = P₁ − P₂.
Apply the momentum equation to a cylindrical control volume. For fully developed flow, momentum flux in equals momentum flux out. The balance is between pressure forces and wall shear:
Solve for the pressure drop:
Define the Darcy friction factor f via the non-dimensionalisation τw = (f/8)ρV²:
For laminar flow, comparison with the Hagen-Poiseuille solution gives f = 64/Re. For turbulent flow, f depends on Re and relative roughness ε/D — determined from the Colebrook equation or the Moody diagram.
Control Volume Diagram
Mass flux, pressure forces, and body forces acting on a fixed control volume in a flow field.
Advanced Simulations
Bernoulli Applications: Venturi Meter & Pitot Tube
PythonClick Run to execute the Python code
Code will be executed with Python 3 on the server
Pipe Flow Pressure Drop & Moody Diagram Data
PythonClick Run to execute the Python code
Code will be executed with Python 3 on the server