handbook: language improvements

This commit is contained in:
Andreas Lauser 2012-11-01 16:34:50 +01:00
parent 38d7b97157
commit 510fa48526
7 changed files with 293 additions and 277 deletions

View File

@ -1,40 +1,42 @@
\chapter{Introduction} \chapter{Introduction}
\eWoms~\cite{EWOMS-HP} aims to be a generic framework for the simulation of multi-phase \eWoms~\cite{EWOMS-HP} a generic framework for the simulation of
fluid flow and transport processes in porous media using continuum multi-phase fluid flow and transport processes in porous media using
mechanical approaches. At the same time, \eWoms aims to deliver continuum mechanical approaches. \eWoms is also an integral part of
top-notch computational performance, high flexibility, a sound the open porous media initiative~\cite{OPM-HP} for which it implements
the fully-implicit discretization schemes. \eWoms is based on the
source code of the \Dumux~\cite{DUMUX-HP} simulation framework and
aims to be a proper superset of \Dumux when it comes to features,
while at the same time it delivers better performance and a
higher-quality code base. To ease porting features from \Dumux to
\eWoms, the \eWoms source code uses very similar naming and style
conventions as the one of \Dumux.
Besides being a generic simulation framework, \eWoms also aims to to
deliver top-notch computational performance, high flexibility, a sound
software architecture and the ability to run on anything from single software architecture and the ability to run on anything from single
processor systems to highly parallel supercomputers with specialized processor systems to highly parallel supercomputers with specialized
hardware architectures. hardware architectures. The means to achieve these somewhat
contradictory goals are the thorough use of object oriented design in
\eWoms is an integral part of the open porous media conjunction with template programming. These requirements motivated
initiative~\cite{OPM-HP} where it provides the fully-implicit the decision to implement \eWoms using the \Cplusplus programming
models. \eWoms is based on the source code of the language.
\Dumux~\cite{DUMUX-HP} simulation framework and aims to be a proper
superset of \Dumux when it comes to features, while at the same time
it aims to deliver better performance and quality of the source
code. To ease porting features from \Dumux to \eWoms and vice-versa,
all classes provided by \eWoms are currently located in the namespace
\texttt{Dumux}.
The means to achieve these somewhat contradictory goals are the
thorough use of object oriented design in conjunction with template
programming. These requirements motivated the decision to use
\Cplusplus as the implementation language for \eWoms.
One of the more complex issues when dealing with parallel continuum One of the more complex issues when dealing with parallel continuum
models is managing the grids used for the spatial discretization of models for partial differential equations, is the management of the
the physical model. To date, no generic and efficient approach exists grids used for the spatial discretization. To date, no generic and
for all possible cases, so \eWoms is build on top of \Dune, the efficient approach exists for all possible cases, which lead to \eWoms
\textbf{D}istributed and \textbf{U}nified \textbf{N}umerics being build on top of \Dune, the \textbf{D}istributed and
\textbf{E}nvironment~\cite{DUNE-HP}. \Dune provides a generic interface \textbf{U}nified \textbf{N}umerics
to many existing grid management libraries such as UG~\cite{UG-HP}, \textbf{E}nvironment~\cite{DUNE-HP}. Instead of trying to implement a
ALBERTA~\cite{ALBERTA-HP}, ALUGrid~\cite{ALUGRID-HP} and a few grid for everything, \Dune defines a generic \Cplusplus interface to
more. DUNE also extensively uses template programming in order to grids, and provides adapters to several existing grid management
achieve minimal overhead when accessing the underlying grid libraries such as UG~\cite{UG-HP}, ALBERTA~\cite{ALBERTA-HP} or
libraries\footnote{In fact, the performance penalty resulting from the ALUGrid~\cite{ALUGRID-HP}. DUNE also extensively uses template
use of \Dune's grid interface is usually negligible~\cite{BURRI2006}.}. programming in order to achieve minimal overhead when accessing the
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] \begin{figure}[hbt]
\centering \centering
\includegraphics[width=.5\linewidth, keepaspectratio]{EPS/dunedesign} \includegraphics[width=.5\linewidth, keepaspectratio]{EPS/dunedesign}
@ -65,24 +67,25 @@ it matches the grid's cell. For a more thorough description of \Dune's
grid definition, see~\cite{BASTIAN2008}. grid definition, see~\cite{BASTIAN2008}.
In addition to the grid interface, \Dune also provides quite a few In addition to the grid interface, \Dune also provides quite a few
additional modules, of which the \texttt{dune-localfunctions} and additional modules; In the context of this handbook the
\texttt{dune-istl} modules are the most relevant in the context of \texttt{dune-localfunctions} and \texttt{dune-istl} modules are
this handbook. \texttt{dune-localfunctions} provides a set of generic probably the most relevant. \texttt{dune-localfunctions} provides a
finite element shape functions, while \texttt{dune-istl} is the set of generic finite element shape functions, while
\textbf{I}terative \textbf{S}olver \textbf{T}emplate \textbf{L}ibrary \texttt{dune-istl} is the \textbf{I}terative \textbf{S}olver
and provides generic, highly optimized linear algebra routines for \textbf{T}emplate \textbf{L}ibrary and provides generic, highly
solving the generated systems. optimized linear algebra routines for solving linear systems of
equations.
\eWoms comes in form of an additional module \Dune module \eWoms comes in form of a module \Dune module '\texttt{ewoms}'. It
'\texttt{ewoms}'. It depends on the \Dune core modules depends on the \Dune core modules \texttt{dune-common},
\texttt{dune-common}, \texttt{dune-grid}, \texttt{dune-istl}, and on \texttt{dune-grid}, \texttt{dune-istl}, and on
\texttt{dune-localfunctions}. The main intention of \eWoms is to \texttt{dune-localfunctions}. The main intention of \eWoms is to
provide a framework for an easy and efficient implementation of new provide a framework for an easy and efficient implementation of new
physical models for porous media flow problems, ranging from problem physical models for porous media flow problems, ranging from problem
formulation and the selection of spatial and temporal discretization formulation and the selection of spatial and temporal discretization
schemes as well as nonlinear solvers, to general concepts for model schemes as well as nonlinear and linear solvers, to general concepts
coupling. Moreover, \eWoms includes ready-to-use numerical models and for model coupling. Moreover, \eWoms includes ready-to-use numerical
a few example applications. models and a few example applications.
%%% Local Variables: %%% Local Variables:
%%% mode: latex %%% mode: latex

View File

