From 740f126f2f1353339531abdf1396ecc745eb3812 Mon Sep 17 00:00:00 2001
From: Klaus Mosthaf <klmos@env.dtu.dk>
Date: Mon, 18 Oct 2010 08:59:51 +0000
Subject: [PATCH] further work on the tutorial_coupled exchanged fluidsystem
 and fluid to twophase water-oil

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4451 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 doc/handbook/tutorial-coupled.tex             |  8 +++---
 doc/handbook/tutorial.tex                     |  6 ++---
 tutorial/tutorial_coupled.cc                  |  2 +-
 tutorial/tutorialproblem_coupled.hh           | 25 ++++++++++++++-----
 tutorial/tutorialspatialparameters_coupled.hh |  3 ++-
 5 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/doc/handbook/tutorial-coupled.tex b/doc/handbook/tutorial-coupled.tex
index f195a43f94..f9db6a24ca 100644
--- a/doc/handbook/tutorial-coupled.tex
+++ b/doc/handbook/tutorial-coupled.tex
@@ -70,7 +70,7 @@ can be retrieved by the \Dumux property system and only depend on this
 single type tag. Retrieving them is done between line
 \ref{tutorial-coupled:retrieve-types-begin} and
 \ref{tutorial-coupled:retrieve-types-end}. For an introduction to the
-property system, see section \textbf{TODO}.
+property system, see section \ref{sec:propertysytem}.
 
 The first thing which should be done at run time is to initialize the
 message passing interface using DUNE's \texttt{MPIHelper} class. Line
@@ -103,7 +103,7 @@ so-called \textit{problem file} as shown in listing
 numberstyle=\tiny, numbersep=5pt, firstline=17]{../../tutorial/tutorialproblem_coupled.hh}
 \end{lst}
 
-First, a new type tag is created for the problem on line
+First, a new type tag is created for the problem in line
 \ref{tutorial-coupled:create-type-tag}.  In this case, the new type
 tag inherits all properties defined for the \texttt{BoxTwoP} type tag,
 which means that for this problem the two-phase box model is chosen as
@@ -137,7 +137,7 @@ The problem class always has at least five methods:
   the Dirichlet conditions on a boundary segment
 \item A method \texttt{neumann()} specifying the actual values for
   the Neumann conditions on a boundary segment
-\item A method for source or sink terms called \texttt{source}
+\item A method for source or sink terms called \texttt{source()}
 \item A method called \texttt{initial()} for specifying the initial
   condition.
 \end{itemize}
@@ -201,7 +201,7 @@ the density are of interest. These interactions are defined in
 a specific \verb+fluidsystem+ in the folder \verb+dumux/material/fluidsystems+.
 It features methods returning fluid properties like density, enthalpy, viscosity,
 etc. by accessing the pure components as well as binary coefficients such as
-Henry's or Diffusion coefficients, which are stored in 
+Henry or diffusion coefficients, which are stored in 
 \verb+dumux/material/binarycoefficients+. New fluids which are not yet
  available in the \Dumux distribution can be defined analogously.
 
diff --git a/doc/handbook/tutorial.tex b/doc/handbook/tutorial.tex
index 3f00214bac..9505fc2de7 100644
--- a/doc/handbook/tutorial.tex
+++ b/doc/handbook/tutorial.tex
@@ -1,10 +1,10 @@
 \chapter[Tutorial]{Tutorial}\label{chp:tutorial}
 
-In \Dumux two sorts of models are implemented: Fully coupled models and decoupled models. In the fully coupled models a flow system is described by a system of strongly coupled equations which can be mass balance equations, balance equations of components, energy balance equations, etc. In contrast a decoupled model consists of a pressure equation which is iteratively coupled to a saturation equation, concentration equations, energy balance equations, etc.
+In \Dumux two sorts of models are implemented: Fully-coupled models and decoupled models. In the fully coupled models a flow system is described by a system of strongly coupled equations which can be mass balance equations, balance equations of components, energy balance equations, etc. In contrast a decoupled model consists of a pressure equation which is iteratively coupled to a saturation equation, concentration equations, energy balance equations, etc.
 
-Different kinds of both coupled and decoupled models can be isothermal two phase models, isothermal two phase two component models, non-isothermal twophase model, non-isothermal two phase two component models, etc.
+Examples for different kinds of both coupled and decoupled models are isothermal two-phase models, isothermal two-phase two-component models, non-isothermal two-phase model, non-isothermal two-phase two-component models, etc.
 
