Frequent Links
Continuity equation
Continuum mechanics  

Diagram illustrating a derivation using Bernoulli's Law  
Laws


A continuity equation in physics is an equation that describes the transport of a conserved quantity. Since mass, energy, momentum, electric charge and other natural quantities are conserved under their respective appropriate conditions, a variety of physical phenomena may be described using continuity equations.
Continuity equations are a stronger, local form of conservation laws. For example, it is true that "the total energy in the universe is conserved". But this statement does not immediately rule out the possibility that energy could disappear from Earth while simultaneously appearing in another galaxy. A stronger statement is that energy is locally conserved: Energy can neither be created nor destroyed, nor can it "teleport" from one place to another—it can only move by a continuous flow. A continuity equation is the mathematical way to express this kind of statement.
Continuity equations more generally can include "source" and "sink" terms, which allow them to describe quantities that are often but not always conserved, such as the density of a molecular species which can be created or destroyed by chemical reactions. In an everyday example, there is a continuity equation for the number of living humans; it has a "source term" to account for people being born, and a "sink term" to account for people dying.
Any continuity equation can be expressed in an "integral form" (in terms of a flux integral), which applies to any finite region, or in a "differential form" (in terms of the divergence operator) which applies at a point.
Continuity equations underlie more specific transport equations such as the convection–diffusion equation, Boltzmann transport equation, and Navier–Stokes equations.
Contents
General equation
Definition of flux
Before we can write down the continuity equation (below), we must first define flux, a quantity specifying flow or motion.
The continuity equation is applicable when there is some quantity q which can flow or move, such as mass, energy, electric charge, momentum, number of molecules, etc. Let ρ be the volume density of this property, i.e., the amount of q per unit volume.
The way that this quantity q is flowing is described by its flux. The flux of q is a vector field, which we denote as j. Here are some examples and properties of flux:
 The dimension of flux is "amount of q per unit time, per unit area". For example, in the mass continuity equation for flowing water, if 1 gram per second of water is flowing through a pipe with crosssectional area 1 cm^{2}, then the average mass flux j inside the pipe is (1 gram / second) / cm^{2}, pointing along the pipe in the direction that the water is flowing. Outside the pipe, where there is no water, the flux is zero.
 If there is a velocity field u which describes the relevant flow—in other words, if all of the quantity q at a point x is moving with velocity u(x)—then the flux is by definition equal to the density times the velocity field:
 <math>\mathbf{j} = \rho \mathbf{u}</math>
 For example, in the mass continuity equation for flowing water, u would be the water's velocity at each point, ρ would be the water's density at each point, and then j would be the mass flux.
 In a wellknown example, the flux of electric charge is the electric current density.
 If there is an imaginary surface S, then the surface integral of flux over S is equal to the amount of q that is passing through the surface S per unit time:
<math> (\text{Rate that }q\text{ is flowing through the imaginary surface }S) = \int\!\!\!\!\int_S \mathbf{j} \cdot d\mathbf{S}</math>
 in which <math>\int\!\!\!\!\int_S d\mathbf{S}</math> is a surface integral.
Integral form
The integral form of the continuity equation states that:
 The amount of q in a region increases when additional q flows inward through the surface of the region, and decreases when it flows outward;
 The amount of q in a region increases when new q is created inside the region, and decreases when q is destroyed;
 Apart from these two processes, there is no other way for the amount of q in a region to change.
Mathematically, the integral form of the continuity equation is:
where
 S is any imaginary closed surface, that encloses a volume V,
 Template:Oiint denotes a surface integral over that closed surface,
 <math>q</math> is the total amount of the quantity in the volume V,
 j is the flux of q,
 t is time,
 <math>\Sigma</math> is the net rate that q is being generated inside the volume V. (When q is being generated, it is called a "source" of q, and it makes Σ more positive. When q is being destroyed, it is called a "sink" of q, and it makes Σ more negative.)
In a simple example, V could be a building, and q could be the number of people in the building. The surface S would consist of the walls, doors, roof, and foundation of the building. Then the continuity equation states that the number of people in the building increases when people enter the building (an inward flux through the surface), decreases when people exit the building (an outward flux through the surface), increases when someone in the building gives birth (a "source", Σ > 0), and decreases when someone in the building dies (a "sink", Σ < 0).
Differential form
By the divergence theorem, a general continuity equation can also be written in a "differential form":
<math>\frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf{j} = \sigma\,</math>
where
 ∇⋅ is divergence,
 ρ is the amount of the quantity q per unit volume,
 j is the flux of q,
 t is time,
 σ is the generation of q per unit volume per unit time. Terms that generate (σ > 0) or remove (σ < 0) q are referred to as a "sources" and "sinks" respectively.
