# 8.2.1 Mass Conservation Examples

- Page ID
- 741

Example 8.1: Mass Conservation

A layer of liquid has an initial height of \(H_0\) with an uniform temperature of \(T_0\). At time, \(t_0\), the upper surface is exposed to temperature \(T_1\) (see Figure 8.3) Assume that

*Fig. 8.3 Mass flow due to temperature difference for example*

the actual temperature is exponentially approaches to a linear temperature profile as depicted in Figure 8.3. The density is a function of the temperature according to

\[ \label{massT:Trho} \dfrac{T-T_0}{T_1-T_0} = \alpha\, \left( \dfrac{\rho-\rho_0}{\rho_1-\rho_0} \right) \tag{19} \]

where \(\rho_1\) is the density at the surface and where \(\rho_0\) is the density at the bottom. Assume that the velocity is only a function of the \(y\) coordinate. Calculates the velocity of the liquid. Assume that the velocity at the lower boundary is zero at all times. Neglect the mutual dependency of the temperature and the height.

Solution 8.1

The situation is unsteady state thus the unsteady state and one dimensional continuity equation has to be used which is

\[ \label{massT:gov} \dfrac{\partial \rho}{\partial t} + \dfrac{\partial \left(\rho U_y\right)}{\partial y } = 0 \tag{20} \]

with the boundary condition of zero velocity at the lower surface \(U_y(y=0)=0\). The expression that connects the temperature with the space for the final temperature as

\[ \label{massT:connectT:Ty} \dfrac{T-T_0}{T_1-T_0} = \alpha \, \dfrac{H_0-y}{H_0} \tag{21} \]

The exponential decay is \(\left(1-e^{-\beta\,t}\right)\) and thus the combination (with Equation (19)) is

\[ \label{massT:connectY:Ts} \dfrac{\rho- \rho_0}{\rho_1-\rho_0} = \alpha\, \dfrac{H_0-y}{H_0} \left( 1 - e^{-\beta\,t} \right) \tag{22} \]

Equation (22) relates the temperature with the time and the location was given in the question (it is not the solution of any model). It can be noticed that the height \(H_0\) is a function of time. For this question, it is treated as a constant. Substituting the density, \(\rho\), as a function of time into the governing equation (20) results in

\[ \label{massT:rhoGov1} \overbrace{\alpha\,\beta\,\left(\dfrac{ H_0 - y}{H_0}\right) e^{-\beta\,t}}^{\dfrac{\partial \rho}{\partial t}} + \overbrace{\dfrac{\partial \left( U_y\, \alpha\, \dfrac{H_0-y}{H_0} \left( 1 - e^{-\beta\,t} \right) \right) }{\partial y}} ^{\dfrac{\partial\rho\, U_y}{\partial y}} = 0 \tag{23} \]

Equation (23) is first order ODE with the boundary condition \(U_y(y=0)=0\) which can be arranged as

\[ \label{massT:rhoGov} {\dfrac{\partial \left( U_y\, \alpha\, \dfrac{H_0-y}{H_0} \left( 1 - e^{-\beta\,t} \right) \right) }{\partial y}} = - {\alpha\,\beta\,\left(\dfrac{ H_0 - y}{H_0}\right) e^{-\beta\,t}} \tag{24} \]

\(U_y\) is a function of the time but not \(y\). Equation (24) holds for any time and thus, it can be treated for the solution of equation (24) as a constant. Hence, the integration with respect to \(y\) yields

\[ \label{massT:rhoSol3} \left( U_y\, \alpha\, \dfrac{H_0-y}{H_0} \left( 1 - e^{-\beta\,t} \right) \right) = - {\alpha\,\beta\,\left(\dfrac{ 2\,H_0 - y}{2\,H_0}\right) e^{-\beta\,t}} y + c \tag{25} \]

Utilizing the boundary condition \(U_y(y=0)=0\) yields

\[ \label{massT:rhoSol2} \left( U_y\, \alpha\, \dfrac{H_0-y}{H_0} \left( 1 - e^{-\beta\,t} \right) \right) = - {\alpha\,\beta\,\left(\dfrac{2\, H_0 - y}{2\,H_0}\right) e^{-\beta\,t}} \left( y - 1 \right) \tag{26} \]

or the velocity is

\[ \label{massT:rhoSol1} U_y = {\beta\,\left(\dfrac{2\, H_0 - y}{2\,\left(H_0-y\right)}\right) \dfrac{e^{-\beta\,t}} { \left( 1 - e^{-\beta\,t} \right)} } \left( 1 - y \right) \tag{27} \]

