merge the changes directly done in the stable branch back into trunk

This commit is contained in:
Andreas Lauser
2009-08-05 14:11:46 +00:00
committed by Andreas Lauser
parent 330f89d037
commit 351c18602a
11 changed files with 93 additions and 69 deletions

View File

@@ -1,5 +1,7 @@
# $id: $
if BUILD_HANDBOOK
#EPS_FILES = EPS/tutorial-problemconfiguration.eps
DOCSOURCE = dumux-handbook.tex intro.tex navigation.html css.html
@@ -27,14 +29,10 @@ endif
BASEDIR=../..
CURDIR=doc/handbook
docdir=$(datadir)/doc/handbook
handbookdir=$(docdir)/handbook
handbook_DATA = dumux-handbook.pdf
if BUILD_DOCS
doc_DATA = dumux-handbook.pdf
EXTRAINSTALL = dumux-handbook.pdf grid-howto*.html *.png *.css
endif
CLEANFILES = *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.pdf *.ps
CLEANFILES = *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps
CLEANFILES += *.4ct *.4tc *.css *.idv *.idx *.lg *.tid *.tmp *.tms *.xref
CLEANFILES += dumux-handbook*.html dumux-handbook*.png
CLEANFILES += $(DOCS)
@@ -74,8 +72,9 @@ dumux-handbook.pdf:
# sed $(srcdir)/Makefile.dist.am -e 's/Makefile\.dist/Makefile/g' > $(distdir)/Makefile.am
# sed $(srcdir)/Makefile.dist.in -e 's/Makefile\.dist/Makefile/g' > $(distdir)/Makefile.in
EXTRA_TEXINPUTS:=$(top_srcdir)
EXTRA_TEXINPUTS=$(top_srcdir)
include $(top_srcdir)/am/global-rules
include $(top_srcdir)/am/latex
endif

View File

