24#ifndef DUMUX_TRANSPORTPROBLEM_2P_HH
25#define DUMUX_TRANSPORTPROBLEM_2P_HH
34template<
class TypeTag>
35struct Model<TypeTag, TTag::TransportTwoP>
49template<
class TypeTag>
52 using Implementation =
typename GET_PROP_TYPE(TypeTag, Problem);
56 using Grid =
typename GridView::Grid;
59 using TimeManager =
typename GET_PROP_TYPE(TypeTag, TimeManager);
62 using SpatialParams =
typename GET_PROP_TYPE(TypeTag, SpatialParams);
64 using SolutionTypes =
typename GET_PROP(TypeTag, SolutionTypes);
65 using Solution =
typename SolutionTypes::ScalarSolution;
67 using Element =
typename GridView::Traits::template Codim<0>::Entity;
69 using Indices =
typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
72 dim = Grid::dimension,
73 dimWorld = Grid::dimensionworld
77 transportEqIdx = Indices::transportEqIdx
80 using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
98 cFLFactor_ = getParam<Scalar>(
"Impet.CFLFactor");
100 spatialParams_ = std::make_shared<SpatialParams>(asImp_());
103 if (getParam<bool>(
"Problem.EnableGravity"))
104 gravity_[dim - 1] = - 9.81;
118 cFLFactor_ = getParam<Scalar>(
"Impet.CFLFactor");
120 spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(
spatialParams);
123 if (getParam<bool>(
"Problem.EnableGravity"))
124 gravity_[dim - 1] = - 9.81;
140 return this->asImp_().temperatureAtPos(element.geometry().center());
152 DUNE_THROW(Dune::InvalidStateException,
153 "The problem does not provide "
154 "a temperatureAtPos() method.");
165 return this->asImp_().referencePressureAtPos(element.geometry().center());
177 DUNE_THROW(Dune::InvalidStateException,
178 "The problem does not provide "
179 "a referencePressureAtPos() method.");
195 {
return *spatialParams_; }
201 {
return *spatialParams_; }
213 Solution updateVector;
219 this->
model().update(t, dt, updateVector);
223 dt = min(dt*cFLFactor_, this->
timeManager().episodeMaxTimeStepSize());
227 this->
model().updateTransportedQuantity(updateVector);
234 Implementation &asImp_()
235 {
return *
static_cast<Implementation *
>(
this); }
238 const Implementation &asImp_()
const
239 {
return *
static_cast<const Implementation *
>(
this); }
241 GlobalPosition gravity_;
244 std::shared_ptr<SpatialParams> spatialParams_;
Base class for definition of an sequential diffusion (pressure) or transport problem.
Default implementation of velocity class.
#define GET_PROP(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:281
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:283
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Property tag Model
The type of the mode.
Definition: porousmediumflow/sequential/properties.hh:62
SET_TYPE_PROP(FVPressureOneP, Velocity, FVVelocity1P< TypeTag >)
Set velocity reconstruction implementation standard cell centered finite volume schemes as default.
Property tag Velocity
The type velocity reconstruction.
Definition: porousmediumflow/sequential/properties.hh:67
Property tag TransportModel
The type of the discretization of a transport model.
Definition: porousmediumflow/sequential/properties.hh:66
typename GET_PROP_TYPE(TypeTag, TransportModel) type
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:37
Base class for a sequential two-phase transport problem.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:51
TransportProblem2P(TimeManager &timeManager, Grid &grid)
The constructor.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:94
void timeIntegration()
Time integration of the model.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:210
Scalar temperature(const Element &element) const
Returns the temperature within the domain.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:138
const SpatialParams & spatialParams() const
Returns the spatial parameters object.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:200
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:174
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:194
TransportProblem2P(TimeManager &timeManager, Grid &grid, SpatialParams &spatialParams)
The constructor.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:114
const GlobalPosition & gravity() const
Returns the acceleration due to gravity.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:188
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:149
Scalar referencePressure(const Element &element) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: dumux/porousmediumflow/2p/sequential/transport/problem.hh:163
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
Base file for properties related to sequential models.