Salome HOME
Updated GUI documentation
[tools/solverlab.git] / CoreFlows / Documentation / PhysicalModels / TwoPhase / IsothermalPage.ipynb
1 {
2  "cells": [
3   {
4    "cell_type": "code",
5    "execution_count": 3,
6    "metadata": {},
7    "outputs": [
8     {
9      "data": {
10       "text/markdown": [
11        "The isothermal two-fluid model\n",
12        "==============================\n",
13        "\n",
14        "The model consists in the phasic mass and momentum balance equations.\n",
15        "\n",
16        "The main unknowns are $\\alpha$, $P$, $\\vec{u}_g$, $\\vec{u}_l$. The model uses stiffened gas laws $p_g(\\rho_g)$ and  $p_l(\\rho_l)$ 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",
17        "\n",
18        "The subscript $k$ stands for $l$ for the liquid phase and $g$ for the gas phase. The common\n",
19        "averaged pressure of the two phases is denoted by $p$. \n",
20        "\n",
21        "In our model, pressure equilibrium between the two phases is postulated, and the resulting system to solve is:\n",
22        "$$\n",
23        "\\left\\{\n",
24        "\\begin{array}{ccll}\n",
25        " \\frac{\\partial m_g}{\\partial t}& +& \\nabla \\cdot \\vec{q}_g &= 0,\\\\[1.5ex]\n",
26        "\\frac{\\partial m_l}{\\partial t} &+ &\\nabla \\cdot \\vec{q}_l &= 0,\\\\[1.5ex]\n",
27        "\\frac{\\partial \\vec{q}_g}{\\partial t}& +& \\nabla \\cdot (\\vec{q}_g\\otimes\\frac{\\vec{q}_g}{m_g})+ \\alpha_g \\vec\\nabla p&\\\\[1.5ex] \n",
28        " &+&\\Delta p \\nabla \\alpha_g -\\nu_g\\Delta \\vec{u}_g &= m_g\\vec{g}-K\\rho_m||\\vec{u}_g-\\vec{u}_l||(\\vec{u}_g-\\vec{u}_l)-K_s\\delta(x)m_g||\\vec{u}_g||\\vec{u}_g\\\\[1.5ex]\n",
29        "\\frac{\\partial \\vec{q}_l}{\\partial t}& +& \\nabla \\cdot (\\vec{q}_l\\otimes\\frac{\\vec{q}_l}{m_l})+ \\alpha_l \\vec\\nabla p&\\\\[1.5ex]\n",
30        "&+&\\Delta p \\nabla \\alpha_l -\\nu_l\\Delta \\vec{u}_l &= m_l\\vec{g}-K\\rho_m||\\vec{u}_l-\\vec{u}_g||(\\vec{u}_l-\\vec{u}_g)-K_s\\delta(x)m_l||\\vec{u}_l||\\vec{u}_l\\\\\n",
31        "\\end{array}\n",
32        "\\right.\n",
33        "$$\n",
34        "\n",
35        "Here :\n",
36        "- $\\nu_k$ is the viscosity of phase $k$, set by [IsothermalTwoFluid](../../../Models/inc/IsothermalTwoFluid.hxx)::setViscosity\n",
37        "- $\\Delta p$ denotes the pressure default $p-p_k$ between the bulk average pressure and the interfacial average pressure.\n",
38        "- $\\vec g$ the gravity vector ([IsothermalTwoFluid](../../../Models/inc/IsothermalTwoFluid.hxx)::setGravity)\n",
39        "- $K$ the interphase friction coefficient ([IsothermalTwoFluid](../../../Models/inc/IsothermalTwoFluid.hxx)::setDragCoeffs),\n",
40        "- $K_s(\\vec x)$ the singular friction function, $\\delta_s(\\vec x)$ the Dirac delta function with support on the set $s$ ([IsothermalTwoFluid](../../../Models/inc/IsothermalTwoFluid.hxx)::setPressureLossField).\n",
41        "\n",
42        "where \n",
43        "$$ \n",
44        " \\left\\{\\begin{array}{clc}\n",
45        "\t\\alpha_g +\\alpha_l &=& 1 \\\\[1.5ex]\n",
46        "\tm_k &=& \\alpha_k \\rho_k \\\\[1.5ex]\n",
47        "\t\\vec{q}_k &=& \\alpha_k \\rho_k \\vec{u}_k\n",
48        "\t\\end{array}\\right..\n",
49        "$$\n",
50        "\n",
51        "\n",
52        "The class : [IsothermalTwoFluid](../../../Models/inc/IsothermalTwoFluid.hxx) implements the isentropic two-fluid model  \n",
53        "\n",
54        "\\subpage ExampleIsothermalPage \"Here are C and Python example scripts using the isothermal two-fluid model\"\t\n",
55        "\n"
56       ],
57       "text/plain": [
58        "<IPython.core.display.Markdown object>"
59       ]
60      },
61      "metadata": {},
62      "output_type": "display_data"
63     }
64    ],
65    "source": [
66     "from IPython.display import display, Markdown\n",
67     "display(Markdown('IsothermalPage.md'))"
68    ]
69   }
70  ],
71  "metadata": {
72   "kernelspec": {
73    "display_name": "Python 2",
74    "language": "python",
75    "name": "python2"
76   },
77   "language_info": {
78    "codemirror_mode": {
79     "name": "ipython",
80     "version": 2
81    },
82    "file_extension": ".py",
83    "mimetype": "text/x-python",
84    "name": "python",
85    "nbconvert_exporter": "python",
86    "pygments_lexer": "ipython2",
87    "version": "2.7.12"
88   }
89  },
90  "nbformat": 4,
91  "nbformat_minor": 2
92 }