This general equation may be used to derive any continuity equation, ranging from as simple as the volume continuity equation to as complicated as the Navier–Stokes equations. This equation also generalizes the advection equation. Other equations in physics, such as Gauss's law of the electric field and Gauss's law for gravity, have a similar mathematical form to the continuity equation, but are not usually called by the term "continuity equation", because j in those cases does not represent the flow of a real physical quantity.
In the case that q is a conserved quantity that cannot be created or destroyed (such as energy), σ = 0 and the equations becomes:
 <math>\frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf{j} = 0\,</math>
Electromagnetism
In electromagnetic theory, the continuity equation is an empirical law expressing (local) charge conservation. Mathematically it is an automatic consequence of Maxwell's equations, although charge conservation is more fundamental than Maxwell's equations. It states that the divergence of the current density J (in amperes per square meter) is equal to the negative rate of change of the charge density ρ (in coulombs per cubic metre),
 <math> \nabla \cdot \mathbf{J} =  {\partial \rho \over \partial t} </math>
Consistency with Maxwell's equations One of Maxwell's equations, Ampère's law (with Maxwell's correction), states that
 <math> \nabla \times \mathbf{H} = \mathbf{J} + \frac{\partial \mathbf{D}}{\partial t}. </math>
Taking the divergence of both sides (the divergence and partial derivative in time commute) results in
 <math> \nabla \cdot ( \nabla \times \mathbf{H} ) = \nabla \cdot \mathbf{J} + \frac{\partial (\nabla \cdot \mathbf{D})}{\partial t}, </math>
but the divergence of a curl is zero, so that
 <math> \nabla \cdot \mathbf{J} + \frac{\partial (\nabla \cdot \mathbf{D})}{\partial t} = 0. </math>
Another one of Maxwell's equations, Gauss's law, states that
 <math> \nabla \cdot \mathbf{D} = \rho,\, </math>
substitution into the previous equation yields the continuity equation
 <math> \nabla \cdot \mathbf{J} + {\partial \rho \over \partial t} = 0.\,</math>
Current is the movement of charge. The continuity equation says that if charge is moving out of a differential volume (i.e. divergence of current density is positive) then the amount of charge within that volume is going to decrease, so the rate of change of charge density is negative. Therefore the continuity equation amounts to a conservation of charge.
If magnetic monopoles exist, there would be a continuity equation for monopole currents as well, see the monopole article for background and the duality between electric and magnetic currents.
Fluid dynamics
In fluid dynamics, the continuity equation states that, in any steady state process, the rate at which mass enters a system is equal to the rate at which mass leaves the system.^{[1]}^{[2]}
The differential form of the continuity equation is:^{[1]}
 <math> {\partial \rho \over \partial t} + \nabla \cdot (\rho \mathbf{u}) = 0</math>
where
 ρ is fluid density,
 t is time,
 u is the flow velocity vector field.
In this context, this equation is also one of the Euler equations (fluid dynamics). The Navier–Stokes equations form a vector continuity equation describing the conservation of linear momentum.
If ρ is a constant, as in the case of incompressible flow, the mass continuity equation simplifies to a volume continuity equation:^{[1]}
 <math>\nabla \cdot \mathbf{u} = 0,</math>
which means that the divergence of velocity field is zero everywhere. Physically, this is equivalent to saying that the local volume dilation rate is zero.
Energy and heat
Conservation of energy says that energy cannot be created or destroyed. (See below for the nuances associated general relativity.) Therefore there is a continuity equation for energy flow:
 <math> \frac{ \partial u}{\partial t} + \nabla \cdot \mathbf{q} = 0</math>
where
 u = local energy density (energy per unit volume),
 q = energy flux (transfer of energy per unit crosssectional area per unit time) as a vector,
