Figure 4 Mass in and out of the box of the fluid [5]
Now let \("\rho u"\) is the mass flow rate per unit area at the center of the element, then with help of forward finite difference scheme along the x – direction
Forward FDM along the right surface
\(\frac{\partial\rho u}{\partial x}=\frac{\left.\ \text{ρu}\right\rceil_{x+\delta x}-\left.\ \text{ρu}\right\rceil_{\text{center}}}{\delta x/2}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\)
\(\left.\ \text{ρu}\right\rceil_{x+\delta x}=\left.\ \text{ρu}\right\rceil_{\text{center}}+\frac{\partial\rho u}{\partial x}\frac{\text{δx}}{2}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\)
Backward FDM along the left surface
\(\frac{\partial\rho u}{\partial x}=\frac{\left.\ \text{ρu}\right\rceil_{\text{center}}-\left.\ \text{ρu}\right\rceil_{x-\delta x}}{\delta x/2}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\)
\(\left.\ \text{ρu}\right\rceil_{x-\delta x}=\left.\ \text{ρu}\right\rceil_{\text{center}}-\frac{\partial\rho u}{\partial x}\frac{\text{δx}}{2}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\)
Net rate of mass in x – direction =\(\left.\ (\rho u\right\rceil_{x+\delta x}-\left.\ \text{ρu}\right\rceil_{x-\delta x})\delta y\delta z\ \)
\(=\left\{\left.\ \text{ρu}\right\rceil_{\text{center}}+\frac{\partial\rho u}{\partial x}\frac{\text{δx}}{2}-\left(\left.\ \text{ρu}\right\rceil_{\text{center}}-\frac{\partial\rho u}{\partial x}\frac{\text{δx}}{2}\right)\right\}\text{δyδz}\)
\(=\left\{\left.\ \text{ρu}\right\rceil_{\text{center}}+\frac{\partial\rho u}{\partial x}\frac{\text{δx}}{2}-\left.\ \text{ρu}\right\rceil_{\text{center}}+\frac{\partial\rho u}{\partial x}\frac{\text{δx}}{2}\right\}\text{δyδz}\)
\(Net\ rate\ of\ mass\ in\ x\ \ direction=\frac{\partial\rho u}{\partial x}\text{δxδyδz\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ }\left(3.8\right)\)
Similarly at y – direction
\(\frac{\partial\rho v}{\partial y}=\frac{\left.\ \text{ρv}\right\rceil_{y+\delta y}-\left.\ \text{ρv}\right\rceil_{\text{center}}}{\delta y/2}\)Forward FDM along the right surface
\(\left.\ \text{ρv}\right\rceil_{y+\delta y}=\left.\ \text{ρv}\right\rceil_{\text{center}}+\frac{\partial\rho v}{\partial y}\frac{\text{δy}}{2}\)
\(\frac{\partial\rho v}{\partial y}=\frac{\left.\ \text{ρv}\right\rceil_{\text{center}}-\left.\ \text{ρv}\right\rceil_{y-\delta y}}{\delta y/2}\)Backward FDM along the left surface
\(\left.\ \text{ρv}\right\rceil_{y-\delta y}=\left.\ \text{ρv}\right\rceil_{\text{center}}-\frac{\partial\rho v}{\partial y}\frac{\text{δy}}{2}\)
Net rate of mass in x – direction =\(\left.\ (\rho v\right\rceil_{x+\delta x}-\left.\ \text{ρv}\right\rceil_{y-\delta y})\delta x\delta z\ \)
\(=\left\{\left.\ \text{ρv}\right\rceil_{\text{center}}+\frac{\partial\rho v}{\partial y}\frac{\text{δy}}{2}-\left(\left.\ \text{ρv}\right\rceil_{\text{center}}-\frac{\partial\rho v}{\partial y}\frac{\text{δy}}{2}\right)\right\}\text{δxδz}\)
\(=\left\{\left.\ \text{ρv}\right\rceil_{\text{center}}+\frac{\partial\rho v}{\partial y}\frac{\text{δy}}{2}-\left.\ \text{ρv}\right\rceil_{\text{center}}+\frac{\partial\rho v}{\partial y}\frac{\text{δy}}{2}\right\}\text{δxδz}\)
\(Net\ rate\ of\ mass\ in\ y\ \ direction=\frac{\partial\rho v}{\partial y}\text{δxδyδz\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ }\left(3.9\right)\)
Similarly at z – direction
\(\frac{\partial\rho w}{\partial z}=\frac{\left.\ \text{ρw}\right\rceil_{z+\delta z}-\left.\ \text{ρw}\right\rceil_{\text{center}}}{\delta z/2}\)Forward FDM along the right surface
\(\left.\ \text{ρw}\right\rceil_{z+\delta z}=\left.\ \text{ρw}\right\rceil_{\text{center}}+\frac{\partial\rho w}{\partial z}\frac{\text{δz}}{2}\)
\(\frac{\partial\rho z}{\partial z}=\frac{\left.\ \text{ρw}\right\rceil_{\text{center}}-\left.\ \text{ρw}\right\rceil_{z-\delta z}}{\delta z/2}\)Backward FDM along the left surface
\(\left.\ \text{ρw}\right\rceil_{z-\delta z}=\left.\ \text{ρw}\right\rceil_{\text{center}}-\frac{\partial\rho w}{\partial z}\frac{\text{δz}}{2}\)
Net rate of mass in z – direction =\(\left.\ (\rho w\right\rceil_{z+\delta z}-\left.\ \text{ρw}\right\rceil_{z-\delta z})\delta x\delta y\ \)
\(=\left\{\left.\ \text{ρw}\right\rceil_{c\text{enter}}+\frac{\partial\rho w}{\partial z}\frac{\text{δz}}{2}-\left(\left.\ \text{ρw}\right\rceil_{\text{center}}-\frac{\partial\rho w}{\partial z}\frac{\text{δz}}{2}\right)\right\}\text{δxδy}\)
\(=\left\{\left.\ \text{ρw}\right\rceil_{\text{center}}+\frac{\partial\rho w}{\partial z}\frac{\text{δz}}{2}-\left.\ \text{ρw}\right\rceil_{\text{center}}+\frac{\partial\rho w}{\partial z}\frac{\text{δz}}{2}\right\}\text{δxδy}\)
\(Net\ rate\ of\ mass\ in\ z\ \ direction=\frac{\partial\rho w}{\partial z}\text{δxδyδz\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ }\text{\ \ \ }\left(3.10\right)\)
Thus;
Net flow rate of mass flow rate\(\ =\left[\frac{\partial\rho u}{\partial x}+\frac{\partial\rho v}{\partial y}+\frac{\partial\rho w}{\partial z}\right]\text{δxδyδz}\)
\(\frac{\partial\rho}{\partial t}\text{δxδyδz}+\left[\frac{\partial\rho u}{\partial x}+\frac{\partial\rho v}{\partial y}+\frac{\partial\rho w}{\partial z}\right]\delta x\delta y\delta z=0\)
\(\frac{\partial\rho}{\partial t}+\frac{\partial\rho u}{\partial x}+\frac{\partial\rho v}{\partial y}+\frac{\partial\rho w}{\partial z}=0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ }\ \left(3.11\right)\)
The above equation represents the continuity equation which is one of the fundamental equations of fluid mechanics. It is valid for transient, compressible or incompressible fluid flow. It can be written in vector form as follow;
\(\frac{\partial\rho}{\partial t}+\mathbf{\nabla}\bullet\rho\mathbf{V=}0\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ \ \ }\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\text{\ \ }\ \left(3.12\right)\)
Two special cases that the researchers interested on them due to wide range of their applications in engineering and industry like solar collectors, internal pipe flow, nanofluid enclosure along with natural convection which they are;
  1. For steady, compressible fluid flow whick makes the density as a function of space only;\(\mathbf{\nabla}\bullet\rho\mathbf{V}=0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(3.13\right)\)
  2. For incompressible flow;\(\mathbf{\nabla}\bullet\mathbf{V}=0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(3.14\right)\)\(\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}+\frac{\partial w}{\partial z}=0\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(3.15\right)\)
  3. Momentum Equation