It can be noticed that indeed the velocity is a function of the time and space \(y\).

## Simplified Continuity Equation

A simplified equation can be obtained for a steady state in which the transient term is eliminated as (in a vector form)

\[ \label{dif:eq:massSS} \boldsymbol{\nabla} \cdot \left( \rho \,\pmb{U}\right) = 0 \tag{28} \]

If the fluid is incompressible then the governing equation is a volume conservation as

\[ \label{dif:eq:massSSRho} \boldsymbol{\nabla} \cdot \pmb{U} = 0 \tag{29} \]

Note that this equation appropriate only for a single phase case.

Example 8.2

In many coating processes a thin film is created by a continuous process in which liquid injected into a moving belt which carries the material out as

*Fig. 8.4 Mass flow in coating process for example.*

Solution 8.2

Example 8.3

Solution 8.3

\[ \label{massFxy:Rhocomply} 2\,a\, x + \dfrac{\partial U_y }{\partial y} = 0 \tag{39}\] Equation (39) is an ODE with constant coefficients. It can be noted that \(x\) should be treated as a constant parameter for the \(y\) coordinate integration.

Thus,

\[ \label{massFxy:U_y} U_y = - \int 2\,a\, x + f(x) = -2\,x\,y + f(x) \tag{40}\]

The integration constant in this case is not really a constant but rather an arbitrary function of \(x\). Notice the symmetry of the situation. The velocity, \(U_x\) has also arbitrary function in the \(y\) component. For the second part equation (28) is applicable and used as

\[ \label{massFxy:Govfull}

\dfrac{\partial\, \left( a\,x^2 + b\,y^2 \right) \left( m\,e^{x+y}\right) }{\partial x} +

\dfrac{\partial\,U_y\, \left( m\,e^{x+y}\right) }{\partial y} = 0 \tag{41}

\] Taking the derivative of the first term while moving the second part to the other side results in

\[

\label{massFxy:GovExplnation1}

a\,\left( 2\,x+ x^2 + \dfrac{b}{a\dfrac{}{}}\,y^2 \right) \,e^{x+y} = -

\left( e^{x+y} \right)\, \left( \dfrac{\partial\,U_y\, }{\partial y \dfrac{}{}} + U_y \right) \tag{42}

\] The exponent can be canceled to further simplify the equation (42) and switching sides to be

\label{massFxy:GovExplnation}

\left( \dfrac{\partial\,U_y\, }{\partial y\dfrac{}{}} + U_y \right)

= - a\,\left( 2\,x+ x^2 + \dfrac{b}{a\dfrac{}{}}\,y^2 \right) \tag{43}

\] Equation (43) is a first order ODE that can be solved by combination of the homogeneous solution with the private solution (see for an explanation in the Appendix). The homogeneous equation is

\[

\label{massFxy:GovHomogeneous}

\dfrac{\partial\,U_y\, }{\partial y} + U_y = 0 \tag{44}

\] The solution for (44) is \(U_y= c\,e^{-y}\) (see for an explanation in the appendix). The private solution is

\[

\label{massFxy:GovPrivate}

\left.U_y\right|_{private} = \left( -b\,\left( {y}^{2}-2\,y+2\right) -a\,{x}^{2}-2\,a\,x\right) \tag{45}

\] The total solution is

\[ \label{massFxy:GovF} U_y = c\,e^{-y} + \left( -b\,\left( {y}^{2}-2\,y+2\right) -a\,{x}^{2}-2\,a\,x\right) \tag{46} \]

Example 8.4

\[

\label{canUbe:Uxyx}

\begin{array}{lcccr}

U_x = \left(x\,t\right) ^2 \, z &&

U_y = \left(x\,t\right) + \left( y\,t\right) + \left( z\,t\right) &&

U_z = \left(x\,t\right) + \left( y\,t\right) + \left( z\,t\right)

\end{array} \tag{47}

\] in the flow field. Is the flow is incompressible? Is the flow in a steady state condition?

Solution 8.4

Whether the solution is in a steady state or not can be observed from whether the velocity contains time component. Thus, this flow field is not steady state since it contains time component. This continuity equation is checked if the flow incompressible (constant density). The derivative of each component are