An important practical example is the flow of heat. When heat flows inside a solid, the continuity equation can be combined with Fourier's law (heat flux is proportional to temperature gradient) to arrive at the heat equation. The equation of heat flow may also have source terms: Although energy cannot be created or destroyed, heat can be created from other types of energy, for example via friction or joule heating.
Probability distributions
If there is a quantity that moves continuously according to a stochastic (random) process, like the location of a single dissolved molecule with Brownian motion, then there is a continuity equation for its probability distribution. The flux in this case is the probability per unit area per unit time that the particle passes through a surface. According to the continuity equation, the negative divergence of this flux equals the rate of change of the probability density. The continuity equation reflects the fact that the molecule is always somewhere—the integral of its probability distribution is always equal to 1—and that it moves by a continuous motion (no teleporting).
Quantum mechanics
Quantum mechanics is another domain where there is a continuity equation related to conservation of probability. The terms in the equation require the following definitions, and are slightly less obvious than the other examples above, so they are outlined here:
 The wavefunction <math>\Psi</math> for a single particle in position space (rather than momentum space), that is, a function of position r and time t, <math>\Psi = \Psi(\mathbf{r}, t)</math>.
 The probability density function is:
 <math> \rho(\mathbf{r},t) = \Psi^{*}(\mathbf{r},t) \Psi(\mathbf{r},t) = \Psi(\mathbf{r},t)^2 \,\!</math>
 The probability of finding the particle within V at t is denoted and defined by:
 <math>P=P_{\mathbf{r} \in V}(t) = \int_V \Psi^{*} \Psi d V = \int_V \Psi^2 d V \,</math>
 The probability current (aka probability flux):
 <math> \mathbf{j}(\mathbf{r},t) = \frac{\hbar}{2mi} \left [ \Psi^{*} \left ( \nabla \Psi \right )  \Psi \left ( \nabla \Psi^{*} \right ) \right ]. </math>
With these definitions the continuity equation reads:
 <math> \nabla \cdot \mathbf{j} + \frac{\partial \rho}{\partial t} = 0 \rightleftharpoons \nabla \cdot \mathbf{j} + \frac{\partial \Psi^2}{\partial t} = 0.</math>
Either form may be quoted. Intuitively; the above quantities indicate this represents the flow of probability. The chance of finding the particle at some position r and time t flows like a fluid; hence the term probability current, a vector field. The particle itself does not flow deterministically in this vector field.
Consistency with Schrödinger equation For this derivation see^{[3]} for example. The 3d time dependent Schrödinger equation and its complex conjugate (i → –i throughout) are respectively:  <math> \begin{align} & \frac{\hbar^2}{2m}\nabla^2 \Psi + U\Psi = i\hbar \frac{\partial \Psi}{\partial t} , \\
&  \frac{\hbar^2}{2m}\nabla^2 \Psi^{*} + U\Psi^{*} =  i\hbar \frac{\partial \Psi^{*}}{\partial t} ,\\ \end{align}</math>
where U is the potential function. The partial derivative of ρ with respect to t is:
 <math> \frac{\partial \rho}{\partial t} = \frac{\partial \Psi ^2}{\partial t } = \frac{\partial}{\partial t} \left ( \Psi^{*} \Psi \right ) = \Psi^{*} \frac{\partial \Psi}{\partial t} + \Psi \frac{\partial\Psi^{*}}{\partial t} .</math>
Multiplying the Schrödinger equation by Ψ* then solving for <math> \scriptstyle \Psi^{*} \partial \Psi/\partial t \,\!</math>, and similarly multiplying the complex conjugated Schrödinger equation by Ψ then solving for <math>\scriptstyle \Psi \partial \Psi^* / \partial t \,\!</math>;
 <math> \begin{align} & \Psi^*\frac{\partial \Psi}{\partial t} = \frac{1}{i\hbar } \left [ \frac{\hbar^2\Psi^*}{2m}\nabla^2 \Psi + U\Psi^*\Psi \right ], \\
& \Psi \frac{\partial \Psi^*}{\partial t} =  \frac{1}{i\hbar } \left [  \frac{\hbar^2\Psi}{2m}\nabla^2 \Psi^* + U\Psi\Psi^* \right ],\\ \end{align}</math>
substituting into the time derivative of ρ:
 <math> \begin{align}
\frac{\partial \rho}{\partial t} & = \frac{1}{i\hbar } \left [ \frac{\hbar^2\Psi^{*}}{2m}\nabla^2 \Psi + U\Psi^{*}\Psi \right ]  \frac{1}{i\hbar } \left [  \frac{\hbar^2\Psi}{2m}\nabla^2 \Psi^{*} + U\Psi\Psi^{*} \right ] \\
& = \frac{1}{i\hbar } \left [ \frac{\hbar^2\Psi^{*}}{2m}\nabla^2 \Psi + U\Psi^{*}\Psi \right ] + \frac{1}{i\hbar } \left [ +\frac{\hbar^2\Psi}{2m}\nabla^2 \Psi^{*}  U\Psi^{*}\Psi \right ] \\ & =  \frac{1}{i\hbar } \frac{\hbar^2\Psi^{*}}{2m}\nabla^2 \Psi + \frac{1}{i\hbar } \frac{\hbar^2\Psi}{2m}\nabla^2 \Psi^{*} \\ & = \frac{\hbar}{2im} \left [ \Psi\nabla^2 \Psi^{*}  \Psi^{*}\nabla^2 \Psi \right ] \\
\end{align} </math>
The Laplacian operators (∇^{2}) in the above result suggest that the right hand side is the divergence of j, and the reversed order of terms imply this is the negative of j, altogether:
 <math>\begin{align} \nabla \cdot \mathbf{j} & = \nabla \cdot \left [ \frac{\hbar}{2mi} \left ( \Psi^{*} \left ( \nabla \Psi \right )  \Psi \left ( \nabla \Psi^{*} \right ) \right ) \right ] \\