@ -3,10 +3,10 @@
As already mentioned in the previous section, \eWoms allows to specify As already mentioned in the previous section, \eWoms allows to specify
a number of parameters at run time. A description of these parameters a number of parameters at run time. A description of these parameters
can usually obtained by passing the \texttt{--help} parameter to the can usually be obtained by passing the \texttt{--help} parameter to the
executable. The values used for these parameters are printed to the executable. The values used for these parameters are printed to the
terminal during the start-up of the simulation, e.g. the if the \texttt{lens\_immiscible} terminal during the start-up of the simulation, e.g. the if the \texttt{lens\_immiscible}
simulation is run with the parameters \texttt{--end-time=30e3 --foo-param=123}, there will an output similar to simulation is run with the parameters \texttt{--end-time=30e3 --foo-param=123}, it will print an output similar to
\begin{lstlisting}[style=Bash] \begin{lstlisting}[style=Bash]
########### ###########
# Parameters specified at run-time # Parameters specified at run-time
@ -27,13 +27,13 @@ FooParam="123"
\end{lstlisting} \end{lstlisting}
This can be directly copy-and-pasted into a file This can be directly copy-and-pasted into a file
(e.g. \texttt{myparams.ini}) and loaded by passing the (e.g. \texttt{myparams.ini}). The simulation can be instructed to use
\texttt{--parameter-file=myparams.ini} parameter to the simulation the these parameters by passing the \texttt{--parameter-file=myparams.ini}
next time it is run. parameter the next time it is run. Of course, this file can also be
adapted.
When you do simulations, always look for the paramters which are An additional hint: Always watch out for parameters which are unknown
unknown to the simulation, as this is \emph{very} useful for spotting to the simulation, as this is \emph{very} useful for spotting typos.
typos.
%%% Local Variables: %%% Local Variables:
%%% mode: latex %%% mode: latex

View File

@ -2,27 +2,28 @@
This section describes a way of installing \eWoms that works in most This section describes a way of installing \eWoms that works in most
cases, but depending on your operating system of choice, \Cplusplus cases, but depending on your operating system of choice, \Cplusplus
compiler and features which you need, some tweaks are possibly. As a compiler and features which you need, some tweaks are possibly
pre-requisite it is assumed, that you are using a recent Linux required. As a pre-requisite it is assumed, that you are using a
distribution that has the appropriate development packages (\Cplusplus recent Linux distribution that has the appropriate development
compiler, autoconf, automake, libtool and pkg-config amongst possibly packages (\Cplusplus compiler, autoconf, automake, libtool and
others) installed, but that you did not install \Dune via distribution pkg-config amongst possibly others) installed, but that you did not
provided packages. If you need more information, or if you have \Dune install \Dune via distribution provided packages. If you need more
already installed, please have a look at the detailed installation information, or if you have \Dune already installed, please have a
instructions in Section \ref{install}. look at the detailed installation instructions in Section
\ref{install}.
\subsection{Retrieving the code} \subsection{Retrieving the code}
You can download all \Dune modules by either downloading and unpacking You can retrieve all required \Dune modules by either downloading and
the tarballs for the \Dune-2.2 release as well as downloading and unpacking the tarballs for the \Dune-2.2 release followed by
unpacking the tarball for the \eWoms 2.2 release, or by retrieving the downloading and unpacking the tarball for the \eWoms 2.2 release, or
code directly from their respective source-code repositories. If you by retrieving the code directly from their respective source-code
decide to use the first method, make sure to unpack all tarballs into repositories. If you decide to use the first method, make sure to
the same directory; if you prefer the second method, make sure that unpack all tarballs into the same directory; if you prefer the second
you have the \texttt{git} version control system with the SVN plug-in method, make sure that you have the \texttt{git} version control
installed on your computer and enter the following code snipplet into system with the SVN plug-in installed on your computer and enter the
a terminal: following code snippet into a terminal:
\begin{lstlisting}[style=Bash] \begin{lstlisting}[style=Bash]
cd $YOUR_DUNE_ROOT_DIRECTORY cd $YOUR_DUNE_ROOT_DIRECTORY
for DUNE_MODULE in common geometry grid istl localfunctions; do \ for DUNE_MODULE in common geometry grid istl localfunctions; do \
@ -35,10 +36,10 @@ git clone --branch "release-2.2" git://github.com/OPM/ewoms.git
\subsection{Building \Dune and \eWoms} \subsection{Building \Dune and \eWoms}
\label{buildIt} \label{buildIt}
\eWoms is \Dune module and is recommended to build it using the \Dune \eWoms is a \Dune module and is recommended to build it using the \Dune
build system~\cite{DUNE-BS}. To simplify things, \eWoms ships with a build system~\cite{DUNE-BS}. To simplify things, \eWoms ships with a
few option files for \Dune's build script, \texttt{dunecontrol}. If few option files for \Dune's build script, \texttt{dunecontrol}. If
you are using \eWoms the first time, we recommend to use the one you are using \eWoms the first time, we recommend to use the options
optimized for the debugging experience, \texttt{debug.opts}: optimized for the debugging experience, \texttt{debug.opts}:
\begin{lstlisting}[style=Bash] \begin{lstlisting}[style=Bash]
@ -58,12 +59,12 @@ cd $YOUR_DUNE_ROOT_DIRECTORY
\end{lstlisting} \end{lstlisting}
%$ %$
Sometimes it is necessary to have additional options which are Sometimes it is necessary to have additional options which might be
specific to the operating system of your choice, or if you have specific to the operating system of your choice, or if you have
special requirements. For this reason, the option files mentioned special requirements. For this reason, the option files mentioned
above should be rather understood as a starting point for your own above should be rather understood as a starting point for your own
option files than as something fixed; feel free to copy and modify option files than as something fixed; feel free to copy and modify
them. To avoid confusion, it is usually helpful to rename your them. To avoid confusion, it is helpful to rename your
customized option files, though. customized option files, though.
%%% Local Variables: %%% Local Variables:

View File

