Difference between revisions of "Kharon theory manual"

From Kraken Wiki
Jump to: navigation, search
Line 9: Line 9:
  
 
<equation id="eqn:MassConservation">
 
<equation id="eqn:MassConservation">
{{NumBlk|:|<math>\nabla\cdot(\varepsilon \alpha_q \rho_q u_q) = \gamma_{pq} + s_{\text{mass},q}</math>|<xr id="eqn:MassConservation" nolink />}}
+
{{NumBlk|:|<math>\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q\right) = \gamma_{pq} + s_{\text{mass},q}</math>|<xr id="eqn:MassConservation" nolink />}}
 
</equation>
 
</equation>
  
Line 15: Line 15:
  
 
<equation id="eqn:MassConservation2">
 
<equation id="eqn:MassConservation2">
{{NumBlk|:|<math>\Leftrightarrow \iiint\limits_V [\nabla\cdot(\varepsilon \alpha_q \rho_q u_q)]\, dV = \iiint\limits_V (\gamma_{pq} + s_{\text{mass},q})\, dV</math>|<xr id="eqn:MassConservation2" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow \iiint\limits_V \left[\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q\right)\right]\, dV = \iiint\limits_V \left(\gamma_{pq} + s_{\text{mass},q}\right)\, dV</math>|<xr id="eqn:MassConservation2" nolink />}}
 
</equation>
 
</equation>
  
Line 21: Line 21:
  
 
<equation id="eqn:MassConservation3">
 
<equation id="eqn:MassConservation3">
{{NumBlk|:|<math>\Leftrightarrow \iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset [(\varepsilon \alpha_q \rho_q u_q)\cdot n]\, dA = \iiint\limits_V (\gamma_{pq} + s_{\text{mass},q})\, dV</math>|<xr id="eqn:MassConservation3" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow \iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q\right)\cdot n\right]\, dA = \iiint\limits_V \left(\gamma_{pq} + s_{\text{mass},q}\right)\, dV</math>|<xr id="eqn:MassConservation3" nolink />}}
 
</equation>
 
</equation>
  
Line 27: Line 27:
  
 
<equation id="eqn:DiscretizedMassConservation">
 
<equation id="eqn:DiscretizedMassConservation">
{{NumBlk|:|<math>\Leftrightarrow (\varepsilon \alpha_q \rho_q u_q A)_\text{e} - (\varepsilon \alpha_q \rho_q u_q A)_\text{w} = F_{\text{e},q} - F_{\text{w},q} = \Gamma_{pq} + S_{\text{mass},q}</math>|<xr id="eqn:DiscretizedMassConservation" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow \left(\varepsilon \alpha_q \rho_q u_q A\right)_\text{e} - \left(\varepsilon \alpha_q \rho_q u_q A\right)_\text{w} = F_{\text{e},q} - F_{\text{w},q} = \Gamma_{pq} + S_{\text{mass},q}</math>|<xr id="eqn:DiscretizedMassConservation" nolink />}}
 
</equation>
 
</equation>
  
Line 90: Line 90:
  
 
<equation id="eqn:MomentumConservation">
 
<equation id="eqn:MomentumConservation">
{{NumBlk|:|<math>\nabla\cdot(\varepsilon \alpha_q \rho_q u_q u_q) = \nabla\cdot(\varepsilon \alpha_q \mu_{\text{eff},q} \nabla u_q)</math>|<xr id="eqn:MomentumConservation" nolink />}}
+
{{NumBlk|:|<math>\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q u_q\right) = \nabla\cdot\left(\varepsilon \alpha_q \mu_{\text{eff},q} \nabla u_q\right)</math>|<xr id="eqn:MomentumConservation" nolink />}}
::::<math>+ [\text{max}(\gamma_{pq},0)u_p - \text{max}(-\gamma_{pq},0)u_q] - \varepsilon \alpha_q \nabla p + \varepsilon \alpha_q \rho_q g</math>
+
::::<math>+ \left[\text{max}\left(\gamma_{pq},0\right)u_p - \text{max}\left(-\gamma_{pq},0\right)u_q\right] - \varepsilon \alpha_q \nabla p + \varepsilon \alpha_q \rho_q g</math>
::::<math>- \frac{1}{2} \varepsilon^3 \alpha_q \rho_q C \left| u_q \right| u_q - k(u_q - u_p) + s_{\text{mom},q}</math>
+
::::<math>- \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C \left| u_q \right| u_q - k\left(u_q - u_p\right) + s_{\text{mom},q}</math>
 
</equation>
 
</equation>
  
Line 99: Line 99:
  
 
<equation id="eqn:MomentumConservation2">
 
<equation id="eqn:MomentumConservation2">
{{NumBlk|:|<math>\Leftrightarrow \iiint\limits_V [\nabla\cdot(\varepsilon \alpha_q \rho_q u_q u_q) - \nabla\cdot(\varepsilon \alpha_q \mu_{\text{eff},q} \nabla u_q)]\, dV = \iiint\limits_V [\text{max}(\gamma_{pq},0)u_p - \text{max}(-\gamma_{pq},0)u_q]\, dV</math>|<xr id="eqn:MomentumConservation2" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow \iiint\limits_V \left[\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \mu_{\text{eff},q} \nabla u_q\right)\right]\, dV = \iiint\limits_V \left[\text{max}\left(\gamma_{pq},0\right)u_p - \text{max}\left(-\gamma_{pq},0\right)u_q\right]\, dV</math>|<xr id="eqn:MomentumConservation2" nolink />}}
::::<math> + \iiint\limits_V (-\varepsilon \alpha_q \nabla p + \varepsilon \alpha_q \rho_q g - \frac{1}{2} \varepsilon^3 \alpha_q \rho_q C \left| u_q \right| u_q - k(u_q - u_p) + s_{\text{mom},q})\, dV </math>
+
::::<math> + \iiint\limits_V \left(-\varepsilon \alpha_q \nabla p + \varepsilon \alpha_q \rho_q g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C \left| u_q \right| u_q - k\left(u_q - u_p\right) + s_{\text{mom},q}\right)\, dV </math>
 
</equation>
 
</equation>
  
Line 106: Line 106:
  
 
<equation id="eqn:MomentumConservation3">
 
<equation id="eqn:MomentumConservation3">
{{NumBlk|:|<math>\Leftrightarrow \iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset [(\varepsilon \alpha_q \rho_q u_q u_q)\cdot n - (\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x})\cdot n]\, dA = [\text{max}(\Gamma_{pq},0)u_p - \text{max}(-\Gamma_{pq},0)u_q]</math>|<xr id="eqn:MomentumConservation3" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow \iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA = \left[\text{max}\left(\Gamma_{pq},0\right)u_p - \text{max}\left(-\Gamma_{pq},0\right)u_q\right]</math>|<xr id="eqn:MomentumConservation3" nolink />}}
::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \frac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K(u_q - u_p) + S_{\text{mom},q} </math>
+
::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q} </math>
 
</equation>
 
</equation>
  
