mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
merge the changes directly done in the stable branch back into trunk
This commit is contained in:
committed by
Andreas Lauser
parent
330f89d037
commit
351c18602a
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user