& = \frac{\hbar}{2mi} \left [ \Psi^{*} \left ( \nabla^2 \Psi \right )  \Psi \left ( \nabla^2 \Psi^{*} \right ) \right ] \\ & =  \frac{\hbar}{2mi} \left [ \Psi \left ( \nabla^2 \Psi^{*} \right )  \Psi^{*} \left ( \nabla^2 \Psi \right ) \right ] \\
\end{align} </math>
so the continuity equation is:
 <math> \begin{align} & \frac{\partial \rho}{\partial t} =  \nabla \cdot \mathbf{j} \\
& \frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf{j} = 0 \\ \end{align}</math>
The integral form follows as for the general equation.
Relativistic version
Special relativity
The notation and tools of special relativity, especially 4vectors and 4gradients, offer a convenient way to write any continuity equation.
The density of a quantity ρ and its current j can be combined into a 4vector called a 4current:
 <math>J = \left(c \rho, j_x, j_y, j_z \right)</math>
where c is the speed of light. The 4divergence of this current is:
 <math>\partial_\mu J^\mu = \frac{\partial \rho}{\partial t} + \nabla \cdot \mathbf{j} </math>
where ∂_{μ} is the 4gradient and μ is an index labelling the spacetime dimension. Then the continuity equation is:
 <math>\partial_\mu J^\mu = 0</math>
in the usual case where there are no sources or sinks, i.e. for perfectly conserved quantities like energy or charge. This continuity equation is manifestly ("obviously") Lorentz invariant.
Examples of continuity equations often written in this form include electric charge conservation <math>\partial_\mu J^\mu = 0</math> where J is the electric 4current; and energymomentum conservation <math>\partial_\nu T^{\mu\nu} = 0</math> where T is the stressenergy tensor.
General relativity
In general relativity, where spacetime is curved, the continuity equation (in differential form) for energy, charge, or other conserved quantities involves the covariant divergence instead of the ordinary divergence.
For example, the stress–energy tensor is a secondorder tensor field containing energy–momentum densities, energy–momentum fluxes, and shear stresses, of a massenergy distribution. The differential form of energymomentum conservation in general relativity states that the covariant divergence of the stressenergy tensor is zero:
 <math> T^{\mu}_{\;\; \nu ; \mu} = 0.</math>
This is an important constraint on the form the Einstein field equations take in general relativity.^{[4]}
However, the ordinary divergence of the stressenergy tensor does not necessarily vanish:^{[5]}
 <math> \partial_{\mu} T^{\mu\nu} =
 \Gamma^{\mu}_{\mu \lambda} T^{\lambda \nu}  \Gamma^{\nu}_{\mu \lambda} T^{\mu \lambda},
</math>
The righthand side strictly vanishes for a flat geometry only.
As a consequence, the integral form of the continuity equation is difficult to define and not necessarily valid for a region within which spacetime is significantly curved (e.g. around a black hole, or across the whole universe).^{[6]}
Particle physics
Quarks and gluons have color charge, which is always conserved like electric charge, and there is a continuity equation for such color charge currents (explicit expressions for currents are given at gluon field strength tensor).
There are many other quantities in particle physics which are often or always conserved: baryon number (proportional to the number of quarks minus the number of antiquarks), electron number, mu number, tau number, isospin, and others.^{[7]} Each of these has a corresponding continuity equation, possibly including source / sink terms.
Conserved currents from Noether's theorem
If a physical field described by a function of space and time, ϕ(r, t), is varied by a small amount;
 <math>\phi \rightarrow \phi + \delta\phi</math>
then Noether's theorem states the Lagrangian L, or rather the Lagrangian density ℒ for fields, is invariant (does not change):
 <math>\mathcal{L} \rightarrow \mathcal{L} + \delta\mathcal{L}, \ \delta\mathcal{L}=0</math>