Line 113: Line 113:
  
 
<equation id="eqn:MomentumConservation4">
 
<equation id="eqn:MomentumConservation4">
{{NumBlk|:|<math>\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset [(\varepsilon \alpha_q \rho_q u_q u_q)\cdot n - (\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x})\cdot n]\, dA</math>|<xr id="eqn:MomentumConservation4" nolink />}}
+
{{NumBlk|:|<math>\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA</math>|<xr id="eqn:MomentumConservation4" nolink />}}
::::<math> = (\varepsilon \alpha_q \rho_q u_q u_q A)_{\text{e}} - (\varepsilon \alpha_q \rho_q u_q u_q A)_{\text{w}} - (\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x} A)_{\text{e}} + (\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x} A)_{\text{w}} </math>
+
::::<math> = \left(\varepsilon \alpha_q \rho_q u_q u_q A\right)_{\text{e}} - \left(\varepsilon \alpha_q \rho_q u_q u_q A\right)_{\text{w}} - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x} A\right)_{\text{e}} + \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x} A\right)_{\text{w}} </math>
::::<math> = F_{\text{e},q} u_{\text{e},q} + F_{\text{w},q} u_{\text{w},q} - (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{e}} (u_{\text{e},q} - u_{\text{P},q}) + (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{w}} (u_{\text{P},q} - u_{\text{w},q}) </math>
+
::::<math> = F_{\text{e},q} u_{\text{e},q} + F_{\text{w},q} u_{\text{w},q} - \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}} \left(u_{\text{e},q} - u_{\text{P},q}\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}} \left(u_{\text{P},q} - u_{\text{w},q}\right) </math>
 
</equation>
 
</equation>
  
Line 122: Line 122:
  
 
<equation id="eqn:UpwindMomentumFlux1">
 
<equation id="eqn:UpwindMomentumFlux1">
{{NumBlk|:|<math>F_{\text{e},q} u_{\text{e},q} = \text{max}(F_{\text{e},q},0)u_{\text{P},q} - \text{max}(-F_{\text{e},q},0)u_{\text{E},q}</math>|<xr id="eqn:UpwindMomentumFlux1" nolink />}}
+
{{NumBlk|:|<math>F_{\text{e},q} u_{\text{e},q} = \text{max}\left(F_{\text{e},q},0\right)u_{\text{P},q} - \text{max}\left(-F_{\text{e},q},0\right)u_{\text{E},q}</math>|<xr id="eqn:UpwindMomentumFlux1" nolink />}}
 
</equation>
 
</equation>
 
<equation id="eqn:UpwindMomentumFlux2">
 
<equation id="eqn:UpwindMomentumFlux2">
{{NumBlk|:|<math>F_{\text{w},q} u_{\text{w},q} = \text{max}(F_{\text{w},q},0)u_{\text{W},q} - \text{max}(-F_{\text{w},q},0)u_{\text{P},q}</math>|<xr id="eqn:UpwindMomentumFlux2" nolink />}}
+
{{NumBlk|:|<math>F_{\text{w},q} u_{\text{w},q} = \text{max}\left(F_{\text{w},q},0\right)u_{\text{W},q} - \text{max}\left(-F_{\text{w},q},0\right)u_{\text{P},q}</math>|<xr id="eqn:UpwindMomentumFlux2" nolink />}}
 
</equation>
 
</equation>
  
Line 131: Line 131:
  
 
<equation id="eqn:MomentumConservation5">
 
<equation id="eqn:MomentumConservation5">
{{NumBlk|:|<math>\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset [(\varepsilon \alpha_q \rho_q u_q u_q)\cdot n - (\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x})\cdot n]\, dA</math>|<xr id="eqn:MomentumConservation5" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA</math>|<xr id="eqn:MomentumConservation5" nolink />}}
::::<math> =[\text{max}(F_{\text{e},q},0) + \text{max}(-F_{\text{w},q},0) + (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{e}} + (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{w}}]u_{\text{P},q} </math>
+
::::<math> =\left[\text{max}\left(F_{\text{e},q},0\right) + \text{max}\left(-F_{\text{w},q},0\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}} + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}}\right]u_{\text{P},q} </math>
::::::::<math> -[\text{max}(-F_{\text{e},q},0) + (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{e}}]u_{\text{E},q} </math>
+
::::::::<math> -\left[\text{max}\left(-F_{\text{e},q},0\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}}\right]u_{\text{E},q} </math>
::::::::<math> -[\text{max}(F_{\text{w},q},0) + (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{w}}]u_{\text{W},q} </math>
+
::::::::<math> -\left[\text{max}\left(F_{\text{w},q},0\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}}\right]u_{\text{W},q} </math>
 
</equation>
 
</equation>
  
  
Denoting <math>(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{e}} = D_{\text{e},q}</math> and <math>(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{w}} = D_{\text{w},q}</math> and modifying the central coefficient slightly, since <math>\text{max}(F_{\text{e},q},0) = F_{\text{e},q} + \text{max}(-F_{\text{e},q},0)</math> and <math>\text{max}(-F_{\text{w},q},0) = -F_{\text{w},q} + \text{max}(F_{\text{w},q},0)</math>, <xr id="eqn:MomentumConservation5"/> reduces to
+
Denoting <math>\left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}} = D_{\text{e},q}</math> and <math>\left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}} = D_{\text{w},q}</math> and modifying the central coefficient slightly, since <math>\text{max}\left(F_{\text{e},q},0\right) = F_{\text{e},q} + \text{max}\left(-F_{\text{e},q},0\right)</math> and <math>\text{max}\left(-F_{\text{w},q},0\right) = -F_{\text{w},q} + \text{max}\left(F_{\text{w},q},0\right)</math>, <xr id="eqn:MomentumConservation5"/> reduces to
  
  
 
<equation id="eqn:MomentumConservation6">
 
<equation id="eqn:MomentumConservation6">
{{NumBlk|:|<math>\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset [(\varepsilon \alpha_q \rho_q u_q u_q)\cdot n - (\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x})\cdot n]\, dA</math>|<xr id="eqn:MomentumConservation6" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA</math>|<xr id="eqn:MomentumConservation6" nolink />}}
::::<math> = [\text{max}(-F_{\text{e},q},0) + D_{\text{e},q} + \text{max}(F_{\text{w},q},0) + D_{\text{w},q} + (F_{\text{e},q} - F_{\text{w},q})]u_{\text{P},q}</math>
+
::::<math> = \left[\text{max}\left(-F_{\text{e},q},0\right) + D_{\text{e},q} + \text{max}\left(F_{\text{w},q},0\right) + D_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q}</math>
::::::::<math>-[\text{max}(-F_{\text{e},q},0) + D_{\text{e},q}]u_{\text{E},q} - [\text{max}(F_{\text{w},q},0) + D_{\text{w},q}]u_{\text{W},q}</math>
+
::::::::<math>-\left[\text{max}\left(-F_{\text{e},q},0\right) + D_{\text{e},q}\right]u_{\text{E},q} - \left[\text{max}\left(F_{\text{w},q},0\right) + D_{\text{w},q}\right]u_{\text{W},q}</math>
 