@ -8,17 +8,17 @@ rough steps will be described here; More detailed explanations can be
found in the tutorials in the following chapter. found in the tutorials in the following chapter.
\begin{enumerate} \begin{enumerate}
\item Go to the directory \texttt{/test}. There, various test \item Go to the directory \texttt{test}. There, various test
application folders can be found. Let us consider as example application folders can be found. Let us consider as example
\texttt{boxmodels/lens{\_}immiscible}: 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 \item By default, the \texttt{dunecontrol} command only compiles the
parts of \Dune modules that are necessary to build modules depending parts of \Dune modules that are necessary to build modules depending
on the given module. For \eWoms, \texttt{dunecontrol} does not build on the given module. For \eWoms, \texttt{dunecontrol} does not build
anything by default, because \eWoms only provides \Cplusplus anything by default, because \eWoms only provides \Cplusplus
template classes but no libraries that need compilation. To compile template classes but no libraries that need compilation. To compile
the test simulation for the "lens" problem which uses the immiscible the test simulation for the "lens" problem which uses the fully-implicit
box model, enter model that assumes immisciblility, enter
\begin{lstlisting}[style=Bash] \begin{lstlisting}[style=Bash]
make lens_immiscible make lens_immiscible
\end{lstlisting} \end{lstlisting}
@ -37,15 +37,15 @@ make -j $N check
%$ %$
\item If everything was compiled correctly, there should be an \item If everything was compiled correctly, there should be an
executable \texttt{lens{\_}immiscible}. To run the simulation, executable called '\texttt{lens{\_}immiscible}'. To run the simulation,
simply run it, i.e. enter simply execute it, i.e. enter
\begin{lstlisting}[style=Bash] \begin{lstlisting}[style=Bash]
./lens_immiscible ./lens_immiscible
\end{lstlisting} \end{lstlisting}
You may also want to change some parameters from the command line. For You may also want to change some parameters from the command line. For
example, if you want to change the time up to which the simulation is example, if you want to change the time up to which the problem is
run to $30.000$ seconds, use simulated to $30.000$ seconds, use
\begin{lstlisting}[style=Bash] \begin{lstlisting}[style=Bash]
./lens_immiscible --end-time=30e3 ./lens_immiscible --end-time=30e3
\end{lstlisting} \end{lstlisting}
@ -61,11 +61,11 @@ simulation together with a brief description, by running
pressing \texttt{<Ctrl>+<C>}. pressing \texttt{<Ctrl>+<C>}.
\item The actual output files produced by the simulation are a series \item The actual output files produced by the simulation are a series
of \texttt{.vtu} files and a \texttt{.pvd} file. The \texttt{.vtu} of \texttt{.vtu} files and a \texttt{.pvd} file. Each \texttt{.vtu}
contain "visualization ready" data which is produced during the file contains "visualization ready" data for a single time step,
simulation, while the \texttt{.pvd} file "stitches" these together while the \texttt{.pvd} file "stitches" these files together into a
into a coherent data set. For example, the \texttt{.pvd} holds the coherent data set. For example, the \texttt{.pvd} holds the
simulation time at which a given data-set is produced which can simulation time at which a given time step was produced, that can
later be used for visualization. later be used for visualization.
\item You can now display the result of the simulation using the \item You can now display the result of the simulation using the
visualization tool ParaView (or, if you prefer, VisIt). Just type visualization tool ParaView (or, if you prefer, VisIt). Just type
@ -74,9 +74,9 @@ simulation together with a brief description, by running
``Apply'' button. Once you have done this, the visualization of the ``Apply'' button. Once you have done this, the visualization of the
simulation result appears on the screen and you can click the simulation result appears on the screen and you can click the
``play'' button in the toolbar to view display its evolution over ``play'' button in the toolbar to view display its evolution over
time. Also note that you can choose the output quantity to be time. Also note that you can choose the visualized quantity
displayed in the toolbar. For the lens problem, the most insight can in the toolbar. For the lens problem, the most interesting quantities
be gained by looking at one of the saturations. are probably the saturations.
\item Play a bit around to make your self familiar with the \item Play a bit around to make your self familiar with the
visualization tool of your choice as you will be using it a lot. visualization tool of your choice as you will be using it a lot.
\end{enumerate} \end{enumerate}

View File

