Let y be a point in three dimensional space and let

(y1,y2,y3)

be Cartesian coordinates
of this point. Let V be a region in three dimensional space and suppose a fluid having
density ρ

(y,t)

and velocity, v

(y,t)

is flowing through this region. Then the mass of fluid
leaving V per unit time is given by the area integral ∫_{∂V }ρ

(y,t)

v

(y,t)

⋅ ndA while the
total mass of the fluid enclosed in V at a given time is ∫_{V }ρ

(y,t)

dV . Also suppose mass
originates at the rate f

(y,t)

per cubic unit per unit time within this fluid. Then
the conclusion which can be drawn through the use of the divergence theorem
is the following fundamental equation known as the mass balance equation.

∂ ρ
-∂t + ∇ ⋅(ρv) = f (y,t) (27.8)

(27.8)

To see this is so, take an arbitrary V for which the divergence theorem holds. Then
the time rate of change of the mass in V is

∂ ∫ ∫ ∂ρ(y,t)
∂t ρ (y,t)dV = --∂t---dV
V V

where the derivative was taken under the integral sign with respect to t. (This is a
physical derivation and therefore, it is not necessary to fuss with the hard mathematics
related to the change of limit operations. You should expect this to be true under fairly
general conditions because the integral is a sort of sum and the derivative of a sum is the
sum of the derivatives.) Therefore, the rate of change of mass

∂-
∂t

∫_{V }ρ

(y,t)

dV , equals

◜--rate at whic◞h◟ mass enters-◝
∫ ∂ρ(y,t)- ∫ ∫
V ∂t dV = − ∂V ρ(y,t)v (y,t) ⋅ndA + V f (y,t)dV
∫
= − (∇ ⋅(ρ (y,t)v (y,t))+ f (y,t)) dV.
V

Since this holds for every sample volume V it must be the case that the equation of
continuity holds. Again, there are interesting mathematical questions here which can be
explored but since it is a physical derivation, it is not necessary to dwell too much on
them. If all the functions involved are continuous, it is certainly true but it is true under
far more general conditions than that.

Also note this equation applies to many situations and f might depend on more than
just y and t. In particular, f might depend also on temperature and the density ρ. This
would be the case for example if you were considering the mass of some chemical and f
represented a chemical reaction. Mass balance is a general sort of equation valid in many
contexts.