</equation>
 
</equation>
  
Line 150: Line 150:
 
Identifying the coefficients of neighboring velocities
 
Identifying the coefficients of neighboring velocities
 
<equation id="eqn:MomentumNeighborCoefficient1">
 
<equation id="eqn:MomentumNeighborCoefficient1">
{{NumBlk|:|<math>a_{\text{e},q} = \text{max}(-F_{\text{e},q},0) + D_{\text{e},q}</math>|<xr id="eqn:MomentumNeighborCoefficient1" nolink />}}
+
{{NumBlk|:|<math>a_{\text{e},q} = \text{max}\left(-F_{\text{e},q},0\right) + D_{\text{e},q}</math>|<xr id="eqn:MomentumNeighborCoefficient1" nolink />}}
 
</equation>
 
</equation>
 
<equation id="eqn:MomentumNeighborCoefficient2">
 
<equation id="eqn:MomentumNeighborCoefficient2">
{{NumBlk|:|<math>a_{\text{w},q} = \text{max}(F_{\text{w},q},0) + D_{\text{w},q}</math>|<xr id="eqn:MomentumNeighborCoefficient2" nolink />}}
+
{{NumBlk|:|<math>a_{\text{w},q} = \text{max}\left(F_{\text{w},q},0\right) + D_{\text{w},q}</math>|<xr id="eqn:MomentumNeighborCoefficient2" nolink />}}
 
</equation>
 
</equation>
  
Line 159: Line 159:
  
 
<equation id="eqn:MomentumConservation7">
 
