Fluid Mechanics
The Continuity Equation
Conservation of mass — why the same fluid that fills a wide pipe must race through a narrow one
The continuity equation is the mathematical statement of conservation of mass for a flowing fluid: the mass flow rate ṁ = ρAv is constant along a streamtube, where ρ is density (kg/m³), A is cross-sectional area (m²), and v is the mean velocity normal to A (m/s). Because no mass is created or destroyed inside a closed tube, whatever enters each second must leave each second. For incompressible flow the density cancels and it collapses to the volumetric form A1v1 = A2v2 — the reason a garden-hose nozzle turns a lazy stream into a jet. Written per point, the differential form ∂ρ/∂t + ∇·(ρu) = 0 enforces the same balance everywhere; for steady incompressible flow it becomes ∇·u = 0. It is the first of the governing equations of fluid mechanics, prerequisite to Bernoulli, Euler, and Navier-Stokes.
- General formṁ = ρAv = constant
- IncompressibleA1v1 = A2v2
- Differential∂ρ/∂t + ∇·(ρu) = 0
- Steady incompressible∇·u = 0
- Valid as incompressibleLiquids & gas below ~Mach 0.3
- ConservesMass — not volume, not energy
Interactive visualization
Press play, or step through manually. The visualization is yours to drive — try it before reading on.
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Why the continuity equation matters
Every other equation in fluid mechanics assumes it. Bernoulli's energy balance, Euler's inviscid momentum equation, and the full Navier-Stokes equations all carry the continuity equation as a companion constraint — you cannot solve a flow field without simultaneously enforcing that mass is conserved at every point. It is the bookkeeping rule that makes the rest of the physics consistent.
Practically, it is the equation an engineer reaches for first when sizing anything that carries fluid:
- Pipe and duct sizing. Pick a target velocity (water lines are typically held to 1–3 m/s to limit friction and water hammer), then continuity gives the required diameter for a known flow rate.
- Nozzles and diffusers. A shrinking area accelerates an incompressible jet; a growing area (a diffuser) slows it and recovers pressure. Both follow directly from Av = constant.
- Venturi and orifice flow meters. The measured area change fixes the velocity change; pairing that with Bernoulli turns a differential-pressure reading into a flow rate.
- Manifolds and pipe networks. At every junction the mass in equals the mass out — the network equivalent of Kirchhoff's current law.
- Pumps, turbines, and compressors. Inlet and outlet mass flows must match in steady operation, which sets the velocity triangle geometry inside the machine.
- Cardiovascular and hydraulic modelling. Blood accelerating through a stenosed artery, or oil through a valve orifice, obeys exactly the same A1v1 = A2v2 arithmetic.
How it works, step by step
Consider a rigid streamtube — a bundle of streamlines forming an imaginary pipe that fluid cannot cross sideways. Slice it at two stations, 1 and 2.
- Count the mass crossing each slice. In a time dt, the fluid at station 1 advances a distance v₁·dt, so the volume swept is A₁v₁·dt and the mass is ρ₁A₁v₁·dt. The mass flow rate is therefore ṁ₁ = ρ₁A₁v₁, with units (kg/m³)(m²)(m/s) = kg/s.
- Impose conservation of mass. For steady flow nothing accumulates between the two slices, so ṁ₁ = ṁ₂. That is the general continuity equation: ρ₁A₁v₁ = ρ₂A₂v₂.
- Drop the density for a liquid. Liquids barely compress — water's density changes by about 0.005% per atmosphere — so ρ₁ ≈ ρ₂ and it reduces to the volumetric form A₁v₁ = A₂v₂, i.e. Q = Av = constant.
- Solve for the speed change. Rearranged, v₂ = v₁·(A₁/A₂). Velocity scales with the inverse area ratio. Because area goes as diameter squared, v₂ = v₁·(D₁/D₂)². Halving the diameter quadruples the speed.
- Generalise to a point. Shrink the control volume to an infinitesimal cube and the balance becomes the differential form ∂ρ/∂t + ∇·(ρu) = 0. The first term is local mass storage; the second is the net mass flux leaving the cube. For steady flow the storage term is zero.
Worked example: a fire-hose nozzle
A fire hose has an internal diameter of 65 mm and carries water at 4.0 m/s. It ends in a nozzle with a 25 mm exit. Find the jet velocity and the volumetric flow rate.
Water is incompressible, so use A₁v₁ = A₂v₂ with A = πD²/4:
- Inlet area: A₁ = π(0.065)²/4 = 3.32 × 10⁻³ m².
- Exit area: A₂ = π(0.025)²/4 = 4.91 × 10⁻⁴ m².
- Exit velocity: v₂ = v₁·(A₁/A₂) = 4.0 × (0.065/0.025)² = 4.0 × 6.76 = 27.0 m/s.
- Flow rate: Q = A₁v₁ = 3.32 × 10⁻³ × 4.0 = 1.33 × 10⁻² m³/s ≈ 13.3 L/s (≈ 800 L/min).
The nozzle raised the water speed by the area ratio (65/25)² = 6.76×, and Q is identical at inlet and exit — mass conservation, nothing more. That 27 m/s jet is what carries water across a room; the pressure needed to produce it comes from Bernoulli, which continuity feeds directly.
Governing equations and symbols
General (compressible): ṁ = ρAv = constant, so ρ₁A₁v₁ = ρ₂A₂v₂
Incompressible: A₁v₁ = A₂v₂ → v₂ = v₁(A₁/A₂) = v₁(D₁/D₂)²
Differential: ∂ρ/∂t + ∇·(ρu) = 0 → steady incompressible: ∇·u = 0
- ṁ — mass flow rate, kg/s
- ρ — fluid density, kg/m³ (water ≈ 998, air ≈ 1.225 at sea level)
- A — cross-sectional area normal to the flow, m²
- v — mean (area-averaged) velocity normal to A, m/s
- Q — volumetric flow rate, m³/s, equal to Av
- u — velocity vector field, m/s
- ∇· — divergence operator, 1/m acting on velocity
- D — pipe diameter, m (A = πD²/4)
Forms of the equation, at a glance
| Form | Equation | Assumption | Typical use |
|---|---|---|---|
| General integral | ρ₁A₁v₁ = ρ₂A₂v₂ | Steady, one inlet + one outlet | Compressible nozzles, gas ducts |
| Incompressible | A₁v₁ = A₂v₂ (Q = Av) | ρ constant (Mach < 0.3) | Pipes, hoses, water systems |
| Multi-branch | Σ(ρAv)ᵢₙ = Σ(ρAv)ₒᵤₜ | Steady control volume | Manifolds, junctions, HVAC |
| Unsteady integral | d/dt∫ρ dV + Σṁₒᵤₜ − Σṁᵢₙ = 0 | Storage allowed (filling/draining) | Tanks, accumulators, surge |
| Differential | ∂ρ/∂t + ∇·(ρu) = 0 | Continuum, any point | CFD, Navier-Stokes coupling |
| Steady incompressible differential | ∇·u = 0 | ρ constant, steady | Divergence-free velocity fields |
Common misconceptions and failure modes
- "Continuity conserves volume." It conserves mass. Volume flow Q = Av is only constant when density is constant. In a supersonic nozzle the volume flow rate rises even though mass flow is fixed, because density falls.
- "Something pushes the fluid faster in the throat." No force is added by the constriction itself. The fluid speeds up purely because the same mass must pass through less area per unit time. The pressure drop that Bernoulli predicts is a consequence, not the cause.
- "A1v1 = A2v2 works for air." Only below roughly Mach 0.3, where density change stays under about 5%. Above that you must keep ρ, and above Mach 1 the area-velocity relation even reverses sign — a diverging duct accelerates the flow.
- "Velocity means the fastest streak of fluid." The v in continuity is the area-averaged mean velocity. In laminar pipe flow the centreline speed is twice the mean; using the peak instead of the average double-counts the flow.
- "Continuity gives the pressure." It gives only the kinematics — the relationship between area and speed. Pressure comes from a momentum or energy balance (Bernoulli, Euler, Navier-Stokes). Continuity is necessary but never sufficient on its own.
- "It only applies to steady flow." The unsteady integral form handles filling and draining tanks; the differential form carries the ∂ρ/∂t term explicitly. Steady flow is just the special case where storage is zero.
Frequently asked questions
What is the continuity equation?
The continuity equation is the conservation of mass written for a flowing fluid. It says the mass flow rate ṁ = ρAv is the same at every cross-section of a streamtube, where ρ is density, A is cross-sectional area, and v is the mean velocity normal to A. If nothing is stored or created inside the tube, whatever mass enters per second must leave per second. For incompressible flow ρ is constant and it simplifies to A1v1 = A2v2.
Why does fluid speed up in a constriction?
Because the volumetric flow rate Q = Av must stay constant for an incompressible fluid. If the pipe area A shrinks, the velocity v must rise by exactly the inverse ratio so that Av does not change. Halving the area doubles the speed; a quarter of the area quadruples it. Nothing pushes the fluid faster except mass conservation — the same amount of fluid has to pass through a smaller opening in the same time.
What is the difference between the incompressible and compressible forms?
The incompressible form A1v1 = A2v2 assumes density is constant, which is accurate for liquids and for gases below about Mach 0.3 where density changes stay under roughly 5 percent. The general form keeps density: ρ1A1v1 = ρ2A2v2, so mass flow rate rather than volume flow rate is conserved. In a supersonic nozzle density and area can both change, which is why a converging-diverging nozzle accelerates gas even as its area grows.
What is the differential form of the continuity equation?
The differential form is ∂ρ/∂t + ∇·(ρu) = 0, where ρ is density, u is the velocity vector, and ∇· is the divergence operator. It states that the rate of density increase at a point plus the net mass outflow per unit volume equals zero. For steady flow the time term vanishes: ∇·(ρu) = 0. For steady incompressible flow density is constant and it becomes simply ∇·u = 0, meaning the velocity field is divergence-free.
How is the continuity equation used in control-volume analysis?
You draw a fixed control volume, then apply the integral form: the rate of change of mass stored inside equals the mass flow in minus the mass flow out across the surfaces. For steady flow storage is zero, so the sum of ρAv over all inlets equals the sum over all outlets. This lets engineers size a manifold with several branches, balance a pipe junction, or check that a pump's inlet and outlet flows match, without solving the flow field in detail.
Does the continuity equation apply to gases and air?
Yes — mass conservation always holds, so the full form ρAv = constant applies to any gas. The simplification A1v1 = A2v2 only holds when density change is negligible, roughly below Mach 0.3. Above that, compressibility matters: as air accelerates its density drops, so you cannot ignore ρ. HVAC ducts, low-speed wind tunnels, and ventilation are usually treated as incompressible, while jet engines, rocket nozzles, and high-speed aerodynamics need the compressible form.
What is the relationship between the continuity equation and Bernoulli's equation?
They are complementary. Continuity is conservation of mass and tells you how velocity changes with area (A1v1 = A2v2). Bernoulli's equation is conservation of energy along a streamline and tells you how pressure changes with velocity (p + ½ρv² + ρgh = constant). Combine them and you predict the pressure drop in a Venturi or nozzle: the constriction forces the fluid faster by continuity, and that higher speed forces the static pressure lower by Bernoulli.