@ -2,22 +2,21 @@
\label{tutorial-coupled} \label{tutorial-coupled}
The process of setting up a problem using \eWoms can be roughly The process of setting up a problem using \eWoms can be roughly
divided into four parts: divided into three parts:
\begin{enumerate} \begin{enumerate}
\item A suitable model has to be chosen. \item A suitable model has to be chosen.
\item The geometry of the problem and correspondingly a grid have to \item The geometry of the problem has to be defined and the suitable
be defined. grid has to be created.
\item Boundary and initial conditions and material properties have to be \item Boundary and initial conditions and material properties have to
selected. be specified.
\end{enumerate} \end{enumerate}
The physical set-up of the flow problem being solved in this tutorial The physical set-up of the flow problem being solved in this tutorial
is illustrated in Figure \ref{tutorial-coupled:problemfigure}: It is illustrated in Figure \ref{tutorial-coupled:problemfigure}: It
consists of a rectangular domain with no-flow boundary conditions on consists of a rectangular domain with no-flow boundary conditions on
the top and on the bottom of the domain, which is initially fully the top and on the bottom of the domain, which is initially fully
saturated by oil. Water infiltrates from the left side into the domain saturated by a light oil. Water infiltrates from the left side and
and replaces the oil. The effect of gravity is neglected for this replaces the oil. The effect of gravity is neglected.
problem.
\begin{figure}[ht] \begin{figure}[ht]
\psfrag{x}{x} \psfrag{x}{x}
@ -58,10 +57,10 @@ The solved equations are the mass balances of water and oil:
\subsection{The main source file} \subsection{The main source file}
Listing \ref{tutorial-coupled:mainfile} shows the main application Listing \ref{tutorial-coupled:mainfile} shows the main file
file \texttt{tutorial/tutorial\_coupled.cc} uses the fully implicit \texttt{tutorial/tutorial\_coupled.cc} for the tutorial problem using
model that assumes immiscibility. This file has to be compiled and a fully-implicit model that assumes immiscibility. This file has to be
executed in order to solve the problem described above. compiled and executed in order to solve the problem described above.
\begin{lst}[File tutorial/tutorial\_coupled.cc]\label{tutorial-coupled:mainfile} \mbox{} \begin{lst}[File tutorial/tutorial\_coupled.cc]\label{tutorial-coupled:mainfile} \mbox{}
\lstinputlisting[style=eWomsCode, numbersep=5pt, firstline=25, firstnumber=25]{../../tutorial/tutorial_coupled.cc} \lstinputlisting[style=eWomsCode, numbersep=5pt, firstline=25, firstnumber=25]{../../tutorial/tutorial_coupled.cc}
@ -84,13 +83,12 @@ The default \eWoms startup routine deals with parsing the command line
arguments, reading the parameter file, properly setting up the \Dune arguments, reading the parameter file, properly setting up the \Dune
infrastructure, creating the grid, and starting the actual simulation. infrastructure, creating the grid, and starting the actual simulation.
Required parameters for the start of the simulation, such as the Required parameters for the start of the simulation, such as the
initial time-step size, the simulation time or details of the grid, initial time-step size, the final simulation time or details of the
can be either specified by command line arguments of the form grid, can be either specified by command line arguments of the form
(\texttt{--parameter-name=value}), in the file specified by the (\texttt{--parameter-name=value}), or in the file specified by the
\texttt{--parameter-file="file\_name"} argument. A list of all \texttt{--parameter-file="file\_name"} argument. A list of all
recognized parameters that can be specified at run time can be printed parameters that can be specified at run-time can be obtained by passing
by passing the \texttt{--help} argument to the exectutable of the the \texttt{--help} argument to the exectutable of the simulation.
simulation.
\subsection{The problem file} \subsection{The problem file}
@ -109,67 +107,74 @@ using the \eWoms property system (for more information see chapter
\begin{itemize} \begin{itemize}
\item First, a new type tag is created for the problem in line \item First, a new type tag is created for the problem in line
\ref{tutorial-coupled:create-type-tag}. In this case, the new type \ref{tutorial-coupled:create-type-tag}. In this case, the new type
tag inherits all properties from the \texttt{BoxTwoP} type tag, which tag inherits all properties from the \texttt{BoxImmiscibleTwoPhase}
means that for this problem the two-phase box model is chosen as type tag, which means that for this problem the immiscible box model
discretization scheme. for two fluid phases is chosen as discretization scheme.
\item On line \ref{tutorial-coupled:set-problem}, a problem class is \item On line \ref{tutorial-coupled:set-problem}, the problem class is
specified for the new type tag, while the grid which is going to be specified for the new type tag, while the kind of grid which is
used is defined in line \ref{tutorial-coupled:set-grid} -- in this going to be used is defined in line \ref{tutorial-coupled:set-grid}
case that is \texttt{Dune::YaspGrid}. -- in this case that is \texttt{Dune::YaspGrid}.
\item Since there's no uniform mechanism to allocate grids in \Dune, \item Since \Dune does not provide a uniform mechanism to initialize
\eWoms features the concept of grid creators. In this case the and load grids, \eWoms features the concept of grid creators. In
generic \texttt{CubeGridCreator} is used. This grid creator constructs a structured this case, the generic \texttt{CubeGridCreator} is used. This grid
hexahedron grid of a specified size and resolution. For this grid creator constructs a structured rectangular grid with a specified
creator the physical domain of the grid is specified via the size and resolution. For this grid creator, the physical domain of
run-time parameters \texttt{Grid.upperRightX}, the grid is specified via the run-time parameters
\texttt{Grid.upperRightY}, \texttt{Grid.numberOfCellsX} and \texttt{DomainSizeX} and \texttt{DomainSizeY} and its resolution by
\texttt{Grid.numberOfCellsY}. These parameters can be specified via \texttt{CellsX} and \texttt{CellsY}. These parameters can be
the command-line or in a parameter file. specified via the command-line or in a parameter file, but the
problem file must define default values for them. Defining these
defaults is done on lines
\ref{tutorial-coupled:grid-default-params-begin} to
\ref{tutorial-coupled:default-params-end}.
\end{itemize} \end{itemize}
Next, an appropriate fluid system -- which specifies the thermodynamic Next, an appropriate fluid system -- which specifies the thermodynamic
relations of the fluid phases -- has to be chosen. By default, the relations of the fluid phases -- has to be chosen. By default, the
fully-implicit immiscible model uses the fully-implicit immiscible model for two fluid phases uses
\texttt{TwoPImmiscibleFluidSystem}. This fluid system simplifies \texttt{Dumux::FluidSystems::TwoPImmiscible}. This fluid system
things considerably by assuming immiscibility of the phases, but it simplifies things considerably by assuming immiscibility of the
requires to explicitly specify the fluids used for the wetting and phases, but it requires to explicitly specify the fluids used for the
non-wetting phases. In this case, liquid water based on the relations wetting and non-wetting phases. In this case, liquid water based on
from IAPWS'97~\cite{IAPWS1997} is chosen as the wetting phase on line the relations from IAPWS'97~\cite{IAPWS1997} is chosen as the wetting
\ref{tutorial-coupled:wettingPhase} and liquid oil is chosen as the phase on line \ref{tutorial-coupled:wettingPhase} and liquid oil is
non-wetting phase on line \ref{tutorial-coupled:nonwettingPhase}. The chosen as the non-wetting phase on line
next property, which is set in line \ref{tutorial-coupled:gravity}, \ref{tutorial-coupled:nonwettingPhase}. The next property, which is
tells the model not to use gravity. This is then followed by the set in line \ref{tutorial-coupled:gravity}, tells the model not to use
specifcation default values for parameters specifying the temporal and gravity. This is then followed by the specifcation default values for
spatial domain from line \ref{tutorial-coupled:default-params-begin} parameters specifying the temporal and spatial domain from line
to line \ref{tutorial-coupled:default-params-end}. The values of thos \ref{tutorial-coupled:default-params-begin} to line
can be overwritten at run-time if desired. \ref{tutorial-coupled:default-params-end}. The values of those can be
overwritten at run-time if desired.
Following the property definition is the definition actual physical Following the property definitions comes the definition of the actual
set-up to be simulated. This is done by means of the \textit{problem physical set-up to be simulated. This is done by means of the
class}. The problem class specifies boundary and initial conditions, \textit{problem class}. The problem class specifies boundary and
source terms or spatial quantities like temperature, porosity, initial conditions, source terms or spatial quantities like
intrinsic permeability and the parameters of the material law within temperature, porosity, intrinsic permeability and the parameters of
the domain. Since there are quite a few methods of the problem called the material law within the domain. Since there are quite a few
by the \eWoms models, and often there are sensible defaults for these methods of the problem called by the \eWoms models, and often there
methods, it is strongly recomended to derive the problem class from are sensible defaults for these methods, it is strongly recomended to
the class specified by the \texttt{BaseProblem} property as can be derive the problem class from the class specified by the
seen on line \ref{tutorial-coupled:def-problem}\footnote{Technically, \texttt{BaseProblem} property as done on line
deriving the problem from the \texttt{BaseProblem} property is not \ref{tutorial-coupled:def-problem}\footnote{Technically, deriving the
required if it implements all necessary methods. Do not complain if problem from the \texttt{BaseProblem} property is not required if it
things explode in this case, though.}. implements all necessary methods. Do not complain if things explode
in this case, though.}.
For isothermal multi-phase porous media models, problem class must always provide at least For isothermal multi-phase porous media model, the problem class must
the following methods: always provide at least the following methods:
\begin{itemize} \begin{itemize}
\item \texttt{initial()} for specifying the initial condition within \item \texttt{initial()} for specifying the initial condition within
the domain. the domain,
\item \texttt{source()} specifying the source term for each conservation quantity. \item \texttt{source()} which specifies the source term for each conservation quantitym
\item \texttt{boundary()} specifying the conditions which apply on the domain boundary. \item \texttt{boundary()} for specifying the conditions which apply on
\item \texttt{temperature()} specifying temperature at a given time the domain boundary,
and at a given position of the domain. If energy is conserved, this \item \texttt{temperature()} specifying the temperature within the
method is not necessary, but energy fluxes must be provided in the domain. Note, that if energy is conserved, this method is not
\texttt{boundary()} and \texttt{source()} methods and an initial necessary. Though in this case, energy fluxes must be specified by
temperature needs to be defined in the \texttt{initial()} method. the \texttt{boundary()} and \texttt{source()} methods and an initial
temperature needs to be defined by the \texttt{initial()} method.
\item \texttt{intrinsicPermeability()} returns the intrinsic \item \texttt{intrinsicPermeability()} returns the intrinsic
permeability matrix $\mathbf{K}$ in $[m^2]$ at a given location. permeability matrix $\mathbf{K}$ in $[m^2]$ at a given location.
\item \texttt{porosity()} returns the ratio of pore space to \item \texttt{porosity()} returns the ratio of pore space to
@ -181,12 +186,12 @@ the following methods:
All of these methods take a single template argument, All of these methods take a single template argument,
\texttt{Context}, and the three function arguments \texttt{context}, \texttt{Context}, and the three function arguments \texttt{context},
\texttt{spaceIdx} and \texttt{timeIdx}. Together these form the \texttt{spaceIdx} and \texttt{timeIdx}. Together, these form the
\textit{execution context}. The execution context can be thought of as \textit{execution context}. The execution context can be thought of as
a collection of all available information when a given method is a collection of all available information when a given method is
called. Execution contexts are thus a way to abstract the differences called. Execution contexts are thus a way to abstract the differences
of the different discretization schemes. The following methods are of the different discretization schemes. The following methods are
provided by all \text{context} objects: provided by all \texttt{context} objects:
\begin{itemize} \begin{itemize}
\item \texttt{pos(spaceIdx, timeIdx)}: This method returns the \item \texttt{pos(spaceIdx, timeIdx)}: This method returns the
relevant position of the execution context within the physical relevant position of the execution context within the physical
@ -206,7 +211,7 @@ provided by all \text{context} objects:
\end{itemize} \end{itemize}
The execution contexts for the \texttt{source} and \texttt{boundary} The execution contexts for the \texttt{source} and \texttt{boundary}
methods provide the following methods in addition: methods always provide the following methods in addition:
\begin{itemize} \begin{itemize}
\item \texttt{volVars(spaceIdx, timeIdx)}: The secondary variables \item \texttt{volVars(spaceIdx, timeIdx)}: The secondary variables
used by the model relevant for the execution context. These are used by the model relevant for the execution context. These are
@ -217,20 +222,21 @@ methods provide the following methods in addition:
Finally, the execution context for the \texttt{boundary} method Finally, the execution context for the \texttt{boundary} method
provides the methods \texttt{boundarySegmentArea(spaceIdx, timeIdx)}, provides the methods \texttt{boundarySegmentArea(spaceIdx, timeIdx)},
and \texttt{normal(spaceIdx, timeIdx)}, which return the area and and \texttt{normal(spaceIdx, timeIdx)}, which return the area of the
outer unit normal of the execution context's boundary segment. boundary segment and outer unit normal of the boundary segment.
When specifying the boundary conditions in the problem class, a small When specifying the boundary conditions in the problem class, a small
safeguard value \texttt{eps\_} is usually added when comparing spatial safeguard value \texttt{eps\_} should usually be added when comparing
coordinates. For the problem considered here, the left boundary might spatial coordinates. For the problem considered here, the left
hence not be detected if checking whether the first coordinate of the boundary might not be detected if checking whether the first
global position is equal to zero, but by testing whether it is smaller coordinate of the global position is equal to zero, but it is detected
than a very small value \texttt{eps\_}. Also, the \texttt{bboxMax()} reliably by testing whether it is smaller than an
(``\textbf{max}imum coordinate of the grid's \textbf{b}ounding $\epsilon$-value. Also, the \texttt{bboxMax()} (``\textbf{max}imum
\textbf{b}ox'') method is used here to determine the extend of the coordinate of the grid's \textbf{b}ounding \textbf{box}'') method is
physical domain. It returns a vector with the maximum values of each used here to determine the extend of the physical domain. It returns a
global coordinate of the grid. This method and the analogous vector with the maximum values on each axis of the grid. This method
\texttt{bboxMin()} method are provided by the problem's base class. and the analogous \texttt{bboxMin()} method are provided by the
problem's base class.
In addition to these methods, there might be some additional In addition to these methods, there might be some additional
model-specific methods. model-specific methods.
@ -238,35 +244,39 @@ model-specific methods.
\subsection{Defining fluid properties} \subsection{Defining fluid properties}
\label{tutorial-coupled:description-fluid-class} \label{tutorial-coupled:description-fluid-class}
The \eWoms distribution includes some common substances which can be The \eWoms distribution includes representations of some common
used out of the box. The properties of pure substances (such as substances which can be used out of the box. The properties of pure
the components nitrogen, water, or the pseudo-component air) are substances (such as nitrogen, water, or the pseudo-component air) are
provided by header files located in the folder provided by header files located in the folder
\texttt{dumux/material/components}. \texttt{dumux/material/components}.
When two or more components are considered, interactions between pure When two or more substances are considered, interactions between these
substances become relevant and properties of these mixtures of become relevant and the properties of these mixtures of substances --
substances -- e.g. composition, density or enthalpy -- are of e.g. composition, density or enthalpy -- are required. In \eWoms, such
interest. Such interactions are defined by {\em fluid systems}, which interactions are defined by {\em fluid systems}, which are located in
are located in \texttt{dumux/material/fluidsystems}. A more thorough \texttt{dumux/material/fluidsystems}. A more thorough overview of the
overview of the \eWoms fluid framework can be found in \eWoms fluid framework can be found in
chapter~\ref{sec:fluidframework}. chapter~\ref{sec:fluidframework}.
\subsection{Exercises} \subsection{Exercises}
\label{tutorial-coupled:exercises} \label{tutorial-coupled:exercises}
The following exercises will give you the opportunity to learn how you The following exercises will give you the opportunity to learn how you
can change soil parameters, boundary conditions, run-time parameters can change soil parameters, boundary conditions, run-time parameters
and fluid properties in \eWoms. and fluid properties in \eWoms.
\subsubsection{Exercise 1} \subsubsection{Exercise 1}
\renewcommand{\labelenumi}{\alph{enumi})} For Exercise 1 you have
to make only some small changes in the tutorial files. \renewcommand{\labelenumi}{\alph{enumi})}
For Exercise 1 you have to modify the tutorial files only sightly, or
even not at all.
\begin{enumerate} \begin{enumerate}
\item \textbf{Running the Program} \\ \item \textbf{Running the Program} \\
To get an impression what the results should look like you can first run the original version of To get an impression what the results should look like, you can first run the original version of
the coupled tutorial model by typing \texttt{./tutorial\_coupled}. the fully-implicit tutorial problem by typing \texttt{./tutorial\_coupled}.
Note, that the time-step size is automatically adapted during the simulation. Note, that the time-step size is automatically adapted during the simulation.
For visualizing the results using the program \texttt{paraview}, please refer to section \ref{quick-start-guide}. For visualizing the results using the program \texttt{paraview}, please refer to section \ref{quick-start-guide}.
@ -274,24 +284,23 @@ For visualizing the results using the program \texttt{paraview}, please refer to
Change the size of the model domain so that you get a rectangle with Change the size of the model domain so that you get a rectangle with
edge lengths of $\text{x} = \unit[400]{m}$ and $\text{y} = edge lengths of $\text{x} = \unit[400]{m}$ and $\text{y} =
\unit[500]{m}$ and with discretization lengths of $\Delta \text{x} = \unit[500]{m}$ and with discretization lengths of $\Delta \text{x} =
\unit[20]{m}$ and $\Delta \text{y} = \unit[20]{m}$. For this you can \unit[20]{m}$ and $\Delta \text{y} = \unit[20]{m}$. For this, you can
either change the properties defined between lines either change the properties defined between lines
\ref{tutorial-coupled:default-params-begin} and \ref{tutorial-coupled:default-params-begin} and
\ref{tutorial-coupled:default-params-end} (don't forget to \ref{tutorial-coupled:default-params-end}, or you may pass them as
re-compile the program in this case), or pass you may pass them as command line parameters to the simulation when you run it.
command line parameters to the simulation when you run it. Note,
that you do not have to recompile the program if you add command
line parameters to the executable.
If you chose to change the problem file, re-compile the simulation If you chose to change the problem file, re-compile the simulation
by typing \texttt{make tutorial\_coupled}. In both cases, don't by typing \texttt{make tutorial\_coupled}. Note, that you do not
forget run the simulation as explained above. have to recompile the 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} \\ \item \textbf{Boundary Conditions} \\
Change the boundary conditions in the file Change the boundary conditions in the problem file
\texttt{tutorialproblem\_coupled.hh} so that water enters from the \texttt{tutorialproblem\_coupled.hh} so that water enters from the
bottom and oil is extracted from the top boundary. The right and the bottom and oil is extracted from the top boundary. The right and the
left boundary should be closed for water and oil fluxes. left boundary should be closed for both, water and oil.
Note that in \eWoms, flux boundary conditions are specified as Note that in \eWoms, flux boundary conditions are specified as
fluxes of the conserved quantities into the direction of the outer fluxes of the conserved quantities into the direction of the outer
@ -300,55 +309,59 @@ For visualizing the results using the program \texttt{paraview}, please refer to
simulation by typing \texttt{make tutorial\_coupled} and re-run it simulation by typing \texttt{make tutorial\_coupled} and re-run it
as explained above. as explained above.
\item \textbf{Changing the Shape of the Discrete Elements} \\ \item \textbf{Changing the Shape of the Discrete Elements} \\
In order to complete this exercise you need a \Dune grid module that In order to complete this exercise you need a \Dune grid manager
is capable of handling simplex grids. By default, \Dune does not that is capable of handling simplex grids. By default, \Dune does
include such a grid manager in its core modules, but one such grid not include such a grid manager in its core modules, but the freely
manager that is freely available available \texttt{ALUGrid}~\cite{ALUGRID-HP} can be used. If you did
\texttt{ALUGrid}~\cite{ALUGRID-HP}. If you did not install such a not install such a grid manager, you may also skip this exercise.
grid manager, please skip this exercise.
To complete this excercise, change the problem's grid creator on Change the grid creator used by the problem to
line \ref{tutorial-coupled:set-gridcreator} to
\texttt{SimplexGridCreator<TypeTag>} and the type of the grid to \texttt{SimplexGridCreator<TypeTag>} and the type of the grid to
\texttt{Dune::ALUSimplexGrid<2, 2>} on line \texttt{Dune::ALUSimplexGrid<2, 2>}. The grid creator is specified
on line \ref{tutorial-coupled:set-gridcreator}, whil the type of the
\Dune grid manager is set on line
\ref{tutorial-coupled:set-grid}. You also need to change the include \ref{tutorial-coupled:set-grid}. You also need to change the include
statement from \texttt{cubegridcreator.hh} to statement of the grid creator from \texttt{cubegridcreator.hh} to
\texttt{simplexgridcreator.hh} on line \texttt{simplexgridcreator.hh} on line
\ref{tutorial-coupled:include-grid-creator}. \ref{tutorial-coupled:include-grid-creator} and the one for the grid
manager from \texttt{dune/grid/yaspgrid.hh} to
\texttt{dune/grid/alugrid.hh} on line \ref{tutorial-coupled:include-grid-manager}.
The resulting grid can be examined by re-compiling and starting the The resulting grid can be examined by re-compiling and starting the
simulation, loading the result into \texttt{paraview}, and selecting simulation, loading the result into \texttt{paraview}, and selecting
\texttt{Surface with Edges} as the visualization mode. \texttt{Surface with Edges} instead of the default visualization
mode \texttt{Surface}.
\item \textbf{Changing Fluids} \\ \item \textbf{Changing Fluids} \\
In this exercise you will change the fluids used. Use DNAPL instead In this exercise you will change the fluids used: Use DNAPL instead
of Oil and Brine instead of Water. To do that, you may follow the of LNAPL and Brine instead of Water. This can be done by the
steps: following steps:
\begin{enumerate} \begin{enumerate}
\item Brine: Brine is thermodynamically very similar to pure water but \item Brine: Brine is thermodynamically very similar to pure water but
also considers a fixed amount of salt in the liquid phase. Hence, also includes a fixed amount of salt in the liquid phase. Hence,
the class \texttt{Dumux::Brine} calls back to a class which the class \texttt{Dumux::Brine} calls back to a class which
represents pure water. This can be, for example \texttt{Dumux::H2O}, represents pure water. (This can be, for example
or \texttt{Dumux::SimpleH2O}. The class which represents pure water \texttt{Dumux::H2O}, or \texttt{Dumux::SimpleH2O}.) The class which
is passed to \texttt{Dumux::Brine} as the second template argument represents pure water is passed to \texttt{Dumux::Brine} as the
after the data type for scalar values, i.e. the full definition of second template argument after the data type for scalar values,
the brine component is \texttt{Dumux::Brine<Scalar, i.e. the full definition of the brine component is
Dumux::H2O<Scalar> >}. The file which defines the brine component \texttt{Dumux::Brine<Scalar, Dumux::H2O<Scalar> >}. The file which
is located in the folder \texttt{dumux/material/components/}. defines the brine component is located in the folder
Include this file and select use the brine component as the wetting phase. \texttt{dumux/material/components/}. Include this file and select
\item DNAPL: Now let us include a component representing an oil that use the brine component as the wetting phase.
\item DNAPL: Now let us use a component that represents an oil that
is heavier than water (in environmental engineering this class of is heavier than water (in environmental engineering this class of
substances is often called \textbf{d}ense substances is often called \textbf{d}ense
\textbf{n}on-\textbf{a}queous \textbf{p}hase \textbf{l}iquid \textbf{n}on-\textbf{a}queous \textbf{p}hase \textbf{l}iquid
(DNAPL)) which is also located in the folder (DNAPL)) which is also located in the folder
\texttt{dumux/material/components/}. Try to include the file and \texttt{dumux/material/components/}. Include the correct file and
use the \texttt{DNAPL} component as the non-wetting phase. use the DNAPL component as the non-wetting phase.
\end{enumerate} \end{enumerate}
If you want to take a closer look on how the fluid classes are defined If you want to take a closer look on how the fluid classes are defined
and which substances are available in the \eWoms distribution, feel and which substances are available in the \eWoms distribution, feel
free to browse through the files in the directory free to browse through the files in the directory
\texttt{dumux/material/components} and to read \texttt{dumux/material/components} and read
chapter~\ref{sec:fluidframework}. chapter~\ref{sec:fluidframework}.
\item \textbf{Use a Full-Fledged Fluid System} \\ \item \textbf{Use a Full-Fledged Fluid System} \\
@ -362,28 +375,26 @@ chapter~\ref{sec:fluidframework}.
Now include the file Now include the file
\texttt{dumux/material/fluidsystems/h2oairfluidsystem.hh}, and \texttt{dumux/material/fluidsystems/h2oairfluidsystem.hh}, and
instruct the model to use this fluid system by setting instruct the model to use this fluid system by setting
\texttt{FluidSystem} via:\\ the \texttt{FluidSystem} property via:\\
\begin{lstlisting}[style=eWomsCode] \begin{lstlisting}[style=eWomsCode]
SET_TYPE_PROP(TutorialProblemCoupled, SET_TYPE_PROP(TutorialProblemCoupled,
FluidSystem, FluidSystem,
Dumux::FluidSystems::H2OAir<typename GET\_PROP\_TYPE(TypeTag, Scalar)>) Dumux::FluidSystems::H2OAir<typename GET_PROP_TYPE(TypeTag, Scalar)>)
\end{lstlisting} \end{lstlisting}
However, this is a rather complicated fluid system which considers However, this is a rather complicated fluid system which considers all
mixtures of components and also uses tabulated components that need to fluid phases as a mixture of the components and also uses tabulated
be initialized -- i.e. some components use tables for expensive to components that need to be filled with values (i.e. some components
calculate quantities that need to be filled with values. The use tables to speed up expensive computations). The initialization of
initialization of the fluid system is normally done in the constructor the fluid system is normally done in the constructor of the problem by
of the problem by calling \texttt{FluidSystem::init();}. calling \texttt{FluidSystem::init();}.
Remember that in \Cplusplus, the constructor always the same name as As water flow replacing a gas is much faster, simulate the problem
the respective class, i.e. \texttt{TutorialProblemCoupled(..)}. only until $2.000$ seconds is reached and start with a time step of
$1$ second.
As water flow replacing a gas is much faster, test your simulation Now, revert the changes made in this part of the exercise, as we will
only until $2000$ seconds and start with a time step of $1$ second. continue to use immiscible phases from here on and hence do not need a
complex fluid system.
Please revert the changes made in this part of the exercise, as we
will continue to use immiscible phases from here on and hence do not
need a complex fluid system.
\item \textbf{Changing Constitutive Relations} \\ \item \textbf{Changing Constitutive Relations} \\
Instead of using a regularized Brooks-Corey law for the relative Instead of using a regularized Brooks-Corey law for the relative
@ -400,7 +411,7 @@ need a complex fluid system.
of the property definition by \texttt{LinearMaterial} and rename of the property definition by \texttt{LinearMaterial} and rename
\texttt{RawMaterialLaw} to \texttt{TwoPMaterialLaw}. Also remove the \texttt{RawMaterialLaw} to \texttt{TwoPMaterialLaw}. Also remove the
line which contains the \texttt{EffToAbsLaw} typedef. line which contains the \texttt{EffToAbsLaw} typedef.
\item Then adapt the necessary parameters of the linear law and the \item Then, adapt the necessary parameters of the linear law and the
respective \texttt{set}-functions can be found in the file respective \texttt{set}-functions can be found in the file
\texttt{dumux/material/fluidmatrixinteractions/2p/linearmaterialparams.hh}.\\ \texttt{dumux/material/fluidmatrixinteractions/2p/linearmaterialparams.hh}.\\
Call the \texttt{set}-functions from the constructor of the problem. Call the \texttt{set}-functions from the constructor of the problem.
@ -511,12 +522,12 @@ step size of $100\;\text{s}$.
\subsubsection{Exercise 3: Create a New Component} \subsubsection{Exercise 3: Create a New Component}
Create a new file for the benzene component called \texttt{benzene.hh} Create a new file for the benzene component called \texttt{benzene.hh}
and implement a new component. (You may copy and modify one of the and implement a new component. (\textbf{Hint:} The easiest way to do
existing components located in the directory this is to copy and modify one of the existing components located in
\texttt{dumux/material/components}. Use benzene as a new fluid and the directory \texttt{dumux/material/components}.) Use benzene as a
run the model of Exercise 2 with water and benzene. Benzene has a new non-wetting fluid and run the problem of Exercise 2 with water and
density of $889.51 \, \text{kg} / \text{m}^3$ and a viscosity of benzene. Benzene has a density of $889.51 \, \text{kg} / \text{m}^3$
$0.00112 \, \text{Pa} \; \text{s}$. and a viscosity of $0.00112 \, \text{Pa} \; \text{s}$.
\clearpage \newpage \clearpage \newpage

View File

@ -1,23 +1,25 @@
\chapter[Tutorial]{Tutorial}\label{chp:tutorial} \chapter[Tutorial]{Tutorial}\label{chp:tutorial}
\eWoms provides two sorts of models: Models which use a fully-implicit \eWoms provides two sorts of models: Models which use a fully-implicit
discretization in space and time and models that are discretization in space and time and models that use a
semi-implicit. semi-implicit space and an explicit time discretization.
The semi-implicit solve the combined mass balance equation for all The semi-implicit models work by first implicitly solving a mass
phases implicitly -- which yields a pressure -- and then transport the balance equation for all conservation quaintites combined. This
conserved quantities in an explicit step based on the result of the procedire yields a pressure field. Then, the conserved quantities are
(implicit) pressure step. For this reason these models are also called transported using an explicit post-processing procedure based on of
to be based on the IMPES approach (\textbf{i}mplicit \textbf{p}ressure the pressure field obtained in the implicit step. These models are
\textbf{e}xplicit \textbf{s}aturation) or, more generally, on the usually refered to be based on the IMPES approach (\textbf{i}mplicit
IMPET approach (IMPES (\textbf{i}mplicit \textbf{p}ressure \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). \textbf{e}xplicit \textbf{t}ransport).
The fully-implicit models, describe the conservation quantities of a In contrast, the fully-implicit models describe the conservation
flow system as a system of strongly coupled partial differential quantities of a flow system as a system of strongly coupled partial
equations. Physically, these conservation quantities are mass, differential equations which is directly using a non-linear
momentum and energy; Although the momentum is usually not explicitly solver. Physically, these conservation quantities are mass, momentum
conserved in the context of flow models for porous media. 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 In section \ref{box} a short introduction to the vertex centered
finite volume scheme (VCFV or box method) used by \eWoms as the finite volume scheme (VCFV or box method) used by \eWoms as the
@ -27,15 +29,14 @@ which is quite similar to the VCFV discretization, except that this
scheme does not require to construct a dual grid centered around the scheme does not require to construct a dual grid centered around the
primary grid's vertices. primary grid's vertices.
This chapter, first introduce how to solve flow problems using a
The following two sections of the tutorial first introduce how to fully-implicit model (section \ref{tutorial-coupled}) and then how to
solve flow problems using a fully-coupled model (section solve the same problem using a semi-implicit model (section
\ref{tutorial-coupled}) and then how to solve the same problem using a \ref{tutorial-decoupled}). Being simple but representative case, an
semi-implicit model (section \ref{tutorial-decoupled}). Being the isothermal two-phase problem (i.e. two fluid phases, one solid phase)
easiest case, an isothermal two-phase system (two fluid phases, one will be considered. The source code of these tutorials is shipped with
solid phase) will be considered. The source code of these tutorials is the \eWoms source package and can be found in the \texttt{tutorial}
shipped with the \eWoms source package and can be found in the directory.
\texttt{tutorial} directory.
\input{tutorial-coupled} \input{tutorial-coupled}
\input{tutorial-decoupled} \input{tutorial-decoupled}

View File

@ -38,7 +38,7 @@
#include <dumux/material/fluidmatrixinteractions/mp/2padapter.hh> #include <dumux/material/fluidmatrixinteractions/mp/2padapter.hh>
// For the DUNE grid // For the DUNE grid
#include <dune/grid/yaspgrid.hh> #include <dune/grid/yaspgrid.hh> /*@\label{tutorial-coupled:include-grid-manager}@*/
#include <dumux/common/cubegridcreator.hh> /*@\label{tutorial-coupled:include-grid-creator}@*/ #include <dumux/common/cubegridcreator.hh> /*@\label{tutorial-coupled:include-grid-creator}@*/
// For Dune::FieldMatrix // For Dune::FieldMatrix
@ -103,14 +103,14 @@ SET_SCALAR_PROP(TutorialProblemCoupled, EndTime, 100e3);
SET_SCALAR_PROP(TutorialProblemCoupled, InitialTimeStepSize, 125.0); SET_SCALAR_PROP(TutorialProblemCoupled, InitialTimeStepSize, 125.0);
// define the physical size of the problem's domain [m] // define the physical size of the problem's domain [m]
SET_SCALAR_PROP(TutorialProblemCoupled, DomainSizeX, 300.0); SET_SCALAR_PROP(TutorialProblemCoupled, DomainSizeX, 300.0); /*@\label{tutorial-coupled:grid-default-params-begin}@*/
SET_SCALAR_PROP(TutorialProblemCoupled, DomainSizeY, 60.0); SET_SCALAR_PROP(TutorialProblemCoupled, DomainSizeY, 60.0);
SET_SCALAR_PROP(TutorialProblemCoupled, DomainSizeZ, 0.0); SET_SCALAR_PROP(TutorialProblemCoupled, DomainSizeZ, 0.0);
// // define the number of cells used for discretizing the physical domain // // define the number of cells used for discretizing the physical domain
SET_INT_PROP(TutorialProblemCoupled, CellsX, 100); SET_INT_PROP(TutorialProblemCoupled, CellsX, 100);
SET_INT_PROP(TutorialProblemCoupled, CellsY, 1); SET_INT_PROP(TutorialProblemCoupled, CellsY, 1);
SET_INT_PROP(TutorialProblemCoupled, CellsZ, 1); /*@\label{tutorial-coupled:default-params-end}@*/ SET_INT_PROP(TutorialProblemCoupled, CellsZ, 1); /*@\label{tutorial-coupled:default-params-end}@*/
} // namespace Properties } // namespace Properties
//! Tutorial problem using the fully-implicit immiscible model. //! Tutorial problem using the fully-implicit immiscible model.