Difference between revisions of "Kharon theory manual"

From Kraken Wiki
Jump to: navigation, search
Line 187: Line 187:
 
::::::::<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 - \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>
 
</equation>
 
</equation>
 +
  
 
<equation id="eqn:MomentumConservation10">
 
<equation id="eqn:MomentumConservation10">
Line 198: Line 199:
 
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).
 
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).
  
 +
[[File:MomentumConservationEquation.png|thumb|800px| ]]
  
  

Revision as of 16:42, 18 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(\varepsilon \alpha_q \rho_q u_q) = \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 [\nabla\cdot(\varepsilon \alpha_q \rho_q u_q)]\, dV = \iiint\limits_V (\gamma_{pq} + s_{\text{mass},q})\, 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 [(\varepsilon \alpha_q \rho_q u_q)\cdot n]\, dA = \iiint\limits_V (\gamma_{pq} + s_{\text{mass},q})\, 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 (\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}

 

 

 

 

(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(\varepsilon \alpha_q \rho_q u_q u_q) = \nabla\cdot(\varepsilon \alpha_q \mu_{\text{eff},q} \nabla u_q)

 

 

 

 

(5)

+ [\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
- \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}


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 [\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

 

 

 

 

(6)

 + \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

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 [(\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]

 

 

 

 

(7)

 -\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}

Developing the left-hand side terms first

\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

 

 

 

 

(8)

 = (\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}}
 = 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})


Adopting upwind discretization for the momentum fluxes on the cell faces

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}

 

 

 

 

(9)

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}

 

 

 

 

(10)

and rearranging terms

\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

 

 

 

 

(11)

 =[\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}
 -[\text{max}(-F_{\text{e},q},0) + (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{e}}]u_{\text{E},q}
 -[\text{max}(F_{\text{w},q},0) + (\varepsilon \alpha_q A \frac{\mu_{\text{eff},q}}{\delta x})_{\text{w}}]u_{\text{W},q}


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


\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

 

 

 

 

(12)

 = [\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}
-[\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}


Identifying the coefficients of neighboring velocities

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

 

 

 

 

(13)

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

 

 

 

 

(14)

leads to a general form

\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

 

 

 

 

(15)

 = [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}

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

\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}

 

 

 

 

(16)

 = [\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
- \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}

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

\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}

 

 

 

 

(17)

 = [\text{max}(\Gamma_{pq},0)u_p - \text{max}(-\Gamma_{pq},0)u_q] - (\Gamma_{pq} + S_{\text{mass},q})u_{\text{P},q}
 -\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}

Splitting the mass source term

\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}

 

 

 

 

(19)

 = [\text{max}(\Gamma_{pq},0)u_{\text{P},p} - \text{max}(-\Gamma_{pq},0)u_{\text{P},q}]
-[\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}
 -\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}


\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}

 

 

 

 

(19)

 = [\text{max}(-\Gamma_{pq},0) + \text{max}(-S_{\text{mass},q},0)]u_q + \text{max}(\Gamma_{pq},0)u_p
 -\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}

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}(\Gamma_{pq},0) + \text{max}(S_{\text{mass},q},0), resulting from the subtraction of the mass equation times cell velocity, while the counterparts, [\text{max}(-\Gamma_{pq},0) + \text{max}(-S_{\text{mass},q},0)]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}(\Gamma_{pq},0) + \text{max}(S_{\text{mass},q},0) + \text{max}(-\Gamma_{pq},0) 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).

MomentumConservationEquation.png



Conservation of Total Enthalpy

Figure 3: Conservation of total enthalpy for an interior cell