under a continuous symmetry, in which the field is a continuous variable. The field ϕ(r, t) can be a scalar field, often a scalar potential like the classical gravitational potential ζ(r, t) or electric potential ϕ(r, t), or a vector field like the Newtonian gravitational field g(r, t) or vector potentials like the magnetic potential A(r, t), or a tensor field of any order such as the electromagnetic tensor F(r, t), or even a spinor field which arise in describing particles as quantum fields. The Lagrangian density is a function of the field and its space and time derivatives: ℒ[ϕ(r, t), ∂ϕ(r, t)/∂t, ∇ϕ(r, t)].
The above considerations leads to conserved current densities in a completely general form:^{[8]}
 <math>J^\mu (\mathbf{r},t) = \frac{\partial \mathcal{L}}{\partial [\partial_\mu \phi(\mathbf{r},t)]}\delta\phi(\mathbf{r},t) </math>
because they satisfy the continuity equation
 <math>\partial_\mu J^\mu = 0</math>
Derivation of conserved currents from Lagrangian density The variation in ℒ is:
 <math>\begin{align}
\delta\mathcal{L} & = \frac{\partial \mathcal{L}}{\partial \phi}\delta\phi + \frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)} \delta (\partial_\mu \phi)\\ & = \frac{\partial \mathcal{L}}{\partial \phi}\delta\phi + \frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)} (\partial_\mu \delta \phi)\\ \end{align}</math>
next using the Euler–Lagrange equations for a field:
 <math>\partial_\mu\left[\frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)}\right] = \frac{\partial \mathcal{L}}{\partial \phi}</math>
the variation is:
 <math>\begin{align}
\delta\mathcal{L} & = \partial_\mu\left[\frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)}\right]\delta\phi + \frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)} (\partial_\mu \delta \phi)\\ & = \partial_\mu\left[\frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)}\delta\phi\right] \\ & = 0 \end{align}</math>
where the product rule has been used, so we obtain the continuity equation in a different general form:
 <math>\partial_\mu\left[\frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)}\delta\phi\right] = 0 </math>
So the conserved current density has to be:
 <math>J^\mu = \frac{\partial \mathcal{L}}{\partial (\partial_\mu \phi)}\delta\phi </math>
Integrating the density of the conserved quantity J^{0}/c, over a spacelike region of volume V, gives the total amount of conserved quantity within that volume:
 <math>q(t) = \int_V \frac{1}{c} J^0(\mathbf{r},t) \, dV </math>
Equivalently, integrating the current density of the conserved quantity j = (J^{1}, J^{2}, J^{3}), through a closed spacelike surface S (see above descriptions) over some time duration, also gives the conserved quantity flowing through that surface in that time duration:
 <math>q(t_2  t_1) = \int_{t_1}^{t_2} \iint_S \mathbf{j}(\mathbf{r},t) \cdot d\mathbf{S} \,dt\, </math>
See also
References
 ^ ^{a} ^{b} ^{c} Pedlosky, Joseph (1987). Geophysical fluid dynamics. Springer. pp. 10–13. ISBN 9780387963877.
 ^ Clancy, L.J.(1975), Aerodynamics, Section 3.3, Pitman Publishing Limited, London
 ^ Quantum Mechanics Demystified, D. McMahon, Mc Graw Hill (USA), 2006, ISBN(10) 0 07 145546 9
 ^ D. McMahon (2006). Relativity DeMystified. Mc Graw Hill (USA). ISBN 0071455450.
 ^ C.W. Misner; K.S. Thorne; J.A. Wheeler (1973). Gravitation. W.H. Freeman & Co. ISBN 0716703440.
 ^ Michael Weiss and John Baez. "Is Energy Conserved in General Relativity?". Retrieved 20140425.
 ^ J.A. Wheeler, C. Misner, K.S. Thorne (1973). Gravitation. W.H. Freeman & Co. pp. 558–559. ISBN 0716703440.
 ^ D. McMahon, Mc Graw Hill (USA) (2008). Quantum Field Theory. ISBN 9780071543828.
Further reading
 Hydrodynamics, H. Lamb, Cambridge University Press, (2006 digitalization of 1932 6th edition) ISBN 9780521458689
 Introduction to Electrodynamics (3rd Edition), D.J. Griffiths, Pearson Education Inc, 1999, ISBN 8177582933
 Electromagnetism (2nd edition), I.S. Grant, W.R. Phillips, Manchester Physics Series, 2008 ISBN 0471927120
 Gravitation, J.A. Wheeler, C. Misner, K.S. Thorne, W.H. Freeman & Co, 1973, ISBN 0716703440