24#ifndef DUMUX_TRANSPORTPROBLEM_2P_HH
25#define DUMUX_TRANSPORTPROBLEM_2P_HH
34template<
class TypeTag>
35struct Model<TypeTag, TTag::TransportTwoP>
40template<
class TypeTag>
50template<
class TypeTag>
57 using Grid =
typename GridView::Grid;
66 using Solution =
typename SolutionTypes::ScalarSolution;
68 using Element =
typename GridView::Traits::template Codim<0>::Entity;
73 dim = Grid::dimension,
74 dimWorld = Grid::dimensionworld
78 transportEqIdx = Indices::transportEqIdx
81 using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
99 cFLFactor_ = getParam<Scalar>(
"Impet.CFLFactor");
101 spatialParams_ = std::make_shared<SpatialParams>(asImp_());
104 if (getParam<bool>(
"Problem.EnableGravity"))
105 gravity_[dim - 1] = - 9.81;
119 cFLFactor_ = getParam<Scalar>(
"Impet.CFLFactor");
121 spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(
spatialParams);
124 if (getParam<bool>(
"Problem.EnableGravity"))
125 gravity_[dim - 1] = - 9.81;
141 return this->asImp_().temperatureAtPos(element.geometry().center());
153 DUNE_THROW(Dune::InvalidStateException,
154 "The problem does not provide "
155 "a temperatureAtPos() method.");
166 return this->asImp_().referencePressureAtPos(element.geometry().center());
178 DUNE_THROW(Dune::InvalidStateException,
179 "The problem does not provide "
180 "a referencePressureAtPos() method.");
196 {
return *spatialParams_; }
202 {
return *spatialParams_; }
214 Solution updateVector;
220 this->
model().update(t, dt, updateVector);
224 dt = min(dt*cFLFactor_, this->
timeManager().episodeMaxTimeStepSize());
228 this->
model().updateTransportedQuantity(updateVector);
235 Implementation &asImp_()
236 {
return *
static_cast<Implementation *
>(
this); }
239 const Implementation &asImp_()
const
240 {
return *
static_cast<const Implementation *
>(
this); }
242 GlobalPosition gravity_;
245 std::shared_ptr<SpatialParams> spatialParams_;
Default implementation of velocity class.
Base class for definition of an sequential diffusion (pressure) or transport problem.
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type GetProp
get the type of a property (equivalent to old macro GET_PROP(...))
Definition: propertysystem.hh:140
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
GetPropType< TypeTag, Properties::TransportModel > type
Definition: porousmediumflow/2p/sequential/transport/problem.hh:37
Base class for a sequential two-phase transport problem.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:52
TransportProblem2P(TimeManager &timeManager, Grid &grid)
The constructor.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:95
void timeIntegration()
Time integration of the model.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:211
Scalar temperature(const Element &element) const
Returns the temperature within the domain.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:139
const SpatialParams & spatialParams() const
Returns the spatial parameters object.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:201
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:175
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:195
TransportProblem2P(TimeManager &timeManager, Grid &grid, SpatialParams &spatialParams)
The constructor.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:115
const GlobalPosition & gravity() const
Returns the acceleration due to gravity.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:189
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:150
Scalar referencePressure(const Element &element) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: porousmediumflow/2p/sequential/transport/problem.hh:164
Default implementation of a velocity class.
Definition: velocitydefault.hh:42
Base class for definition of an sequential diffusion (pressure) or transport problem.
Definition: onemodelproblem.hh:46
TimeManager & timeManager()
Returns TimeManager object used by the simulation.
Definition: onemodelproblem.hh:551
Model & model()
Returns numerical model used for the problem.
Definition: onemodelproblem.hh:575
The type of the mode.
Definition: porousmediumflow/sequential/properties.hh:70
The type velocity reconstruction.
Definition: porousmediumflow/sequential/properties.hh:79
Base file for properties related to sequential models.