<equation id="eqn:MomentumConservation7">
{{NumBlk|:|<math>\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset [(\varepsilon \alpha_q \rho_q u_q u_q)\cdot n - (\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x})\cdot n]\, dA</math>|<xr id="eqn:MomentumConservation7" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA</math>|<xr id="eqn:MomentumConservation7" nolink />}}
::::<math> = [a_{\text{e},q} + a_{\text{w},q} + (F_{\text{e},q} - F_{\text{w},q})]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>
+
::::<math> = \left[a_{\text{e},q} + a_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>
 
</equation>
 
</equation>
  
Line 166: Line 166:
  
 
<equation id="eqn:MomentumConservation8">
 
<equation id="eqn:MomentumConservation8">
{{NumBlk|:|<math>\Rightarrow[a_{\text{e},q} + a_{\text{w},q} + (F_{\text{e},q} - F_{\text{w},q})]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation8" nolink />}}
+
{{NumBlk|:|<math>\Rightarrow\left[a_{\text{e},q} + a_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation8" nolink />}}
::::<math> = [\text{max}(\Gamma_{pq},0)u_p - \text{max}(-\Gamma_{pq},0)u_q] - \varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g</math>
+
::::<math> = \left[\text{max}\left(\Gamma_{pq},0\right)u_p - \text{max}\left(-\Gamma_{pq},0\right)u_q\right] - \varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g</math>
::::::::<math>- \frac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K(u_q - u_p) + S_{\text{mom},q}</math>
+
::::::::<math>- \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}</math>
 
</equation>
 
</equation>
  
Line 174: Line 174:
  
 
<equation id="eqn:MomentumConservation9">
 
<equation id="eqn:MomentumConservation9">
{{NumBlk|:|<math>\Rightarrow[a_{\text{e},q} + a_{\text{w},q} + (F_{\text{e},q} - F_{\text{w},q}) - (F_{\text{e},q} - F_{\text{w},q})]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation9" nolink />}}
+
{{NumBlk|:|<math>\Rightarrow\left[a_{\text{e},q} + a_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right) - \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation9" nolink />}}
::::<math> = [\text{max}(\Gamma_{pq},0)u_p - \text{max}(-\Gamma_{pq},0)u_q] - (\Gamma_{pq} + S_{\text{mass},q})u_{\text{P},q}</math>
+
::::<math> = \left[\text{max}\left(\Gamma_{pq},0\right)u_p - \text{max}\left(-\Gamma_{pq},0\right)u_q\right] - \left(\Gamma_{pq} + S_{\text{mass},q}\right)u_{\text{P},q}</math>
::::::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \frac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K(u_q - u_p) + S_{\text{mom},q}</math>
+
::::::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}</math>
 
</equation>
 
</equation>
  
Line 182: Line 182:
  
 
<equation id="eqn:MomentumConservation10">
 
<equation id="eqn:MomentumConservation10">
{{NumBlk|:|<math>\Leftrightarrow[a_{\text{e},q} + a_{\text{w},q}]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation10" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow\left[a_{\text{e},q} + a_{\text{w},q}\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation10" nolink />}}
::::<math> = [\text{max}(\Gamma_{pq},0)u_{\text{P},p} - \text{max}(-\Gamma_{pq},0)u_{\text{P},q}]</math>
+
::::<math> = \left[\text{max}\left(\Gamma_{pq},0\right)u_{\text{P},p} - \text{max}\left(-\Gamma_{pq},0\right)u_{\text{P},q}\right]</math>
::::::::<math>-[\text{max}(\Gamma_{pq},0) - \text{max}(-\Gamma_{pq},0) + \text{max}(S_{\text{mass},q},0) - \text{max}(-S_{\text{mass},q},0)]u_{\text{P},q}</math>
+
::::::::<math>-\left[\text{max}\left(\Gamma_{pq},0\right) - \text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right) - \text{max}\left(-S_{\text{mass},q},0\right)\right]u_{\text{P},q}</math>
::::::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \frac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K(u_q - u_p) + S_{\text{mom},q}</math>
+
::::::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}</math>
 
</equation>
 
</equation>
  
  
<equation id="eqn:MomentumConservation10">
+
<equation id="eqn:MomentumConservation11">
{{NumBlk|:|<math>\Leftrightarrow[a_{\text{e},q} + a_{\text{w},q} + \text{max}(\Gamma_{pq},0) + \text{max}(S_{\text{mass},q},0) + \text{max}(-\Gamma_{pq},0)]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation10" nolink />}}
+
{{NumBlk|:|<math>\Leftrightarrow\left[a_{\text{e},q} + a_{\text{w},q} + \text{max}\left(\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right) + \text{max}\left(-\Gamma_{pq},0\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}</math>|<xr id="eqn:MomentumConservation11" nolink />}}
::::<math> = [\text{max}(-\Gamma_{pq},0) + \text{max}(-S_{\text{mass},q},0)]u_q + \text{max}(\Gamma_{pq},0)u_p</math>
+
::::<math> = \left[\text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(-S_{\text{mass},q},0\right)\right]u_q + \text{max}\left(\Gamma_{pq},0\right)u_p</math>
::::::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \frac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K(u_q - u_p) + S_{\text{mom},q}</math>
+
::::::::<math> -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}</math>
 
</equation>
 
</equation>
  
Since the right-hand side contains only references to the central cell, subscripts P have been dropped from right-hand side to simplify the notation. Note that the diagonal element of the coefficient matrix contains the split terms, <math>\text{max}(\Gamma_{pq},0) + \text{max}(S_{\text{mass},q},0)</math>, resulting from the subtraction of the mass equation times cell velocity, while the counterparts, <math>[\text{max}(-\Gamma_{pq},0) + \text{max}(-S_{\text{mass},q},0)]u_q</math>, remain on the right-hand side. These are not considered as momentum source terms, as such, since they are only artifacts of the derivation procedure.
+
Since the right-hand side contains only references to the central cell, subscripts P have been dropped from right-hand side to simplify the notation. Note that the diagonal element of the coefficient matrix contains the split terms, <math>\text{max}\left(\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right)</math>, resulting from the subtraction of the mass equation times cell velocity, while the counterparts, <math>\left[\text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(-S_{\text{mass},q},0\right)\right]u_q</math>, remain on the right-hand side. These are not considered as momentum source terms, as such, since they are only artifacts of the derivation procedure.
 +
 
 +
Finally, denoting the central coefficient by <math> a_P = a_{\text{e},q} + a_{\text{w},q} + \text{max}\left(\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right) + \text{max}\left(-\Gamma_{pq},0\right)</math> and casting <xr id="eqn:MomentumConservation11"/> into a vector form (over the phases) the final form, in which the equations are actually solved, is obtained. For simplicity’s sake, the equation is written only for the first 3 cells (c1, c2 and c3).
 +
 
  
Finally, denoting the central coefficient by <math> a_P = a_{\text{e},q} + a_{\text{w},q} + \text{max}(\Gamma_{pq},0) + \text{max}(S_{\text{mass},q},0) + \text{max}(-\Gamma_{pq},0)</math> and casting <xr id="eqn:MomentumConservation10"/> into a vector form (over the phases) the final form, in which the equations are actually solved, is obtained. For simplicity’s sake, the equation is written only for the first 3 cells (c1, c2 and c3).
+
<equation id="eqn:DiscretizedMomentumConservation">
 +
{{NumBlk|:|
 +
<math>
 +
\begin{bmatrix}
 +
a_{\text{P,c1},1} + K_{\text{c1}} &            -K_{\text{c1}}        &          -a_{\text{e,c1},1}      &                  0              &                \cdots            &                  0              \\
 +
          -K_{\text{c1}}          & a_{\text{P,c1},2} + K_{\text{c1}} &                  0              &          -a_{\text{e,c1},2}      &                \ddots            &                \vdots            \\
 +
        -a_{\text{w,c2},1}      &                  0              & a_{\text{P,c2},1} + K_{\text{c2}} &            -K_{\text{c2}}        &          -a_{\text{e,c2},1}      &                  0              \\
 +
                  0               &            -a_{\text{w,c2},2}    &            -K_{\text{c2}}        & a_{\text{P,c2},2} + K_{\text{c2}} &                  0              &          -a_{\text{e,c2},2}       \\
 +
              \vdots            &                \ddots            &          -a_{\text{w,c3},1}      &                  0               & a_{\text{P,c3},1} + K_{\text{c3}} &            -K_{\text{c3}}        \\
 +
                  0              &                \cdots            &                  0              &          -a_{\text{w,c3},2}      &            -K_{\text{c3}}        & a_{\text{P,c3},2} + K_{\text{c3}}     
 +
\end{bmatrix}
 +
\begin{pmatrix}
 +
u_{\text{c1,1}}\\
 +
u_{\text{c1,2}}\\
 +
u_{\text{c2,1}}\\
 +
u_{\text{c2,2}}\\
 +
u_{\text{c3,1}}\\
 +
u_{\text{c3,2}}
 +
\end{pmatrix}
 +
=
 +
\begin{pmatrix}
 +
S_{\text{mom,c1,1}}\\
 +
S_{\text{mom,c1,2}}\\
 +
S_{\text{mom,c2,1}}\\
 +
S_{\text{mom,c2,2}}\\
 +
S_{\text{mom,c3,1}}\\
 +
S_{\text{mom,c3,2}}
 +
\end{pmatrix}
 +
</math>
 +
|<xr id="eqn:DiscretizedMomentumConservation" nolink />}}
 +
</equation>
  
[[File:MomentumConservationEquation.png|thumb|800px| ]]
 
  
 +
where:
  
 +
:<math>S_{\text{mom},\text{c1},q} = \Big\{\big[\text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(-S_{\text{mass},q},0\right)\big]u_q + \text{max}\left(\Gamma_{pq},0\right)u_p </math>
 +
::::::<math>- \varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}\Big\}_{\text{c1}}</math>
  
 +
and
 +
:{|
 +
|<math> \alpha_q </math>
 +
|
 +
|volume fraction of phase ''q'' [-],
 +
|-
 +
|<math> \gamma_{pq} </math>
 +
|
 +
|volumetric mass transfer rate from phase ''p'' to ''q'' [kg/m<sup>3</sup>s],
 +
|-
 +
|<math> \Gamma_{pq} </math>
 +
|
 +
|mass transfer rate from phase ''p'' to ''q'' [kg/s],
 +
|-
 +
|<math> \delta x </math>
 +
|
 +
|distance between two adjacent cell centers [m],
 +
|-
 +
|<math> \varepsilon </math>
 +
|
 +
|porosity, fluid fraction of cell volume [-],
 +
|-
 +
|<math> \mu_{\text{eff},q} </math>
 +
|
 +
|effective viscosity of phase ''q'' [Ns/m<sup>2</sup>],
 +
|-
 +
|<math> \rho_q </math>
 +
|
 +
|density of phase ''q'' [kg/m<sup>3</sup>],
 +
|-
 +
|<math> A </math>
 +
|
 +
|face area [m<sup>2</sup>],
 +
|-
 +
|<math> C </math>
 +
|
 +
|inertial loss coefficient [1/m],
 +
|-
 +
|<math> F </math>
 +
|
 +
|face mass flow rate [kg/s],
 +
|-
 +
|<math> g </math>
 +
|
 +
|acceleration of gravity [m/s<sup>2</sup>],
 +
|-
 +
|<math> k </math>
 +
|
 +
|volumetric interphase drag coefficient [kg/m<sup>3</sup>s],
 +
|-
 +
|<math> K </math>
 +
|
 +
|interphase drag coefficient [kg/s],
 +
|-
 +
|<math> n </math>
 +
|
 +
|face normal pointing out of the cell (1 for east face, -1 for west face),
 +
|-
 +
|<math> p </math>
 +
|
 +
|pressure [Pa],
 +
|-
 +
|<math> s_{\text{mass},q} </math>
 +
|
 +
|volumetric mass source to phase ''q'' [kg/m<sup>3</sup>s],
 +
|-
 +
|<math> S_{\text{mass},q} </math>
 +
|
 +
|mass source to phase ''q'' [kg/s],
 +
|-
 +
|<math> s_{\text{mom},q} </math>
 +
|
 +
|volumetric momentum source to phase ''q'' [N/m<sup>3</sup>],
 +
|-
 +
|<math> S_{\text{mom},q} </math>
 +
|
 +
|momentum source to phase ''q'' [N],
 +
|-
 +
|<math> u_q </math>
 +
|
 +
|velocity of phase ''q'' [m/s],
 +
|-
 +
|<math> V </math>
 +
|
 +
|cell volume [m<sup>3</sup>],
 +
|-
 +
|subscript c1
 +
|
 +
|refers to first cell,
 +
|-
 +
|subscript c2
 +
|
 +
|refers to second cell,
 +
|-
 +
|subscript c3
 +
|
 +
|refers to third cell,
 +
|-
 +
|subscript e
 +
|
 +
|east face (the face in the negative x-direction),
 +
|-
 +
|subscript E
 +
|
 +
|east neighbor (the cell in the negative x-direction),
 +
|-
 +
|subscript w
 +
|
 +
|west face (the face in the positive x-direction),
 +
|-
 +
|subscript W
 +
|
 +
|west neighbor (the cell in the positive x-direction),
 +
|-
 +
|subscript P
 +
|
 +
|central cell (the cell for which the equation is written),
 +
|-
 +
|subscript ''q''
 +
|
 +
|current phase for which the equation is written (1 = primary, 2 = secondary),
 +
|-
 +
|subscript ''p''
 +
|
 +
|the other phase (p = 2 for q = 1 and p = 1 for q = 2),
 +
|-
 +
|subscript ''pq''
 +
|
 +
|indicates exchange between phases (e.g. <math> \Gamma_{pq} </math> mass transfer from phase ''p'' to ''q'').
 +
|}
  
 
== Conservation of Total Enthalpy ==
 
== Conservation of Total Enthalpy ==
Line 209: Line 374:
 
[[File:EnthalpyConservation.png|thumb|400px| <xr id="fig:EnthalpyConservation"/>: Conservation of total enthalpy for an interior cell]]
 
[[File:EnthalpyConservation.png|thumb|400px| <xr id="fig:EnthalpyConservation"/>: Conservation of total enthalpy for an interior cell]]
 
</figure>
 
</figure>
 +
 +
Conservation of total enthalpy (of phase ''q'') can be written as
 +
 +
<equation id="eqn:TransientTotalEnthalpyConservation">
 +
{{NumBlk|:|<math>\frac{\partial \left(\varepsilon \alpha_q \rho_q h_{0,q}\right)}{\partial t} + \nabla\cdot\left(\varepsilon \alpha_q \rho_q h_{0,q} u_q\right)</math>|<xr id="eqn:TransientTotalEnthalpyConservation" nolink />}}
 +
::::<math>= \nabla\cdot\left(\varepsilon \alpha_q \lambda_{\text{eff},q} \nabla T_q \right) + \left[\text{max}\left(\gamma_{pq},0\right) h_{0,\text{cre}} - \text{max}\left(-\gamma_{pq},0\right) h_{0,\text{des}}\right]</math>
 +
::::::::<math>- \nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \varepsilon \alpha_q \frac{\partial p}{\partial t} + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}</math>
 +
</equation>
 +
 +
Disregarding the transient terms and moving the diffusion term to the left-hand side leads to
 +
 +
<equation id="eqn:TotalEnthalpyConservation">
 +
{{NumBlk|:|<math>\Rightarrow\nabla\cdot\left(\varepsilon \alpha_q \rho_q h_{0,q} u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \lambda_{\text{eff},q} \nabla T_q \right)</math>|<xr id="eqn:TotalEnthalpyConservation" nolink />}}
 +
::::<math>= \left[\text{max}\left(\gamma_{pq},0\right) h_{0,\text{cre}} - \text{max}\left(-\gamma_{pq},0\right) h_{0,\text{des}}\right] - \nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}</math>
 +
</equation>
 +
 +
Total enthalpy is defined as the sum of specific enthalpy, kinetic energy and potential energy
 +
 +
<equation id="eqn:TotalEnthalpyDefinition">
 +
{{NumBlk|:|<math>h_0 = h + \tfrac{1}{2} \left| u_q \right|^2 - \mathbf{g} \cdot \mathbf{r}</math>|<xr id="eqn:TotalEnthalpyDefinition" nolink />}}
 +
</equation>
 +
 +
where <math>\mathbf{g} \cdot \mathbf{r}</math> is the dot product of gravity vector, <math>\mathbf{g}</math>, and location vector, <math>\mathbf{r}</math>, a vector pointing from the reference level to the evaluated location. The total enthalpies related to phase change can be defined as
 +
 +
<equation id="eqn:EnthalpyPhaseChangeTerms">
 +
{{NumBlk|:|<math>
 +
\begin{align}
 +
& h_{0,\text{cre}} = h_{\text{P,sat,}q} + \tfrac{1}{2} \left| u_p \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}\\
 +
& h_{0,\text{des}} = h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}
 +
\end{align}
 +
</math>|<xr id="eqn:EnthalpyPhaseChangeTerms" nolink />}}
 +
</equation>
 +
 +
In other words, when mass is transferred to phase ''q'' (“created”), it brings with it the saturation enthalpy of phase ''q'', <math>h_{\text{P,sat,}q}</math>, and the kinetic energy of phase ''p'', <math>\tfrac{1}{2} \left| u_p \right|^2_{\text{P}}</math>.  When mass is transferred from phase ''q'' (“destroyed”), it leaves with the enthalpy and kinetic energy of phase ''q'', <math>h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}}</math>. It is chosen that the potential energy associated with phase change is evaluated at the center of the cell, <math>\left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}</math>.
 +
 +
