Ideal Fluid Kinematics and the Continuity Equation
Fluid mechanics begins not with forces but with a question of description: how do you even write down the configuration of a medium with effectively infinitely many degrees of freedom? Two complementary answers emerge. In the Lagrangian description you label each material parcel by its initial position and track its trajectory — particle mechanics for a continuum of particles. In the Eulerian description, far more convenient for field equations, you forget which parcel is where and instead record the velocity field , the density , and the pressure at fixed spatial points. The bridge between the pictures is the material derivative : the rate of change experienced by an observer riding with the flow. Because the fluid acceleration contains the advective term , the equations of fluid motion are nonlinear in even when the flow is steady — the single structural fact from which most of fluid dynamics' richness (and difficulty) descends. Mass is neither created nor destroyed, and that one fact, applied to an arbitrary control volume, produces the continuity equation — the cleanest example in physics of a local conservation law: a density paired with a flux such that any change inside a region is exactly the net flow through its boundary. The same template recurs for charge, energy, and quantum probability. This article isolates the kinematic and mass-conservation foundation on which Euler's equation, vorticity dynamics, and the Navier–Stokes equations all stand; the techniques parallel those already built for the loaded string's continuum limit and the strain tensor of deformable solids.
- Fluid motion has two equivalent descriptions: Lagrangian (follow material parcels, ) and Eulerian (record fields at fixed points).
- The dictionary between them is the material derivative — the rate of change following a parcel; its advective term makes fluid dynamics nonlinear.
- Mass conservation on any control volume localizes to the continuity equation , valid for every fluid whatsoever.
- The divergence is the fractional rate of volume expansion of a material element; incompressible flow means , equivalently .
- In steady duct flow, continuity integrates to — the reason nozzles speed water up and streamline crowding encodes speed.
- Key idea: All of mass conservation is encoded in ; the material derivative converts Eulerian field rates into the rate seen by a comoving parcel.
Where this lives today
Every weather forecast you read is a numerical solution of a continuity equation coupled to momentum and energy balances. Global atmosphere models advance the density and wind fields on grids of a few kilometers, and their dynamical cores are built around exactly the conservation-form structure of equation (2) — fluxes through cell faces, finite-volume bookkeeping, mass conserved to machine precision over million-step runs, the discrete descendant of Derivation B's control volume. Ocean and climate models do the same for a stratified, incompressible-to-excellent-approximation sea. In engineering CFD the incompressible constraint is the expensive part: it is not an evolution equation but an instantaneous condition, enforced at every time step by solving a global Poisson problem for pressure ("pressure projection"). GPU solvers in 2026 — from Formula 1 aerodynamics to real-time surgical blood-flow simulation — spend most of their cycles making velocity fields divergence-free, a striking case of a one-line kinematic identity dominating exascale compute budgets.
The physical picture
Imagine instrumenting a river two different ways. The Eulerian way is a fixed array of flow meters bolted to the riverbed, each reporting the local velocity as water rushes past. The Lagrangian way is a fleet of GPS-tagged corks, each reporting its own trajectory. Both fully describe the flow. The material derivative is the dictionary that translates meter-readings into cork-experiences: a cork's temperature changes both because the river warms up where it sits () and because the cork drifts into warmer water ().
Continuity is bookkeeping. Draw an imaginary box in the fluid: the only way the mass inside can change is by mass crossing the walls. Add up the flux over the walls and you have the rate of loss; shrink the box to a point and the surface sum becomes the divergence . This is exactly the localization move used for the Stress Tensor and Cauchy's Relation — balance on an arbitrary region, divergence theorem, then "the region was arbitrary."
Incompressibility is a no-pile-up rule. says whatever volume flows into a tiny region per second must flow out, because the fluid cannot be squeezed. Streamlines therefore crowd where the flow speeds up, exactly like the field lines of any divergence-free field — the picture to keep for the duct examples below, and the reason a river narrows where it runs fast.
The core equations
Everything in this subject is written in terms of the rate of change a moving parcel actually experiences. Take any field carried by the fluid — temperature, a velocity component, density. Its value at the parcel changes for two reasons: the field evolves at the point where the parcel currently is, and the parcel moves to a place where the field has a different value. The sum is the material derivative, derived cleanly in Derivation A:
where: — any field quantity carried by the fluid; — local rate of change at a fixed point; — advective change from riding through a spatially varying field; — the Eulerian velocity field. Applied to velocity itself, is the parcel's acceleration — nonzero even in steady flow wherever streamlines bend or crowd. That quadratic-in- term is the seed of turbulence. Mass conservation, localized on an arbitrary fixed control volume (Derivation B), becomes the continuity equation in conservation form — a density paired with its flux:
where: — mass density; — the mass flux (mass crossing unit area per unit time); — divergence. Read it as: density can only change locally by mass streaming in or out. No constitutive assumption enters — equation (2) holds for honey, air, and neutron-star matter alike, which is why it survives unchanged into the Euler and Navier–Stokes systems downstream. Expanding the divergence with the product rule and regrouping the first two terms as a material derivative gives the equivalent material form — the same law, but read from the parcel's seat:
where: — density change following the parcel; — the parcel's fractional volume expansion rate, as Derivation C proves via the Jacobian of the flow map. A parcel's density falls exactly as fast as its volume grows — conservation of the parcel's mass, written as calculus. Equation (3) makes the incompressible idealization transparent. If each parcel keeps its density, , then (with ) the velocity field must be divergence-free:
where: — local volumetric expansion rate; zero means every material element preserves its volume. This is an excellent approximation for liquids in almost all regimes and for gases moving well below the sound speed (Mach number ); it is a statement about the flow, not the substance — air in a gentle breeze flows incompressibly. For steady flow in a duct or stream tube, integrating equation (2) between two cross sections gives the workhorse one-dimensional relation:
where: — cross-sectional area; — speed averaged over the section; — density at that station. For incompressible flow this is : halve the area, double the speed. It is the quantitative content of streamline crowding, and the kinematic half of every venturi-meter and nozzle calculation (the pressure half is Bernoulli's theorem, next article). Two-dimensional incompressible flow admits a beautiful shortcut. Since in the plane, the velocity can be generated from a single scalar, the stream function:
where: — the stream function; the construction satisfies equation (4) identically. Curves of constant are streamlines, and the difference between two streamlines equals the volume flux carried between them — a scalar that draws the flow's own portrait. Its irrotational partner, the velocity potential, takes over in the vorticity and potential-flow article.
We derive the operator that converts Eulerian field data into the rate of change experienced by a moving parcel. The strategy is nothing more than the multivariable chain rule applied to a field evaluated along a trajectory — but doing it once carefully explains why the advective term is there, why it is nonlinear in velocity, and why "steady" does not mean "unaccelerated." Watch that the parcel's velocity is, by construction, the local field value .
Step 1. Let a parcel follow the trajectory with , and let be any field. The value the parcel experiences is the composite function
Step 2. Differentiate with the chain rule, summing over the repeated index :
Why two terms: the field changes under the parcel's feet even if it stands still, and the parcel additionally slides its evaluation point through the field's spatial variation.
Step 3. Substitute and name the result:
Step 4. Apply it to the velocity field itself, component by component:
Why this matters: the acceleration entering Newton's second law for the parcel is quadratic in . Every equation of fluid dynamics inherits this nonlinearity from pure kinematics — before any force has been mentioned. *Why this works: for a steady one-dimensional nozzle flow , the material derivative gives ; substituting reproduces the acceleration obtained by directly differentiating the parcel's position in time.*
Go deeper · Derivation B · 1 minContinuity equation from a fixed control volume
We localize "mass is conserved" into a partial differential equation. The strategy is the standard three-move pattern of continuum physics — balance on an arbitrary region, divergence theorem, localization — applied to the simplest conserved quantity there is. Let be a fixed region of space with boundary and outward normal . The only subtlety is a sign: outward flux decreases the mass inside.
Step 1. The mass currently inside the fixed region is
Step 2. Because does not move, the time derivative passes through the integral and acts on the integrand alone:
Why partial: at a fixed integration point only the explicit time dependence of can change the value.
Step 3. Mass leaves through the boundary at the rate of the outward flux. The mass crossing a patch per unit time is , so conservation states
Why the minus sign: points outward, so positive is outflow, which depletes .
Step 4. Convert the surface integral with the divergence theorem:
Step 5. Collect both sides under one integral and localize:
Why localization is allowed: the balance holds for every region ; a continuous integrand that integrates to zero over all regions must vanish pointwise. *Why this closes the loop: integrating the local equation back over any fixed volume and applying Gauss's theorem recovers the global balance ; the identical three-move pattern — arbitrary region, divergence theorem, localization — yields Cauchy's equation of motion when applied to momentum balance instead.*
Go deeper · Derivation C · 1 minDivergence as the parcel expansion rate
We prove that is the fractional rate of volume growth of a material element — the geometric fact that makes the material form of continuity, and the meaning of incompressibility, transparent. The strategy runs through the Lagrangian flow map: express the current volume of a parcel through the Jacobian determinant of the map from initial labels to current positions, then differentiate that determinant following the flow. The payoff is Euler's expansion formula, plus a second, independent route to the continuity equation.
Step 1. Let map each initial label to the parcel's current position. A material volume element evolves as
Why: the Jacobian is precisely the local volume-stretch factor of the map, exactly as in any change of variables.
Step 2. Differentiate the determinant following the flow. Using and the rule that differentiating a determinant sums over its rows, every term assembles into the trace of the velocity gradient:
Why the trace appears: each row differentiation inserts one factor of the velocity gradient; the off-diagonal insertions cancel by the determinant's antisymmetry, leaving .
Step 3. Read off the fractional expansion rate of the element:
Step 4. A material parcel keeps its mass, . Expand with the product rule:
Step 5. Divide by and insert Step 3:
Why this closes the loop: the material form of continuity, obtained in Derivation B by algebra, here falls out of pure geometry — and incompressibility is revealed as literally "parcel volume is preserved." *Why this is consistent: for the uniform expansion (Hubble-like flow), and the formula predicts , matching the exact cube-growth of a comoving box — a clean check of Euler's identity .*
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Incompressible flow | Each parcel keeps its density (); the velocity field is divergence-free. Excellent for liquids generally and for gases below Mach . | |
| Steady flow | With the mass flux is divergence-free even when the medium is compressible; integrates to along a stream tube. | |
| Uniform constant density | The textbook special case of incompressibility; note stratified flows are incompressible without being uniform. | |
| Acoustic (linearized) limit | Small disturbances about rest: dropping the quadratic term gives the linear continuity equation that, with linearized momentum balance, builds the sound-wave equation. | |
| No flow | With everywhere, density is frozen: statics. The equation reduces to the trivial truth that mass sits still. |
Worked examples
Example 1 — garden hose with a nozzle (confidence builder). A hose of inner diameter delivers of water. The nozzle exit has diameter . Find the speed in the hose, the exit speed, and the average acceleration of a parcel in the -long nozzle.
Step 1. Convert the flow rate: .
Step 2. Hose cross section: , so .
Step 3. Nozzle exit: , so . The area ratio is , and the speed jumps by the same factor of ten — equation (5) at work.
Step 4. The flow in the nozzle is steady, so all acceleration is advective: . Using the mean speed over : .
Step 5. The water moves at in the hose, exits at , and parcels in the nozzle accelerate at roughly — about — with everywhere. Steady is not the same as unaccelerated.
Example 2 — stagnation-point flow (exam level). A two-dimensional flow near a stagnation point is with . Verify incompressibility, find the stream function and streamlines, and compute the parcel acceleration at .
Step 1. Divergence: . The flow is incompressible everywhere — equation (4) holds exactly.
Step 2. Stream function from equation (6): gives ; then must equal , so . Hence , and streamlines are the hyperbolas — fluid sweeping in along and out along around the stagnation point at the origin.
Step 3. The flow is steady, so the acceleration is purely advective, . Compute each component: , and .
Step 4. Evaluate at with : , ; magnitude .
Step 5. with hyperbolic streamlines, and the parcel at m accelerates at , magnitude , pointing radially away from the stagnation point. Note the elegant structure : an effective outward "centrifugal" field, which the pressure gradient must supply once dynamics (Euler's equation) enters.
Origins · 1 minLeonhard Euler and how this was discovered
Euler is the reason fluid mechanics is a field theory. Where his contemporaries reasoned about tubes and efflux, Euler introduced the velocity field itself — the function at every point of space — and in his great memoirs of 1755–1757 wrote down both the continuity equation and the momentum equations of ideal flow in essentially modern notation, decades before "vector" was a word. The material derivative, the pressure as a field, the very idea that a PDE system could govern a continuum: all Euler. He did this while nearly blind, dictating calculations of legendary accuracy; his collected works run past 80 volumes, and the equation of ideal fluid motion still bears his name in the next article.
Going further
References. Landau & Lifshitz, Fluid Mechanics (Vol. 6), §1–2 · Batchelor, An Introduction to Fluid Dynamics, Ch. 2 · Goldstein, Classical Mechanics, 3rd ed., Ch. 13 (continuous systems and fields) · Taylor, Classical Mechanics, Ch. 16 · Morin, Introduction to Classical Mechanics, continuum chapter Key results to keep in mind: the control-volume derivation confirms ; Euler's expansion identity provides a second, geometric route to the same continuity equation. Example 1's numbers are , , , ; Example 2 yields stream function and acceleration . The Mach incompressibility rule of thumb is the standard engineering threshold, corresponding to density errors under approximately 5%. The full story — compressible flow, boundary layers, flow instabilities, turbulence — lives in the Fluid Mechanics track (migrates later as its own subject); this chapter takes only what the continuum-mechanics thread needs.
Builds on: Discrete Loaded String and the Continuum Limit · Strain Tensor and Deformation of Continua · Vector calculus (divergence theorem) Leads to: Stress Tensor and Cauchy's Relation · Euler's Equations and Bernoulli's Theorem · Lagrangian Density and Continuum Lagrangian Formalism · Elastic Waves in Solids
Is the material derivative a total derivative? The notation D/Dt versus d/dt confuses me.
It is a total time derivative — but along one specific family of curves: the flow trajectories. Writing with , the ordinary equals . The capital-D notation exists to flag that the answer depends on moving with the fluid: a raindrop falling through the same field, or a probe towed on a different path, would experience with its own velocity , not the fluid's. So D/Dt is "d/dt, evaluated riding the flow" — one operator from a whole family, singled out because Newton's law applies to material parcels.
Why is the advective term nonlinear? Velocity appears twice, but the equation looks innocent.
The parcel acceleration is : the velocity field differentiated and evaluated using itself — velocity advecting velocity. Double the field everywhere and this term quadruples; solutions cannot be superposed. That single quadratic term is why fluid dynamics has no general superposition principle, why simple flows destabilize into turbulence, and why the Navier–Stokes regularity problem is worth a million dollars while the linear wave equation is a homework exercise. Note the nonlinearity is kinematic in origin: it appears before any force or constitutive law enters, purely from describing acceleration in field language.
Air is obviously compressible — I can pump up a bicycle tire. Why do we model air flow as incompressible?
Incompressibility is a property of a flow regime, not of the substance. What matters is whether pressure variations in the flow are large enough to change density appreciably. Bernoulli-scale pressure variations are , and comparing with the equation of state shows fractional density changes of order the Mach number squared: . At (a fast car), and . The engineering rule is for incompressible treatment. Your tire pump is a different regime: you impose a large density change by confinement, not by flow.
Does the continuity equation assume anything about viscosity or the type of fluid?
Nothing at all — that is its distinction. Derivation B uses only "mass crosses boundaries at rate ," true for honey, superfluid helium, air, and plasma alike. Viscosity, pressure, and constitutive behavior enter the momentum equation (Euler for ideal flow, Navier–Stokes for viscous flow), never the mass balance. That is why every fluid solver, whatever its physics models, carries the same continuity equation, and why the "density plus flux" template transfers verbatim to charge conservation in electromagnetism and probability conservation in quantum mechanics.
What exactly is the difference between a streamline, a pathline, and a streakline?
A streamline is an instantaneous curve everywhere tangent to at one frozen moment — the field's portrait. A pathline is the actual trajectory of one parcel over time — the cork's GPS track. A streakline is the locus of all parcels that ever passed a fixed point — the smoke line from a chimney. In steady flow the three coincide, which is why intro courses blur them. In unsteady flow they differ dramatically: a smoke plume in gusty wind (streakline) looks nothing like either the instantaneous streamlines or any single particle's path.
The stream function seems like magic. Why does incompressibility buy me a scalar description in 2D, and does it work in 3D?
In 2D, is exactly the integrability condition guaranteeing a function with , — the same mathematics that gives potentials for conservative forces, with a twist of index. The bonus: , so is constant along streamlines, and between two streamlines is the volume flux carried between them. In 3D one scalar no longer suffices; axisymmetric flows admit a Stokes stream function, and general 3D flows need a vector potential — same idea, more components.
Can density vary in an incompressible flow? These seem contradictory.
They coexist perfectly well. Incompressibility says : each parcel keeps its density as it moves. It does not say all parcels carry the same density. The stratified ocean — warm light water riding over cold dense water — flows incompressibly while varies strongly with depth; each water parcel keeps its own as it circulates. Only the special (though common) case " uniform and constant" collapses the two notions. The distinction matters physically: density stratification with incompressible flow drives internal waves, a huge part of geophysical fluid dynamics.
Where does the continuity equation sit in the Lagrangian field-theory formalism of this chapter?
It enters as kinematics, not dynamics. In the Lagrangian-density formulation of continuum mechanics — as in the Lagrangian Density and Continuum Lagrangian Formalism article — one varies an action to obtain the momentum equations, while mass conservation is built into the description from the start (in Lagrangian coordinates, is an identity of the flow map, Derivation C's statement ). Deeper still, Noether's theorem ties conservation laws to symmetries; for nonrelativistic fluids the mass conservation law pairs with the phase symmetry of the underlying matter description, foreshadowing the probability current of quantum mechanics.