mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-24 10:10:18 -06:00
set naming conventions in tutorial_decoupled.cc and tutorialsoil_coupled.hh
This commit is contained in:
parent
f59be03392
commit
e3454d9e0f
@ -89,6 +89,7 @@ Universit\"at Stuttgart, Paffenwaldring 61, D-70569 Stuttgart, Germany}\\
|
||||
\input{intro}
|
||||
\input{getting-started}
|
||||
\input{tutorial}
|
||||
\input{structure}
|
||||
\input{models}
|
||||
|
||||
\bibliographystyle{plain}
|
||||
|
2
doc/handbook/structure.tex
Normal file
2
doc/handbook/structure.tex
Normal file
@ -0,0 +1,2 @@
|
||||
\chapter{Structure}
|
||||
|
@ -39,38 +39,38 @@ int main(int argc, char** argv)
|
||||
const int dim=2; /*@\label{tutorial-decoupled:dim}@*/
|
||||
|
||||
// create a grid object
|
||||
typedef double NumberType; /*@\label{tutorial-decoupled:grid-begin}@*/
|
||||
typedef Dune::SGrid<dim,dim> GridType;
|
||||
typedef GridType::LevelGridView GridView;
|
||||
typedef Dune::FieldVector<GridType::ctype,dim> FieldVector;
|
||||
typedef double Scalar; /*@\label{tutorial-decoupled:grid-begin}@*/
|
||||
typedef Dune::SGrid<dim,dim> Grid;
|
||||
typedef Grid::LevelGridView GridView;
|
||||
typedef Dune::FieldVector<Grid::ctype,dim> FieldVector;
|
||||
Dune::FieldVector<int,dim> N(10); N[0] = 30;
|
||||
FieldVector L(0);
|
||||
FieldVector H(300); H[0] = 600;
|
||||
GridType grid(N,L,H);
|
||||
Grid grid(N,L,H);
|
||||
GridView gridView(grid.levelView(0));/*@\label{tutorial-decoupled:grid-end}@*/
|
||||
|
||||
|
||||
// define fluid and solid properties and constitutive relationships
|
||||
Dune::Water wettingfluid; /*@\label{tutorial-decoupled:water}@*/
|
||||
Dune::Oil nonwettingfluid; /*@\label{tutorial-decoupled:oil}@*/
|
||||
Dune::TutorialSoil<GridType, NumberType> soil; /*@\label{tutorial-decoupled:soil}@*/
|
||||
Dune::TwoPhaseRelations<GridType, NumberType> materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/
|
||||
Dune::TutorialSoil<Grid, Scalar> soil; /*@\label{tutorial-decoupled:soil}@*/
|
||||
Dune::TwoPhaseRelations<Grid, Scalar> materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/
|
||||
|
||||
// create object containing the variables
|
||||
typedef Dune::VariableClass<GridView, NumberType> VariableType;
|
||||
VariableType variables(gridView);
|
||||
typedef Dune::VariableClass<GridView, Scalar> VariableClass;
|
||||
VariableClass variables(gridView);
|
||||
|
||||
// create object including the problem definition
|
||||
typedef Dune::TutorialProblemDecoupled<GridView, NumberType, VariableType> Problem;
|
||||
typedef Dune::TutorialProblemDecoupled<GridView, Scalar, VariableClass> Problem;
|
||||
Problem problem(variables, wettingfluid, nonwettingfluid, soil, materialLaw,L, H); /*@\label{tutorial-decoupled:problem}@*/
|
||||
|
||||
// create object including the discretisation of the pressure equation
|
||||
typedef Dune::FVTotalVelocity2P<GridView, NumberType, VariableType, Problem> DiffusionType;
|
||||
DiffusionType diffusion(gridView, problem, "pw"); /*@\label{tutorial-decoupled:diffusion}@*/
|
||||
typedef Dune::FVTotalVelocity2P<GridView, Scalar, VariableClass, Problem> Diffusion;
|
||||
Diffusion diffusion(gridView, problem, "pw"); /*@\label{tutorial-decoupled:diffusion}@*/
|
||||
|
||||
// create object including the space discretisation of the saturation equation
|
||||
typedef Dune::FVSaturationWetting2P<GridView, NumberType, VariableType, Problem> TransportType;
|
||||
TransportType transport(gridView, problem, "vt"); /*@\label{tutorial-decoupled:transport}@*/
|
||||
typedef Dune::FVSaturationWetting2P<GridView, Scalar, VariableClass, Problem> Transport;
|
||||
Transport transport(gridView, problem, "vt"); /*@\label{tutorial-decoupled:transport}@*/
|
||||
|
||||
// some parameters used in the IMPES-object
|
||||
int iterFlag = 2;
|
||||
@ -78,8 +78,8 @@ int main(int argc, char** argv)
|
||||
double maxDefect = 1e-5;
|
||||
|
||||
// create object including the IMPES (IMplicit Pressure Explicit Saturation) algorithm
|
||||
typedef Dune::IMPES<GridView, DiffusionType, TransportType, VariableType> IMPESType;
|
||||
IMPESType impes(diffusion, transport, iterFlag, nIter, maxDefect); /*@\label{tutorial-decoupled:impes}@*/
|
||||
typedef Dune::IMPES<GridView, Diffusion, Transport, VariableClass> IMPES;
|
||||
IMPES impes(diffusion, transport, iterFlag, nIter, maxDefect); /*@\label{tutorial-decoupled:impes}@*/
|
||||
|
||||
// some parameters needed for the TimeLoop-object
|
||||
double tStart = 0; // start simulation at t = tStart
|
||||
@ -89,7 +89,7 @@ int main(int argc, char** argv)
|
||||
double cFLFactor = 0.9; // security factor for the Courant-Friedrichs-Lewy-Criterion
|
||||
|
||||
// create TimeLoop-object
|
||||
Dune::TimeLoop<GridType, IMPESType > timeloop(tStart, tEnd, fileName, modulo, cFLFactor); /*@\label{tutorial-decoupled:timeloop}@*/
|
||||
Dune::TimeLoop<Grid, IMPES> timeloop(tStart, tEnd, fileName, modulo, cFLFactor); /*@\label{tutorial-decoupled:timeloop}@*/
|
||||
|
||||
Dune::Timer timer;
|
||||
timer.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user