Based on the derivation in (Bird, et. al. 2007).
The general balance equations (GBE) are the main tennets of continuum mechanics. Proper derivation of these equations is absolutely essential to theral-hydraulics. They are also incredibly useful for other physical systems, and when coupled with the electronic charge conservation equation, could (ostensibly) solve any non-quantum mechanical problem.
The general balance equation for any property is given by:
We can use Reynold’s Transport theorem, which states that \(\frac{D}{Dt}\int_{V_{m}}\psi dV=\int_{V_{m}}\left[\frac{\partial\psi}{\partial t}+\nabla\cdot\left(\psi\vec{v}\right)\right]dV\) and Greene Theorem, which thats \(\oint_{S_{m}}\mathbb{J}\cdot\vec{n}dS=\int_{V_{m}}\nabla\cdot\mathbb{J}dV\). Inputting these two expressions to first convert the material derivative to time and spatial derivative and to convert the surface integral to a volume integral, respectively. With these two changes and combining volume integrals, we then get
and after differentiating:
Apply the GBE, using \(\psi = \rho\), \(\mathbb{J} = 0\), and \(\dot{\psi_{g}} = 0\), we get
which is equivalent to (by FOIL): \(\frac{\partial\rho}{\partial t}+\nabla\cdot\left(\rho\vec{v}\right)=\frac{\partial\rho}{\partial t}+\vec{v}\cdot\nabla\rho+\rho\nabla\cdot\vec{v}\) and using the material derivative’s definition: \(\frac{D\rho}{Dt}\equiv\frac{\partial\rho}{\partial t}+\vec{v}\cdot\nabla\rho\) in the above equation, we get:
and assuming incompressible: \(\frac{D\rho}{Dt}=0\), it is apparent that:
which is the continuity equation.