{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "The Drift model\n", "===============\t\n", "\n", "The model consists in the steam mass balance equation together with the mixture mass conservation, the mixture momentum balance and mixture energy balance equations. The main unknowns are the steam mass concentration $c_v$, the pressure $P$, the mixture velocity $\\vec{u}_m$, and the common temperature $T$. The model uses stiffened gas laws $p_g(\\rho_g,T)$ and $p_l(\\rho_l,T)$ as well as linearised internal energy law $e_k(T)$ valid around the saturation points $(P=1 bar, T=373K)$ or $(P=155 bars, T=618K)$ depending on the value of the enum \\ref pressureEstimate.\n", "\n", "The drift model is a system of four nonlinear equations taking the following conservative form\n", "$$\n", "\\left\\{\\begin{array}{lll}\n", " \\partial_t(\\phi \\rho_m) &+\\nabla\\cdot(\\phi\\rho_m\\vec{u}_m)&=0\\\\\n", " \\partial_t(\\phi m_g)&+\\nabla\\cdot\\phi(m_g\\vec{u}_g)&=\\phi\\Gamma_g(h_m,\\Phi)\\\\\n", " \\partial_t(\\phi\\rho_m\\vec{u}_m)&+\\nabla\\cdot\\phi(m_g\\vec{u}_g\\otimes\\vec{u}_g+ m_l\\vec{u}_l\\otimes\\vec{u}_l)+\\vec{\\nabla}(p\\phi)&=p\\vec{\\nabla}\\phi+\\phi\\rho_m\\vec{g}- K_g\\phi m_g||\\vec{u}_g||\\vec{u}_g- K_l\\phi m_l||\\vec{u}_l||\\vec{u}_l- K_s\\delta_s(x)\\phi\\rho_m||\\vec{u}_m||\\vec{u}_m\\\\\n", " \\partial_t\\phi (\\rho_m E_m)&+\\nabla\\cdot\\phi(m_g H_g{}^t\\vec{u}_g+m_l H_l{}^t\\vec{u}_l)&=\\Phi+\\phi\\rho_m\\vec{g}\\cdot\\vec{u}_m- K_g\\phi m_g||\\vec{u}_g||^3- K_l\\phi m_l||\\vec{u}_l||^3- K_s\\delta_s(x)\\phi\\rho_m||\\vec{u}_m||^3\n", " \\end{array}\\right.,\n", "$$\n", "where the mixture quantities are defined by\n", "$$\n", "\\begin{array}{lll}\n", "\\rho_m&=&\\alpha_g\\rho_g+\\alpha_l\\rho_l\\\\\n", "\\vec{u}_m&=&\\frac{\\alpha_g\\rho_g\\vec{u}_g+\\alpha_l\\rho_l\\vec{u}_l}{\\alpha_g\\rho_g+\\alpha_l\\rho_l}\\\\\n", "E_m&=&\\alpha_g\\rho_g E_g+\\alpha_l\\rho_l E_l,\n", "\\end{array}\n", "$$\n", "\n", "whereas the quantities associated to each to phase $k=g,l$ are defined as\n", "- $\\alpha_k$ is the phasic volumic presence rate,\n", "- $\\rho_k$ is the phasic density,\n", "- $m_k=\\alpha_k\\rho_k$ is the phasic partial density,\n", "- $\\vec u_k$ the phasic velocity,\n", "- $\\vec q_k = \\rho \\vec u$ the phasic momentum,\n", "- $p$ the common phasic pressure,\n", "- $e_k$ the phasic internal energy,\n", "- $E_k = e_k + \\frac{||\\vec u||^2}{2}$ the phasic total energy,\n", "- $h_k=e_k+\\frac{p}{\\rho_k}$ the phasic enthalpy\n", "- $H_k=h_k+\\frac{1}{2}|\\vec{u}_k|^2$ the phasic total enthalpy\n", "- $T$ the common absolute temperature,\n", "- $\\nu_k$ the viscosity ([DriftModel](../../../Models/inc/DriftModel.hxx)::setViscosity),\n", "- $\\lambda_k$ the thermal conductivity ([DriftModel](../../../Models/inc/DriftModel.hxx)::setConductivity),\n", "- $K_k$ the phasic regular friction coefficient ([DriftModel](../../../Models/inc/DriftModel.hxx)::setDragCoeffs),\n", "\n", "Geometric and physical source terms are\n", "- $\\vec g$ the gravity vector ([DriftModel](../../../Models/inc/DriftModel.hxx)::setGravity)\n", "- $\\Phi(\\vec x)$ the heat power received by the fluid ([DriftModel](../../../Models/inc/DriftModel.hxx)::setHeatPowerField),\n", "- $\\phi(\\vec x)$ the volumic porosity field ([DriftModel](../../../Models/inc/DriftModel.hxx)::setPorosityField),\n", "- $K_s(\\vec x)$ the singular friction function, $\\delta_s(\\vec x)$ the Dirac delta function with support on the set $s$ ([DriftModel](../../../Models/inc/DriftModel.hxx)::setPressureLossField).\n", "\n", "We close the Drift-Model system with a stiffened gas law $p = (\\gamma_k -1) \\rho_k e_k -\\gamma_k p_{0k}$ for each phase and a linearised enthalpy law $h_k(T)$ valid around the points $(P=1 bar, T=300K)$ or $(P=155 bars, T=618K)$ depending on the value of the enum \\ref pressureEstimate.\n", "\n", "For the sake of simplicity, for the moment we consider constant viscosity and conductivity, and neglect the contribution of viscous forces in the energy equation.\n", "\n", "The constant parameters $\\lambda_k, \\nu_k,\\vec g, K_k$ and the fields $\\phi(\\vec x),\\: \\Phi(\\vec x),\\: K_s(\\vec x)$ can be set by the user. The default value for $\\phi$ is $\\phi=1$.\n", "\n", "\n", "To close the system we need a drift correlation for the relative velocity:\n", "$$\n", "\\vec{u}_r=\\vec{u}_g-\\vec{u}_l=\\vec{f}_r(c_g,\\vec{u}_m,\\rho_m).\n", "$$\n", "For the moment the only drift correlation available is $\\vec{u}_g=\\vec{u}_l$.\n", "\n", "The phase change is modeled using the formula\n", "$$\n", " \\Gamma_g=\\left\\{\\begin{array}{cc}\n", " \\frac{\\Phi}{\\mathcal{L}}&\\textrm{ if } T^{sat}\\leq T \\textrm{ and } 0<\\alpha_g<1\\\\[1.5ex]\n", " 0& \\textrm{ otherwise }\n", " \\end{array}\\right..\n", "$$\n", "\n", "For the moment the boiling temperature $T^{sat}$ is constant and can be changed using the function DriftModell::setSatTemp.\n", "\n", "The class : [DriftModel](../../../Models/inc/DriftModel.hxx) implements the 4 equation drift model \n", "\n", "\\subpage ExampleDriftModelPage \"Here are C and Python example scripts using the Drift Model \"\n", "\n", "\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from IPython.display import display, Markdown\n", "display(Markdown('DriftModelPage.md'))" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 2 }