mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove the code of the IMPET ("decoupled") models
there was no interest in using them and the maintainance burden grew pretty large as the Dumux and eWoms code-bases continued to diverge.
This commit is contained in:
parent
6ac5cecdc0
commit
84becd65d2
File diff suppressed because it is too large
Load Diff
@ -1,9 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% This file has been autogenerated from the LaTeX part of the %
|
||||
% doxygen documentation; DO NOT EDIT IT! Change the model's .hh %
|
||||
% file instead!! %
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
This model solves equations of the form \[ \textbf{div}\, \boldsymbol v = q. \] The velocity $ \boldsymbol v $ is the single phase Darcy velocity\-: \[ \boldsymbol v = -\frac{1}{\mu} \boldsymbol K \left(\textbf{grad}\, p + \rho \, g \, \textbf{grad}\, z\right), \] where $ p $ is the pressure, $ \boldsymbol K $ the absolute permeability, $ \mu $ the viscosity, $ \rho $ the density, and $ g $ the gravity constant, and $ q $ is the source term. At the boundary, $ p = p_D $ on $ \Gamma_{Dirichlet} $, and $ \boldsymbol v \cdot \boldsymbol n = q_N$ on $ \Gamma_{Neumann} $.
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% This file has been autogenerated from the LaTeX part of the %
|
||||
% doxygen documentation; DO NOT EDIT IT! Change the model's .hh %
|
||||
% file instead!! %
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
Provides a Finite Volume implementation for the pressure equation of a compressible system with two components. An I\-M\-P\-E\-S-\/like method is used for the sequential solution of the problem. Diffusion is neglected, capillarity can be regarded. Isothermal conditions and local thermodynamic equilibrium are assumed. Gravity is included. \[ c_{total}\frac{\partial p}{\partial t} + \sum_{\kappa} \frac{\partial v_{total}}{\partial C^{\kappa}} \nabla \cdot \left( \sum_{\alpha} X^{\kappa}_{\alpha} \varrho_{\alpha} \bf{v}_{\alpha}\right) = \sum_{\kappa} \frac{\partial v_{total}}{\partial C^{\kappa}} q^{\kappa}, \] where $\bf{v}_{\alpha} = - \lambda_{\alpha} \bf{K} \left(\nabla p_{\alpha} + \rho_{\alpha} \bf{g} \right) $. $ c_{total} $ represents the total compressibility, for constant porosity this yields $ - \frac{\partial V_{total}}{\partial p_{\alpha}} $, $p_{\alpha} $ denotes the phase pressure, $ \bf{K} $ the absolute permeability, $ \lambda_{\alpha} $ the phase mobility, $ \rho_{\alpha} $ the phase density and $ \bf{g} $ the gravity constant and $ C^{\kappa} $ the total \hyperlink{a00070}{Component} concentration. See paper S\-P\-E 99619 or \char`\"{}\-Analysis of a Compositional Model for Fluid
|
||||
Flow in Porous Media\char`\"{} by Chen, Qin and Ewing for derivation.
|
||||
|
||||
The pressure base class \hyperlink{a00131}{F\-V\-Pressure} assembles the matrix and right-\/hand-\/side vector and solves for the pressure vector, whereas this class provides the actual entries for the matrix and R\-H\-S vector. The partial derivatives of the actual fluid volume $ v_{total} $ are gained by using a secant method.
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% This file has been autogenerated from the LaTeX part of the %
|
||||
% doxygen documentation; DO NOT EDIT IT! Change the model's .hh %
|
||||
% file instead!! %
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
The transport step is described by the finite volume model for the solution of the transport equation for compositional two-\/phase flow. \[ \frac{\partial C^\kappa}{\partial t} = - \nabla \cdot \left( \sum_{\alpha} X^{\kappa}_{\alpha} \varrho_{alpha} \bf{v}_{\alpha}\right) + q^{\kappa}, \] where $ \bf{v}_{\alpha} = - \lambda_{\alpha} \bf{K} \left(\nabla p_{\alpha} + \rho_{\alpha} \bf{g} \right) $. $ p_{\alpha} $ denotes the phase pressure, $ \bf{K} $ the absolute permeability, $ \lambda_{\alpha} $ the phase mobility, $ \rho_{\alpha} $ the phase density and $ \bf{g} $ the gravity constant and $ C^{\kappa} $ the total \hyperlink{a00070}{Component} concentration. The whole flux contribution for each cell is subdivided into a storage term, a flux term and a source term. Corresponding functions ({\ttfamily \hyperlink{a00145_a13998fc22be58456c4bf8e3f4b12d89c}{get\-Flux()}} and {\ttfamily \hyperlink{a00145_a40fc97d83d3d15cdd29574d3a38fdafb}{get\-Flux\-On\-Boundary()}}) are provided, internal sources are directly treated.
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% This file has been autogenerated from the LaTeX part of the %
|
||||
% doxygen documentation; DO NOT EDIT IT! Change the model's .hh %
|
||||
% file instead!! %
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
This model solves equations of the form \[ \phi \left( \rho_w \frac{\partial S_w}{\partial t} + \rho_n \frac{\partial S_n}{\partial t}\right) + \textbf{div}\, \boldsymbol{v}_{total} = q. \] The definition of the total velocity $\boldsymbol{v}_{total}$ depends on the choice of the primary pressure variable. Further, fluids can be assumed to be compressible or incompressible (Property\-: {\ttfamily Enable\-Compressibility}). In the incompressible case a wetting $(w) $ phase pressure as primary variable leads to
|
||||
|
||||
\[ - \textbf{div}\, \left[\lambda \boldsymbol K \left(\textbf{grad}\, p_w + f_n \textbf{grad}\, p_c + \sum f_\alpha \rho_\alpha \, g \, \textbf{grad}\, z\right)\right] = q, \]
|
||||
|
||||
a non-\/wetting ( $ n $) phase pressure yields \[ - \textbf{div}\, \left[\lambda \boldsymbol K \left(\textbf{grad}\, p_n - f_w \textbf{grad}\, p_c + \sum f_\alpha \rho_\alpha \, g \, \textbf{grad}\, z\right)\right] = q, \] and a global pressure leads to \[ - \textbf{div}\, \left[\lambda \boldsymbol K \left(\textbf{grad}\, p_{global} + \sum f_\alpha \rho_\alpha \, g \, \textbf{grad}\, z\right)\right] = q. \] Here, $ p_\alpha $ is a phase pressure, $ p_ {global} $ the global pressure of a classical fractional flow formulation (see e.\-g. P. Binning and M. A. Celia, ''Practical implementation of the fractional flow approach to multi-\/phase flow simulation'', Advances in water resources, vol. 22, no. 5, pp. 461-\/478, 1999.), $ p_c = p_n - p_w $ is the capillary pressure, $ \boldsymbol K $ the absolute permeability, $ \lambda = \lambda_w + \lambda_n $ the total mobility depending on the saturation ( $ \lambda_\alpha = k_{r_\alpha} / \mu_\alpha $), $ f_\alpha = \lambda_\alpha / \lambda $ the fractional flow function of a phase, $ \rho_\alpha $ a phase density, $ g $ the gravity constant and $ q $ the source term.
|
||||
|
||||
For all cases, $ p = p_D $ on $ \Gamma_{Dirichlet} $, and $ \boldsymbol v_{total} \cdot \boldsymbol n = q_N $ on $ \Gamma_{Neumann} $.
|
||||
|
||||
The slightly compressible case is only implemented for phase pressures! In this case for a wetting $(w) $ phase pressure as primary variable the equations are formulated as \[ \phi \left( \rho_w \frac{\partial S_w}{\partial t} + \rho_n \frac{\partial S_n}{\partial t}\right) - \textbf{div}\, \left[\lambda \boldsymbol{K} \left(\textbf{grad}\, p_w + f_n \, \textbf{grad}\, p_c + \sum f_\alpha \rho_\alpha \, g \, \textbf{grad}\, z\right)\right] = q, \] and for a non-\/wetting ( $ n $) phase pressure as \[ \phi \left( \rho_w \frac{\partial S_w}{\partial t} + \rho_n \frac{\partial S_n}{\partial t}\right) - \textbf{div}\, \left[\lambda \boldsymbol{K} \left(\textbf{grad}\, p_n - f_w \textbf{grad}\, p_c + \sum f_\alpha \rho_\alpha \, g \, \textbf{grad}\, z\right)\right] = q, \] In this slightly compressible case the following definitions are valid\-: $ \lambda = \rho_w \lambda_w + \rho_n \lambda_n $, $ f_\alpha = (\rho_\alpha \lambda_\alpha) / \lambda $ This model assumes that temporal changes in density are very small and thus terms of temporal derivatives are negligible in the pressure equation. Depending on the formulation the terms including time derivatives of saturations are simplified by inserting $ S_w + S_n = 1 $.
|
||||
|
||||
In the IMPES models the default setting is: \begin{itemize}
|
||||
\item formulation: Property: {\ttfamily Formulation} defined as {\ttfamily DecoupledTwoPCommonIndices::pwSw}
|
||||
\item compressibility: disabled Property: {\ttfamily EnableCompressibility} set to {\ttfamily false}
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% This file has been autogenerated from the LaTeX part of the %
|
||||
% doxygen documentation; DO NOT EDIT IT! Change the model's .hh %
|
||||
% file instead!! %
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
This model solves equations of the form
|
||||
|
||||
\[ \phi \frac{\partial (\rho_\alpha S_\alpha)}{\partial t} + \textbf{div}\, (\rho_\alpha \boldsymbol{v_\alpha}) = q_\alpha, \]
|
||||
|
||||
where $ S_\alpha $ is the saturation of phase $ \alpha $ (wetting $(w) $, non-\/wetting $(n) $) and $ \boldsymbol v_\alpha $ is the phase velocity defined by the multi-\/phase Darcy equation. If a phase velocity is reconstructed from the pressure solution it can be directly inserted into the previous equation. In the incompressible case the equation is further divided by the phase density $ \rho_\alpha $. If a total velocity is reconstructed the saturation equation is reformulated into\-:
|
||||
|
||||
\[ \phi \frac{\partial S_w}{\partial t} + f_w \textbf{div}\, \boldsymbol{v}_{t} + f_w \lambda_n \boldsymbol{K}\left(\textbf{grad}\, p_c + (\rho_n-\rho_w) \, g \, \textbf{grad} z \right)= q_\alpha, \] to get a wetting phase saturation or \[ \phi \frac{\partial S_n}{\partial t} + f_n \textbf{div}\, \boldsymbol{v}_{t} - f_n \lambda_w \boldsymbol{K}\left(\textbf{grad}\, p_c + (\rho_n-\rho_w) \, g \, \textbf{grad} z \right)= q_\alpha, \] if the non-\/wetting phase saturation is the primary transport variable.
|
||||
|
||||
The total velocity formulation is only implemented for incompressible fluids and $ f_\alpha $ is the fractional flow function, $ \lambda_\alpha $ is the mobility, $ \boldsymbol K $ the absolute permeability, $ p_c $ the capillary pressure, $ \rho $ the fluid density, $ g $ the gravity constant, and $ q $ the source term.
|
||||
|
@ -9,13 +9,13 @@
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="901.02991"
|
||||
height="695.31177"
|
||||
width="897.59418"
|
||||
height="682.33881"
|
||||
id="svg2"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
version="1.0"
|
||||
sodipodi:docname="ewoms_structure.eps"
|
||||
sodipodi:docname="ewoms_structure.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape">
|
||||
<defs
|
||||
id="defs4">
|
||||
@ -233,14 +233,14 @@
|
||||
objecttolerance="10"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="1.0939471"
|
||||
inkscape:cx="346.64128"
|
||||
inkscape:cy="392.93108"
|
||||
inkscape:zoom="3.0941496"
|
||||
inkscape:cx="101.04255"
|
||||
inkscape:cy="601.15843"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="995"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1025"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
showguides="false"
|
||||
@ -258,7 +258,7 @@
|
||||
empspacing="5"
|
||||
snapvisiblegridlinesonly="false"
|
||||
originx="-79.109908px"
|
||||
originy="-43.250732px" />
|
||||
originy="9.5930184px" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
@ -268,7 +268,7 @@
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
@ -276,7 +276,7 @@
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(-79.109908,-5.531982)">
|
||||
transform="translate(-79.109908,-71.348693)">
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect2385"
|
||||
@ -302,7 +302,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot3185"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-370.57227,-20.49932)"><flowRegion
|
||||
transform="translate(-370.57227,45.317391)"><flowRegion
|
||||
id="flowRegion3187"><rect
|
||||
id="rect3189"
|
||||
width="67.644951"
|
||||
@ -314,7 +314,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot3193"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-383.10743,123.69209)"><flowRegion
|
||||
transform="translate(-383.10743,189.5088)"><flowRegion
|
||||
id="flowRegion3195"><rect
|
||||
id="rect3197"
|
||||
width="93.572754"
|
||||
@ -324,18 +324,6 @@
|
||||
id="flowPara3199"
|
||||
style="font-size:12px">common</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3201"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-409.5625,186.38349)"><flowRegion
|
||||
id="flowRegion3203"><rect
|
||||
id="rect3205"
|
||||
width="146.55243"
|
||||
height="40.274036"
|
||||
x="556.69971"
|
||||
y="55.761379" /></flowRegion><flowPara
|
||||
id="flowPara3207"
|
||||
style="font-size:12px">decoupled</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3209"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-370.56348,231.50068)"><flowRegion
|
||||
@ -376,7 +364,7 @@
|
||||
width="120"
|
||||
height="30"
|
||||
x="160"
|
||||
y="28.094482"
|
||||
y="93.911194"
|
||||
ry="2.42839" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
@ -384,17 +372,9 @@
|
||||
width="120"
|
||||
height="30"
|
||||
x="160"
|
||||
y="-202.97729"
|
||||
y="-268.79401"
|
||||
ry="2.42839"
|
||||
transform="scale(1,-1)" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect3237"
|
||||
width="120"
|
||||
height="30"
|
||||
x="160.89064"
|
||||
y="235.48123"
|
||||
ry="2.42839" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect3239"
|
||||
@ -423,7 +403,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot3253"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-233.57324,-43.982254)"><flowRegion
|
||||
transform="translate(-233.57324,21.834457)"><flowRegion
|
||||
id="flowRegion3255"><rect
|
||||
id="rect3257"
|
||||
width="93.572754"
|
||||
@ -435,7 +415,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot3281"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-240.58301,79.383492)"><flowRegion
|
||||
transform="translate(-240.58301,145.2002)"><flowRegion
|
||||
id="flowRegion3283"><rect
|
||||
id="rect3285"
|
||||
width="106.5874"
|
||||
@ -445,46 +425,6 @@
|
||||
id="flowPara3287"
|
||||
style="font-size:12px">specific models </flowPara></flowRoot> <rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect3291"
|
||||
width="120"
|
||||
height="30"
|
||||
x="310"
|
||||
y="216.97729"
|
||||
ry="2.42839" />
|
||||
<rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect3293"
|
||||
width="120"
|
||||
height="30"
|
||||
x="310"
|
||||
y="256.97729"
|
||||
ry="2.42839" />
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3295"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-233.57324,207.95618)"><flowRegion
|
||||
id="flowRegion3297"><rect
|
||||
id="rect3299"
|
||||
width="93.572754"
|
||||
height="38.18499"
|
||||
x="556.69971"
|
||||
y="55.761379" /></flowRegion><flowPara
|
||||
id="flowPara3301"
|
||||
style="font-size:12px">common</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3303"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-233.78711,168.38349)"><flowRegion
|
||||
id="flowRegion3305"><rect
|
||||
id="rect3307"
|
||||
width="93.572754"
|
||||
height="38.18499"
|
||||
x="556.69971"
|
||||
y="55.761379" /></flowRegion><flowPara
|
||||
id="flowPara3309"
|
||||
style="font-size:12px">specific models</flowPara></flowRoot> <rect
|
||||
style="fill:none;stroke:#000000;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
|
||||
id="rect3335"
|
||||
width="120"
|
||||
height="30"
|
||||
@ -509,7 +449,7 @@
|
||||
ry="2.42839" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1.18635452px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 160.91412,688.09448 -30,0 L 130,44.094482 l 30,0"
|
||||
d="m 160.91412,753.09448 -30,0 -0.91412,-644 30,0"
|
||||
id="path3347"
|
||||
sodipodi:nodetypes="cccc"
|
||||
inkscape:connector-curvature="0" />
|
||||
@ -526,7 +466,7 @@
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 130.91412,188.09448 29.08588,0"
|
||||
d="m 130.91412,253.91119 29.08588,0"
|
||||
id="path3355"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0" />
|
||||
@ -569,16 +509,6 @@
|
||||
id="flowPara3407"
|
||||
style="font-size:12px;fill:#000000">fluidsystems</flowPara></flowRoot> <path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
|
||||
d="m 430,230.97729 60,0"
|
||||
id="path4203"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
|
||||
d="m 430,272.97729 60,0"
|
||||
id="path4205"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
|
||||
d="m 430,412.09448 60,0"
|
||||
id="path4207"
|
||||
inkscape:connector-curvature="0" />
|
||||
@ -600,7 +530,7 @@
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
|
||||
d="m 280,188.97729 210,0"
|
||||
d="m 280,254.794 210,0"
|
||||
id="path4217"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0" />
|
||||
@ -619,7 +549,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot4295"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(157.88135,92.255242)"><flowRegion
|
||||
transform="translate(157.88135,158.07195)"><flowRegion
|
||||
id="flowRegion4297"><rect
|
||||
id="rect4299"
|
||||
width="510.99359"
|
||||
@ -631,7 +561,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot4303"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(158.34326,-27.744758)"><flowRegion
|
||||
transform="translate(158.34326,38.071953)"><flowRegion
|
||||
id="flowRegion4305"><rect
|
||||
id="rect4307"
|
||||
width="553.04321"
|
||||
@ -643,7 +573,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot2506"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(158.34326,137.01181)"><flowRegion
|
||||
transform="translate(158.34326,202.82852)"><flowRegion
|
||||
id="flowRegion2508"><rect
|
||||
id="rect2510"
|
||||
width="510.99359"
|
||||
@ -653,18 +583,6 @@
|
||||
id="flowPara2512"
|
||||
style="font-size:11px;text-align:start;text-anchor:start">Common infrastructure (time management, start-up routines, propterty sytem, ...)</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot2522"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(157.88135,178.29595)"><flowRegion
|
||||
id="flowRegion2524"><rect
|
||||
id="rect2526"
|
||||
width="510.99359"
|
||||
height="42.963688"
|
||||
x="339.13889"
|
||||
y="43.877808" /></flowRegion><flowPara
|
||||
id="flowPara2528"
|
||||
style="font-size:11px;text-align:start;text-anchor:start">Physical models using a sequential (IMPET) discretization.</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot2530"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(157.88135,242.08193)"><flowRegion
|
||||
@ -677,18 +595,6 @@
|
||||
style="font-size:11px;text-align:start;text-anchor:start"
|
||||
id="flowPara2546">In-/output infrastructure (writing/reading checkpoint files, writing VTK files)</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot2538"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(157.88135,220.25688)"><flowRegion
|
||||
id="flowRegion2540"><rect
|
||||
id="rect2542"
|
||||
width="510.99359"
|
||||
height="42.963688"
|
||||
x="339.13889"
|
||||
y="43.877808" /></flowRegion><flowPara
|
||||
id="flowPara2544"
|
||||
style="font-size:11px;text-align:start;text-anchor:start">Base classes and general files for the IMPET models</flowPara></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot2550"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(157.88135,361.36753)"><flowRegion
|
||||
@ -745,17 +651,7 @@
|
||||
height="31.994234"
|
||||
x="501.85242"
|
||||
y="542.98785" /></flowRegion><flowPara
|
||||
id="flowPara2732" /></flowRoot> <path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 280.63514,250.76982 18.28242,0 0,-21.02478 10.96945,0"
|
||||
id="path2762"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 298.91756,250.76982 0,21.93891 11.88358,0"
|
||||
id="path2764"
|
||||
inkscape:connector-curvature="0" />
|
||||
<flowRoot
|
||||
id="flowPara2732" /></flowRoot> <flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3209-3"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
@ -1006,7 +902,7 @@
|
||||
x="1520.2885"
|
||||
y="414.44009" /></text>
|
||||
<g
|
||||
transform="translate(0,40.062744)"
|
||||
transform="translate(0,105.87945)"
|
||||
id="g4323-9">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
@ -1030,7 +926,7 @@
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(0,-0.87451172)"
|
||||
transform="translate(0,64.942199)"
|
||||
id="g4323-9-5">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
@ -1054,7 +950,7 @@
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(0,-41.811768)"
|
||||
transform="translate(0,24.004943)"
|
||||
id="g4323-9-6">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
@ -1078,7 +974,7 @@
|
||||
sodipodi:nodetypes="cc" />
|
||||
</g>
|
||||
<g
|
||||
transform="translate(0,81)"
|
||||
transform="translate(0,146.81671)"
|
||||
id="g4323-9-1">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
@ -1105,7 +1001,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot3281-4"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-240.41308,-3.6165075)"><flowRegion
|
||||
transform="translate(-240.41308,62.200203)"><flowRegion
|
||||
id="flowRegion3283-8"><rect
|
||||
id="rect3285-6"
|
||||
width="106.5874"
|
||||
@ -1117,7 +1013,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot4303-6"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(157.88135,12.255241)"><flowRegion
|
||||
transform="translate(157.88135,78.071952)"><flowRegion
|
||||
id="flowRegion4305-3"><rect
|
||||
id="rect4307-5"
|
||||
width="553.04321"
|
||||
@ -1129,7 +1025,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot3281-4-6"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(-240.50683,36.383492)"><flowRegion
|
||||
transform="translate(-240.50683,102.2002)"><flowRegion
|
||||
id="flowRegion3283-8-0"><rect
|
||||
id="rect3285-6-8"
|
||||
width="106.5874"
|
||||
@ -1141,7 +1037,7 @@
|
||||
xml:space="preserve"
|
||||
id="flowRoot4303-6-9"
|
||||
style="font-size:18px;font-style:normal;font-weight:normal;text-align:center;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
|
||||
transform="translate(157.88135,52.255242)"><flowRegion
|
||||
transform="translate(157.88135,118.07195)"><flowRegion
|
||||
id="flowRegion4305-3-1"><rect
|
||||
id="rect4307-5-3"
|
||||
width="553.04321"
|
||||
@ -1151,21 +1047,15 @@
|
||||
id="flowPara4309-2-1"
|
||||
style="font-size:11px;text-align:start;text-anchor:start">Plug-ins for the physical models (energy, velocity, diffusion, ...)</flowPara></flowRoot> <path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 280,44.094482 19,0"
|
||||
d="m 280,109.91119 19,0"
|
||||
id="path2762-9"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 299,142.09448 299,19.094482"
|
||||
d="M 299,207.91119 299,84.911193"
|
||||
id="path4587"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 130.91412,251.09448 29.08588,0"
|
||||
id="path3355-2"
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0" />
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot3209-3-4"
|
||||
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 47 KiB |
@ -173,28 +173,6 @@ subdirectories of \texttt{ewoms/boxmodels} of the \eWoms distribution.
|
||||
\subsubsection{The (Navier-)Stokes model}
|
||||
\input{ModelDescriptions/stokesmodel}
|
||||
|
||||
\subsection{Semi-implicit models}
|
||||
%
|
||||
The basic idea the so-called decoupled models have in common is to reformulate the equations of multi-phase flow (e.g. Eq. \ref{A3:eqmass1}) into one equation for pressure and equations for phase-/component-/etc. transport. The pressure equation is the sum of the mass balance equations and thus considers the total flow of the fluid system. The new set of equations is considered as decoupled (or weakly coupled) and can thus be solved sequentially. The most popular decoupled model is the so-called fractional flow formulation for two-phase flow which is usually implemented applying an IMplicit Pressure Explicit Saturation algorithm (IMPES).
|
||||
In comparison to a fully implicit model, the decoupled structure allows the use of different discretization methods for the different equations. The standard method used in the decoupled models is a cell centered finite volume method. Further schemes, so far only available for the two-phase pressure equation, are cell centered finite volumes with multi-point flux approximation (MPFA O-method) and mimetic finite differences.
|
||||
|
||||
An h-adaptive implementation of both \nameref{ch:2p_decoupled} and \nameref{ch:2p2c_decoupled} is provided for two dimensions.
|
||||
%
|
||||
\subsubsection{The one-phase model}
|
||||
\input{ModelDescriptions/1pdecoupledmodel}
|
||||
|
||||
\subsubsection{The two-phase model}\label{ch:2p_decoupled}
|
||||
|
||||
\paragraph{Pressure model}
|
||||
\input{ModelDescriptions/2pdecoupledpressuremodel}
|
||||
|
||||
\paragraph{Saturation model}
|
||||
\input{ModelDescriptions/2pdecoupledsaturationmodel}
|
||||
|
||||
\subsubsection{The two-phase, two-component model}\label{ch:2p2c_decoupled}
|
||||
\input{ModelDescriptions/2p2cdecoupledpressuremodel}
|
||||
\input{ModelDescriptions/2p2cdecoupledtransportmodel}
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "ewoms-handbook"
|
||||
|
@ -22,8 +22,8 @@ will be explained in more detail below:
|
||||
\noindent In more detail:
|
||||
|
||||
\textbf{First} of all, the new directory including all relevant files
|
||||
needs to be created (see section \ref{tutorial-coupled} and
|
||||
\ref{tutorial-decoupled} for description of how to define problems).
|
||||
needs to be created (see section \ref{tutorial-coupled} for a
|
||||
description of how to define problems).
|
||||
|
||||
\textbf{Second}, a new \texttt{Makefile.am} for the new directory
|
||||
needs to be created. It is good practice to simply copy and modify an
|
||||
@ -31,7 +31,7 @@ existing file. For example, the file \texttt{tutorial/Makefile.am}
|
||||
looks as follows:
|
||||
\begin{verbatim}
|
||||
# programs just to build when "make check" is used
|
||||
check_PROGRAMS = tutorial_decoupled tutorial_coupled
|
||||
check_PROGRAMS = tutorial_coupled
|
||||
|
||||
noinst_HEADERS= *.hh
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
@ -52,10 +52,6 @@ The directory \texttt{ewoms} contains the \eWoms source files. It consists of th
|
||||
\texttt{start.hh} which provides the default way for starting a
|
||||
simulation.
|
||||
|
||||
\item \texttt{decoupled}:
|
||||
Numerical models to solve the pressure equation as part of the fractional flow formulation. The specific models are contained
|
||||
in corresponding subdirectories. In each model folder are subdirectories for the implicit pressure equation sorted by the employed discretization method, and for the explicit transport equation. The general semi-implicit formulation for the implicit pressure, explicit transport formulation can be found in the subdirectory \texttt{common}.
|
||||
|
||||
\item \texttt{io}: Additional classes that provide in-/output routines
|
||||
like writing and reading restart files (often called 'checkpoint'
|
||||
files) and for writing a series of VTK files.
|
||||
@ -98,11 +94,10 @@ The directory \texttt{ewoms} contains the \eWoms source files. It consists of th
|
||||
The directory \texttt{test} contains at least one test/example for
|
||||
each numerical model and for each important aspect of the common
|
||||
\eWoms infrastructure. The directory \texttt{common} contains a test
|
||||
for the property system. The sub-directory \texttt{boxmodels}
|
||||
for the property system. The sub-directory \texttt{implicit}
|
||||
contains test applications for the fully-implicit models (where each
|
||||
test is named according to the scheme \texttt{PROBLEMNAME\_MODDEL}),
|
||||
while the subdirectory \texttt{decoupled} features tests for the
|
||||
semi-implicit models. Each subdirectory contains one or more program
|
||||
test is named according to the scheme \texttt{PROBLEMNAME\_MODDEL}).
|
||||
Each subdirectory contains one or more program
|
||||
files \texttt{*.cc} which contain the main function for the
|
||||
test. Moreover, the problem definitions can be found in the
|
||||
\texttt{*problem.hh} files. Simply executing the tests should either
|
||||
|
@ -1,4 +1,4 @@
|
||||
\section{Solving problems using the fully-implicit models}
|
||||
\section{Upfront considerations}
|
||||
\label{tutorial-coupled}
|
||||
|
||||
The process of setting up a problem using \eWoms can be roughly
|
||||
|
@ -1,327 +0,0 @@
|
||||
\section{Solving problems using the semi-implicit models}
|
||||
\label{tutorial-decoupled}
|
||||
|
||||
In contrast to the last section, we now apply a semi-implicit solution procedure, a
|
||||
so-called \textit{IMPET} (\textit{IM}plicit \textit{P}ressure \textit{E}xplicit
|
||||
\textit{T}ransport) algorithm. This means that the pressure equation is first
|
||||
solved using an implicit method. The resulting velocities are then used to solve
|
||||
a transport equation explicitly.\\
|
||||
In this tutorial, pure fluid phases are solved with a finite volume discretization
|
||||
of both pressure- and transport step. Primary variables, according to default
|
||||
settings of the model, are the pressure and the saturation of the wetting phase.
|
||||
|
||||
The problem which is solved in this tutorial is the same as for the previous tutorial and is illustrated in figure
|
||||
\ref{tutorial-decoupled:problemfigure}: A rectangular domain with no flow
|
||||
boundaries on the top and at the bottom, which is initially saturated with oil,
|
||||
is considered. Water infiltrates from the left side into the domain. Gravity
|
||||
effects are neglected.
|
||||
|
||||
\begin{figure}[ht]
|
||||
\psfrag{x}{x}
|
||||
\psfrag{y}{y}
|
||||
\psfrag{no flow}{no flow}
|
||||
\psfrag{water}{\textbf{water}}
|
||||
\psfrag{oil}{\textcolor{white}{\textbf{oil}}}
|
||||
\psfrag{p_w = 2 x 10^5 [Pa]}{$p_w = 2 \times 10^5$ [Pa]}
|
||||
\psfrag{p_w_initial = 2 x 10^5 [Pa]}{\textcolor{white}{\textbf{$\mathbf{p_{w_{initial}} = 2 \times 10^5}$ [Pa]}}}
|
||||
\psfrag{S_n = 0}{$S_w = 1$}
|
||||
\psfrag{S_n_initial = 0}{\textcolor{white}{$\mathbf{S_{w_{initial}} = 0}$}}
|
||||
\psfrag{q_w = 0 [kg/m^2s]}{$q_w = 0$ $\left[\frac{\textnormal{kg}}{\textnormal{m}^2 \textnormal{s}}\right]$}
|
||||
\psfrag{q_n = -3 x 10^-4 [kg/m^2s]}{$q_n = 3 \times 10^-2$ $\left[\frac{\textnormal{kg}}{\textnormal{m}^2 \textnormal{s}}\right]$}
|
||||
\centering
|
||||
\includegraphics[width=0.9\linewidth,keepaspectratio]{EPS/tutorial-problemconfiguration}
|
||||
\caption{Geometry of the tutorial problem with initial and boundary conditions.}\label{tutorial-decoupled:problemfigure}
|
||||
\end{figure}
|
||||
|
||||
Listing \ref{tutorial-decoupled:mainfile} shows how the main file, which has to be executed, has to be set up, if the problem described above is to be solved using a semi-implicit model. This main file can be found in the directory \texttt{/tutorial} below the \eWoms base directory.
|
||||
|
||||
\begin{lst}[File tutorial/tutorial\_decoupled.cc]\label{tutorial-decoupled:mainfile} \mbox{}
|
||||
\lstinputlisting[style=eWomsCode, numbersep=5pt, firstline=26, firstnumber=26]{../../tutorial/tutorial_decoupled.cc}
|
||||
\end{lst}
|
||||
|
||||
First, from line \ref{tutorial-decoupled:include-begin} to line
|
||||
\ref{tutorial-decoupled:include-end} the \Dune and \eWoms files containing
|
||||
essential functions and classes are included.
|
||||
|
||||
At line \ref{tutorial-decoupled:set-type-tag} the type tag of the
|
||||
problem which is going to be simulated is set. All other data types
|
||||
can be retrieved by the \eWoms property system and only depend on this
|
||||
single type tag. For an introduction to the
|
||||
property system, see section \ref{sec:propertysystem}.
|
||||
|
||||
After this, \eWoms' default startup routine \texttt{Ewoms::start()} is
|
||||
called in line \ref{tutorial-decoupled:call-start}. This function deals
|
||||
with parsing the command line arguments,
|
||||
setting up the infrastructure necessary for \Dune, loading the grid, and
|
||||
starting the simulation. All parameters can
|
||||
be either specified by command line arguments of the form
|
||||
(\texttt{--ParameterName=ParameterValue}), or in the file specified by the
|
||||
\texttt{--ParameterFile=filename.ini} argument. If a parameter is
|
||||
specified on the command line as well as in the parameter file, the
|
||||
values provided in the command line takes
|
||||
precedence.
|
||||
|
||||
\subsection{The problem class} \label{decoupled_problem}
|
||||
|
||||
When solving a problem using \eWoms, the most important file is the
|
||||
so-called \textit{problem file} as shown in listing
|
||||
\ref{tutorial-decoupled:problemfile} of
|
||||
\texttt{tutorialproblem\_decoupled.hh}.
|
||||
|
||||
\begin{lst}[File tutorial/tutorialproblem\_decoupled.hh]\label{tutorial-decoupled:problemfile} \mbox{}
|
||||
\lstinputlisting[style=eWomsCode, numbersep=5pt, firstline=27, firstnumber=27]{../../tutorial/tutorialproblem_decoupled.hh}
|
||||
\end{lst}
|
||||
|
||||
First, both \Dune grid handlers and the semi-implicit model of \eWoms
|
||||
have to be included. Then, a new type tag is created for the problem
|
||||
in line \ref{tutorial-decoupled:create-type-tag}. In this case, the
|
||||
new type tag inherits all properties defined for the \texttt{DecoupledTwoP}
|
||||
type tag, which means that for this problem the two-phase decoupled approach
|
||||
is chosen as discretization scheme (defined via the include in line
|
||||
\ref{tutorial-decoupled:parent-problem}). On line \ref{tutorial-decoupled:set-problem},
|
||||
a problem class is attached to the new type tag, while the grid which
|
||||
is going to be used is defined in line \ref{tutorial-decoupled:set-grid-type} --
|
||||
in this case an \texttt{YaspGrid} is created. Since there's no uniform mechanism to
|
||||
allocate grids in \Dune, \eWoms features the concept of grid creators.
|
||||
In this case the generic \texttt{CubeGridCreator} (line \ref{tutorial-decoupled:set-gridcreator}) which creates a
|
||||
structured hexahedron grid of a specified size and resolution. For
|
||||
this grid creator the physical domain of the grid is specified via the
|
||||
run-time parameters \texttt{DomanSizeX},
|
||||
\texttt{DomanSizeY}, \texttt{CellsX} and
|
||||
\texttt{CellsY}. These parameters can be specified via
|
||||
the command-line or in a parameter file.
|
||||
For more information about the \Dune grid interface, the different grid types
|
||||
that are supported and the generation of different grids consult
|
||||
the \textit{Dune Grid Interface HOWTO} \cite{DUNE-HP}.
|
||||
|
||||
Next, we select the material of the simulation: In the case of a pure two-phase
|
||||
model, each phase is a bulk fluid, and the complex (compositional) fluidsystems
|
||||
do not need to be used. However, they can be used (see exercise 1e).
|
||||
Instead, we use a simplified fluidsystem that wraps pure component classes
|
||||
for the liquid and gas phases. This is done from line \ref{tutorial-decoupled:2p-system-start} to
|
||||
\ref{tutorial-decoupled:2p-system-end}. These components represent fluids made of pure
|
||||
chemical species, but given the fact, that a even pure chemical species can assume two phases, only their respective liquid phase is selected on lines \ref{tutorial-decoupled:wettingPhase} and
|
||||
\ref{tutorial-decoupled:nonwettingPhase}. For all parameters that depend
|
||||
on space, such as the properties of the soil, the specific spatial parameters
|
||||
for the problem of interest are specified in line
|
||||
\ref{tutorial-decoupled:set-spatialparameters}.
|
||||
|
||||
Now we arrive at some model parameters of the applied two-phase semi-implicit
|
||||
model. First, in line \ref{tutorial-decoupled:cflflux} a flux function for the evaluation of the CFL-criterion is defined. This is optional as there exists also a default flux function. The choice depends on the problem which has to be solved. For cases which are not advection dominated, the one chosen here is more reasonable.
|
||||
Line \ref{tutorial-decoupled:cflfactor} assigns the CFL-factor to be used in the
|
||||
simulation run, which scales the time step size (kind of security factor). The next property, defined on line \ref{tutorial-decoupled:gravity}
|
||||
is optional and tells the model to disregard gravity.
|
||||
Finally, the default dimensions of the size of the physical and temporal
|
||||
domains are defined on lines
|
||||
\ref{tutorial-decoupled:domain-defaults-begin} to
|
||||
\ref{tutorial-decoupled:domain-defaults-end}.
|
||||
|
||||
After all necessary properties are defined and
|
||||
its \texttt{Properties} namespace is closed in line \ref{tutorial-decoupled:propertysystem-end},
|
||||
the problem class is defined in line \ref{tutorial-decoupled:def-problem}.
|
||||
As its property, the problem class itself is also derived from a parent,
|
||||
\texttt{IMPESProblem2P}.
|
||||
|
||||
Beside the definition of the boundary and initial conditions, the problem class also provides
|
||||
general information about the current simulation. First, the name used by for the
|
||||
resulting VTK output files is defined by the \texttt{name()} method of line
|
||||
\ref{tutorial-decoupled:name}, and line \ref{tutorial-decoupled:restart} indicates
|
||||
when and whether restart files are written. As semi-implicit schemes usually feature small
|
||||
timesteps, it can be useful to set an output interval larger than 1. The respective function is called in line \ref{tutorial-decoupled:outputinterval}, which gets the output interval as argument.
|
||||
|
||||
The following methods all have in common that they may be dependent on space.
|
||||
Hence, they all have either an \texttt{element} or an \texttt{intersection} as their
|
||||
function argument: Both are \Dune entities, depending on whether the parameter of the method is defined in an element, such as
|
||||
initial values, or on an intersection, such as a boundary condition. As it may be sufficient to return values only based on a position, \eWoms models can also access functions in the problem with the form \mbox{\texttt{...AtPos(GlobalPosition\& globalPos)}}, without an \Dune entity, as one can see in line \ref{tutorial-decoupled:bctype}.
|
||||
|
||||
There are also methods for terms of the partial differential equations which must be provided such as the source term, boundary conditions (lines \ref{tutorial-decoupled:bctype} to
|
||||
\ref{tutorial-decoupled:neumann}) and initial values for the transported
|
||||
quantity in line \ref{tutorial-decoupled:initial}. For more information
|
||||
on the functions, consult the documentation in the code.
|
||||
|
||||
\subsection{The definition of the parameters that are dependent on space}\label{tutorial-decoupled:description-spatialParameters}
|
||||
|
||||
Listing \ref{tutorial-decoupled:spatialparametersfile} shows the file
|
||||
\verb+tutorialspatialparams_decoupled.hh+:
|
||||
|
||||
\begin{lst}[File tutorial/tutorialspatialparams\_decoupled.hh]\label{tutorial-decoupled:spatialparametersfile} \mbox{}
|
||||
\lstinputlisting[style=eWomsCode, numbersep=5pt, firstline=27, firstnumber=27]{../../tutorial/tutorialspatialparams_decoupled.hh}
|
||||
\end{lst}
|
||||
The argument list for its methods here is the same as for the problem
|
||||
functions: Either an \texttt{element}, or only the global position if the function is called \texttt{...AtPos(...)}.
|
||||
|
||||
\subsection{Exercises}
|
||||
\label{tutorial-deoucpled:exercises}
|
||||
The following exercises will give you the opportunity to learn how you
|
||||
can change soil parameters, boundary conditions and fluid properties
|
||||
in \eWoms and is intended to give you an opportunity to play with the
|
||||
semi-implicit modelling framework.
|
||||
|
||||
\subsubsection{Exercise 1}
|
||||
\renewcommand{\labelenumi}{\alph{enumi})}
|
||||
For Exercise 1 you only have to make some small changes in the tutorial files.
|
||||
\begin{enumerate}
|
||||
\item \textbf{Altering output}
|
||||
|
||||
To get an impression what the results should look like, you can run
|
||||
the unmodified version of the semi-implicit tutorial problem by
|
||||
typing \texttt{./tutorial\_decoupled}. The runtime parameters which
|
||||
are set printed at the start of the simulation. You may either
|
||||
specify values for them on the command line by passing the program
|
||||
\texttt{--ParameterName=Value} arguments, or by putting parameters
|
||||
into a filie and instructing the program to load it by adding the
|
||||
command line option \texttt{--ParameterFile=filename}. For a
|
||||
description of the available parameters options you add the
|
||||
\texttt{--help} command line argument to the program. For the
|
||||
visualizing the output using paraview please refer to
|
||||
\ref{quick-start-guide}.
|
||||
|
||||
As you can see, the simulation creates many output files. To reduce
|
||||
these in order to perform longer simulations, change the method
|
||||
responsible for output (line \ref{tutorial-decoupled:outputinterval}
|
||||
in the file \texttt{tutorialproblem\_decoupled}) so that it only
|
||||
writes an output file every 20 time steps. Re-compile the program by
|
||||
typing \texttt{make tutorial\_decoupled} and run it again. Now, run
|
||||
the simulation for $500\;000$ seconds.
|
||||
|
||||
\item \textbf{Changing the Model Domain} \\
|
||||
Change the size of the model domain so that you get a rectangle
|
||||
with edge lengths of x = 300 m \\ and y = 300 m and with discretisation lengths of $\Delta \text{x} = 20$ m and $\Delta \text{y} = 10$ m. \\
|
||||
|
||||
|
||||
\item \textbf{Changing the Boundary Conditions} \\
|
||||
Change the boundary conditions in the file \texttt{tutorialproblem\_decoupled.hh} so that water enters from the bottom and oil flows out at the top boundary. The right and the left boundary should be closed for water and oil fluxes. The Neumannn Boundary conditions are multiplied by the normal (pointing outwards), so an influx is negative, an outflux always positive. Such information can easily be found in the documentation of the functions (also look into base classes).
|
||||
|
||||
\item \textbf{Changing Fluids} \\
|
||||
Now change the fluids: Use DNAPL instead of LNAPL and brine instead of water. To do that you have to select different components:
|
||||
\begin{enumerate}
|
||||
\item Brine: First, you need to add an \texttt{\#include} directive for \texttt{brine.hh}. The class \texttt{Ewoms::Brine} is an adapter class that slightly adapts the thermodynamic properties of pure water by adding some salt. Hence, the class \texttt{Ewoms::Brine} uses a pure water class, such as \texttt{Ewoms::H2O}, as a second template argument after the data type \texttt{<Scalar>} as a template argument.
|
||||
\item DNAPL: First, you need to change \texttt{\#include} directive from \texttt{lnapl.hh} to \texttt{dnapl.hh}. Then change the fluid used for the non-wetting phase from \texttt{LNAPL<Scalar>} to \texttt{DNAPL<Scalar>}
|
||||
\end{enumerate}
|
||||
If you want to take a closer look at how the fluid classes are defined and which substances are already available you may browse the files in the directory
|
||||
\texttt{/ewoms/material/components}.
|
||||
|
||||
\item \textbf{Use an \eWoms fluid system}\label{dec-ex1-fluidsystem} \\
|
||||
\eWoms usually organizes fluid mixtures via a \textit{fluid system}, see also chapter \ref{sec:fluidframework}. In order to include a fluid system you first have to comment the lines \ref{tutorial-coupled:2p-system-start} to \ref{tutorial-coupled:2p-system-end} in the problem file.\\
|
||||
|
||||
Now include the file \texttt{fluidsystems/h2oairsystem.hh} in the
|
||||
material folder, and set a property \texttt{FluidSystem} with the
|
||||
appropriate type,
|
||||
\texttt{Ewoms::FluidSystems::H2OAir<Scalar>}. However, this rather
|
||||
complicated fluidsystem uses tabularized fluid data, which need to be
|
||||
initialized at startup (i.e. the tables need to be filled with values)
|
||||
in the constructor body of the current problem by adding
|
||||
\texttt{GET\_PROP\_TYPE(TypeTag, FluidSystem)::init();}. Remember that
|
||||
the constructor function always has the same name as the respective
|
||||
class, i.e. \texttt{TutorialProblemDecoupled(..)}.
|
||||
|
||||
The density of the gas is magnitudes smaller than that of oil, so it
|
||||
is advisable to decrease the injection rate to $q_n = -3 \cdot 10^{-4}
|
||||
\frac{\text{kg}}{\text{m}^2 \text{s}}$. Also reduce the simulation
|
||||
duration to $20\;000$ seconds.
|
||||
|
||||
Before you proceed, please revert the changes made in this exercise,
|
||||
as we still use bulk phases and hence do not need such an extensive
|
||||
fluid system.
|
||||
|
||||
\item \textbf{Heterogeneities} \\
|
||||
Set up a model domain with the soil properties given in Figure
|
||||
\ref{tutorial-deoucpled:exercise1_d}. Adjust the boundary conditions
|
||||
so that water is again flowing from left to right.
|
||||
\begin{figure}[ht]
|
||||
\psfrag{K1 =}{K $= 10^{-8}\text{ m}^2$}
|
||||
\psfrag{phi1 =}{$\phi = 0.15$}
|
||||
\psfrag{K2 =}{\textcolor{white}{K $= 10^{-9}\text{ m}^2$}}
|
||||
\psfrag{phi2 =}{\textcolor{white}{$\phi = 0.3$}}
|
||||
\psfrag{600 m}{600 m}
|
||||
\psfrag{300 m}{300 m}
|
||||
\centering
|
||||
\includegraphics[width=0.5\linewidth,keepaspectratio]{EPS/exercise1_c.eps}
|
||||
\caption{Exercise 1d: Set-up of a model domain a heterogeneity. $\Delta \text{x} = 20$ m $\Delta \text{y} = 20$ m.}\label{tutorial-deoucpled:exercise1_d}
|
||||
\end{figure}
|
||||
When does the front cross the material border? In paraview, the option \textit{View} $\rightarrow$ \textit{Animation View} is nice to get a rough feeling of the timestep sizes.
|
||||
\end{enumerate}
|
||||
|
||||
\subsubsection{Exercise 2}
|
||||
For this exercise you should create a new problem file analogous to
|
||||
the file \texttt{tutorialproblem\_decoupled.hh} (e.g. with the name
|
||||
\texttt{ex2\_tutorialproblem\_decoupled.hh} and new spatial parameters
|
||||
just like \texttt{tutorialspatialparams\_decoupled.hh}. These files need to
|
||||
be included in the file \texttt{tutorial\_decoupled.cc}.
|
||||
|
||||
Each new files should contain the definition of a new class with a
|
||||
name that relates to the file name, such as \texttt{Ex2TutorialProblemDecoupled}.
|
||||
Make sure that you also adjust the guardian
|
||||
macros in lines \ref{tutorial-decoupled:guardian1} and \ref{tutorial-decoupled:guardian2}
|
||||
in the header files (e.g. change \\
|
||||
\texttt{EWOMS\_TUTORIALPROBLEM\_DECOUPLED\_HH} to
|
||||
\texttt{EWOMS\_EX2\_TUTORIALPROBLEM\_DECOUPLED\_HH}). Beside also adjusting the guardian macros,
|
||||
the new problem file should define and use a new type tag for the problem as well as a new problem class
|
||||
e.g. \texttt{Ex2TutorialProblemDecoupled}. Make sure to assign your newly defined spatial
|
||||
parameter class to the \texttt{SpatialParams} property for the new
|
||||
type tag.
|
||||
|
||||
After this, change the domain size (parameter input file) to match the domain described
|
||||
by figure \ref{tutorial-decoupled:ex2_Domain}. Adapt the problem class
|
||||
so that the boundary conditions are consistent with figure
|
||||
\ref{tutorial-decoupled:ex2_BC}. Initially, the domain is fully saturated
|
||||
with water and the pressure is $p_w = 2 \cdot 10^5 \text{Pa}$ . Oil
|
||||
infiltrates from the left side. Create a grid with $20$ cells in
|
||||
$x$-direction and $10$ cells in $y$-direction. The simulation time
|
||||
should be set to $2e4 \text{s}$.
|
||||
|
||||
Now include your new problem file in the main file and replace the
|
||||
\texttt{TutorialProblemDecoupled} type tag by the one you've created and
|
||||
compile the program.
|
||||
|
||||
|
||||
\begin{figure}[ht]
|
||||
\psfrag{K1}{K $= 10^{-7}\text{ m}^2$}
|
||||
\psfrag{phi1}{$\phi = 0.2$}
|
||||
\psfrag{Lin}{Brooks Corey Law}
|
||||
\psfrag{Lin2}{$\lambda = 1.8$, $p_b = 100$}
|
||||
\psfrag{K2}{K $= 10^{-9}\text{ m}^2$}
|
||||
\psfrag{phi2}{$\phi = 0.15$}
|
||||
\psfrag{BC1}{Brooks Corey Law}
|
||||
\psfrag{BC2}{$\lambda = 2$, $p_b = 500$}
|
||||
\psfrag{H1y}{50 m}
|
||||
\psfrag{H2y}{15 m}
|
||||
\psfrag{H3y}{20 m}
|
||||
\psfrag{L1x}{100 m}
|
||||
\psfrag{L2x}{50 m}
|
||||
\psfrag{L3x}{25 m}
|
||||
\centering
|
||||
\includegraphics[width=0.8\linewidth,keepaspectratio]{EPS/Ex2_Domain.eps}
|
||||
\caption{Set-up of the model domain and the soil parameters}\label{tutorial-decoupled:ex2_Domain}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}[ht]
|
||||
\psfrag{pw}{$p_w = 2 \times 10^5$ [\text{Pa}]}
|
||||
\psfrag{S}{$S_w = 0.0$}
|
||||
\psfrag{qw}{$q_w = 3 \times 10^{-4}$ [kg/$\text{m}^2$s]}
|
||||
\psfrag{qo}{$q_n = 0.0$ [kg/$\text{m}^2$s]}
|
||||
\psfrag{no flow}{no flow}
|
||||
\centering
|
||||
\includegraphics[width=0.8\linewidth,keepaspectratio]{EPS/Ex2_Boundary.eps}
|
||||
\caption{Boundary Conditions}\label{tutorial-decoupled:ex2_BC}
|
||||
\end{figure}
|
||||
|
||||
\begin{itemize}
|
||||
\item What happens if you increase the resolution of the grid? Hint: Paraview can visualize the timesteps via the ``Animation View'' (to be enabled unter the button \textit{View}).
|
||||
\item Set the CFL-factor to 1 and investigate the saturation: Is the value range reasonable?
|
||||
\item Further increase the CFL-factor to 2 and investigate the saturation.
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Exercise 3}
|
||||
Create a new file for benzene called \texttt{benzene.hh} and implement
|
||||
a new component. (You may get a hint by looking at existing components
|
||||
in the directory \verb+/ewoms/material/components+.)
|
||||
|
||||
Use benzene as a new fluid and run the model of Exercise 2 with water
|
||||
and benzene. Benzene has a density of $889.51 \, \text{kg} / \text{m}^3$
|
||||
and a viscosity of $0.00112 \, \text{Pa} \; \text{s}$.
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "ewoms-handbook"
|
||||
%%% End:
|
@ -4,43 +4,25 @@
|
||||
discretization in space and time and models that use a
|
||||
semi-implicit space and an explicit time discretization.
|
||||
|
||||
The semi-implicit models work by first implicitly solving a mass
|
||||
balance equation for all conservation quaintites combined. This
|
||||
procedire yields a pressure field. Then, the conserved quantities are
|
||||
transported using an explicit post-processing procedure based on of
|
||||
the pressure field obtained in the implicit step. These models are
|
||||
usually refered to be based on the IMPES approach (\textbf{i}mplicit
|
||||
\textbf{p}ressure \textbf{e}xplicit \textbf{s}aturation) or, more
|
||||
generally, on the IMPET approach (\textbf{i}mplicit \textbf{p}ressure
|
||||
\textbf{e}xplicit \textbf{t}ransport).
|
||||
|
||||
In contrast, the fully-implicit models describe the conservation
|
||||
quantities of a flow system as a system of strongly coupled partial
|
||||
differential equations which is directly using a non-linear
|
||||
solver. Physically, these conservation quantities are mass, momentum
|
||||
and energy; Although the momentum is usually not explicitly conserved
|
||||
in the context of flow models for porous media.
|
||||
Fully-implicit models as implemented by \eWoms describe the
|
||||
conservation quantities of a flow system as a system of strongly
|
||||
coupled partial differential equations which is directly using a
|
||||
non-linear solver. Physically, these conservation quantities are mass,
|
||||
momentum and energy; Although the momentum is usually not explicitly
|
||||
conserved in the context of flow models for porous media.
|
||||
|
||||
In section \ref{box} a short introduction to the vertex centered
|
||||
finite volume scheme (VCFV or box method) used by \eWoms as the
|
||||
spatial discretization of the fully-implicit models is given. The
|
||||
decoupled models usually employ a cell-centered finite volume scheme
|
||||
which is quite similar to the VCFV discretization, except that this
|
||||
scheme does not require to construct a dual grid centered around the
|
||||
primary grid's vertices.
|
||||
primary spatial discretization is given.
|
||||
|
||||
This chapter, first introduce how to solve flow problems using a
|
||||
fully-implicit model (section \ref{tutorial-coupled}) and then how to
|
||||
solve the same problem using a semi-implicit model (section
|
||||
\ref{tutorial-decoupled}). Being simple but representative case, an
|
||||
The purpose of this chapter is to introduce how flow problems can be
|
||||
solved in \eWoms. Being a simple but representative case, an
|
||||
isothermal two-phase problem (i.e. two fluid phases, one solid phase)
|
||||
will be considered. The source code of these tutorials is shipped with
|
||||
the \eWoms source package and can be found in the \texttt{tutorial}
|
||||
directory.
|
||||
|
||||
\input{tutorial-coupled}
|
||||
\input{tutorial-decoupled}
|
||||
%\input{tutorial-newmodel}
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
|
@ -5,4 +5,3 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
|
||||
include(EwomsAddTest)
|
||||
|
||||
EwomsAddTest(tutorial_coupled)
|
||||
EwomsAddTest(tutorial_decoupled)
|
||||
|
@ -1,36 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2010-2011 by Benjamin Faigle *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
*****************************************************************************/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief tutorial for the sequential two-phase model
|
||||
*/
|
||||
#include "config.h" /*@\label{tutorial-decoupled:include-begin}@*/
|
||||
|
||||
#include <ewoms/common/start.hh> /*@\label{tutorial-decoupled:include-end}@*/
|
||||
#include "tutorialproblem_decoupled.hh" /*@\label{tutorial-decoupled:include-problem-header}@*/
|
||||
|
||||
////////////////////////
|
||||
// the main function
|
||||
////////////////////////
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
typedef TTAG(TutorialProblemDecoupled) TypeTag; /*@\label{tutorial-decoupled:set-type-tag}@*/
|
||||
return Ewoms::start<TypeTag>(argc, argv); /*@\label{tutorial-decoupled:call-start}@*/
|
||||
}
|
@ -1,296 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2008-2012 by Markus Wolff *
|
||||
* Copyright (C) 2008-2012 by Andreas Lauser *
|
||||
* Copyright (C) 2010-2012 by Benjamin Faigle *
|
||||
* Copyright (C) 2009-2012 by Bernd Flemisch *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
*****************************************************************************/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \copydoc Ewoms::TutorialProblemDecoupled
|
||||
*/
|
||||
#ifndef EWOMS_TUTORIALPROBLEM_DECOUPLED_HH // guardian macro /*@\label{tutorial-decoupled:guardian1}@*/
|
||||
#define EWOMS_TUTORIALPROBLEM_DECOUPLED_HH // guardian macro /*@\label{tutorial-decoupled:guardian2}@*/
|
||||
|
||||
// assign parameters dependent on space (e.g. spatial parameters)
|
||||
#include "tutorialspatialparams_decoupled.hh" /*@\label{tutorial-decoupled:spatialparameters}@*/
|
||||
|
||||
// eWoms includes
|
||||
#include <ewoms/decoupled/2p/diffusion/fv/fvpressureproperties2p.hh>
|
||||
#include <ewoms/decoupled/2p/transport/fv/fvtransportproperties2p.hh>
|
||||
#include <ewoms/decoupled/2p/impes/impesproblem2p.hh> /*@\label{tutorial-decoupled:parent-problem}@*/
|
||||
|
||||
// include cfl-criterion after coats: more suitable if the problem is not advection dominated
|
||||
#include<ewoms/decoupled/2p/transport/fv/evalcflfluxcoats.hh>
|
||||
|
||||
// the components that are used
|
||||
#include <ewoms/material/components/simpleh2o.hh>
|
||||
#include <ewoms/material/components/lnapl.hh>
|
||||
|
||||
// the grid includes
|
||||
#include <ewoms/io/cubegridcreator.hh>
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
|
||||
// provides Dune::FieldVector
|
||||
#include <dune/common/fvector.hh>
|
||||
|
||||
namespace Ewoms {
|
||||
|
||||
template<class TypeTag>
|
||||
class TutorialProblemDecoupled;
|
||||
|
||||
//////////
|
||||
// Specify the properties for the lens problem
|
||||
//////////
|
||||
namespace Properties {
|
||||
// create a new type tag for the problem
|
||||
NEW_TYPE_TAG(TutorialProblemDecoupled, INHERITS_FROM(FVPressureTwoP, FVTransportTwoP, IMPESTwoP, TutorialSpatialParamsDecoupled)); /*@\label{tutorial-decoupled:create-type-tag}@*/
|
||||
|
||||
// Set the problem property
|
||||
SET_TYPE_PROP(TutorialProblemDecoupled, /*@\label{tutorial-decoupled:set-problem}@*/
|
||||
Problem,
|
||||
Ewoms::TutorialProblemDecoupled<TypeTag>);
|
||||
|
||||
// Set the grid type
|
||||
SET_TYPE_PROP(TutorialProblemDecoupled, Grid, Dune::YaspGrid<2>); /*@\label{tutorial-decoupled:set-grid-type}@*/
|
||||
|
||||
//Set the grid creator
|
||||
SET_TYPE_PROP(TutorialProblemDecoupled, GridCreator, Ewoms::CubeGridCreator<TypeTag>); /*@\label{tutorial-decoupled:set-gridcreator}@*/
|
||||
|
||||
// Set the wetting phase
|
||||
SET_PROP(TutorialProblemDecoupled, WettingPhase) /*@\label{tutorial-decoupled:2p-system-start}@*/
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
public:
|
||||
typedef Ewoms::LiquidPhase<Scalar, Ewoms::SimpleH2O<Scalar> > type; /*@\label{tutorial-decoupled:wettingPhase}@*/
|
||||
};
|
||||
|
||||
// Set the non-wetting phase
|
||||
SET_PROP(TutorialProblemDecoupled, NonwettingPhase)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
public:
|
||||
typedef Ewoms::LiquidPhase<Scalar, Ewoms::LNAPL<Scalar> > type; /*@\label{tutorial-decoupled:nonwettingPhase}@*/
|
||||
}; /*@\label{tutorial-decoupled:2p-system-end}@*/
|
||||
|
||||
SET_TYPE_PROP(TutorialProblemDecoupled, EvalCflFluxFunction, Ewoms::EvalCflFluxCoats<TypeTag>); /*@\label{tutorial-decoupled:cflflux}@*/
|
||||
SET_SCALAR_PROP(TutorialProblemDecoupled, ImpetCFLFactor, 0.95); /*@\label{tutorial-decoupled:cflfactor}@*/
|
||||
|
||||
// Disable gravity
|
||||
SET_BOOL_PROP(TutorialProblemDecoupled, EnableGravity, false); /*@\label{tutorial-decoupled:gravity}@*/
|
||||
|
||||
// define how long the simulation should run [s] /*@\label{tutorial-decoupled:domain-defaults-begin}@*/
|
||||
SET_SCALAR_PROP(TutorialProblemDecoupled, EndTime, 100e3);
|
||||
|
||||
// define the properties required by the cube grid creator
|
||||
SET_SCALAR_PROP(TutorialProblemDecoupled, DomainSizeX, 300.0);
|
||||
SET_SCALAR_PROP(TutorialProblemDecoupled, DomainSizeY, 60.0);
|
||||
SET_SCALAR_PROP(TutorialProblemDecoupled, DomainSizeZ, 0.0);
|
||||
|
||||
SET_INT_PROP(TutorialProblemDecoupled, CellsX, 100);
|
||||
SET_INT_PROP(TutorialProblemDecoupled, CellsY, 1);
|
||||
SET_INT_PROP(TutorialProblemDecoupled, CellsZ, 0); /*@\label{tutorial-decoupled:domain-defaults-end}@*/
|
||||
} /*@\label{tutorial-decoupled:propertysystem-end}@*/
|
||||
|
||||
/*! \ingroup DecoupledProblems
|
||||
* \brief Problem class for the decoupled tutorial
|
||||
*/
|
||||
template<class TypeTag>
|
||||
class TutorialProblemDecoupled: public IMPESProblem2P<TypeTag> /*@\label{tutorial-decoupled:def-problem}@*/
|
||||
{
|
||||
typedef IMPESProblem2P<TypeTag> ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
|
||||
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes;
|
||||
typedef typename GET_PROP(TypeTag, SolutionTypes) SolutionTypes;
|
||||
typedef typename SolutionTypes::PrimaryVariables PrimaryVariables;
|
||||
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
|
||||
enum
|
||||
{
|
||||
nPhaseIdx = Indices::nPhaseIdx,
|
||||
pwIdx = Indices::pwIdx,
|
||||
swIdx = Indices::swIdx,
|
||||
pressEqIdx = Indices::pressEqIdx,
|
||||
satEqIdx = Indices::satEqIdx
|
||||
};
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
|
||||
typedef typename GridView::Traits::template Codim<0>::Entity Element;
|
||||
typedef typename GridView::Intersection Intersection;
|
||||
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
|
||||
|
||||
public:
|
||||
TutorialProblemDecoupled(TimeManager &timeManager)
|
||||
: ParentType(timeManager, GET_PROP_TYPE(TypeTag, GridCreator)::grid().leafView()), eps_(1e-6)/*@\label{tutorial-decoupled:constructor-problem}@*/
|
||||
{
|
||||
//write only every 10th time step to output file
|
||||
this->setOutputInterval(10);/*@\label{tutorial-decoupled:outputinterval}@*/
|
||||
}
|
||||
|
||||
//! The problem name.
|
||||
/*! This is used as a prefix for files generated by the simulation.
|
||||
*/
|
||||
const char *name() const /*@\label{tutorial-decoupled:name}@*/
|
||||
{
|
||||
return "tutorial_decoupled";
|
||||
}
|
||||
|
||||
//! Returns true if a restart file should be written.
|
||||
/* The default behaviour is to write no restart file.
|
||||
*/
|
||||
bool shouldWriteRestartFile() const /*@\label{tutorial-decoupled:restart}@*/
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//! Returns the temperature within the domain at position globalPos.
|
||||
/*! This problem assumes a temperature of 10 degrees Celsius.
|
||||
*
|
||||
* \param element The finite volume element
|
||||
*
|
||||
* Alternatively, the function temperatureAtPos(const GlobalPosition& globalPos) could be
|
||||
* defined, where globalPos is the vector including the global coordinates of the finite volume.
|
||||
*/
|
||||
Scalar temperature(const Element& element) const /*@\label{tutorial-decoupled:temperature}@*/
|
||||
{
|
||||
return 273.15 + 10; // -> 10°C
|
||||
}
|
||||
|
||||
//! Returns a constant pressure to enter material laws at position globalPos.
|
||||
/* For incrompressible simulations, a constant pressure is necessary
|
||||
* to enter the material laws to gain a constant density etc. In the compressible
|
||||
* case, the pressure is used for the initialization of material laws.
|
||||
*
|
||||
* \param element The finite volume element
|
||||
*
|
||||
* Alternatively, the function referencePressureAtPos(const GlobalPosition& globalPos) could be
|
||||
* defined, where globalPos is the vector including the global coordinates of the finite volume.
|
||||
*/
|
||||
Scalar referencePressure(const Element& element) const /*@\label{tutorial-decoupled:refPressure}@*/
|
||||
{
|
||||
return 2e5;
|
||||
}
|
||||
|
||||
//! Source of mass \f$ [\frac{kg}{m^3 \cdot s}] \f$ of a finite volume.
|
||||
/*! Evaluate the source term for all phases within a given
|
||||
* volume.
|
||||
*
|
||||
* \param values Includes sources for the two phases
|
||||
* \param element The finite volume element
|
||||
*
|
||||
* The method returns the mass generated (positive) or
|
||||
* annihilated (negative) per volume unit.
|
||||
*
|
||||
* Alternatively, the function sourceAtPos(PrimaryVariables &values, const GlobalPosition& globalPos)
|
||||
* could be defined, where globalPos is the vector including the global coordinates of the finite volume.
|
||||
*/
|
||||
void source(PrimaryVariables &values, const Element& element) const /*@\label{tutorial-decoupled:source}@*/
|
||||
{
|
||||
values = 0;
|
||||
}
|
||||
|
||||
//! Type of boundary conditions at position globalPos.
|
||||
/*! Defines the type the boundary condition for the pressure equation,
|
||||
* either pressure (dirichlet) or flux (neumann),
|
||||
* and for the transport equation,
|
||||
* either saturation (dirichlet) or flux (neumann).
|
||||
*
|
||||
* \param bcTypes Includes the types of boundary conditions
|
||||
* \param globalPos The position of the center of the finite volume
|
||||
*
|
||||
* Alternatively, the function boundaryTypes(PrimaryVariables &values, const Intersection&
|
||||
* intersection) could be defined, where intersection is the boundary intersection.
|
||||
*/
|
||||
void boundaryTypesAtPos(BoundaryTypes &bcTypes, const GlobalPosition& globalPos) const /*@\label{tutorial-decoupled:bctype}@*/
|
||||
{
|
||||
if (globalPos[0] < this->bBoxMin()[0] + eps_)
|
||||
{
|
||||
bcTypes.setDirichlet(pressEqIdx);
|
||||
bcTypes.setDirichlet(satEqIdx);
|
||||
// bcTypes.setAllDirichlet(); // alternative if the same BC is used for both types of equations
|
||||
}
|
||||
// all other boundaries
|
||||
else
|
||||
{
|
||||
bcTypes.setNeumann(pressEqIdx);
|
||||
bcTypes.setNeumann(satEqIdx);
|
||||
// bcTypes.setAllNeumann(); // alternative if the same BC is used for both types of equations
|
||||
}
|
||||
}
|
||||
//! Value for dirichlet boundary condition at position globalPos.
|
||||
/*! In case of a dirichlet BC for the pressure equation the pressure \f$ [Pa] \f$, and for
|
||||
* the transport equation the saturation [-] have to be defined on boundaries.
|
||||
*
|
||||
* \param values Values of primary variables at the boundary
|
||||
* \param intersection The boundary intersection
|
||||
*
|
||||
* Alternatively, the function dirichletAtPos(PrimaryVariables &values, const GlobalPosition& globalPos)
|
||||
* could be defined, where globalPos is the vector including the global coordinates of the finite volume.
|
||||
*/
|
||||
void dirichlet(PrimaryVariables &values, const Intersection& intersection) const /*@\label{tutorial-decoupled:dirichlet}@*/
|
||||
{
|
||||
values[pwIdx] = 2e5;
|
||||
values[swIdx] = 1.0;
|
||||
}
|
||||
//! Value for neumann boundary condition \f$ [\frac{kg}{m^3 \cdot s}] \f$ at position globalPos.
|
||||
/*! In case of a neumann boundary condition, the flux of matter
|
||||
* is returned as a vector.
|
||||
*
|
||||
* \param values Boundary flux values for the different phases
|
||||
* \param globalPos The position of the center of the finite volume
|
||||
*
|
||||
* Alternatively, the function neumann(PrimaryVariables &values, const Intersection& intersection) could be defined,
|
||||
* where intersection is the boundary intersection.
|
||||
*/
|
||||
void neumannAtPos(PrimaryVariables &values, const GlobalPosition& globalPos) const /*@\label{tutorial-decoupled:neumann}@*/
|
||||
{
|
||||
values = 0;
|
||||
if (globalPos[0] > this->bBoxMax()[0] - eps_)
|
||||
{
|
||||
values[nPhaseIdx] = 3e-2;
|
||||
}
|
||||
}
|
||||
//! Initial condition at position globalPos.
|
||||
/*! Only initial values for saturation have to be given!
|
||||
*
|
||||
* \param values Values of primary variables
|
||||
* \param element The finite volume element
|
||||
*
|
||||
* Alternatively, the function initialAtPos(PrimaryVariables &values, const GlobalPosition& globalPos)
|
||||
* could be defined, where globalPos is the vector including the global coordinates of the finite volume.
|
||||
*/
|
||||
void initial(PrimaryVariables &values,
|
||||
const Element &element) const /*@\label{tutorial-decoupled:initial}@*/
|
||||
{
|
||||
values = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
const Scalar eps_;
|
||||
};
|
||||
} //end namespace
|
||||
|
||||
#endif
|
@ -1,150 +0,0 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*****************************************************************************
|
||||
* Copyright (C) 2010 by Bernd Flemisch *
|
||||
* Copyright (C) 2010-2012 by Markus Wolff *
|
||||
* Copyright (C) 2010-2012 by Andreas Lauser *
|
||||
* Copyright (C) 2010-2012 by Benjamin Faigle *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
||||
*****************************************************************************/
|
||||
/*!
|
||||
* \file
|
||||
* \copydoc Ewoms::TutorialSpatialParamsDecoupled
|
||||
*/
|
||||
#ifndef EWOMS_TUTORIAL_SPATIAL_PARAMETERS_DECOUPLED_HH
|
||||
#define EWOMS_TUTORIAL_SPATIAL_PARAMETERS_DECOUPLED_HH
|
||||
|
||||
#include <ewoms/parallel/mpihelper.hh>
|
||||
#include <ewoms/decoupled/spatialparams/fvspatialparams.hh>
|
||||
#include <ewoms/material/fluidmatrixinteractions/2p/linearmaterial.hh>
|
||||
#include <ewoms/material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh>
|
||||
#include <ewoms/material/fluidmatrixinteractions/2p/efftoabslaw.hh>
|
||||
|
||||
#include <dune/common/fmatrix.hh>
|
||||
|
||||
namespace Ewoms
|
||||
{
|
||||
|
||||
//forward declaration
|
||||
template<class TypeTag>
|
||||
class TutorialSpatialParamsDecoupled;
|
||||
|
||||
namespace Properties
|
||||
{
|
||||
// The spatial parameters TypeTag
|
||||
NEW_TYPE_TAG(TutorialSpatialParamsDecoupled);
|
||||
|
||||
// Set the spatial parameters
|
||||
SET_TYPE_PROP(TutorialSpatialParamsDecoupled, SpatialParams,
|
||||
Ewoms::TutorialSpatialParamsDecoupled<TypeTag>); /*@\label{tutorial-decoupled:set-spatialparameters}@*/
|
||||
|
||||
// Set the material law
|
||||
SET_PROP(TutorialSpatialParamsDecoupled, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
// material law typedefs
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef RegularizedBrooksCorey<Scalar> RawMaterialLaw;
|
||||
public:
|
||||
typedef EffToAbsLaw<RawMaterialLaw> type;
|
||||
};
|
||||
}
|
||||
|
||||
//! Definition of the spatial parameters for the decoupled tutorial
|
||||
|
||||
template<class TypeTag>
|
||||
class TutorialSpatialParamsDecoupled: public FVSpatialParams<TypeTag>
|
||||
{
|
||||
typedef FVSpatialParams<TypeTag> ParentType;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
|
||||
enum
|
||||
{dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1};
|
||||
typedef typename Grid::Traits::template Codim<0>::Entity Element;
|
||||
|
||||
typedef Dune::FieldMatrix<Scalar,dim,dim> FieldMatrix;
|
||||
|
||||
public:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
|
||||
typedef typename MaterialLaw::Params MaterialLawParams;
|
||||
|
||||
//! Intrinsic permeability tensor K \f$[m^2]\f$ depending
|
||||
/*! on the position in the domain
|
||||
*
|
||||
* \param element The finite volume element
|
||||
*
|
||||
* Alternatively, the function intrinsicPermeabilityAtPos(const GlobalPosition& globalPos) could be
|
||||
* defined, where globalPos is the vector including the global coordinates of the finite volume.
|
||||
*/
|
||||
const FieldMatrix& intrinsicPermeability (const Element& element) const
|
||||
{
|
||||
return K_;
|
||||
}
|
||||
|
||||
//! Define the porosity \f$[-]\f$ of the porous medium depending
|
||||
/*! on the position in the domain
|
||||
*
|
||||
* \param element The finite volume element
|
||||
*
|
||||
* Alternatively, the function porosityAtPos(const GlobalPosition& globalPos) could be
|
||||
* defined, where globalPos is the vector including the global coordinates of the finite volume.
|
||||
*/
|
||||
double porosity(const Element& element) const
|
||||
{
|
||||
return 0.2;
|
||||
}
|
||||
|
||||
/*! Return the parameter object for the material law (i.e. Brooks-Corey)
|
||||
* depending on the position in the domain
|
||||
*
|
||||
* \param element The finite volume element
|
||||
*
|
||||
* Alternatively, the function materialLawParamsAtPos(const GlobalPosition& globalPos)
|
||||
* could be defined, where globalPos is the vector including the global coordinates of
|
||||
* the finite volume.
|
||||
*/
|
||||
const MaterialLawParams& materialLawParams(const Element &element) const
|
||||
{
|
||||
return materialLawParams_;
|
||||
}
|
||||
|
||||
//! Constructor
|
||||
TutorialSpatialParamsDecoupled(const GridView& gridView)
|
||||
: ParentType(gridView), K_(0)
|
||||
{
|
||||
for (int i = 0; i < dim; i++)
|
||||
K_[i][i] = 1e-7;
|
||||
|
||||
// residual saturations
|
||||
materialLawParams_.setSwr(0);
|
||||
materialLawParams_.setSnr(0);
|
||||
|
||||
// parameters for the Brooks-Corey Law
|
||||
// entry pressures
|
||||
materialLawParams_.setPe(500);
|
||||
|
||||
// Brooks-Corey shape parameters
|
||||
materialLawParams_.setLambda(2);
|
||||
}
|
||||
|
||||
private:
|
||||
MaterialLawParams materialLawParams_;
|
||||
FieldMatrix K_;
|
||||
};
|
||||
|
||||
} // end namespace
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user