# Law of Conservation of Mass and Continuity Equation

by Dasa . 25 Aug 2023

Consider a fluid volume with dimensions $\partial x$, $\partial y$, and $\partial z$ ; its center is at (x, y, z).

The mass flow rate(kg/s) across a face can be given as the product of density(kg/m3), velocity(m/s), and area (m2).
So, the mass flow rate of a fluid having a density of ρ and velocity of u entering the element through the face ‘yz’ along the direction of x is given by.

\begin{aligned} \rho * u * \partial y \partial z \end{aligned}

The center is located at $\frac{1}{2} \partial x$ or $\frac{1}{2} \partial y$ or $\frac{1}{2} \partial z$ from any face of the element.

Taylor Series state that the change is $f(c)$ at a distance of $x$ from $c$ is equal to

\begin{aligned} = f(c)+f^{\prime}(c).x \end{aligned}

Similarly, we can write the change in ρu at a distance of $\frac{1}{2} \partial x$ from the center of the element can be written as

$\frac{1}{2} \partial x$ distance upstream face from the center

\begin{aligned} = f(\rho u) + f^{\prime}(\rho u) . \frac{1}{2} \partial x \\ = f(\rho u) + \frac{\partial (\rho u)}{\partial x} . \frac{1}{2} \partial x \end{aligned}

$\frac{1}{2} \partial x$ distance downstream face from the center

\begin{aligned} = f(\rho u) - f^{\prime}(\rho u) . \frac{1}{2} \partial x \\ = f(\rho u) - \frac{\partial (\rho u)}{\partial x} . \frac{1}{2} \partial x \end{aligned}

The rate of increase in mass flow rate in a given time $\partial t$ at the center of the element

=

The net change in mass flow rate

=

(The mass flow rate entering the element) – (The mass flow rate leaving the element)

=

$\frac{\partial \rho}{\partial t} \partial x \partial y \partial z$

$\frac{\partial \rho}{\partial t} \partial x \partial y \partial z =$
$(\rho u - \frac{\partial (\rho u)}{\partial x} . \frac{1}{2} \partial x) \partial y \partial z - (\rho u + \frac{\partial (\rho u)}{\partial x} . \frac{1}{2} \partial x) \partial y \partial z$
$+ (\rho v - \frac{\partial (\rho v)}{\partial y} . \frac{1}{2} \partial y) \partial x \partial z - (\rho v + \frac{\partial (\rho v)}{\partial y} . \frac{1}{2} \partial y) \partial x \partial z$
$+ (\rho w - \frac{\partial (\rho w)}{\partial z} . \frac{1}{2} \partial z) \partial x \partial y - (\rho w + \frac{\partial (\rho w)}{\partial z} . \frac{1}{2} \partial z) \partial x \partial y$

$=(- \frac{\partial (\rho u)}{\partial x} . \frac{1}{2} \partial x) \partial y \partial z - (\frac{\partial (\rho u)}{\partial x} . \frac{1}{2} \partial x) \partial y \partial z$
$+ (- \frac{\partial (\rho v)}{\partial y} . \frac{1}{2} \partial y) \partial x \partial z - (\frac{\partial (\rho v)}{\partial y} . \frac{1}{2} \partial y) \partial x \partial z$
$+ (- \frac{\partial (\rho w)}{\partial z} . \frac{1}{2} \partial z) \partial x \partial y - (\frac{\partial (\rho w)}{\partial z} . \frac{1}{2} \partial z) \partial x \partial y$

$=(- \frac{\partial (\rho u)}{\partial x} \partial x) \partial y \partial z$
$+ (- \frac{\partial (\rho v)}{\partial y} \partial y) \partial x \partial z$
$+ (- \frac{\partial (\rho w)}{\partial z} \partial z) \partial x \partial y$

We can write the above equation as below

$\frac{\partial \rho}{\partial t} \partial x \partial y \partial z = - \frac{\partial (\rho u)}{\partial x} \partial x \partial y \partial z - \frac{\partial (\rho v)}{\partial y} \partial x \partial y \partial z - \frac{\partial (\rho w)}{\partial z} \partial x \partial y \partial z$

$\frac{\partial \rho}{\partial t} = - \frac{\partial (\rho u)}{\partial x} - \frac{\partial (\rho v)}{\partial y} - \frac{\partial (\rho w)}{\partial z}$

$\frac{\partial \rho}{\partial t} + \frac{\partial (\rho u)}{\partial x} + \frac{\partial (\rho v)}{\partial y} + \frac{\partial (\rho w)}{\partial z} = 0$

Using the divergence rule

$\frac{\partial \rho}{\partial t} + div(\rho U) = 0$

The above equation is an unsteady, three-dimensional mass conservation or continuity equation at a point in a compressible fluid.

The first term is “the rate of change in density with respect to time.”

The second term is “the net flow of mass out of the element across its boundaries,” known as the “convective term.”

For incompressible fluid the change in density is zero or it is constant.

$div(U) = 0$

Don't be in delusion, understand the reality from historical data | Copyright © 2020 theDataTalks