run pre-commit with updated .pre-commit-config.yaml

This commit is contained in:
Kai Bao committed 2025-10-13 21:56:30 +02:00
1 parent 253c9de64c
commit c8fae0abcc
92 files changed
+10251 -10276

No files matched your search

-1
View File
@@ -23,4 +23,3 @@ INPUT += @abs_top_srcdir@/opm/
# the \include command).
# EXAMPLE_PATH += @abs_top_srcdir@/examples/
@@ -38,4 +38,3 @@ The primary variables used by this model are\-:
\item The pressure of the phase with the lowest index
\item The two saturations of the phases with the lowest indices
\end{itemize}
@@ -32,4 +32,3 @@ The model uses the following primary variables\-:
\item The total molar concentration of each component\-: $c^\kappa = \sum_\alpha S_\alpha x_\alpha^\kappa \rho_{mol, \alpha}$
\item The absolute temperature \$\-T\$ in Kelvins if the energy equation enabled.
\end{itemize}
@@ -21,4 +21,3 @@ The model uses the following primary variables\-:
\item The saturations $S_\alpha$ of the $M - 1$ phases that exhibit the lowest indices
\item The absolute temperature $T$ in Kelvin if energy is conserved via the energy equation
\end{itemize}
@@ -34,4 +34,3 @@ The model assumes local thermodynamic equilibrium and uses the following primary
\item The saturations of the first $M-1$ phases $S_1, \dots, S_{M-1}$
\item Temperature $T$ if the energy equation is enabled
\end{itemize}
@@ -48,4 +48,3 @@ The model always requires $N$ primary variables, but their interpretation is dep
\end{itemize}
This model is then discretized using a fully-\/coupled vertex centered finite volume (box) scheme as spatial and the implicit Euler method as temporal discretization.
@@ -9,4 +9,3 @@ In the unsaturated zone, Richards' equation is frequently used to approximate th
In contrast to the \char`\"{}full\char`\"{} two-\/phase model, the Richards model assumes that the non-\/wetting fluid is gas and that it thus exhibits a much lower viscosity than the (liquid) wetting phase. (This assumption is quite realistic in many applications\-: For example, at atmospheric pressure and at room temperature, the viscosity of air is only about $1\%$ of the viscosity of liquid water.) As a consequence, the $\frac{k_{r\alpha}}{\mu_\alpha}$ term typically is much larger for the gas phase than for the wetting phase. Using this reasoning, the Richards model assumes that $\frac{k_{rn}}{\mu_n}$ is infinitely large compared to the same term of the liquid phase. This implies that the pressure of the gas phase is equivalent to the static pressure distribution and that therefore, mass conservation only needs to be considered for the liquid phase.
The model thus choses the absolute pressure of the wetting phase $p_w$ as its only primary variable. The wetting phase saturation is calculated using the inverse of the capillary pressure, i.\-e. \[ S_w = p_c^{-1}(p_n - p_w) \] holds, where $p_n$ is a reference pressure given by the problem's {\ttfamily reference\-Pressure()} method. Nota bene, that the last step assumes that the capillary pressure-\/saturation curve can be uniquely inverted, i.\-e. it is not possible to set the capillary pressure to zero if the Richards model ought to be used!
@@ -9,4 +9,3 @@ This model implements Navier-\/\-Stokes flow of a single fluid. By default, it s
If the property {\ttfamily Enable\-Navier\-Stokes} is set to {\ttfamily true}, an additional convective momentum flux term (Navier term) gets included into the momentum conservation equations which allows to capture turbolent flow regimes. This additional term is given by \[ \varrho \left(\mathbf{v} \cdot \boldsymbol{\nabla} \right) \mathbf{v} \;. \]
These equations are discretized by a fully-\/coupled vertex-\/centered finite volume (box) scheme in space and using the implicit Euler method in time. Be aware, that this discretization scheme is quite unstable for the Navier-\/\-Stokes equations and quickly leads to unphysical oscillations in the calculated solution. We intend to use a more appropriate discretization scheme in the future, though.
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Metric
A4
A4
100.00
Single
-2
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Metric
A4
A4
100.00
Single
-2
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Metric
A4
A4
100.00
Single
-2
+1 -1
View File
@@ -2,7 +2,7 @@
Landscape
Center
Metric
A4
A4
100.00
Single
-2
+14 -14
View File
@@ -1,8 +1,8 @@
\section{Box method - A short introduction}\label{box}
For the spatial discretization the so called BOX-method is used which unites the advantages of the finite-volume (FV) and finite-element (FE) methods.
For the spatial discretization the so called BOX-method is used which unites the advantages of the finite-volume (FV) and finite-element (FE) methods.
First, the model domain $G$ is discretized with a FE mesh consisting of nodes i and corresponding elements $E_k$. Then, a secondary FV mesh is constructed by connecting the midpoints and barycenters of the elements surrounding node i creating a box $B_i$ around node i (see Figure \ref{pc:box}a).
First, the model domain $G$ is discretized with a FE mesh consisting of nodes i and corresponding elements $E_k$. Then, a secondary FV mesh is constructed by connecting the midpoints and barycenters of the elements surrounding node i creating a box $B_i$ around node i (see Figure \ref{pc:box}a).
\begin{figure} [h]
\includegraphics[width=0.8\linewidth,keepaspectratio]{EPS/box_disc}
@@ -32,33 +32,33 @@ Like the FE method, the BOX-method follows the principle of weighted residuals.
\begin{minipage}[b]{0.47\textwidth}
\begin{equation}
\label{eq:p}
\label{eq:p}
\tilde p = \sum_i N_i \hat{p_i}
\end{equation}
\begin{equation}
\label{eq:v}
\label{eq:v}
\tilde{\mathbf v} = \sum_i N_i \hat{\mathbf v}
\end{equation}
\begin{equation}
\label{eq:x}
\tilde x^\kappa = \sum_i N_i \hat x^\kappa
\label{eq:x}
\tilde x^\kappa = \sum_i N_i \hat x^\kappa
\end{equation}
\end{minipage}
\hfill
\begin{minipage}[b]{0.47\textwidth}
\begin{equation}
\label{eq:dp}
\label{eq:dp}
\nabla \tilde p = \sum_i \nabla N_i \hat{p_i}
\end{equation}
\begin{equation}
\label{eq:dv}
\label{eq:dv}
\nabla \tilde{\mathbf v} = \sum_i \nabla N_i \hat{\mathbf v}
\end{equation}
\begin{equation}
\label{eq:dx}
\label{eq:dx}
\nabla \tilde x^\kappa = \sum_i \nabla N_i \hat x^\kappa .
\end{equation}
\end{minipage}
\end{minipage}
Due to the approximation with node values and basis functions the differential equations are not exactly fulfilled anymore but a residual $\varepsilon$ is produced.
@@ -96,7 +96,7 @@ where $V_i$ is the volume of the FV box $B_i$ associated with node i. The applic
V_i \frac{\partial \hat u_i}{\partial t} + \int_{\partial G} \left[ W_j \cdot F(\tilde u)\right] \cdot \mathbf n \: d\varGamma_G + \int_G \nabla W_j \cdot F(\tilde u) \: dG- V_i \cdot q = 0 \, .
\end{equation}
Defining the weighting function $W_j$ to be piecewisely constant over a control volume box $B_i$
Defining the weighting function $W_j$ to be piecewisely constant over a control volume box $B_i$
\begin{equation}
W_j(x) = \begin{cases}
@@ -108,13 +108,13 @@ Defining the weighting function $W_j$ to be piecewisely constant over a control
causes $\nabla W_j = 0$:
\begin{equation}
\label{eq:disc1}
\label{eq:disc1}
V_i \frac{\partial \hat u_i}{\partial t} + \int_{\partial B_i} \left[ W_j \cdot F(\tilde u)\right] \cdot \mathbf n \; d{\varGamma}_{B_i} - V_i \cdot q = 0 .
\end{equation}
The consideration of the time discretization and inserting $W_j = 1$ finally lead to the discretized form which will be applied to the mathematical flow and transport equations:
\begin{equation}
\label{eq:discfin}
V_i \frac{\hat u_i^{n+1} - \hat u_i^{n}}{\Delta t} + \int_{\partial B_i} F(\tilde u^{n+1}) \cdot \mathbf n \; d{\varGamma}_{B_i} - V_i \: q^{n+1} \: = 0
\label{eq:discfin}
V_i \frac{\hat u_i^{n+1} - \hat u_i^{n}}{\Delta t} + \int_{\partial B_i} F(\tilde u^{n+1}) \cdot \mathbf n \; d{\varGamma}_{B_i} - V_i \: q^{n+1} \: = 0
\end{equation}
+13 -13
View File
@@ -138,11 +138,11 @@ executed is dynamically determined at run time.
// The base class
class Car
{public:
virtual double gasUsage()
virtual double gasUsage()
{ return 4.5; };/*@\label{designpatterns:virtual-usage}@*/
virtual double fuelTankSize() = 0;/*@\label{designpatterns:totally-virtual}@*/
double range(double fuelTankFillLevel)
double range(double fuelTankFillLevel)
{ return 100*fuelTankFillLevel*fuelTankSize()/gasUsage(); }
};
\end{lstlisting}
@@ -192,7 +192,7 @@ S-Class.
\end{example}
\begin{exc}
What happens if \dots
What happens if \dots
\begin{itemize}
\item \dots the \texttt{gasUsage} method is removed from the \texttt{Lupo} class?
\item \dots the \texttt{virtual} qualifier is removed in front of the
@@ -234,16 +234,16 @@ the called method cannot be dynamically changed at runtime.
can be implemented like this:
\begin{lstlisting}[name=staticcars,basicstyle=\ttfamily\scriptsize,numbers=left,numberstyle=\tiny, numbersep=5pt]
// The base class. The 'Imp' template parameter is the
// type of implementation, i.e. the derived class
// type of implementation, i.e. the derived class
template <class Imp>
class Car
{public:
double gasUsage()
double gasUsage()
{ return 4.5; };
double fuelTankSize()
double fuelTankSize()
{ throw "The derived class needs to implement the fuelTankSize() method"; };
double range(double fuelTankFillLevel)
double range(double fuelTankFillLevel)
{ return 100*fuelTankFillLevel*asImp_().fuelTankSize()/asImp_().gasUsage(); }
protected:
@@ -361,7 +361,7 @@ int main()
Dune::PDELab::GridFunctionSpaceBlockwiseMapper
>
GridFunctionSpace;
typedef typename GridFunctionSpace::ConstraintsContainer<double>::Type
typedef typename GridFunctionSpace::ConstraintsContainer<double>::Type
ConstraintsTrafo;
typedef Ewoms::PDELab::BoxLocalOperator<TypeTag> LocalOperator;
typedef Dune::PDELab::GridOperatorSpace<
@@ -383,7 +383,7 @@ not pose a severe problem as long as the type (in this case the grid
operator space) needs to be specified exactly once in the whole
program. If, on the other hand, it needs to be consistend over
multiple locations in the source code, measures have to be taken in
order to keep the code maintainable.
order to keep the code maintainable.
\section{Traits Classes}
@@ -394,7 +394,7 @@ class. Instead of writing
template <class A, class B, class C, class D>
class MyClass {};
\end{lstlisting}
one can use
one can use
\begin{lstlisting}[basicstyle=\ttfamily\scriptsize,numbers=left,numberstyle=\tiny, numbersep=5pt]
template <class Traits>
class MyClass {};
@@ -402,7 +402,7 @@ class MyClass {};
where the \texttt{Traits} class contains public type definitions for
\texttt{A}, \texttt{B}, \texttt{C} and \texttt{D}, e.g.
\begin{lstlisting}[basicstyle=\ttfamily\scriptsize,numbers=left,numberstyle=\tiny, numbersep=5pt]
struct MyTraits
struct MyTraits
{
typedef float A;
typedef double B;
+6 -7
View File
@@ -280,15 +280,15 @@
owner = {faigle},
review = {3phase model derivation finite element discretizattion Beschreibung
des sequenziellen numerischen L\"osungsschemas verwendete ELLAM methode
Trangenstein + pC
assumpt: no mass transfer between water and gas/oil (black oil)
rho_w = const
s(p, ...) und nicht s(p+pc, ...)},
timestamp = {2011.11.29}
}
@@ -1012,4 +1012,3 @@
title = {wikipedia about aliasing data location in memory: \url{http://en.wikipedia.org/wiki/Aliasing\_(computing)}},
key = {WikipediaAliasing}
}
+2 -2
View File
@@ -12,7 +12,7 @@
\definecolor{bashgray}{gray}{0.92}
\definecolor{cppgray}{gray}{0.95}
\lstset{language=C++, basicstyle=\ttfamily,
\lstset{language=C++, basicstyle=\ttfamily,
keywordstyle=\color{black}\bfseries, tabsize=4, stringstyle=\ttfamily,
extendedchars=true, escapeinside={/*@}{@*/}}
@@ -138,7 +138,7 @@
}
% a new counter
% you can give a label to it and thus reference it
% syntax: \numberThis{printedTextToBeLabeled}{label}
% syntax: \numberThis{printedTextToBeLabeled}{label}
% if you wanted a \newline after a numbered thing, you could just add a empty line after ``\label{#2}''
\newcounter{thingCounter}
\renewcommand{\thethingCounter}{\arabic{thingCounter}}
+9 -9
View File
@@ -64,7 +64,7 @@ The \eWoms fluid framework currently features the following concepts
\section{Fluid States}
Fluid state objects express the complete thermodynamic state of a
system at a given spatial and temporal position.
system at a given spatial and temporal position.
\subsection{Exported Constants}
@@ -144,7 +144,7 @@ Also, \textbf{all} fluid states \textbf{must} provide the following methods:
arbitrary, but in the context of the \eWoms fluid framework, we
assume that it is the same for all fluid phases, i.e.
$f_\alpha^{\kappa,0} = f_\beta^{\kappa,0}$.
Assuming thermal equilibrium, there is a one-to-one mapping between
a component's chemical potential $\zeta^\kappa_\alpha$ and its
fugacity $f^\kappa_\alpha$. With the above assumptions, chemical
@@ -165,7 +165,7 @@ Also, \textbf{all} fluid states \textbf{must} provide the following methods:
\item[viscosity():] Returns the dynamic viscosity
$\mu_\alpha$ of fluid phase $\alpha$.
\end{description}
\subsection{Available Fluid States}
Currently, the following fluid states are provided by \eWoms:
\begin{description}
@@ -309,15 +309,15 @@ only needs to provide the following thermodynamic relations:
parameter cache, a phase and a component index, return the calculate
the molecular diffusion coefficient for the component in the fluid
phase.
Molecular diffusion of a component $\kappa$ in phase $\alpha$ is
caused by a gradient of the chemical potential. Using some
simplifying assumptions~\cite{reid1987}, they can be also expressed
in terms of mole fraction gradients, i.e. the equation used for mass
fluxes due to molecular diffusion is
\[
\[
J^\kappa_\alpha = - \rho_{mol,\alpha} D^\kappa_\alpha\ \mathbf{grad} x^\kappa_\alpha\;,
\]
\]
where $\rho_{mol,\alpha}$ is the molar density of phase $\alpha$,
$x^\kappa_\alpha$ is the mole fraction of component $\kappa$ in
phase $\alpha$, $D^\kappa_\alpha$ is the diffusion coefficient and
@@ -404,7 +404,7 @@ provides the following constraint solvers:
\sum_{\alpha=1}^M \saturation_\alpha = 1
\]
\item $M - 1$ constraints are given by the capillary pressures:
\[
\[
p_\beta = p_\alpha + p_{c\beta\alpha} \;,
\]
for all phases $\alpha$, $\beta$
@@ -430,7 +430,7 @@ system of equations is closed.
non-ideal mixtures.
\end{description}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+2 -2
View File
@@ -15,7 +15,7 @@ in the next chapter.
\input{quickstart-guide}
\input{parameters}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+4 -4
View File
@@ -13,7 +13,7 @@ like splitting hairs to you, but they do make it much easier for
everybody to work on code that has not been written by oneself.
\begin{itemize}
\item Naming:
\item Naming:
\begin{itemize}
\item Comments: They are helpful! Use comments extensively to explain
what your code does, but please refrain from adding trivial
@@ -65,7 +65,7 @@ everybody to work on code that has not been written by oneself.
\begin{itemize}
\item Method parameters
\item Template parameters
\item Return values
\item Return values
\item Exceptions thrown by a method
\end{itemize}
Since we all know that writing documentation is not well-liked and is
@@ -84,7 +84,7 @@ everybody to work on code that has not been written by oneself.
removed. Use those assertations freely!
\end{itemize}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+10 -10
View File
@@ -58,7 +58,7 @@ autotools (\texttt{autoconf}, \texttt{automake}, \texttt{autogen},
\texttt{libtool}), as well as the GNU variant of \texttt{make} called
gmake must be available in a recent enough version. For example Ubuntu
Linux provides these tools by means of the packages \texttt{autoconf},
\texttt{automake}, \texttt{libtool} and the package
\texttt{automake}, \texttt{libtool} and the package
\texttt{build-essential} includes the \Cplusplus compiler
\texttt{g++} and \texttt{make}.
@@ -156,15 +156,15 @@ the actual name of the \emph{ewoms base directory} is
\begin{lstlisting}[style=Bash]
$ mkdir ~/src
$ cd ~/src
$ tar xzvf path_to_tarball_of/dune-common-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-grid-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-geometry-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-istl-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-localfunctions-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-common-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-grid-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-geometry-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-istl-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/dune-localfunctions-2.2.0.tar.gz
$ tar xzvf path_to_tarball_of/ewoms-2.2.0.tar.gz
\end{lstlisting}
\paragraph{Obtaining \Dune and \eWoms from software repositories}
\paragraph{Obtaining \Dune and \eWoms from software repositories}
Direct access to a software repositories for downloading code can be
convenient to always follow the changes of done to the software
@@ -362,7 +362,7 @@ libraries you use.
\item \textbf{METIS}: This is a dependency of ALUGrid, if you are
going to run it parallel.
Available for non-commercial use at
\texttt{\url{http://glaros.dtc.umn.edu/gkhome/metis/metis/overview}}
@@ -373,7 +373,7 @@ libraries you use.
some external libraries.
\end{itemize}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+3 -3
View File
@@ -38,7 +38,7 @@ underlying grid libraries\footnote{In fact, the performance penalty
resulting from the use of \Dune's grid interface is usually
negligible~\cite{BURRI2006}.}.
\begin{figure}[hbt]
\centering
\centering
\includegraphics[width=.5\linewidth, keepaspectratio]{EPS/dunedesign}
\caption{
\label{fig:dune-design}
@@ -87,7 +87,7 @@ schemes as well as nonlinear and linear solvers, to general concepts
for model coupling. Moreover, \eWoms includes ready-to-use numerical
models and a few example applications.
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+30 -30
View File
@@ -1,10 +1,10 @@
\chapter[Models]{Physical and numerical models}
\section{Physical and mathematical description}
\section{Physical and mathematical description}
Characteristic of compositional multiphase models is that the phases
are not only matter of a single chemical substance. Instead, their
composition in general includes several species, and for the mass transfer,
composition in general includes several species, and for the mass transfer,
the component behavior is quite different from the phase behavior. In the following, we
give some basic definitions and assumptions that are required for the
formulation of the model concept below. As an example, we take a
@@ -17,7 +17,7 @@ systems is straightforward and can be found, e.\ g., in
Model Concept}
\textbf{Components:}
The term \emph{component} stands for constituents of the phases which
can be associated with a unique chemical species, or, more generally, with
can be associated with a unique chemical species, or, more generally, with
a group of species exploiting similar physical behavior. In this work, we
assume a water-gas-NAPL system composed of the phases water (subscript
$\text{w}$), gas ($\text{g}$), and NAPL ($\text{n}$). These phases are
@@ -37,12 +37,12 @@ For the nonisothermal multiphase processes in porous media under
consideration, we state that the assumption of local thermal
equilibrium is valid since flow velocities are small. We neglect
chemical reactions and biological decomposition and assume chemical
equilibrium. Mechanical equilibrium is not valid in a porous medium,
equilibrium. Mechanical equilibrium is not valid in a porous medium,
since discontinuities in pressure can occur across a fluid-fluid
interface due to capillary effects.
\textbf{Notation:} The index $\alpha \in \{\text{w}, \text{n}, \text{g}\}$ refers
to the phase, while the superscript $\kappa \in \{\text{w}, \text{a}, \text{c}\}$ refers
\textbf{Notation:} The index $\alpha \in \{\text{w}, \text{n}, \text{g}\}$ refers
to the phase, while the superscript $\kappa \in \{\text{w}, \text{a}, \text{c}\}$ refers
to the component. \\
\begin{tabular}{llll}
$p_\alpha$ & phase pressure & $\phi$ & porosity \\
@@ -70,21 +70,21 @@ molar mass balance can be written as:
\begin{multline}
\label{A3:eqmass1}
\phi \frac{\partial (\sum_\alpha \varrho_{\text{mol}, \alpha}
x_\alpha^\kappa S_\alpha )}{\partial t}
x_\alpha^\kappa S_\alpha )}{\partial t}
- \sum\limits_\alpha \Div \left( \frac{k_{\text{r}
\alpha}}{\mu_\alpha} \varrho_{\text{mol}, \alpha}
x_\alpha^\kappa K (\grad p_\alpha -
\varrho_{\alpha} \boldsymbol{g}) \right) \\
%
%
%
- \sum\limits_\alpha \Div \left( \tau \phi S_\alpha D_\alpha^\kappa \varrho_{\text{mol},
\alpha} \grad x_\alpha^\kappa \right)
\alpha} \grad x_\alpha^\kappa \right)
- q^\kappa = 0, \qquad \kappa \in \{\text{w,a,c}\}.
\end{multline}
The component mass balance can also be written in terms of mass fractions
The component mass balance can also be written in terms of mass fractions
by replacing molar densities by mass densities and mole by mass fractions.
To obtain a single conserved quantity in the temporal derivative, the total
To obtain a single conserved quantity in the temporal derivative, the total
concentration, representing the mass of one component per unit volume, is defined as
\begin{displaymath}
C^\kappa = \sum_\alpha \phi S_\alpha \varrho_{\text{mass},\alpha} X_\alpha^\kappa \; .
@@ -93,7 +93,7 @@ Using this definition, the component mass balance is written as:
\begin{multline}
\label{A3:eqmass2}
\frac{\partial C^\kappa}{\partial t} =
\frac{\partial C^\kappa}{\partial t} =
\sum\limits_\alpha \Div \left( \frac{k_{\text{r}
\alpha}}{\mu_\alpha} \varrho_{\text{mass}, \alpha}
X_\alpha^\kappa K (\grad p_\alpha +
@@ -101,14 +101,14 @@ Using this definition, the component mass balance is written as:
%
%
+ \sum\limits_\alpha \Div \left( \tau \phi S_\alpha D_\alpha^\kappa \varrho_{\text{mass},
\alpha} \grad X_\alpha^\kappa \right)
\alpha} \grad X_\alpha^\kappa \right)
+ q^\kappa = 0, \qquad \kappa \in \{\text{w,a,c}\}.
\end{multline}
In the case of non-isothermal systems, we further have to balance the
thermal energy. We assume fully reversible processes, such that entropy
is not needed as a model parameter. Furthermore, we neglect
is not needed as a model parameter. Furthermore, we neglect
dissipative effects and the heat transport due to molecular
diffusion. The energy balance can then be
formulated as:
@@ -118,18 +118,18 @@ formulated as:
\phi \frac{\partial \left( \sum_\alpha \varrho_{\alpha}
u_\alpha S_\alpha \right)}{\partial t} + \left( 1 -
\phi \right) \frac{\partial \varrho_{\text{s}} c_{\text{s}}
T}{\partial t}
T}{\partial t}
- \Div \left( \lambda_{\text{pm}} \grad T \right)
\\
- \sum\limits_\alpha \Div \left( \frac{k_{\text{r}
\alpha}}{\mu_\alpha} \varrho_{\alpha} h_\alpha
K \left( \grad p_\alpha - \varrho_{\alpha}
\boldsymbol{g} \right) \right)
\boldsymbol{g} \right) \right)
- q^h \; = \; 0.
\end{multline}
In order to close the system, supplementary constraints for capillary pressure, saturations and mole
fractions are needed, \cite{A3:helmig:1997}.
fractions are needed, \cite{A3:helmig:1997}.
According to the Gibbsian phase rule, the number of degrees of freedom
in a non-isothermal compositional multiphase system is equal to the
number of components plus one. This means we need as many independent
@@ -140,40 +140,40 @@ fractions, temperature, pressures, etc.
\input{box}
\section{Available models}
The following description of the available models is automatically extracted
\section{Available models}
The following description of the available models is automatically extracted
from the Doxygen documentation.
% \textbf{TODO}: Unify notation.
% \textbf{TODO}: Unify notation.
\subsection{Fully-implicit models}
\subsection{Fully-implicit models}
The fully-implicit models described in this section are using the box
scheme as described in Section \ref{box} for spatial and the implicit Euler
method as temporal discretization. The models themselves are located in
subdirectories of \texttt{ewoms/boxmodels} of the \eWoms distribution.
\subsubsection{The immiscible multi-phase model}
\subsubsection{The immiscible multi-phase model}
\input{ModelDescriptions/immisciblemodel}
\subsubsection{The miscible multi-phase NCP model}
\subsubsection{The miscible multi-phase NCP model}
\input{ModelDescriptions/pvsmodel}
\subsubsection{The miscible multi-phase PVS model}
\subsubsection{The miscible multi-phase PVS model}
\input{ModelDescriptions/pvsmodel}
\subsubsection{The miscible multi-phase flash model}
\subsubsection{The miscible multi-phase flash model}
\input{ModelDescriptions/flashmodel}
\subsubsection{The Richards model}
\subsubsection{The Richards model}
\input{ModelDescriptions/richardsmodel}
\subsubsection{The black-oil model}
\subsubsection{The black-oil model}
\input{ModelDescriptions/blackoilmodel}
\subsubsection{The (Navier-)Stokes model}
\subsubsection{The (Navier-)Stokes model}
\input{ModelDescriptions/stokesmodel}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+3 -3
View File
@@ -55,7 +55,7 @@ searched for. Bringing \eqref{NewtonGen} into the form used the linear
solvers
\begin{equation}
\label{GenSysEq}
\textbf{A}\textbf{x} - \textbf{b} = 0
\textbf{A}\textbf{x} - \textbf{b} = 0
\end{equation}
leads to
\begin{itemize}
@@ -68,7 +68,7 @@ Once $\textbf{u}^{r} - \textbf{u}^{r+1}$ has been calculated, \eWoms
updates the current solution in \texttt{NewtonController::update()}
and starts the next iteration if the scheme has not yet converged.
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+2 -2
View File
@@ -35,7 +35,7 @@ adapted.
An additional hint: Always watch out for parameters which are unknown
to the simulation, as this is \emph{very} useful for spotting typos.
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+7 -7
View File
@@ -153,7 +153,7 @@ NEW_PROP_TAG(TestProp);
SET_TYPE_PROP(BaseTypeTag, TestProp, int);
UNSET_PROP(DerivedTypeTag, TestProp);
// trying to access the 'TestProp' property for 'DerivedTypeTag'
// trying to access the 'TestProp' property for 'DerivedTypeTag'
// will trigger a compiler error!
}}
\end{lstlisting}
@@ -197,12 +197,12 @@ Example:\nolinebreak
template <TypeTag>
class MyClass {
// retrieve the ::value attribute of the 'NumEq' property
enum { numEq = GET_PROP(TypeTag, NumEq)::value };
enum { numEq = GET_PROP(TypeTag, NumEq)::value };
// retrieve the ::value attribute of the 'NumPhases' property using the convenience macro
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) };
// retrieve the ::type attribute of the 'Scalar' property
typedef typename GET_PROP(TypeTag, Scalar)::type Scalar;
typedef typename GET_PROP(TypeTag, Scalar)::type Scalar;
// retrieve the ::type attribute of the 'Vector' property using the convenience macro
typedef typename GET_PROP_TYPE(TypeTag, Vector) Vector;
};
@@ -238,7 +238,7 @@ diagram for the car types above might look like outlined in Figure
\ref{fig:car-hierarchy}.
\begin{figure}[t]
\centering
\centering
\subfloat[]{
\includegraphics[width=.6\textwidth]{EPS/car-hierarchy.eps}
\label{fig:car-hierarchy}
@@ -296,7 +296,7 @@ the following:
of seats is $2$, it uses $\unitfrac[18]{l}{100km}$ and has a cargo payload of
$\unit[35]{t}$.
\item A tank exhibits a top speed of $\unitfrac[60]{km}{h}$, uses $\unitfrac[65]{l}{100km}$
and features a $\unit[120]{mm}$ diameter canon
and features a $\unit[120]{mm}$ diameter canon
\item A sedan has a gas usage of $\unitfrac[7]{l}{100km}$, as well as an automatic
transmission, in every other aspect it is like a compact car.
\item A pick-up truck has a top speed of $\unitfrac[120]{km}{h}$ and a payload of
@@ -370,7 +370,7 @@ Properties for Sedan:
\end{lstlisting}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
+2 -2
View File
@@ -67,7 +67,7 @@ option files than as something fixed; feel free to copy and modify
them. To avoid confusion, it is helpful to rename your
customized option files, though.
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+4 -4
View File
@@ -11,13 +11,13 @@ found in the tutorials in the following chapter.
\item Go to the directory \texttt{test}. There, various test
application folders can be found. Let us consider as example
the one for the fully-implicit models, \texttt{boxmodels}:
\item Enter the folder \texttt{boxmodels}.
\item Enter the folder \texttt{boxmodels}.
\item By default, the \texttt{dunecontrol} command only compiles the
parts of \Dune modules that are necessary to build modules depending
on the given module. For \eWoms, \texttt{dunecontrol} does not build
anything by default, because \eWoms only provides \Cplusplus
template classes but no libraries that need compilation. To compile
the test simulation for the "lens" problem which uses the fully-implicit
the test simulation for the "lens" problem which uses the fully-implicit
model that assumes immisciblility, enter
\begin{lstlisting}[style=Bash]
make lens_immiscible
@@ -81,7 +81,7 @@ simulation together with a brief description, by running
visualization tool of your choice as you will be using it a lot.
\end{enumerate}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+27 -27
View File
@@ -1,39 +1,39 @@
\chapter{Directory structure}
We briefly describe the directory structure of \eWoms in terms
of subdirectories, source files, and tests. For more details,
the Doxygen documentation should be considered.
\eWoms comes in form of a DUNE module \texttt{ewoms}.
It has a similar structure as other DUNE modules like \texttt{dune-grid}.
The following subdirectories are within the module's root directory,
from now on assumed to be \texttt{/}:
\begin{itemize}
\item \texttt{CMake}: the configuration options
for building \eWoms using CMake. See the file \texttt{INSTALL.cmake} in
the root directory of the \eWoms distribution for details. Of course,
it is also possible to use the DUNE buildsystem just like for the other
We briefly describe the directory structure of \eWoms in terms
of subdirectories, source files, and tests. For more details,
the Doxygen documentation should be considered.
\eWoms comes in form of a DUNE module \texttt{ewoms}.
It has a similar structure as other DUNE modules like \texttt{dune-grid}.
The following subdirectories are within the module's root directory,
from now on assumed to be \texttt{/}:
\begin{itemize}
\item \texttt{CMake}: the configuration options
for building \eWoms using CMake. See the file \texttt{INSTALL.cmake} in
the root directory of the \eWoms distribution for details. Of course,
it is also possible to use the DUNE buildsystem just like for the other
DUNE modules.
\item \texttt{doc}: contains the Doxygen documentation in \texttt{doxygen},
this handbook in \texttt{handbook}, and the \eWoms logo in various formats in
\texttt{logo}. The html documentation produced by Doxygen can be accessed as usual,
namely, by opening \texttt{doc/doxygen/html/index.html} with a web browser.
\item \texttt{ewoms}: the \eWoms source files. See Section \ref{sec:ewoms} for details.
\item \texttt{test}: tests for each numerical model and the property system.
See Section \ref{sec:test} for details.
\item \texttt{tutorial}: contains the tutorials described in Chapter \ref{chp:tutorial}.
\item \texttt{doc}: contains the Doxygen documentation in \texttt{doxygen},
this handbook in \texttt{handbook}, and the \eWoms logo in various formats in
\texttt{logo}. The html documentation produced by Doxygen can be accessed as usual,
namely, by opening \texttt{doc/doxygen/html/index.html} with a web browser.
\item \texttt{ewoms}: the \eWoms source files. See Section \ref{sec:ewoms} for details.
\item \texttt{test}: tests for each numerical model and the property system.
See Section \ref{sec:test} for details.
\item \texttt{tutorial}: contains the tutorials described in Chapter \ref{chp:tutorial}.
\end{itemize}
\subsection{The \texttt{ewoms} directory}\label{sec:ewoms}
The directory \texttt{ewoms} contains the \eWoms source files. It consists of the following subdirectories (see Figure \ref{fig:ewoms-structure}):
The directory \texttt{ewoms} contains the \eWoms source files. It consists of the following subdirectories (see Figure \ref{fig:ewoms-structure}):
\begin{itemize}
\begin{itemize}
\item \texttt{boxmodels}: The fully implicit vertex-centered finite
volume (box) method. This directory features the following
sub-directories
\begin{itemize}
\begin{itemize}
\item \texttt{common}: The infrastructural code shared by all box
models; For example it contains the file
\texttt{boxfvelementgeometry.hh} which is used by the box scheme to
@@ -42,7 +42,7 @@ The directory \texttt{ewoms} contains the \eWoms source files. It consists of th
re-used by multiple models, like a generic plug-in for the energy
equation, models for determining the filter velocity, or plugins
describing molecular diffusion.
\item Each of the other subdirectories contains
\item Each of the other subdirectories contains
a physical numerical model which uses the box discretization.
\end{itemize}
@@ -109,7 +109,7 @@ considered.
\begin{landscape}
\begin{figure}[hbt]
\centering
\centering
\includegraphics[width=\linewidth, keepaspectratio]{EPS/ewoms_structure.eps}
\caption{
\label{fig:ewoms-structure}
@@ -118,7 +118,7 @@ considered.
\end{figure}
\end{landscape}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+1 -1
View File
@@ -1,3 +1,3 @@
\section[New model]{How to implement a new model}
TODO: describe how to impelment a new model
TODO: describe how to impelment a new model
+2 -2
View File
@@ -24,7 +24,7 @@ directory.
\input{tutorial1}
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+9 -9
View File
@@ -50,7 +50,7 @@ The solved equations are the mass balances of water and oil:
-
\nabla \cdot \left( \varrho_{o} \, \frac{k_{ro}}{\mu_{o}} \, \mathbf{K}\;\nabla p_o \right)
-
q_o
q_o
& =
0
\end{align}
@@ -238,7 +238,7 @@ and the analogous \texttt{bboxMin()} method are provided by the
problem's base class.
In addition to these methods, there might be some additional
model-specific methods.
model-specific methods.
\subsection{Defining fluid properties}
\label{tutorial1:description-fluid-class}
@@ -298,12 +298,12 @@ even not at all.
program if you use command line parameters. In both cases, don't
forget run the simulation before re-inspecting the results using
\texttt{paraview}.
\item \textbf{Boundary Conditions} \\
Change the boundary conditions in the problem file
\texttt{tutorial1problem.hh} so that water enters from the
bottom and oil is extracted from the top boundary. The right and the
left boundary should be closed for both, water and oil.
left boundary should be closed for both, water and oil.
Note that in \eWoms, flux boundary conditions are specified as
fluxes of the conserved quantities into the direction of the outer
@@ -389,7 +389,7 @@ chapter~\ref{sec:fluidframework}.
instruct the model to use this fluid system by setting
the \texttt{FluidSystem} property via:\\
\begin{lstlisting}[style=eWomsCode]
SET_TYPE_PROP(Tutorial1Problem,
SET_TYPE_PROP(Tutorial1Problem,
FluidSystem,
Ewoms::FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>)
\end{lstlisting}
@@ -434,7 +434,7 @@ complex fluid system.
directory as the header for the regularized Brooks-Corey law,
\texttt{regularizedbrookscorey.hh}.
\end{itemize}
\item \textbf{Heterogeneities} \\
Set up a model domain with the soil properties given in Figure
\ref{tutorial1:exercise1_d}. Adjust the boundary conditions
@@ -499,7 +499,7 @@ step size of $100\;\text{s}$.
\psfrag{Lin2}{$\lambda = 1.8$, $p_e = 1000\;\text{Pa}$}
\psfrag{K2}{K $= 10^{-9}\;\text{m}^2$}
\psfrag{phi2}{$\phi = 0.15$}
\psfrag{BC1}{\textsc{Brooks}-\textsc{Corey} Law}
\psfrag{BC1}{\textsc{Brooks}-\textsc{Corey} Law}
\psfrag{BC2}{$\lambda = 2$, $p_e = 1500\;\text{Pa}$}
\psfrag{H1y}{$50\;\text{m}$}
\psfrag{H2y}{$15\;\text{m}$}
@@ -542,7 +542,7 @@ and a viscosity of $0.00112 \, \text{Pa} \; \text{s}$.
\clearpage \newpage
%%% Local Variables:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "ewoms-handbook"
%%% End:
%%% End:
+1 -2
View File
@@ -269,7 +269,7 @@ Configuration of Metis partitioner. You can request a configuration to
be read from a JSON file by giving the filename here, ending with
extension '.json.' See
http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/manual.pdf for
available METIS options. Default: "default"
available METIS options. Default: "default"
.TP
\fB\-\-milu\-variant\fR=\fI\,STRING\/\fR
Specify which variant of the modified\-ILU preconditioner ought to be used. Possible variants are: ilu (default, plain ILU), milu_1 (lump diagonal with dropped row entries), milu_2 (lump diagonal with the sum of the absolute values of the dropped row entries), milu_3 (if diagonal is positive add sum of dropped row entries, otherwise subtract them), milu_4 (if diagonal is positive add sum of dropped row entries, otherwise do nothing. Default: "ilu"
@@ -555,4 +555,3 @@ Try to detect and correct oscillations or stagnation during the Newton method. D
.TP
\fB\-\-water\-only\-threshold\fR=\fI\,SCALAR\/\fR
Cells with water saturation above or equal is considered one\-phase water only. Default: 1