Before derivatives the momentum and energy equations, it is very important to full – understanding the following concept which is called Material Derivative.
Physically, any property is a function of space and time. The space is represented by the coordinates (x, y, z) and time which is denoted as t. so that we can write the total or substantive or material derivative which is denoted as \(\varnothing\) as indicated below;
\(\frac{D\varnothing}{\text{Dt}}=\frac{\partial\varnothing}{\partial t}+\frac{\partial\varnothing}{\partial x}\frac{\text{dx}}{\text{dt}}+\frac{\partial\varnothing}{\partial y}\frac{\text{dy}}{\text{dt}}+\frac{\partial\varnothing}{\partial z}\frac{\text{dz}}{\text{dt}}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\left(3.16\right)\)
\(\frac{\text{dx}}{\text{dt}}=u,\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \frac{\text{dy}}{\text{dt}}=v,\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\frac{\text{dz}}{\text{dt}}=w\ \ \ \ \ \ \)
\(\frac{D\varnothing}{\text{Dt}}=\frac{\partial\varnothing}{\partial t}+u\frac{\partial\varnothing}{\partial x}+v\frac{\partial\varnothing}{\partial y}+w\frac{\partial\varnothing}{\partial z}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\left(3.17\right)\)
So that the acceleration can be written as below;
\(a=\frac{D\mathbf{V}}{\text{Dt}}=\frac{\partial\mathbf{V}}{\partial t}+u\frac{\partial\mathbf{V}}{\partial x}+v\frac{\partial\mathbf{V}}{\partial y}+w\frac{\partial\mathbf{V}}{\partial z}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\left(3.18\right)\)
A shorthand notation for the material derivatives operator is;
\(\frac{D\mathbf{\varnothing}}{\text{Dt}}=\frac{\partial\mathbf{\varnothing}}{\partial t}+\left(\mathbf{V\bullet}\mathbf{\nabla}\right)\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\left(3.19\right)\)
Where the \(\mathbf{V}\) is the velocity vector and it is given by\(\mathbf{=}\mathbf{u}\hat{\mathbf{\text{\ i\ }}}\mathbf{+v}\hat{\mathbf{\text{\ j\ }}}\mathbf{+w}\hat{\mathbf{\text{\ k}}}\), the velocity gradient is denoted as\(\mathbf{\ \nabla}\) and it is given by\(\mathbf{\nabla}\mathbf{\varnothing=}\frac{\mathbf{\partial\varnothing}}{\mathbf{\partial x}}\hat{\mathbf{\text{\ i\ }}}\mathbf{+}\frac{\mathbf{\partial\varnothing}}{\mathbf{\partial y}}\hat{\mathbf{\text{\ j\ }}}\mathbf{+}\frac{\mathbf{\partial\varnothing}}{\mathbf{\partial z}}\hat{\mathbf{\text{\ k}}}\)
As an example; acceleration – components will be;
\(a_{x}=\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\left(3.19a\right)\)
\(a_{y}=\frac{\partial v}{\partial t}+u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}+w\frac{\partial v}{\partial z}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\left(3.19b\right)\)
\(a_{z}=\frac{\partial w}{\partial t}+u\frac{\partial w}{\partial x}+v\frac{\partial w}{\partial y}+w\frac{\partial w}{\partial z}\text{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }\left(3.19c\right)\)
Newton’s law physically states that ”the rate of change of momentum of a fluid particle equals to the sum of forces on the particle”. Mathematically, it could be written as inserted below
\(\sum F=m\ a\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \left(3.20\right)\)
There are two major forces acting on fluid particle;
Surface forces
Body forces
It is commonly on CFD problems related to heat transfer and fluid mechanics to include two forces which is a surface force as a separated force and the body force as a source term.
Now let us analysis the surface forces or stresses which contains normal stress and shear stress. The shear stress is nothing but the force magnitude divided by the area. The stress opposite in the direction to the proposed direction as shown in Figure 5.