24#ifndef DUMUX_IMPESPROBLEM_2P_HH
25#define DUMUX_IMPESPROBLEM_2P_HH
39template<
class TypeTag>
48 using Grid =
typename GridView::Grid;
56 dim = Grid::dimension,
57 dimWorld = Grid::dimensionworld
60 using Element =
typename GridView::Traits::template Codim<0>::Entity;
62 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
63 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
83 spatialParams_ = std::make_shared<SpatialParams>(asImp_());
86 if (getParam<bool>(
"Problem.EnableGravity"))
87 gravity_[dim - 1] = - 9.81;
100 spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(
spatialParams);
102 if (getParam<bool>(
"Problem.EnableGravity"))
103 gravity_[dim - 1] = - 9.81;
119 return asImp_().temperatureAtPos(element.geometry().center());
131 DUNE_THROW(Dune::InvalidStateException,
132 "The problem does not provide "
133 "a temperatureAtPos() method.");
144 return asImp_().referencePressureAtPos(element.geometry().center());
156 DUNE_THROW(Dune::InvalidStateException,
157 "The problem does not provide "
158 "a referencePressureAtPos() method.");
174 {
return *spatialParams_; }
180 {
return *spatialParams_; }
186 Implementation &asImp_()
187 {
return *
static_cast<Implementation *
>(
this); }
190 const Implementation &asImp_()
const
191 {
return *
static_cast<const Implementation *
>(
this); }
193 GravityVector gravity_;
196 std::shared_ptr<SpatialParams> spatialParams_;
Properties for adaptive implementations of the sequential IMPES algorithms.
Base class for defining an instance of the diffusion problem.
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
Base class for all 2-phase problems which use an IMPES algorithm.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:41
Scalar temperature(const Element &element) const
Returns the temperature within the domain.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:117
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:128
IMPESProblem2P(TimeManager &timeManager, Grid &grid, const GridView &gridView)
Definition: porousmediumflow/2p/sequential/impes/problem.hh:80
const SpatialParams & spatialParams() const
Returns the spatial parameters object.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:179
Scalar referencePressure(const Element &element) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:142
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:167
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:153
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:173
IMPESProblem2P(TimeManager &timeManager, Grid &grid)
Constructs an IMPESProblem2P object.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:76
IMPESProblem2P(TimeManager &timeManager, Grid &grid, SpatialParams &spatialParams)
Constructs an IMPESProblem2P object.
Definition: porousmediumflow/2p/sequential/impes/problem.hh:96
base class for problems using a sequential implicit-explicit strategy
Definition: impetproblem.hh:46
const GridView & gridView() const
The GridView which used by the problem.
Definition: impetproblem.hh:573
TimeManager & timeManager()
Returns TimeManager object used by the simulation.
Definition: impetproblem.hh:663
Grid & grid()
Returns the current grid which used by the problem.
Definition: impetproblem.hh:581
Base file for properties related to sequential models.