5.2 Conservation of mass: the continuity equation

Mass is conserved: it is neither created nor destroyed as a fluid flows. If the mass inside a fixed region changes, the change must be accounted for entirely by mass crossing the boundary. Turning this bookkeeping statement into a differential equation gives the first of the governing equations of fluid motion.

The balance over a fixed volume

Fix an arbitrary region VV with boundary surface SS. The mass it contains is VρdV\int_V \rho\,dV, and the rate at which mass leaves through SS is the flux of ρu\rho\mathbf{u} outward through the surface. Conservation of mass is the statement that the rate of decrease of the contained mass equals the net outward flux:

From the integral balance to the differential law Derivation

The mass in VV changes only by transport across SS:

ddtVρdV  =  SρudS.\frac{d}{dt}\int_V \rho\,dV \;=\; -\oint_S \rho\mathbf{u}\cdot d\mathbf{S}.

The minus sign makes outward flow (ρudS>0\rho\mathbf{u}\cdot d\mathbf{S} > 0) decrease the contained mass. Because VV is fixed, the time derivative passes inside as a partial derivative; the divergence theorem (refresher: vector calculus →) turns the surface integral into a volume integral:

VρtdV  =  V(ρu)dV.\int_V \frac{\partial \rho}{\partial t}\,dV \;=\; -\int_V \nabla\cdot(\rho\mathbf{u})\,dV.

This holds for every region VV, so the integrands must be equal pointwise.

The result is the continuity equation:

ρt  +  (ρu)  =  0.\frac{\partial \rho}{\partial t} \;+\; \nabla\cdot(\rho\mathbf{u}) \;=\; 0.

The vector j=ρu\mathbf{j} = \rho\mathbf{u} is the mass flux — mass per unit area per unit time. Continuity says that density falls wherever the mass flux diverges and rises wherever it converges.

v_in = 0.50v_out = 0.50density ρcontrol volume — area A, thickness Δxρ = 1.00 ∂ρ/∂t = +0.00
0.50
0.50
v_in = v_out → density parked. This is the *incompressible* case ∇·v = 0.

Where the flow lines converge the divergence (ρu)\nabla\cdot(\rho\mathbf{u}) is negative and density accumulates; where they spread apart it is positive and density depletes. The continuity equation is nothing more than this picture made local.

The incompressible limit

Expanding the divergence, (ρu)=uρ+ρu\nabla\cdot(\rho\mathbf{u}) = \mathbf{u}\cdot\nabla\rho + \rho\,\nabla\cdot\mathbf{u}, the continuity equation can be written with the material derivative of the previous lesson:

DρDt  +  ρu  =  0.\frac{D\rho}{Dt} \;+\; \rho\,\nabla\cdot\mathbf{u} \;=\; 0.

A flow is incompressible when each fluid parcel keeps a constant density along its path, Dρ/Dt=0D\rho/Dt = 0. The continuity equation then collapses to the divergence-free condition

u  =  0.\nabla\cdot\mathbf{u} \;=\; 0.

Incompressibility is a property of the flow, not only of the fluid: it holds whenever the flow speed is small compared with the speed of sound in the medium, so that pressure variations are too weak to compress the fluid appreciably. Liquids under ordinary conditions, and gases moving well below their sound speed, are both well described by u=0\nabla\cdot\mathbf{u} = 0. The divergence-free condition is a powerful constraint — it removes one unknown and makes the pressure a quantity determined instantaneously by the flow rather than by a separate equation of state.