25#ifndef DUMUX_DIFFUSIONPROBLEM_1P_HH
26#define DUMUX_DIFFUSIONPROBLEM_1P_HH
43template<
class TypeTag>
46 using Implementation =
typename GET_PROP_TYPE(TypeTag, Problem);
50 using Grid =
typename GridView::Grid;
53 using TimeManager =
typename GET_PROP_TYPE(TypeTag, TimeManager);
56 using SpatialParams =
typename GET_PROP_TYPE(TypeTag, SpatialParams);
58 using Element =
typename GridView::Traits::template Codim<0>::Entity;
62 dim = Grid::dimension, dimWorld = Grid::dimensionworld
65 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
66 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
78 spatialParams_ = std::make_shared<SpatialParams>(asImp_());
80 if (getParam<bool>(
"Problem.EnableGravity"))
81 gravity_[dim - 1] = -9.81;
94 spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(
spatialParams);
96 if (getParam<bool>(
"Problem.EnableGravity"))
97 gravity_[dim - 1] = -9.81;
108 spatialParams_ = std::make_shared<SpatialParams>(asImp_());
110 if (getParam<bool>(
"Problem.EnableGravity"))
111 gravity_[dim - 1] = -9.81;
123 spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(
spatialParams);
125 if (getParam<bool>(
"Problem.EnableGravity"))
126 gravity_[dim - 1] = -9.81;
148 void deserialize(
double t)
161 return asImp_().temperatureAtPos(element.geometry().center());
172 DUNE_THROW(Dune::InvalidStateException,
173 "The problem does not provide "
174 "a temperatureAtPos() method.");
184 return asImp_().referencePressureAtPos(element.geometry().center());
195 DUNE_THROW(Dune::InvalidStateException,
196 "The problem does not provide "
197 "a referencePressureAtPos() method.");
216 return *spatialParams_;
224 return *spatialParams_;
231 Implementation &asImp_()
232 {
return *
static_cast<Implementation *
>(
this); }
235 const Implementation &asImp_()
const
236 {
return *
static_cast<const Implementation *
>(
this); }
238 GravityVector gravity_;
241 std::shared_ptr<SpatialParams> spatialParams_;
Base class holding the variables for sequential models.
Base class for definition of an sequential diffusion (pressure) or transport problem.
#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 PressureModel
The type of the discretization of a pressure model.
Definition: porousmediumflow/sequential/properties.hh:65
Base class for all single phase diffusion problems.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:45
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:206
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:169
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:214
Scalar referencePressure(const Element &element) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:182
Scalar temperature(const Element &element) const
Returns the temperature within the domain.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:159
DiffusionProblem1P(Grid &grid, SpatialParams &spatialParams)
The constructor.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:120
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:192
DiffusionProblem1P(TimeManager &timeManager, Grid &grid)
Constructs a DiffusionProblem1P object.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:75
const SpatialParams & spatialParams() const
Returns the spatial parameters object.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:222
DiffusionProblem1P(Grid &grid)
The constructor.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:105
DiffusionProblem1P(TimeManager &timeManager, Grid &grid, SpatialParams &spatialParams)
Constructs a DiffusionProblem1P object.
Definition: dumux/porousmediumflow/1p/sequential/diffusion/problem.hh:91
Base class for definition of an sequential diffusion (pressure) or transport problem.
Definition: onemodelproblem.hh:46
void timeIntegration()
Called by TimeManager in order to do a time integration on the model.
Definition: onemodelproblem.hh:345
TimeManager & timeManager()
Returns TimeManager object used by the simulation.
Definition: onemodelproblem.hh:551
void serialize()
This method writes the complete state of the problem to the harddisk.
Definition: onemodelproblem.hh:600
Specifies the properties for 1p pressure models.
Class including data of one grid cell.