mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-26 19:56:27 -06:00
cleaned up coupled tutorial after minicourse and updated labels for the handbook.
This commit is contained in:
parent
7c8e7f6442
commit
b9130c14b4
@ -68,36 +68,17 @@ SET_PROP(TutorialProblemCoupled, Grid) /*@\label{tutorial-coupled:set-grid}@*/
|
||||
}
|
||||
};
|
||||
|
||||
//TODO: edit from here......
|
||||
// Select fluid system
|
||||
SET_PROP(TutorialProblemCoupled, FluidSystem)
|
||||
SET_PROP(TutorialProblemCoupled, FluidSystem) /*@\label{tutorial-coupled:set-fluidsystem}@*/
|
||||
{
|
||||
//typedef Dune::Brine_CO2_System<TypeTag, Dune::IFP::CO2Tables> type;
|
||||
typedef Dumux::H2O_N2_System<TypeTag> type;
|
||||
};
|
||||
|
||||
//// Set the wetting and non-wetting phases - special case of 2p model!
|
||||
//SET_PROP(TutorialProblemCoupled, WettingPhase) /*@\label{tutorial-coupled:set-wetting}@*/
|
||||
//{
|
||||
//private:
|
||||
// typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
|
||||
//public:
|
||||
// typedef Dumux::LiquidPhase<Scalar, Dumux::SimpleH2O<Scalar> > type;
|
||||
//};
|
||||
//SET_PROP(TutorialProblemCoupled, NonwettingPhase)/*@\label{tutorial-coupled:set-nonwetting}@*/
|
||||
//{
|
||||
//private:
|
||||
// typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
|
||||
//public:
|
||||
// typedef Dumux::LiquidPhase<Scalar, Dumux::SimpleDNAPL<Scalar> > type;
|
||||
//};
|
||||
|
||||
// Set the soil properties
|
||||
SET_PROP(TutorialProblemCoupled, SpatialParameters) /*@\label{tutorial-coupled:set-soil}@*/
|
||||
// Set the spatial parameters
|
||||
SET_PROP(TutorialProblemCoupled, SpatialParameters) /*@\label{tutorial-coupled:set-spatialparameters}@*/
|
||||
{
|
||||
typedef Dumux::TutorialSpatialParameters<TypeTag> type;
|
||||
};
|
||||
//TODO: .....until here
|
||||
|
||||
// Disable gravity
|
||||
SET_BOOL_PROP(TutorialProblemCoupled, EnableGravity, false); /*@\label{tutorial-coupled:gravity}@*/
|
||||
@ -147,7 +128,7 @@ public:
|
||||
|
||||
// Specifies which kind of boundary condition should be used for
|
||||
// which equation on a given boundary segment.
|
||||
void boundaryTypes(BoundaryTypeVector &values,
|
||||
void boundaryTypes(BoundaryTypeVector &BCtype,
|
||||
const Element &element,
|
||||
const FVElementGeometry &fvElemGeom,
|
||||
const Intersection &isIt,
|
||||
@ -156,9 +137,9 @@ public:
|
||||
{
|
||||
const GlobalPosition &pos = element.geometry().corner(scvIdx);
|
||||
if (pos[0] < eps_) // dirichlet conditions on left boundary
|
||||
values.setAllDirichlet();
|
||||
BCtype.setAllDirichlet();
|
||||
else // neuman for the remaining boundaries
|
||||
values.setAllNeumann();
|
||||
BCtype.setAllNeumann();
|
||||
|
||||
}
|
||||
|
||||
|
@ -20,9 +20,7 @@
|
||||
#include <dumux/new_material/spatialparameters/boxspatialparameters.hh>
|
||||
|
||||
// include material laws
|
||||
#include <dumux/new_material/fluidmatrixinteractions/2p/regularizedbrookscorey.hh>
|
||||
#include <dumux/new_material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh>
|
||||
#include <dumux/new_material/fluidmatrixinteractions/2p/linearmaterial.hh>
|
||||
#include <dumux/new_material/fluidmatrixinteractions/2p/linearmaterial.hh> /*@\label{tutorial-coupled:rawLawInclude}@*/
|
||||
#include <dumux/new_material/fluidmatrixinteractions/2p/efftoabslaw.hh>
|
||||
|
||||
namespace Dumux
|
||||
@ -46,20 +44,19 @@ class TutorialSpatialParameters: public BoxSpatialParameters<TypeTag> /*@\label{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
|
||||
typedef typename Grid::Traits::template Codim<0>::Entity Element;
|
||||
|
||||
// select materialLaw to be used
|
||||
typedef RegularizedBrooksCorey<Scalar> RawMaterialLaw;
|
||||
//typedef LinearMaterial<Scalar> RawMaterialLaw; // example for linear Materiallaw
|
||||
// select material law to be used
|
||||
typedef LinearMaterial<Scalar> RawMaterialLaw; /*@\label{tutorial-coupled:rawlaw}@*/
|
||||
|
||||
public:
|
||||
// adapter for absolute law
|
||||
typedef EffToAbsLaw<RawMaterialLaw> MaterialLaw;
|
||||
|
||||
typedef EffToAbsLaw<RawMaterialLaw> MaterialLaw; /*@\label{tutorial-coupled:eff2abs}@*/
|
||||
// determine appropriate parameters depening on selected materialLaw
|
||||
typedef typename MaterialLaw::Params MaterialLawParams;
|
||||
typedef typename MaterialLaw::Params MaterialLawParams; /*@\label{tutorial-coupled:matLawObjectType}@*/
|
||||
|
||||
|
||||
// method returning the intrinsic permeability tensor K depending
|
||||
// on the position within the domain
|
||||
const Dune::FieldMatrix<Scalar, dim, dim> &intrinsicPermeability(const Element &element,
|
||||
const Dune::FieldMatrix<Scalar, dim, dim> &intrinsicPermeability(const Element &element, /*@\label{tutorial-coupled:permeability}@*/
|
||||
const FVElementGeometry &fvElemGeom,
|
||||
int scvIdx) const
|
||||
{
|
||||
@ -68,7 +65,7 @@ public:
|
||||
|
||||
// method returning the porosity of the porous matrix depending on
|
||||
// the position within the domain
|
||||
double porosity(const Element &element,
|
||||
double porosity(const Element &element, /*@\label{tutorial-coupled:porosity}@*/
|
||||
const FVElementGeometry &fvElemGeom,
|
||||
int scvIdx) const
|
||||
{
|
||||
@ -76,12 +73,10 @@ public:
|
||||
}
|
||||
|
||||
// return the materialLaw context (i.e. BC, regularizedVG, etc) depending on the position
|
||||
const MaterialLawParams& materialLawParams(const Element &element,
|
||||
const MaterialLawParams& materialLawParams(const Element &element, /*@\label{tutorial-coupled:matLawParams}@*/
|
||||
const FVElementGeometry &fvElemGeom,
|
||||
int scvIdx) const
|
||||
{
|
||||
// if (element.center()>= 783636)
|
||||
// return UpperBoundaryMaterialParams_;
|
||||
return materialParams_;
|
||||
}
|
||||
|
||||
@ -93,22 +88,18 @@ public:
|
||||
K_[i][i] = 1e-7;
|
||||
|
||||
//set residual saturations
|
||||
materialParams_.setSwr(0.0);
|
||||
materialParams_.setSwr(0.0); /*@\label{tutorial-coupled:setLawParams}@*/
|
||||
materialParams_.setSnr(0.0);
|
||||
|
||||
//brooks-corey law
|
||||
materialParams_.setPe(0.0);
|
||||
materialParams_.setAlpha(2.0);
|
||||
|
||||
// //linear material law
|
||||
// materialParams_.setEntryPC(0.0);
|
||||
// materialParams_.setMaxPC(0.0);
|
||||
//linear material law
|
||||
materialParams_.setEntryPC(0.0);
|
||||
materialParams_.setMaxPC(0.0);
|
||||
}
|
||||
|
||||
private:
|
||||
Dune::FieldMatrix<Scalar, dim, dim> K_;
|
||||
// Object that helds the values/parameters of the selected material law.
|
||||
MaterialLawParams materialParams_;
|
||||
MaterialLawParams materialParams_; /*@\label{tutorial-coupled:matParamsObject}@*/
|
||||
};
|
||||
} // end namespace
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user