The law of conservation of mass can be written
The rate of increase of mass inside the volume must match the rate of inﬂow of mass across the volume’s surface. The latter is calculated by integrating the mass ﬂux over the surface, noting the negative sign due to pointing out of the volume.
Divergence, denoted by , indicates the tendency of a vector ﬁeld to point outward of a closed surface. For example, When the divergence of velocity is positive, the ﬂuid is expanding; negative divergence indicates contraction. Imagine a volume of ﬂuid with a complex distribution of at its bounding surface, below left. The calculation will isolate the diverging component (right) from uniform ﬂow (centre).
The divergence of velocity is calculated by integrating — i.e. summing — ﬂuxes over the closed surface. To deﬁne divergence at a point, we consider the limiting case where the volume tends to zero. For a surface that encloses a volume , divergence is the ﬂux across the surface per unit volume, as , e.g.
The nabla symbol can be considered a vector operator