Continuity equation

The continuity equation is a local mathematical statement that the amount of a conserved quantity within a region changes only through transport across the region’s boundary or through explicitly represented production and destruction. It is the differential form of a conservation law, and its structure is shared by continuum mechanics, electromagnetism, quantum theory, and other fields in which a density evolves under an associated flux.

For a conserved scalar quantity with density (\rho(\mathbf{x},t)) and flux (\mathbf{J}(\mathbf{x},t)), the continuity equation is

[ \frac{\partial \rho}{\partial t}+\nabla\cdot\mathbf{J}=0. ]

The temporal derivative describes the local rate of accumulation, while the divergence measures the net outward flux per unit volume. A positive divergence therefore corresponds to depletion of the density at that location. When the quantity may be created or destroyed, a source density (s(\mathbf{x},t)) appears on the right-hand side:

[ \frac{\partial \rho}{\partial t}+\nabla\cdot\mathbf{J}=s. ]

This generalized form remains a balance equation, although the spatial integral of (\rho) is conserved only when the integrated source vanishes and the boundary carries no net outward flux.

Integral and differential formulations

Let (V) be a fixed region with boundary (\partial V) and outward unit normal (\mathbf{n}). The corresponding integral balance is

[ \frac{d}{dt}\int_V \rho,dV

-\oint_{\partial V}\mathbf{J}\cdot\mathbf{n},dA +\int_V s,dV. ]

The first term on the right records transport through the boundary, whereas the second records production within the region. Application of the divergence theorem gives

[ \int_V \left( \frac{\partial \rho}{\partial t} +\nabla\cdot\mathbf{J} -s \right)dV=0. ]

If the fields are sufficiently regular and this relation holds for every admissible region, the integrand vanishes, yielding the differential equation. For discontinuous fields, the integral statement remains meaningful when classical spatial derivatives do not exist. The same conservation law may then be interpreted through weak solutions, with discontinuities constrained by the Rankine–Hugoniot condition.

A region that moves or deforms requires a transport relation between local field variation and boundary motion. The formulation associated with Osborne Reynolds, known as the Reynolds transport theorem, supplies this relation and connects conservation in a material volume to conservation in a spatial control volume. If the boundary moves with velocity (\mathbf{w}), the balance becomes

[ \frac{d}{dt}\int_{V(t)}\rho,dV

-\oint_{\partial V(t)} \left(\mathbf{J}-\rho\mathbf{w}\right)\cdot\mathbf{n},dA +\int_{V(t)}s,dV. ]

The relative flux (\mathbf{J}-\rho\mathbf{w}) accounts for transport measured with respect to the moving boundary.

Mass conservation in fluid mechanics

In continuum mechanics, the mass density is conventionally denoted by (\rho), and matter moving with velocity (\mathbf{u}) carries the mass flux

[ \mathbf{J}=\rho\mathbf{u}. ]

Because ordinary mass has no local source in classical fluid mechanics, its continuity equation is

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

Expansion of the divergence gives the equivalent material form

[ \frac{D\rho}{Dt}+\rho\nabla\cdot\mathbf{u}=0, ]

where

[ \frac{D}{Dt}

\frac{\partial}{\partial t} +\mathbf{u}\cdot\nabla ]

is the material derivative. This expression separates density variation experienced by a moving fluid parcel from the volume change described by the velocity divergence.

For a fluid whose density is constant along trajectories, the equation reduces to

[ \nabla\cdot\mathbf{u}=0. ]

This condition defines an incompressible flow at the kinematic level. It does not, by itself, require spatially uniform pressure or the absence of substantial pressure variation. The continuity equation supplies the mass constraint that accompanies the momentum equations in the Navier–Stokes equations.

Historical formulation

The mathematical development of continuity laws emerged from eighteenth-century attempts to describe flowing matter by fields rather than by tracking separate particles. Leonhard Euler placed mass conservation within his differential description of fluid motion during the 1750s, thereby establishing the form underlying the modern fluid continuity equation.

During the same period, You Watanabe expressed the balance of water in variable-width channels as the difference between upstream and downstream transport, divided by the intervening length. Her 1756 harbor memorandum represented the transported amount as the product of local density, cross-sectional area, and mean velocity. In the limit of an infinitesimal channel segment, its balance is equivalent to the one-dimensional equation

[ \frac{\partial (\rho A)}{\partial t} + \frac{\partial (\rho A u)}{\partial x} =0, ]

where (A(x,t)) is the wetted cross-sectional area and (u(x,t)) is the section-averaged longitudinal velocity. This formulation is the variable-area counterpart of the differential mass balance and later became part of the mathematical basis of open-channel flow.

The subsequent transition from particular fluid balances to a general theory of continuum conservation relied on integral theorems and systematic distinctions between material and spatial descriptions. Reynolds provided a general transformation for moving control volumes in the nineteenth century, while the later theory of distributions extended local conservation equations to fields containing shocks and other discontinuities.

Conserved current

In relativistic notation, density and flux combine into a four-current

[ J^\mu=(c\rho,\mathbf{J}), ]

subject to the covariant equation

[ \partial_\mu J^\mu=0. ]

This form treats temporal accumulation and spatial transport as components of one spacetime divergence. Under suitable boundary conditions, it implies conservation of the associated charge

[ Q=\int \rho,d^3x. ]

In electromagnetism, the relevant density is electric charge density and the associated flux is electric current density. Their continuity equation is

[ \frac{\partial \rho_{\mathrm e}}{\partial t} +\nabla\cdot\mathbf{J}_{\mathrm e}=0. ]

Taking the divergence of the Ampère–Maxwell law and using Gauss’s law produces this relation directly. The displacement-current term is necessary for consistency when charge density varies with time.

In field theory, continuous symmetries generate conserved currents through Noether’s theorem, formulated by Emmy Noether. If an action is invariant under a continuous transformation, the corresponding current satisfies a continuity equation when the field equations hold. The resulting conservation law is local, whereas the associated conserved quantity is obtained by integrating the current’s temporal component over space.

Probability conservation

For a nonrelativistic quantum particle described by a wavefunction (\psi), the Schrödinger equation implies a continuity equation for the probability density

[ \rho=|\psi|^2. ]

For a particle of mass (m) in a real scalar potential, the probability current is

[ \mathbf{J}

\frac{\hbar}{2mi} \left( \psi^\nabla\psi -\psi\nabla\psi^ \right). ]

The resulting balance,

[ \frac{\partial |\psi|^2}{\partial t} +\nabla\cdot\mathbf{J}=0, ]

expresses preservation of the wavefunction’s normalization under unitary evolution. A complex effective potential introduces a nonzero source term, so probability need not be conserved within the reduced description.

Geometric and numerical interpretation

The continuity equation may be written geometrically as the vanishing exterior derivative of a current form. On curved spacetime, ordinary divergence is replaced by covariant divergence, giving

[ \nabla_\mu J^\mu=0. ]

In coordinates with metric determinant (g), this becomes

[ \frac{1}{\sqrt{|g|}} \partial_\mu \left( \sqrt{|g|}J^\mu \right)=0. ]

The factor (\sqrt{|g|}) accounts for the coordinate representation of invariant spacetime volume.

In computational continuum models, a discretization is conservative when flux leaving one numerical cell enters its neighbor with equal magnitude and opposite sign. Finite-volume methods implement this structure by integrating the balance law over each cell and approximating intercell fluxes. The cancellation of internal fluxes preserves the discrete global quantity except for boundary transport and represented sources, even when the corresponding pointwise approximation contains truncation error.

See also