\[

\label{canUbe:parUxParX}

\begin{array}{lcccr}

\dfrac{\partial U_x}{\partial x} = t^2\,z &&

\dfrac{\partial U_y}{\partial y} = t &&

\dfrac{\partial U_z}{\partial z} = t

\end{array} \tag{48}

\] Hence the gradient or the combination of these derivatives is

\[

\label{canUbe:divergence}

\nabla \pmb{U} = t^2\,z + 2\,t \tag{49}

\] The divergence isn't zero thus this flow, if it exist, must be compressible flow. This flow can exist only for a limit time since over time the divergence is unbounded (a source must exist).

Example 8.5

Find the density as a function of the time for a given one dimensional flow with \(U_x = x \,e^{5\,\alpha\,y} \,\left( \cos\left(\alpha\,t \right) \right)\). The initial density is \(\rho(t=0)= \rho_0\).

Solution 8.5

\[

\label{massWhatRho:gov}

\dfrac{\partial \rho}{\partial t} + \dfrac{\partial \left(U_x\, \rho\right) }{\partial x} = 0 \tag{50}

\] Mathematically speaking, this kind of presentation is possible. However physically there are velocity components in \(y\) and \(z\) directions. In this problem, these physical components are ignored for academic reasons. Equation (50) is first order partial differential equation which can be converted to an ordinary differential equations when the velocity component, \(U_x\), is substituted. Using,

\[

\label{massWhatRho:Ux}

\dfrac{\partial U_x}{\partial x} = e^{5\,\alpha\,y} \,\left( \cos\left(\alpha\,t \right) \right) \tag{51}

\] Substituting equation (51) into equation and noticing that the density, \(\rho\), is a function of \(x\) results of

\[

\label{massWhatRho:dRho}

\dfrac{\partial \rho}{\partial t} = - \rho\, x \,e^{5\,\alpha\,y} \,\left( \cos\left(\alpha\,t \right) \right)

- \dfrac{\partial \rho} {\partial x} \, e^{5\,\alpha\,y} \,\left( \cos\left(\alpha\,t \right) \right) \tag{52}

\] Equation (52) can be separated to yield

\[

\label{massWhatRho:RhoofY}

\overbrace{\dfrac{1}{\cos\left(\alpha\,t \right) } \dfrac{\partial \rho}{\partial t}}

^{f(t)} =

\overbrace{- \rho\, x \,e^{5\,\alpha\,y} - \dfrac{\partial \rho} {\partial x} \, e^{5\,\alpha\,y}}

^{f(y)} \tag{53}

\] A possible solution is when the left and the right hand sides are equal to a constant. In that case the left hand side is

\[ \label{massWhatRho:UxEgovtmp} \rho\, x \,e^{5\,\alpha\,y} + \dfrac{\partial \rho} {\partial x} \, e^{5\,\alpha\,y} = c_1 \tag{56}\] The term \(\,e^{5\,\alpha\,y}\) is always positive, real value, and independent of \(y\) thus equation (56) becomes

\[ \label{massWhatRho:UxEgov} \rho\, x + \dfrac{\partial \rho} {\partial x} = \dfrac{c_1}{e^{5\,\alpha\,y}} = c_3 \tag{57}\] Equation (57) is a constant coefficients first order ODE which its solution discussed extensively in the appendix. The solution of (57) is given by

\[

\label{massWhatRho:UxEsolG}

\rho =e^{-\dfrac{x^2}{2}}\,

\left(

c - \overbrace{\dfrac{\sqrt{\pi}\,i\,c_3\,erf\left( \dfrac{i\,x}{\sqrt{2}} \right) } {\sqrt{2}}}

^{\text{impossible solution}}

\right) \tag{58}

\] which indicates that the solution is a complex number thus the constant, \(c_3\), must be zero and thus the constant, \(c_1\) vanishes as well and the solution contain only the homogeneous part and the private solution is dropped

\[ \label{massWhatRho:UxEsol} \rho = c_2\, {e}^{-\dfrac{x^2}{2}} \tag{59}\]

The solution is the multiplication of equation (59) by transferred to

\[ \label{massWhatRho:RhoTotalSol} \rho = c_2\, {e}^{-\dfrac{x^2}{2}} \left( \dfrac{c_1\,sin\left( \alpha\,t\right) }{\alpha}+c_2 \right) \tag{60} \]

Where the constant, \(c_2\), is an arbitrary function of the \(y\) coordinate.

## Contributors

Dr. Genick Bar-Meir. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or later or Potto license.