mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-21 16:57:25 -06:00
further work on the tutorial_coupled exchanged fluidsystem and fluid to twophase water-oil
This commit is contained in:
parent
f59541f834
commit
38159bf1f1
@ -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.
|
||||
|
||||
|
@ -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}
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user