Substituting <xr id="eqn:TotalEnthalpyDefinition"/> and <xr id="eqn:EnthalpyPhaseChangeTerms"/> to <xr id="eqn:TotalEnthalpyConservation"/> and rearranging terms
 +
 +
<equation id="eqn:TotalEnthalpyConservation2">
 +
{{NumBlk|:|<math>\Rightarrow\nabla\cdot\left(\varepsilon \alpha_q \rho_q h_q u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \lambda_{\text{eff},q} \nabla T_q \right)</math>|<xr id="eqn:TotalEnthalpyConservation2" nolink />}}
 +
::::<math>= \left[\text{max}\left(\gamma_{pq},0\right) \left(h_{\text{P,sat,}q} + \tfrac{1}{2} \left| u_p \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}\right) - \text{max}\left(-\gamma_{pq},0\right) \left(h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}
 +
\right)\right]</math>
 +
::::<math> -\nabla\cdot\left(\tfrac{1}{2}\varepsilon \alpha_q \rho_q \left| u_q \right|^2 u_q\right)
 +
+\nabla\cdot\left(\varepsilon \alpha_q \rho_q \left( \mathbf{g} \cdot \mathbf{r} \right)u_q\right)
 +
-\nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}</math>
 +
</equation>
 +
 +
At this point, an approximation is introduced: the diffusion term is expressed relative to the gradient of enthalpy, instead of temperature, as follows. This approximation is considered to be sufficiently accurate for small enthalpy differences.
 +
 +
