mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-28 03:53:49 -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{intro}
|
||||||
\input{getting-started}
|
\input{getting-started}
|
||||||
\input{tutorial}
|
\input{tutorial}
|
||||||
|
\input{structure}
|
||||||
\input{models}
|
\input{models}
|
||||||
|
|
||||||
\bibliographystyle{plain}
|
\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}@*/
|
const int dim=2; /*@\label{tutorial-decoupled:dim}@*/
|
||||||
|
|
||||||
// create a grid object
|
// create a grid object
|
||||||
typedef double NumberType; /*@\label{tutorial-decoupled:grid-begin}@*/
|
typedef double Scalar; /*@\label{tutorial-decoupled:grid-begin}@*/
|
||||||
typedef Dune::SGrid<dim,dim> GridType;
|
typedef Dune::SGrid<dim,dim> Grid;
|
||||||
typedef GridType::LevelGridView GridView;
|
typedef Grid::LevelGridView GridView;
|
||||||
typedef Dune::FieldVector<GridType::ctype,dim> FieldVector;
|
typedef Dune::FieldVector<Grid::ctype,dim> FieldVector;
|
||||||
Dune::FieldVector<int,dim> N(10); N[0] = 30;
|
Dune::FieldVector<int,dim> N(10); N[0] = 30;
|
||||||
FieldVector L(0);
|
FieldVector L(0);
|
||||||
FieldVector H(300); H[0] = 600;
|
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}@*/
|
GridView gridView(grid.levelView(0));/*@\label{tutorial-decoupled:grid-end}@*/
|
||||||
|
|
||||||
|
|
||||||
// define fluid and solid properties and constitutive relationships
|
// define fluid and solid properties and constitutive relationships
|
||||||
Dune::Water wettingfluid; /*@\label{tutorial-decoupled:water}@*/
|
Dune::Water wettingfluid; /*@\label{tutorial-decoupled:water}@*/
|
||||||
Dune::Oil nonwettingfluid; /*@\label{tutorial-decoupled:oil}@*/
|
Dune::Oil nonwettingfluid; /*@\label{tutorial-decoupled:oil}@*/
|
||||||
Dune::TutorialSoil<GridType, NumberType> soil; /*@\label{tutorial-decoupled:soil}@*/
|
Dune::TutorialSoil<Grid, Scalar> soil; /*@\label{tutorial-decoupled:soil}@*/
|
||||||
Dune::TwoPhaseRelations<GridType, NumberType> materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/
|
Dune::TwoPhaseRelations<Grid, Scalar> materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/
|
||||||
|
|
||||||
// create object containing the variables
|
// create object containing the variables
|
||||||
typedef Dune::VariableClass<GridView, NumberType> VariableType;
|
typedef Dune::VariableClass<GridView, Scalar> VariableClass;
|
||||||
VariableType variables(gridView);
|
VariableClass variables(gridView);
|
||||||
|
|
||||||
// create object including the problem definition
|
// 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}@*/
|
Problem problem(variables, wettingfluid, nonwettingfluid, soil, materialLaw,L, H); /*@\label{tutorial-decoupled:problem}@*/
|
||||||
|
|
||||||
// create object including the discretisation of the pressure equation
|
// create object including the discretisation of the pressure equation
|
||||||
typedef Dune::FVTotalVelocity2P<GridView, NumberType, VariableType, Problem> DiffusionType;
|
typedef Dune::FVTotalVelocity2P<GridView, Scalar, VariableClass, Problem> Diffusion;
|
||||||
DiffusionType diffusion(gridView, problem, "pw"); /*@\label{tutorial-decoupled:diffusion}@*/
|
Diffusion diffusion(gridView, problem, "pw"); /*@\label{tutorial-decoupled:diffusion}@*/
|
||||||
|
|
||||||
// create object including the space discretisation of the saturation equation
|
// create object including the space discretisation of the saturation equation
|
||||||
typedef Dune::FVSaturationWetting2P<GridView, NumberType, VariableType, Problem> TransportType;
|
typedef Dune::FVSaturationWetting2P<GridView, Scalar, VariableClass, Problem> Transport;
|
||||||
TransportType transport(gridView, problem, "vt"); /*@\label{tutorial-decoupled:transport}@*/
|
Transport transport(gridView, problem, "vt"); /*@\label{tutorial-decoupled:transport}@*/
|
||||||
|
|
||||||
// some parameters used in the IMPES-object
|
// some parameters used in the IMPES-object
|
||||||
int iterFlag = 2;
|
int iterFlag = 2;
|
||||||
@ -78,8 +78,8 @@ int main(int argc, char** argv)
|
|||||||
double maxDefect = 1e-5;
|
double maxDefect = 1e-5;
|
||||||
|
|
||||||
// create object including the IMPES (IMplicit Pressure Explicit Saturation) algorithm
|
// create object including the IMPES (IMplicit Pressure Explicit Saturation) algorithm
|
||||||
typedef Dune::IMPES<GridView, DiffusionType, TransportType, VariableType> IMPESType;
|
typedef Dune::IMPES<GridView, Diffusion, Transport, VariableClass> IMPES;
|
||||||
IMPESType impes(diffusion, transport, iterFlag, nIter, maxDefect); /*@\label{tutorial-decoupled:impes}@*/
|
IMPES impes(diffusion, transport, iterFlag, nIter, maxDefect); /*@\label{tutorial-decoupled:impes}@*/
|
||||||
|
|
||||||
// some parameters needed for the TimeLoop-object
|
// some parameters needed for the TimeLoop-object
|
||||||
double tStart = 0; // start simulation at t = tStart
|
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
|
double cFLFactor = 0.9; // security factor for the Courant-Friedrichs-Lewy-Criterion
|
||||||
|
|
||||||
// create TimeLoop-object
|
// 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;
|
Dune::Timer timer;
|
||||||
timer.reset();
|
timer.reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user