@@ -55,7 +55,7 @@
\title{
\begin{center}
\includegraphics[width=0.7\textwidth]{../logo/color_highres_bgtrans.eps}
\includegraphics[width=0.7\textwidth]{../logo/dumux_logo_hires_whitebg.eps}
\\[3cm]
{\Huge Handbook}
\end{center}

View File

@@ -34,7 +34,7 @@ add your account to the group \texttt{svndune}.
If you are working on a LH2 computer, you then can checkout DuMu$^\text{x}$
and the external modules via
\begin{itemize}
\item \texttt{svn checkout svn+ssh://luftig/home/svn/DUMUX/dune-mux/trunk dune-mux}
\item \texttt{svn checkout svn+ssh://luftig/home/svn/DUMUX/dune-mux/trunk dumux}
\item \texttt{svn checkout svn+ssh://luftig/home/svn/DUMUX/dune-subgrid/trunk dune-subgrid}
\item \texttt{svn checkout svn+ssh://luftig/home/svn/DUMUX/external/trunk external}
\end{itemize}
@@ -56,7 +56,7 @@ by \texttt{localhost}.
%Moreover, the possibility to checkout a read-only version from outside exists. Therefor, no IWS-account is needed. The following commands can be used for an anonymous checkout:
%\begin{itemize}
%\item \texttt{svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/dune-mux/trunk dune-mux}
%\item \texttt{svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/dune-mux/trunk dumux}
%\item \texttt{svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/external/trunk external}
%\item \texttt{svn checkout svn://svn.iws.uni-stuttgart.de/DUMUX/dune-subgrid/trunk dune-subgrid}
%\end{itemize}
@@ -75,11 +75,13 @@ Please also refer to the DUNE webpage for additional details, \cite{DUNE-HP}.
\paragraph{Build DUNE and DuMu$^\text{x}$}
Type in the folder \texttt{DUMUX}:
\begin{center}
\texttt{./dune-common/bin/dunecontrol --opts=dune-mux/debug.opts all}
\texttt{./dune-common/bin/dunecontrol --opts=\$DUMUX\_ROOT/debug.opts all}
\end{center}
This uses the DUNE buildsystem. If it does not work, please
consider the file \texttt{INSTALL} in the directory \texttt{dune-mux}. You can also find more information
in the DUNE Buildsystem HOWTO located at the DUNE webpage, \cite{DUNE-HP}.
Alternatively, the tool Cmake can
be used to build \Dumux. Please check the file
\texttt{INSTALL.cmake} for details.
This uses the DUNE buildsystem. If it does not work, please consider
the file \texttt{INSTALL} in the \Dumux root directory (if you use
SVN, this \texttt{\$DUMUX\_ROOT} is usually \texttt{dumux}, if you use
a released version it is usually \texttt{dumux-VERSION}). You can also
find more information in the DUNE Buildsystem HOWTO located at the
DUNE webpage, \cite{DUNE-HP}. Alternatively, the tool CMake can be
used to build \Dumux. Please check the file \texttt{INSTALL.cmake} for
details.

View File

@@ -50,7 +50,7 @@ into global linear systems of equations and much more. \texttt{dune-istl} is the
and provides generic, highly optimized linear algebra routines for solving
the generated systems.
\Dumux comes in form of an additional module \texttt{dune-mux}.
\Dumux comes in form of an additional module \texttt{dumux}.
It inherits functionality from the DUNE core modules
\texttt{dune-common}, \texttt{dune-grid}, and \texttt{dune-istl}, as well as from
the discretization module \texttt{dune-disc}. Some numerical models

View File

@@ -3,7 +3,7 @@
The previous chapter showed, how to install and compile \Dumux. This chapter shall give a very brief introduction, how to run a first test application and how to visualize the first output files. Only the rough steps will be described here. More detailed explanations can be found in the tutorials in the following chapter.
\begin{enumerate}
\item Go to the directory \texttt{dune-mux/test}. There, various test application folders can be found. Let us consider as example \texttt{test{\_}2p}:
\item Go to the directory \texttt{/test}. There, various test application folders can be found. Let us consider as example \texttt{test{\_}2p}:
\item Enter the folder \texttt{2p}. If everyting was compiled correctly, there should be an executable \texttt{test{\_}2p}. In order to run the simulation, type\\
\texttt{./test{\_}2p 1e4 1e2}\\
into the console. The parameters that are used here are the end time of the simulation and the initial timestep size. The parameters that are required when calling the application are specified in the application file (here: test{\_}2p.cc).

View File

@@ -3,14 +3,14 @@
We briefly describe the structure of \Dumux in terms
of subdirectories, source files, and tests. For more details,
the Doxygen documentation should be considered.
\Dumux comes in form of a DUNE module \texttt{dune-mux}.
\Dumux comes in form of a DUNE module \texttt{dumux}.
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{dune-mux}:
from now on assumed to be \texttt{/}:
\begin{itemize}
\item \texttt{CMake}: the configuration options
for building \Dumux using CMake. See the file \texttt{INSTALL.cmake} in
the root directory \texttt{dune-mux} for details. Of course,
the root directory of \texttt{dumux} 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},

View File

@@ -222,7 +222,7 @@ from either \texttt{Dune::HomogeneousSoil} or
\texttt{Dune::HeterogeneousSoil}.
For this tutorial problem a new soil class named \texttt{TutorialSoil}
is derived from \texttt{Dune::HomogeneousSoil} (listing
is derived from \texttt{Dune::Matrix2p} (listing
\ref{tutorial-coupled:soilpropertiesfile}, line
\ref{tutorial-coupled:tutorialsoil}), is located in
\texttt{tutorial/tutorialsoil\_coupled.hh}.

View File

@@ -27,9 +27,9 @@ The problem which is solved in this tutorial is illustrated in figure \ref{tutor
\caption{Geometry of the tutorial problem with initial and boundary conditions.}\label{tutorial-decoupled:problemfigure}
\end{figure}
Listing \ref{tutorial-deoucpled:mainfile} shows how the main file, which has to be executed, has to be set up, if the problem described above is to be solved using a decoupled model. This main file can be found in the directory \texttt{/dune-mux/tutorial}.
Listing \ref{tutorial-deoucpled:mainfile} shows how the main file, which has to be executed, has to be set up, if the problem described above is to be solved using a decoupled model. This main file can be found in the directory \texttt{/tutorial}.
\begin{lst}[File dune-mux/tutorial/tutorial\_decoupled.cc]\label{tutorial-deoucpled:mainfile} \mbox{}
\begin{lst}[File tutorial/tutorial\_decoupled.cc]\label{tutorial-deoucpled:mainfile} \mbox{}
\lstinputlisting[basicstyle=\ttfamily\scriptsize,numbers=left,
numberstyle=\tiny, numbersep=5pt]{../../tutorial/tutorial_decoupled.cc}
\end{lst}
@@ -38,23 +38,44 @@ First, in line \ref{tutorial-decoupled:include-begin} to \ref{tutorial-decoupled
In line \ref{tutorial-decoupled:grid-begin} to \ref{tutorial-decoupled:grid-end} the geometry is defined and the grid is generated. The three variables of Type \texttt{Dune::FieldVector} define the lower left corner of the domain (\texttt{L}), the upper right corner of the domain (\texttt{H}) and the number of cells in $x$ and $y$ direction (\texttt{N}), where the dimensions are previously defined in line \ref{tutorial-decoupled:dim}. The grid of type \texttt{Dune::SGrid} is then generated in line \ref{tutorial-decoupled:grid-end}. For more information about the dune grid interface, the different grid types that are supported and the generation of different grids it is referred to the \textit{Dune Grid Interface HOWTO} \cite{DUNE-HP}.
The second point mentioned at the beginning of this section was the definition of material properties and constitutive relationships. The fluid properties of the two fluid phases considered here are defined in lines \ref{tutorial-decoupled:water} and \ref{tutorial-decoupled:oil}. The fluid classes including different kinds of fluids (here: \texttt{Dune::Water} and \texttt{Dune::LowViscosityOil}) can be found in the folder \texttt{material/fluids} in the directory \texttt{/dune-mux/dumux}-\texttt{/material/fluids}. The properties of the solid matrix are defined in a special soil class. The \texttt{soil} object is generated in line \ref{tutorial-decoupled:soil}. As can be seen, the class type is \texttt{Dune::TutorialSoil}, which is defined in the file \texttt{tutorial\_soilproperties\_decoupled.hh} in the folder \texttt{/tutorial}. A description of this file and the definition of a soil class including the soil parameters can be found in section \ref{tutorial-decoupled:description-soil-class}. Finally, in line \ref{tutorial-decoupled:twophaserelations} the information included in the fluid and soil objects is used to generate an object of type \texttt{Dune::TwoPhaseRelations}, which includes the constitutive relationships (capillary pressure-saturation relation, relative permeability-saturation relation, etc.). The file \texttt{twophaserelations.hh} can be found in the directory \texttt{/dune-mux/dumux/material}.
The second point mentioned at the beginning of this section was the
definition of material properties and constitutive relationships. The
fluid properties of the two fluid phases considered here are defined
in lines \ref{tutorial-decoupled:water} and
\ref{tutorial-decoupled:oil}. The fluid classes including different
kinds of fluids (here: \texttt{Dune::Water} and \texttt{Dune::LowViscosityOil})
can be found in the folder \texttt{/dumux/material/fluids}. The
properties of the solid matrix are defined in a special soil
class. The \texttt{soil} object is generated in line
\ref{tutorial-decoupled:soil}. As can be seen, the class type is
\texttt{Dune::TutorialSoil}, which is defined in the file
\texttt{tutorial\_soilproperties\_decoupled.hh} in the folder
\texttt{/tutorial}. A description of this file and the definition of a
soil class including the soil parameters can be found in section
\ref{tutorial-decoupled:description-soil-class}. Finally, in line
\ref{tutorial-decoupled:twophaserelations} the information included in
the fluid and soil objects is used to generate an object of type
\texttt{Dune::TwoPhaseRelations}, which includes the constitutive
relationships (capillary pressure-saturation relation, relative
permeability-saturation relation, etc.). The file
\texttt{twophaserelations.hh} can be found in the directory
\texttt{/dumux/material}.
The definition of boundary and initial conditions as well as source of sink terms is done by definition of a so-called \textit{problem} class. In case of this tutorial the problem class is defined in the file \texttt{tutorialproblem\_decoupled.hh} in the \texttt{/tutorial} folder. In the main file the problem object of type \texttt{Dune::TutorialProblemDecoupled} is then generated in line \ref{tutorial-decoupled:problem}. A further explanation of the definition of boundary and initial conditions, source and sink terms and the structure of the problem class can be found in section \ref{tutorial-decoupled:description-bc-ic}. Besides the definition of the boundary and initial conditions the problem class is also a kind of interface containing all the objects generated before (geometry, fluids, soil, constitutive relationships, etc.). Thus, as can be seen in line \ref{tutorial-decoupled:problem} all this objects are given as arguments when calling the constructor of the problem class.
Following the steps listed at the beginning of this section, finally, a model has to be chosen. In case of this tutorial a decoupled isothermal two phase model is the choice. As explained before a decoupled model consists of a pressure equation which is decoupled or only weakly coupled to a saturation equation, concentration equations, energy balance equations, etc. In case of isothermal two phase flow one pressure equation and one saturation equation have to be solved.
The discretisation of the pressure equation is included in the object which is generated in line \ref{tutorial-decoupled:diffusion} of the main file. It is called \texttt{diffusion} and it is of type \texttt{Dune::FVTotalVelocity2P}. The definition of this class can be found in \texttt{/dune-mux/dumux/diffusion/fv} in the file \texttt{fvtotalvelocity2p.hh}. The \texttt{FV} in the class name indicates that a \textit{finite volume} discretisation is used. For the pressure equation also other discretisation methods like \textit{finite elements} or \textit{mimetic finite differences} are available.
The discretisation of the pressure equation is included in the object which is generated in line \ref{tutorial-decoupled:diffusion} of the main file. It is called \texttt{diffusion} and it is of type \texttt{Dune::FVTotalVelocity2P}. The definition of this class can be found in \texttt{/dumux/diffusion/fv} in the file \texttt{fvtotalvelocity2p.hh}. The \texttt{FV} in the class name indicates that a \textit{finite volume} discretisation is used. For the pressure equation also other discretisation methods like \textit{finite elements} or \textit{mimetic finite differences} are available.
Similarly, an object containing the discretisation of the saturation equation is generated in line \ref{tutorial-decoupled:transport} of the main file. As can be seen, this object is called \texttt{transport}. The class \texttt{Dune::FVSaturationWetting2P} can be found in the directory \texttt{/dune-mux/dumux/transport/fv}. Again, the \texttt{FV} in the class name indicates a \textit{finite volume} discretisation.
Similarly, an object containing the discretisation of the saturation equation is generated in line \ref{tutorial-decoupled:transport} of the main file. As can be seen, this object is called \texttt{transport}. The class \texttt{Dune::FVSaturationWetting2P} can be found in the directory \texttt{/dumux/transport/fv}. Again, the \texttt{FV} in the class name indicates a \textit{finite volume} discretisation.
For the decoupled model the so-called \textit{IMPES} (\textit{IM}plicit \textit{P}ressure \textit{E}xplicit \textit{S}aturation) algorithm is used. This means that the pressure equation is first solved using an implicit method. The resulting velocities are then used to solve the saturation equation explicitly. It is clear that depending on the non-linearity this is an iterative process within every timestep. The object \texttt{impes} of type \texttt{Dune::IMPES} which is generated in line \ref{tutorial-decoupled:impes} of the main file combines the objects \texttt{diffusion} and \texttt{transport} and proceeds the iterations of the IMPES algorithm within a timestep. The definition of the class \texttt{Dune::IMPES} can be found in the file \texttt{impes.hh} in the directory \texttt{/dune-mux/dumux/fractionalflow/impes}.
For the decoupled model the so-called \textit{IMPES} (\textit{IM}plicit \textit{P}ressure \textit{E}xplicit \textit{S}aturation) algorithm is used. This means that the pressure equation is first solved using an implicit method. The resulting velocities are then used to solve the saturation equation explicitly. It is clear that depending on the non-linearity this is an iterative process within every timestep. The object \texttt{impes} of type \texttt{Dune::IMPES} which is generated in line \ref{tutorial-decoupled:impes} of the main file combines the objects \texttt{diffusion} and \texttt{transport} and proceeds the iterations of the IMPES algorithm within a timestep. The definition of the class \texttt{Dune::IMPES} can be found in the file \texttt{impes.hh} in the directory \texttt{/dumux/fractionalflow/impes}.
Finally, an object called \texttt{timeloop} of type \texttt{Dune::TimeLoop} is generated in line \ref{tutorial-decoupled:timeloop} of the tutorial main file. The class \texttt{Dune::TimeLoop} is defined in the file \texttt{timeloop.hh} in the folder \texttt{/dune-mux/dumux/timedisc}. The object \texttt{timeloop} includes the type of timestep that is used (implicit, explicit, etc.) and contains the function \texttt{execute} which is called in line \ref{tutorial-decoupled:execute} of the main file. This function finally starts the computation and runs the (time)loop over all timesteps.
Finally, an object called \texttt{timeloop} of type \texttt{Dune::TimeLoop} is generated in line \ref{tutorial-decoupled:timeloop} of the tutorial main file. The class \texttt{Dune::TimeLoop} is defined in the file \texttt{timeloop.hh} in the folder \texttt{/dumux/timedisc}. The object \texttt{timeloop} includes the type of timestep that is used (implicit, explicit, etc.) and contains the function \texttt{execute} which is called in line \ref{tutorial-decoupled:execute} of the main file. This function finally starts the computation and runs the (time)loop over all timesteps.
\subsection{The definition of the fluid properties}\label{tutorial-decoupled:description-fluid-class}
In \Dumux different fluids are already implemented. The definitions can be found in the directory \texttt{material/fluids}. As can be observed in these files, for each fluid a class named like the fluid is defined. These classes are derived from the fluid base class \texttt{Fluid} which is defined in the file \texttt{property\_baseclasses.hh} in the directory \texttt{/dune-mux/dumux/material} and include several functions returning different fluid properties.
In \Dumux different fluids are already implemented. The definitions can be found in the directory \texttt{material/fluids}. As can be observed in these files, for each fluid a class named like the fluid is defined. These classes are derived from the fluid base class \texttt{Fluid} which is defined in the file \texttt{property\_baseclasses.hh} in the directory \texttt{/dumux/material} and include several functions returning different fluid properties.
If a new fluid type is to be used or an existing type is to be used with different fluid parameters new fluid types can be defined derived from the base class \texttt{Fluid} comparable to the fluids already defined in the file \texttt{material/fluids/}.
@@ -64,13 +85,13 @@ It is important to mention, that existing fluid classes should not be changed.
Soil properties which can be defined in \Dumux are the \textit{intrinsic permeability}, the \textit{porosity} and the \textit{heat capacity} as well as the \textit{heat conductivity} of the solid matrix. Further the \textit{residual saturations} of the fluids, and the \textit{capillary pressures-saturation function} as well as the \textit{relative permeability-saturation functions} are depending on the soil.
The base class \texttt{Dune::Matrix2p} for the definition of the soil parameters can be found in the file \texttt{property\_baseclasses.hh} in the directory \texttt{/dune-mux/dumux/material}. Derived from this base class, there exist two standard soil type classes named \texttt{HomogeneousSoil} and \texttt{HeterogeneousSoil}. Both can be found in the file \texttt{matrixproperties.hh} in the \texttt{/material} folder. If one wants to use a soil that differs from this standard soil types, new soil classes can be derived either from the base class (\texttt{Dune::Matrix2p}) or from the two standard soil classes (\texttt{Dune::HomogeneousSoil} and \texttt{Dune::HeterogeneousSoil}).
The base class \texttt{Dune::Matrix2p} for the definition of the soil parameters can be found in the file \texttt{property\_baseclasses.hh} in the directory \texttt{/dumux/material}. Derived from this base class, there exist two standard soil type classes named \texttt{HomogeneousSoil} and \texttt{HeterogeneousSoil}. Both can be found in the file \texttt{matrixproperties.hh} in the \texttt{/material} folder. If one wants to use a soil that differs from this standard soil types, new soil classes can be derived either from the base class (\texttt{Dune::Matrix2p}) or from the two standard soil classes (\texttt{Dune::HomogeneousSoil} and \texttt{Dune::HeterogeneousSoil}).
For this tutorial problem a new soil class named \texttt{TutorialSoil} is derived from \texttt{Dune::HomogeneousSoil} (listing \ref{tutorial-deoucpled:soilpropertiesfile}, line \ref{tutorial-decoupled:tutorialsoil}), which can be found in the file \texttt{tutorial\_soilproperties\_decoupled.hh} in the directory \texttt{/tutorial}.
For this tutorial problem a new soil class named \texttt{TutorialSoil} is derived from \texttt{Dune::Matrix2p} (listing \ref{tutorial-deoucpled:soilpropertiesfile}, line \ref{tutorial-decoupled:tutorialsoil}), which can be found in the file \texttt{tutorial\_soilproperties\_decoupled.hh} in the directory \texttt{/tutorial}.
Listing \ref{tutorial-deoucpled:soilpropertiesfile} shows the file \texttt{tutorial\_soilproperties\_decoupled.hh}.
\begin{lst}[File dune-mux/tutorial/tutorial\_soilproperties\_decoupled.hh]\label{tutorial-deoucpled:soilpropertiesfile} \mbox{}
\begin{lst}[File tutorial/tutorial\_soilproperties\_decoupled.hh]\label{tutorial-deoucpled:soilpropertiesfile} \mbox{}
\lstinputlisting[basicstyle=\ttfamily\scriptsize,numbers=left,
numberstyle=\tiny, numbersep=5pt]{../../tutorial/tutorial_soilproperties_decoupled.hh}
\end{lst}
@@ -85,9 +106,9 @@ Finally, the functions defining the type of the capillary pressure function and
\subsection{The definition of boundary and initial conditions and source or sink terms}\label{tutorial-decoupled:description-bc-ic}
Boundary and initial conditions are defined in a so-called problem class. The problem class of this tutorial has the name \texttt{TutorialProblemDecoupled} and is defined in the file \texttt{tutorialproblem\_decoupled.hh} which can be found in the directory \texttt{/tutorial}. Listing \ref{tutorial-deoucpled:problemfile} shows the class \texttt{TutorialProblemDecoupled}. As can be seen it is derived from the problem base class \texttt{FractionalFlowProblem} (line \ref{tutorial-decoupled:tutorialproblem}) which is defined in the file \texttt{fractionalflowproblem.hh} in the directory \texttt{/dune-mux/dumux/fractionalflow}.
Boundary and initial conditions are defined in a so-called problem class. The problem class of this tutorial has the name \texttt{TutorialProblemDecoupled} and is defined in the file \texttt{tutorialproblem\_decoupled.hh} which can be found in the directory \texttt{/tutorial}. Listing \ref{tutorial-deoucpled:problemfile} shows the class \texttt{TutorialProblemDecoupled}. As can be seen it is derived from the problem base class \texttt{FractionalFlowProblem} (line \ref{tutorial-decoupled:tutorialproblem}) which is defined in the file \texttt{fractionalflowproblem.hh} in the directory \texttt{/dumux/fractionalflow}.
\begin{lst}[File dune-mux/tutorial/tutorialproblem\_decoupled.hh]\label{tutorial-deoucpled:problemfile} \mbox{}
\begin{lst}[File tutorial/tutorialproblem\_decoupled.hh]\label{tutorial-deoucpled:problemfile} \mbox{}
\lstinputlisting[basicstyle=\ttfamily\scriptsize,numbers=left,
numberstyle=\tiny, numbersep=5pt]{../../tutorial/tutorialproblem_decoupled.hh}
\end{lst}
@@ -114,7 +135,7 @@ Finally, the function \texttt{initSat} is defined in line \ref{tutorial-decouple
\subsection{Exercise}
\label{tutorial-deoucpled:exercises}
The following exercises will give you the opportunity to learn how you can change soil parameters, boundary conditions and fluid properties in \Dumux. (In the future you will find the output file of the last timestep of each exercise simulation in the directory \texttt{/dune-mux/dumux/tutorial/results/decoupled}.)
The following exercises will give you the opportunity to learn how you can change soil parameters, boundary conditions and fluid properties in \Dumux. (In the future you will find the output file of the last timestep of each exercise simulation in the directory \texttt{/dumux/tutorial/results/decoupled}.)
\subsubsection{Exercise 1}
\renewcommand{\labelenumi}{\alph{enumi})}
@@ -129,11 +150,11 @@ Compile the main file by typing \texttt{make tutorial\_decoupled} and run the mo
\item \textbf{Changing Fluids} \\
Now you can change the fluids. Use DNAPL instead of Oil and Brine instead of Water. To do that you have to change the file \texttt{tutorial\_decoupled.cc}. If you want to take a closer look how the fluid classes are defined and which fluids are already available please open the files \texttt{oil.hh} and \texttt{water.hh} in the directory
\texttt{/dune-mux/dumux/material/fluids}.
\texttt{/dumux/material/fluids}.
\item \textbf{Changing Constitutive Relationships} \\
Use a Brooks-Corey law with $\lambda$ = 2 and entry pressure $p_b = 0.0$ instead of a linear law for the relative-permeability/saturation relationship. To do that you have to change the file \texttt{tutorial\_soilproperties\_decoupled.hh}. You can find the flag that you have to set for the Brooks-Corey law in the file \texttt{property\_baseclasses.hh} in the directory \texttt{/dune-mux/dumux/material}.
The available relative permeability and capillary pressure functions are defined in the file \texttt{/dune-mux/dumux/material/relperm\_pc\_law}.\\
Use a Brooks-Corey law with $\lambda$ = 2 and entry pressure $p_b = 0.0$ instead of a linear law for the relative-permeability/saturation relationship. To do that you have to change the file \texttt{tutorial\_soilproperties\_decoupled.hh}. You can find the flag that you have to set for the Brooks-Corey law in the file \texttt{property\_baseclasses.hh} in the directory \texttt{/dumux/material}.
The available relative permeability and capillary pressure functions are defined in the file \texttt{/dumux/material/relperm\_pc\_law}.\\
(Hint: The CFL-security-factor should be set to a value smaller than 1 if nonlinear relationships are used (Suggestion: 0.95). It can be found in the application file \texttt{tutorialproblem\_decoupled.hh}.)
\item \textbf{Heterogeneities} \\
@@ -192,7 +213,7 @@ Now, set up a model that describes the processes given in the Figures \ref{tutor
\end{figure}
\subsubsection{Exercise 3}
Create a file called \texttt{new\_fluid.hh} and implement a new fluid class. This new fluid class should be derived from the base class Fluid which can be found in \texttt{/dune-mux/dumux/material/property\_baseclasses.hh}. \\
(You can look at existing fluid classes in the file \texttt{/dune-mux/dumux/material/fluids/}.)
Create a file called \texttt{new\_fluid.hh} and implement a new fluid class. This new fluid class should be derived from the base class Fluid which can be found in \texttt{/dumux/material/property\_baseclasses.hh}. \\
(You can look at existing fluid classes in the folder \texttt{/dumux/material/fluids}.)
Use benzene as a new fluid and run the model of Exercise 2 with water and benzene. The properties of benzene are given in the following: \\
density: 889.51 kg/$\text{m}^3$, viscosity: 0.00112 Pa s.

View File

@@ -1,25 +1,25 @@
# tests where program to build and program to run are equal
NORMALTESTS = tutorial_decoupled tutorial_coupled
EXTRA_DIST=CMakeLists.txt results/*/*/*.vtu
noinst_HEADERS= tutorial_soilproperties_decoupled.hh \
tutorialproblem_decoupled.hh
# list of tests to run
#TESTS = $(NORMALTESTS)
# programs just to build when "make check" is used
bin_PROGRAMS = $(NORMALTESTS)
dist_noinst_DATA = tutorial_decoupled.cc tutorial_coupled.cc
tutorial_decoupleddir = $(EXTRA_DIST=CMakeLists.txt
includedir)/dumux/tutorial
tutorial_decoupleddir = $(datadir)/dumux/tutorial
tutorial_decoupled_HEADERS = tutorial_soilproperties_decoupled.hh \
tutorialproblem_decoupled.hh
tutorial_decoupled_SOURCES = tutorial_decoupled.cc
tutorial_coupleddir = $(EXTRA_DIST=CMakeLists.txt
includedir)/dumux/tutorial
tutorial_decoupled_DATA = $(tutorial_decoupled_SOURCES)
tutorial_coupleddir = $(datadir)/dumux/tutorial
tutorial_coupled_HEADERS = tutorialsoil_coupled.hh \
tutorialproblem_coupled.hh
tutorial_coupled_SOURCES = tutorial_coupled.cc
tutorial_coupled_DATA = $(tutorial_coupled_SOURCES)
EXTRA_DIST=CMakeLists.txt
include $(top_srcdir)/am/global-rules

View File

@@ -19,7 +19,7 @@
// fluid properties
#include <dumux/material/fluids/water.hh>
#include <dumux/material/fluids/oil.hh>
#include <dumux/material/fluids/lowviscosityoil.hh>
// the numerical model
#include <dumux/boxmodels/2p/2pboxmodel.hh>
@@ -59,10 +59,10 @@ SET_PROP(TutorialProblemCoupled, Grid) /*@\label{tutorial-coupled:set-grid}@*/
Dune::FieldVector<int, 2> cellRes;
Dune::FieldVector<ctype, 2> lowerLeft(0.0);
Dune::FieldVector<ctype, 2> upperRight;
cellRes[0] = 45;
cellRes[1] = 15;
cellRes[0] = 30;
cellRes[1] = 10;
upperRight[0] = 300;
upperRight[1] = 100;
upperRight[1] = 60;
return new Dune::SGrid<2,2>(cellRes,
lowerLeft,
upperRight);
@@ -71,7 +71,7 @@ SET_PROP(TutorialProblemCoupled, Grid) /*@\label{tutorial-coupled:set-grid}@*/
// Set the wetting and non-wetting phases
SET_TYPE_PROP(TutorialProblemCoupled, WettingPhase, Dune::Water); /*@\label{tutorial-coupled:set-wetting}@*/
SET_TYPE_PROP(TutorialProblemCoupled, NonwettingPhase, Dune::Oil);/*@\label{tutorial-coupled:set-nonwetting}@*/
SET_TYPE_PROP(TutorialProblemCoupled, NonwettingPhase, Dune::LowViscosityOil);/*@\label{tutorial-coupled:set-nonwetting}@*/
// Set the soil properties
SET_PROP(TutorialProblemCoupled, Soil) /*@\label{tutorial-coupled:set-soil}@*/
@@ -155,8 +155,8 @@ public:
int scvIdx,
int boundaryFaceIdx) const
{
values[Indices::pW] = 200.0e3; // 200 000 Pa = 2 bar
values[Indices::sN] = 1.0; // 100 % oil saturation
values[Indices::pW] = 200.0e3; // 200 kPa = 2 bar
values[Indices::sN] = 0.0; // 0 % oil saturation on left boundary
}
// Evaluate the boundary conditions for a neumann boundary
@@ -170,11 +170,12 @@ public:
int scvIdx,
int boundaryFaceIdx) const
{
const GlobalPosition &pos = element.geometry().corner(scvIdx);
const GlobalPosition &pos =
fvElemGeom.boundaryFace[boundaryFaceIdx].ipGlobal;
Scalar right = this->bboxMax()[0];
if (pos[0] > right - eps_) {
// outflow of 0.3 g/(m * s) oil on the right boundary of the
// domain
// oil outflux of 0.3 g/(m * s) on the right boundary of
// the domain.
values[Indices::phase2Mass(Indices::wPhase)] = 0;
values[Indices::phase2Mass(Indices::nPhase)] = 0.3e-3;
} else {
@@ -191,7 +192,7 @@ public:
const FVElementGeometry &fvElemGeom,
int scvIdx) const
{
values[Indices::pW] = 200.0e3; // 200 000 Pa = 2 bar
values[Indices::pW] = 200.0e3; // 200 kPa = 2 bar
values[Indices::sN] = 1.0;
}

View File

@@ -23,8 +23,8 @@ namespace Dune
/** \todo Please doc me! */
template<class GridView, class Scalar, class VC> class TutorialProblemDecoupled /*@\label{tutorial-decoupled:tutorialproblem}@*/
: public FractionalFlowProblem<GridView, Scalar, VC>
template<class GridView, class Scalar, class VariableClass> class TutorialProblemDecoupled /*@\label{tutorial-decoupled:tutorialproblem}@*/
: public FractionalFlowProblem<GridView, Scalar, VariableClass>
{
enum
{dim=GridView::dimension, dimWorld = GridView::dimensionworld};
@@ -34,17 +34,18 @@ template<class GridView, class Scalar, class VC> class TutorialProblemDecoupled
typedef Dune::FieldVector<Scalar,dimWorld> GlobalPosition;
public:
TutorialProblemDecoupled(VC& variables, Fluid& wettingphase, Fluid& nonwettingphase, Matrix2p<Grid, Scalar>& soil,
TutorialProblemDecoupled(VariableClass& variables, Fluid& wettingphase, Fluid& nonwettingphase, Matrix2p<Grid, Scalar>& soil,
TwoPhaseRelations<Grid, Scalar>& materialLaw = *(new TwoPhaseRelations<Grid,Scalar>),
const FieldVector<Scalar,dim> Left = 0, const FieldVector<Scalar,dim> Right = 0)
: FractionalFlowProblem<GridView, Scalar, VC>(variables, wettingphase, nonwettingphase, soil, materialLaw),
: FractionalFlowProblem<GridView, Scalar, VariableClass>(variables, wettingphase, nonwettingphase, soil, materialLaw),
Left_(Left[0]), Right_(Right[0]), eps_(1e-8)
{}
// function returning source/sink terms for the pressure equation
// depending on the position within the domain
virtual Scalar sourcePress (const GlobalPosition& globalPos, const Element& e, /*@\label{tutorial-decoupled:qpress}@*/
const LocalPosition& localPos)
virtual Scalar source(const GlobalPosition& globalPos,
const Element& e, /*@\label{tutorial-decoupled:qpress}@*/
const LocalPosition& localPos)
{
return 0.0;
}
@@ -80,7 +81,7 @@ public:
Scalar dirichletPress(const GlobalPosition& globalPos, const Element& e, /*@\label{tutorial-decoupled:gpress}@*/
const LocalPosition& localPos) const
{
return 2e5;
return 1e6;
}
// function returning the Dirichlet boundary condition for the solution