<equation id="eqn:TotalEnthalpyConservation3">
 +
{{NumBlk|:|<math>\Rightarrow\nabla\cdot\left(\varepsilon \alpha_q \rho_q h_q u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \frac{\lambda_{\text{eff},q}}{c_{p,q}} \nabla h_q \right)</math>|<xr id="eqn:TotalEnthalpyConservation3" nolink />}}
 +
::::<math>= \left[\text{max}\left(\gamma_{pq},0\right) \left(h_{\text{P,sat,}q} + \tfrac{1}{2} \left| u_p \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}\right) - \text{max}\left(-\gamma_{pq},0\right) \left(h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}
 +
\right)\right]</math>
 +
::::<math> -\nabla\cdot\left(\tfrac{1}{2}\varepsilon \alpha_q \rho_q \left| u_q \right|^2 u_q\right)
 +
+\nabla\cdot\left(\varepsilon \alpha_q \rho_q \left( \mathbf{g} \cdot \mathbf{r} \right)u_q\right)
 +
-\nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}</math>
 +
</equation>
 +
 +
<xr id="eqn:TotalEnthalpyConservation3"/> is discretized for an interior cell, shown in <xr id="fig:EnthalpyConservation"/>, by volume integration over cell P.

Revision as of 14:52, 19 April 2018

Conservation of Mass

Figure 1: Conservation of mass for an interior cell

Steady one-dimensional conservation of mass (of phase q) is given through the following relation

\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q\right) = \gamma_{pq} + s_{\text{mass},q}

 

 

 

 

(1)

Equation 1 is discretized for an interior cell, shown in Figure 1, by volume integration over cell P.

\Leftrightarrow \iiint\limits_V \left[\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q\right)\right]\, dV = \iiint\limits_V \left(\gamma_{pq} + s_{\text{mass},q}\right)\, dV

 

 

 

 

(2)

The divergence term on the left-hand side of the equation is transformed into a surface integral over the cell faces using the divergence theorem.

\Leftrightarrow \iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q\right)\cdot n\right]\, dA = \iiint\limits_V \left(\gamma_{pq} + s_{\text{mass},q}\right)\, dV

 

 

 

 

(3)

Throughout this document upwind discretization is used to evaluate the face mass flow rates, even though any discretization scheme could be chosen. The final discretized form reduces to

\Leftrightarrow \left(\varepsilon \alpha_q \rho_q u_q A\right)_\text{e} - \left(\varepsilon \alpha_q \rho_q u_q A\right)_\text{w} = F_{\text{e},q} - F_{\text{w},q} = \Gamma_{pq} + S_{\text{mass},q}

 

 

 

 

(4)

where:

 \alpha_q volume fraction of phase q [-],
 \gamma_{pq} volumetric mass transfer rate from phase p to q [kg/m3s],
 \Gamma_{pq} mass transfer rate from phase p to q [kg/s],
 \varepsilon porosity, fluid fraction of cell volume [-],
 \rho_q density of phase q [kg/m3],
 A face area [m2],
 F face mass flow rate [kg/s],
 n face normal pointing out of the cell (1 for east face, -1 for west face),
 s_{\text{mass},q} volumetric mass source to phase q [kg/m3s],
 S_{\text{mass},q} mass source to phase q [kg/s],
 u_q velocity of phase q [m/s],
subscript e east face (the face in the negative x-direction),
subscript w west face (the face in the positive x-direction),
subscript q current phase for which the equation is written (1 = primary, 2 = secondary),
subscript p the other phase (p = 2 for q = 1 and p = 1 for q = 2),
subscript pq indicates exchange between phases (e.g.  \Gamma_{pq} mass transfer from phase p to q).

Conservation of Momentum

Figure 2: Conservation of momentum for an interior cell

Steady one-dimensional conservation of momentum (of phase q) is solved from the following relation

\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q u_q\right) = \nabla\cdot\left(\varepsilon \alpha_q \mu_{\text{eff},q} \nabla u_q\right)

 

 

 

 

(5)

+ \left[\text{max}\left(\gamma_{pq},0\right)u_p - \text{max}\left(-\gamma_{pq},0\right)u_q\right] - \varepsilon \alpha_q \nabla p + \varepsilon \alpha_q \rho_q g
- \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C \left| u_q \right| u_q - k\left(u_q - u_p\right) + s_{\text{mom},q}


Equation 5 is discretized for an interior cell, shown in Figure 2, by volume integration over cell P. The diffusion term has been moved to the left-hand side, since it will be developed together with the divergence of momentum.

\Leftrightarrow \iiint\limits_V \left[\nabla\cdot\left(\varepsilon \alpha_q \rho_q u_q u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \mu_{\text{eff},q} \nabla u_q\right)\right]\, dV = \iiint\limits_V \left[\text{max}\left(\gamma_{pq},0\right)u_p - \text{max}\left(-\gamma_{pq},0\right)u_q\right]\, dV

 

 

 

 

(6)

 + \iiint\limits_V \left(-\varepsilon \alpha_q \nabla p + \varepsilon \alpha_q \rho_q g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C \left| u_q \right| u_q - k\left(u_q - u_p\right) + s_{\text{mom},q}\right)\, dV

As with the conservation of mass equation above, the divergence terms on the left-hand side of the equation are transformed into surface integrals over the cell faces using the divergence theorem.

\Leftrightarrow \iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA = \left[\text{max}\left(\Gamma_{pq},0\right)u_p - \text{max}\left(-\Gamma_{pq},0\right)u_q\right]

 

 

 

 

(7)

 -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}

Developing the left-hand side terms first

\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA

 

 

 

 

(8)

 = \left(\varepsilon \alpha_q \rho_q u_q u_q A\right)_{\text{e}} - \left(\varepsilon \alpha_q \rho_q u_q u_q A\right)_{\text{w}} - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x} A\right)_{\text{e}} + \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x} A\right)_{\text{w}}
 = F_{\text{e},q} u_{\text{e},q} + F_{\text{w},q} u_{\text{w},q} - \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}} \left(u_{\text{e},q} - u_{\text{P},q}\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}} \left(u_{\text{P},q} - u_{\text{w},q}\right)


Adopting upwind discretization for the momentum fluxes on the cell faces

F_{\text{e},q} u_{\text{e},q} = \text{max}\left(F_{\text{e},q},0\right)u_{\text{P},q} - \text{max}\left(-F_{\text{e},q},0\right)u_{\text{E},q}

 

 

 

 

(9)

F_{\text{w},q} u_{\text{w},q} = \text{max}\left(F_{\text{w},q},0\right)u_{\text{W},q} - \text{max}\left(-F_{\text{w},q},0\right)u_{\text{P},q}

 

 

 

 

(10)

and rearranging terms

\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA

 

 

 

 