-The following two sections of the tutorial demonstrate how to solve problems first using a coupled model (section \ref{tutorial-coupled}) and second using a decoupled model (section \ref{tutorial-decoupled}). Being the easiest case, a isothermal two phase system (two fluid phases, one solid phase) will be considered.
+The following two sections of the tutorial demonstrate how to solve problems first using a coupled model (section \ref{tutorial-coupled}) and second using a decoupled model (section \ref{tutorial-decoupled}). Being the easiest case, a isothermal two-phase system (two fluid phases, one solid phase) will be considered.
 \input{tutorial-coupled}
 \input{tutorial-decoupled}
 %\input{tutorial-newmodel}
\ No newline at end of file
diff --git a/tutorial/tutorial_coupled.cc b/tutorial/tutorial_coupled.cc
index 239fd2d966..1763a70f55 100644
--- a/tutorial/tutorial_coupled.cc
+++ b/tutorial/tutorial_coupled.cc
@@ -71,7 +71,7 @@ int main(int argc, char** argv)
         // instantiate the problem on the leaf grid
         Problem problem(timeManager, gridPtr->leafView()); /*@\label{tutorial-coupled:instantiate-problem}@*/
         timeManager.init(problem, 0, dt, tEnd, !restart);
-        // load the some previously saved state from disk
+        // load some previously saved state from disk
         if (restart)
             problem.restart(restartTime); /*@\label{tutorial-coupled:restart}@*/
         // run the simulation
diff --git a/tutorial/tutorialproblem_coupled.hh b/tutorial/tutorialproblem_coupled.hh
index a92ad2491a..acd53a8d00 100644
--- a/tutorial/tutorialproblem_coupled.hh
+++ b/tutorial/tutorialproblem_coupled.hh
@@ -1,6 +1,6 @@
 // $Id$
 /*****************************************************************************
- *   Copyright (C) 2008-2009 by Melanie Darcis                               *
+ *   Copyright (C) 2008-2009 by Melanie Darcis, Klaus Mosthaf                *
  *   Copyright (C) 2009 by Andreas Lauser                                    *
  *   Institute of Hydraulic Engineering                                      *
  *   University of Stuttgart, Germany                                        *
@@ -18,7 +18,7 @@
 #define DUMUX_TUTORIALPROBLEM_COUPLED_HH
 
 // fluid properties
-#include <dumux/material/fluidsystems/h2o_n2_system.hh>
+#include <dumux/material/fluidsystems/2p_system.hh>
 
 // the numerical model
 #include <dumux/boxmodels/2p/2pmodel.hh>
@@ -68,12 +68,25 @@ SET_PROP(TutorialProblemCoupled, Grid) /*@\label{tutorial-coupled:set-grid}@*/
     }
 };
 
-// Select fluid system
-SET_PROP(TutorialProblemCoupled,   FluidSystem) /*@\label{tutorial-coupled:set-fluidsystem}@*/
+// Set the wetting phase
+SET_PROP(TutorialProblemCoupled, WettingPhase) /*@\label{tutorial-coupled:2p-system-start}@*/
 {
-    typedef Dumux::H2O_N2_System<TypeTag> type;
+private:
+    typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
+public:
+    typedef Dumux::LiquidPhase<Scalar, Dumux::H2O<Scalar> > type; /*@\label{tutorial-coupled:wettingPhase}@*/
 };
 
+// Set the non-wetting phase
+SET_PROP(TutorialProblemCoupled, NonwettingPhase)
+{
+private:
+    typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
+public:
+    typedef Dumux::LiquidPhase<Scalar, Dumux::Oil<Scalar> > type; /*@\label{tutorial-coupled:nonwettingPhase}@*/
+}; /*@\label{tutorial-coupled:2p-system-end}@*/
+
+
 // Set the spatial parameters
 SET_PROP(TutorialProblemCoupled, SpatialParameters) /*@\label{tutorial-coupled:set-spatialparameters}@*/
 {
@@ -176,7 +189,7 @@ public:
             // oil outflux of 0.3 g/(m * s) on the right boundary of
             // the domain.
             values[Indices::contiWEqIdx] = 0;
-            values[Indices::contiNEqIdx] = 0.3e-3;
+            values[Indices::contiNEqIdx] = 3e-4;
         } else {
             // no-flow on the remaining neumann-boundaries
             values[Indices::contiWEqIdx] = 0;
diff --git a/tutorial/tutorialspatialparameters_coupled.hh b/tutorial/tutorialspatialparameters_coupled.hh
index ab32ae90ee..7d731fe72c 100644
--- a/tutorial/tutorialspatialparameters_coupled.hh
+++ b/tutorial/tutorialspatialparameters_coupled.hh
@@ -82,7 +82,8 @@ public:
 
     // constructor
     TutorialSpatialParametersCoupled(const GridView& gridView) :
-        BoxSpatialParameters<TypeTag>(gridView), K_(0)
+        BoxSpatialParameters<TypeTag>(gridView),
+        K_(0)
     {
         for (int i = 0; i < dim; i++)
             K_[i][i] = 1e-7;
-- 
GitLab