(11)

 =\left[\text{max}\left(F_{\text{e},q},0\right) + \text{max}\left(-F_{\text{w},q},0\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}} + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}}\right]u_{\text{P},q}
 -\left[\text{max}\left(-F_{\text{e},q},0\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}}\right]u_{\text{E},q}
 -\left[\text{max}\left(F_{\text{w},q},0\right) + \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}}\right]u_{\text{W},q}


Denoting \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{e}} = D_{\text{e},q} and \left(\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x}\right)_{\text{w}} = D_{\text{w},q} and modifying the central coefficient slightly, since \text{max}\left(F_{\text{e},q},0\right) = F_{\text{e},q} + \text{max}\left(-F_{\text{e},q},0\right) and \text{max}\left(-F_{\text{w},q},0\right) = -F_{\text{w},q} + \text{max}\left(F_{\text{w},q},0\right), Equation 11 reduces to


\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA

 

 

 

 

(12)

 = \left[\text{max}\left(-F_{\text{e},q},0\right) + D_{\text{e},q} + \text{max}\left(F_{\text{w},q},0\right) + D_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q}
-\left[\text{max}\left(-F_{\text{e},q},0\right) + D_{\text{e},q}\right]u_{\text{E},q} - \left[\text{max}\left(F_{\text{w},q},0\right) + D_{\text{w},q}\right]u_{\text{W},q}


Identifying the coefficients of neighboring velocities

a_{\text{e},q} = \text{max}\left(-F_{\text{e},q},0\right) + D_{\text{e},q}

 

 

 

 

(13)

a_{\text{w},q} = \text{max}\left(F_{\text{w},q},0\right) + D_{\text{w},q}

 

 

 

 

(14)

leads to a general form

\Leftrightarrow\iint\limits_{A}\!\!\!\!\!\!\!\!\!\!\!\subset\!\supset \left[\left(\varepsilon \alpha_q \rho_q u_q u_q\right)\cdot n - \left(\varepsilon \alpha_q \mu_{\text{eff},q} \frac{\Delta u_q}{\delta x}\right)\cdot n\right]\, dA

 

 

 

 

(15)

 = \left[a_{\text{e},q} + a_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}

Substituting the results of Equation 15 into Equation 7 and continuing with the development

\Rightarrow\left[a_{\text{e},q} + a_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}

 

 

 

 

(16)

 = \left[\text{max}\left(\Gamma_{pq},0\right)u_p - \text{max}\left(-\Gamma_{pq},0\right)u_q\right] - \varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g
- \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}

At this point, the conservation of mass equation times cell velocity, u_{\text{P},q}, is subtracted from Equation 16

\Rightarrow\left[a_{\text{e},q} + a_{\text{w},q} + \left(F_{\text{e},q} - F_{\text{w},q}\right) - \left(F_{\text{e},q} - F_{\text{w},q}\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}

 

 

 

 

(17)

 = \left[\text{max}\left(\Gamma_{pq},0\right)u_p - \text{max}\left(-\Gamma_{pq},0\right)u_q\right] - \left(\Gamma_{pq} + S_{\text{mass},q}\right)u_{\text{P},q}
 -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}

Splitting the mass source term

\Leftrightarrow\left[a_{\text{e},q} + a_{\text{w},q}\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}

 

 

 

 

(18)

 = \left[\text{max}\left(\Gamma_{pq},0\right)u_{\text{P},p} - \text{max}\left(-\Gamma_{pq},0\right)u_{\text{P},q}\right]
-\left[\text{max}\left(\Gamma_{pq},0\right) - \text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right) - \text{max}\left(-S_{\text{mass},q},0\right)\right]u_{\text{P},q}
 -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}


\Leftrightarrow\left[a_{\text{e},q} + a_{\text{w},q} + \text{max}\left(\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right) + \text{max}\left(-\Gamma_{pq},0\right)\right]u_{\text{P},q} - a_{\text{e},q}u_{\text{E},q} - a_{\text{w},q}u_{\text{W},q}

 

 

 

 

(19)

 = \left[\text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(-S_{\text{mass},q},0\right)\right]u_q + \text{max}\left(\Gamma_{pq},0\right)u_p
 -\varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}

Since the right-hand side contains only references to the central cell, subscripts P have been dropped from right-hand side to simplify the notation. Note that the diagonal element of the coefficient matrix contains the split terms, \text{max}\left(\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right), resulting from the subtraction of the mass equation times cell velocity, while the counterparts, \left[\text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(-S_{\text{mass},q},0\right)\right]u_q, remain on the right-hand side. These are not considered as momentum source terms, as such, since they are only artifacts of the derivation procedure.

Finally, denoting the central coefficient by  a_P = a_{\text{e},q} + a_{\text{w},q} + \text{max}\left(\Gamma_{pq},0\right) + \text{max}\left(S_{\text{mass},q},0\right) + \text{max}\left(-\Gamma_{pq},0\right) and casting Equation 19 into a vector form (over the phases) the final form, in which the equations are actually solved, is obtained. For simplicity’s sake, the equation is written only for the first 3 cells (c1, c2 and c3).



\begin{bmatrix}
a_{\text{P,c1},1} + K_{\text{c1}} &            -K_{\text{c1}}         &          -a_{\text{e,c1},1}       &                   0               &                \cdots             &                   0               \\
          -K_{\text{c1}}          & a_{\text{P,c1},2} + K_{\text{c1}} &                   0               &          -a_{\text{e,c1},2}       &                \ddots             &                \vdots             \\
         -a_{\text{w,c2},1}       &                   0               & a_{\text{P,c2},1} + K_{\text{c2}} &            -K_{\text{c2}}         &          -a_{\text{e,c2},1}       &                   0               \\
                  0               &            -a_{\text{w,c2},2}     &            -K_{\text{c2}}         & a_{\text{P,c2},2} + K_{\text{c2}} &                   0               &          -a_{\text{e,c2},2}       \\
               \vdots             &                \ddots             &          -a_{\text{w,c3},1}       &                   0               & a_{\text{P,c3},1} + K_{\text{c3}} &            -K_{\text{c3}}         \\
                  0               &                \cdots             &                   0               &          -a_{\text{w,c3},2}       &             -K_{\text{c3}}        & a_{\text{P,c3},2} + K_{\text{c3}}      
\end{bmatrix}
\begin{pmatrix}
u_{\text{c1,1}}\\
u_{\text{c1,2}}\\
u_{\text{c2,1}}\\
u_{\text{c2,2}}\\
u_{\text{c3,1}}\\
u_{\text{c3,2}}
\end{pmatrix}
=
\begin{pmatrix}
S_{\text{mom,c1,1}}\\
S_{\text{mom,c1,2}}\\
S_{\text{mom,c2,1}}\\
S_{\text{mom,c2,2}}\\
S_{\text{mom,c3,1}}\\
S_{\text{mom,c3,2}}
\end{pmatrix}

 

 

 

 

(20)


where:

S_{\text{mom},\text{c1},q} = \Big\{\big[\text{max}\left(-\Gamma_{pq},0\right) + \text{max}\left(-S_{\text{mass},q},0\right)\big]u_q + \text{max}\left(\Gamma_{pq},0\right)u_p
- \varepsilon \alpha_q V \nabla p + \varepsilon \alpha_q \rho_q V g - \tfrac{1}{2} \varepsilon^3 \alpha_q \rho_q C V \left| u_q \right| u_q - K\left(u_q - u_p\right) + S_{\text{mom},q}\Big\}_{\text{c1}}

and

 \alpha_q volume fraction of phase q [-],
 \gamma_{pq} volumetric mass transfer rate from phase p to q [kg/m3s],
 \Gamma_{pq} mass transfer rate from phase p to q [kg/s],
 \delta x distance between two adjacent cell centers [m],
 \varepsilon porosity, fluid fraction of cell volume [-],
 \mu_{\text{eff},q} effective viscosity of phase q [Ns/m2],
 \rho_q density of phase q [kg/m3],
 A face area [m2],
 C inertial loss coefficient [1/m],
 F face mass flow rate [kg/s],
 g acceleration of gravity [m/s2],
 k volumetric interphase drag coefficient [kg/m3s],
 K interphase drag coefficient [kg/s],
 n face normal pointing out of the cell (1 for east face, -1 for west face),
 p pressure [Pa],
 s_{\text{mass},q} volumetric mass source to phase q [kg/m3s],
 S_{\text{mass},q} mass source to phase q [kg/s],
 s_{\text{mom},q} volumetric momentum source to phase q [N/m3],
 S_{\text{mom},q} momentum source to phase q [N],
 u_q velocity of phase q [m/s],
 V cell volume [m3],
subscript c1 refers to first cell,
subscript c2 refers to second cell,
subscript c3 refers to third cell,
subscript e east face (the face in the negative x-direction),
subscript E east neighbor (the cell in the negative x-direction),
subscript w west face (the face in the positive x-direction),
subscript W west neighbor (the cell in the positive x-direction),
subscript P central cell (the cell for which the equation is written),
subscript q current phase for which the equation is written (1 = primary, 2 = secondary),
subscript p the other phase (p = 2 for q = 1 and p = 1 for q = 2),
subscript pq indicates exchange between phases (e.g.  \Gamma_{pq} mass transfer from phase p to q).

Conservation of Total Enthalpy

Figure 3: Conservation of total enthalpy for an interior cell

Conservation of total enthalpy (of phase q) can be written as

\frac{\partial \left(\varepsilon \alpha_q \rho_q h_{0,q}\right)}{\partial t} + \nabla\cdot\left(\varepsilon \alpha_q \rho_q h_{0,q} u_q\right)

 

 

 

 

(21)

= \nabla\cdot\left(\varepsilon \alpha_q \lambda_{\text{eff},q} \nabla T_q \right) + \left[\text{max}\left(\gamma_{pq},0\right) h_{0,\text{cre}} - \text{max}\left(-\gamma_{pq},0\right) h_{0,\text{des}}\right]
- \nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \varepsilon \alpha_q \frac{\partial p}{\partial t} + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}

Disregarding the transient terms and moving the diffusion term to the left-hand side leads to

\Rightarrow\nabla\cdot\left(\varepsilon \alpha_q \rho_q h_{0,q} u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \lambda_{\text{eff},q} \nabla T_q \right)

 

 

 

 

(22)

= \left[\text{max}\left(\gamma_{pq},0\right) h_{0,\text{cre}} - \text{max}\left(-\gamma_{pq},0\right) h_{0,\text{des}}\right] - \nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}

Total enthalpy is defined as the sum of specific enthalpy, kinetic energy and potential energy

h_0 = h + \tfrac{1}{2} \left| u_q \right|^2 - \mathbf{g} \cdot \mathbf{r}

 

 

 

 

(23)

where \mathbf{g} \cdot \mathbf{r} is the dot product of gravity vector, \mathbf{g}, and location vector, \mathbf{r}, a vector pointing from the reference level to the evaluated location. The total enthalpies related to phase change can be defined as


\begin{align}
& h_{0,\text{cre}} = h_{\text{P,sat,}q} + \tfrac{1}{2} \left| u_p \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}\\
& h_{0,\text{des}} = h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}
\end{align}

 

 

 

 

(24)

In other words, when mass is transferred to phase q (“created”), it brings with it the saturation enthalpy of phase q, h_{\text{P,sat,}q}, and the kinetic energy of phase p, \tfrac{1}{2} \left| u_p \right|^2_{\text{P}}. When mass is transferred from phase q (“destroyed”), it leaves with the enthalpy and kinetic energy of phase q, h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}}. It is chosen that the potential energy associated with phase change is evaluated at the center of the cell, \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}.

Substituting Equation 23 and Equation 24 to Equation 22 and rearranging terms

\Rightarrow\nabla\cdot\left(\varepsilon \alpha_q \rho_q h_q u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \lambda_{\text{eff},q} \nabla T_q \right)

 

 

 

 

(25)

= \left[\text{max}\left(\gamma_{pq},0\right) \left(h_{\text{P,sat,}q} + \tfrac{1}{2} \left| u_p \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}\right) - \text{max}\left(-\gamma_{pq},0\right) \left(h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}
\right)\right]
 -\nabla\cdot\left(\tfrac{1}{2}\varepsilon \alpha_q \rho_q \left| u_q \right|^2 u_q\right)
+\nabla\cdot\left(\varepsilon \alpha_q \rho_q \left( \mathbf{g} \cdot \mathbf{r} \right)u_q\right)
-\nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}

At this point, an approximation is introduced: the diffusion term is expressed relative to the gradient of enthalpy, instead of temperature, as follows. This approximation is considered to be sufficiently accurate for small enthalpy differences.

\Rightarrow\nabla\cdot\left(\varepsilon \alpha_q \rho_q h_q u_q\right) - \nabla\cdot\left(\varepsilon \alpha_q \frac{\lambda_{\text{eff},q}}{c_{p,q}} \nabla h_q \right)

 

 

 

 

(26)

= \left[\text{max}\left(\gamma_{pq},0\right) \left(h_{\text{P,sat,}q} + \tfrac{1}{2} \left| u_p \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}\right) - \text{max}\left(-\gamma_{pq},0\right) \left(h_{\text{P,}q} + \tfrac{1}{2} \left| u_q \right|^2_{\text{P}} - \left(\mathbf{g} \cdot \mathbf{r}\right)_{\text{P}}
\right)\right]
 -\nabla\cdot\left(\tfrac{1}{2}\varepsilon \alpha_q \rho_q \left| u_q \right|^2 u_q\right)
+\nabla\cdot\left(\varepsilon \alpha_q \rho_q \left( \mathbf{g} \cdot \mathbf{r} \right)u_q\right)
-\nabla\cdot\left(\varepsilon \alpha_q \mathbf{q} \right) + \nabla\cdot\left(\varepsilon \alpha_q \boldsymbol{\tau} \cdot \mathbf{u}_q  \right) + s_{h,q}

Equation 26 is discretized for an interior cell, shown in Figure 3, by volume integration over cell P.