25#ifndef DUMUX_DIFFUSIONPROBLEM_1P_HH
26#define DUMUX_DIFFUSIONPROBLEM_1P_HH
35template<
class TypeTag>
44template<
class TypeTag>
51 using Grid =
typename GridView::Grid;
59 using Element =
typename GridView::Traits::template Codim<0>::Entity;
63 dim = Grid::dimension, dimWorld = Grid::dimensionworld
66 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
67 using GravityVector = Dune::FieldVector<Scalar, dimWorld>;
79 spatialParams_ = std::make_shared<SpatialParams>(asImp_());
81 if (getParam<bool>(
"Problem.EnableGravity"))
82 gravity_[dim - 1] = -9.81;
95 spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(
spatialParams);
97 if (getParam<bool>(
"Problem.EnableGravity"))
98 gravity_[dim - 1] = -9.81;
109 spatialParams_ = std::make_shared<SpatialParams>(asImp_());
111 if (getParam<bool>(
"Problem.EnableGravity"))
112 gravity_[dim - 1] = -9.81;
124 spatialParams_ = Dune::stackobject_to_shared_ptr<SpatialParams>(
spatialParams);
126 if (getParam<bool>(
"Problem.EnableGravity"))
127 gravity_[dim - 1] = -9.81;
149 void deserialize(
double t)
162 return asImp_().temperatureAtPos(element.geometry().center());
173 DUNE_THROW(Dune::InvalidStateException,
174 "The problem does not provide "
175 "a temperatureAtPos() method.");
185 return asImp_().referencePressureAtPos(element.geometry().center());
196 DUNE_THROW(Dune::InvalidStateException,
197 "The problem does not provide "
198 "a referencePressureAtPos() method.");
217 return *spatialParams_;
225 return *spatialParams_;
232 Implementation &asImp_()
233 {
return *
static_cast<Implementation *
>(
this); }
236 const Implementation &asImp_()
const
237 {
return *
static_cast<const Implementation *
>(
this); }
239 GravityVector gravity_;
242 std::shared_ptr<SpatialParams> spatialParams_;
Base class for definition of an sequential diffusion (pressure) or transport problem.
Base class holding the variables for sequential models.
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::PressureModel > type
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:36
Base class for all single phase diffusion problems.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:46
const GravityVector & gravity() const
Returns the acceleration due to gravity.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:207
Scalar temperatureAtPos(const GlobalPosition &globalPos) const
Returns the temperature within the domain.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:170
SpatialParams & spatialParams()
Returns the spatial parameters object.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:215
Scalar referencePressure(const Element &element) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:183
Scalar temperature(const Element &element) const
Returns the temperature within the domain.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:160
DiffusionProblem1P(Grid &grid, SpatialParams &spatialParams)
The constructor.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:121
Scalar referencePressureAtPos(const GlobalPosition &globalPos) const
Returns the reference pressure for evaluation of constitutive relations.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:193
DiffusionProblem1P(TimeManager &timeManager, Grid &grid)
Constructs a DiffusionProblem1P object.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:76
const SpatialParams & spatialParams() const
Returns the spatial parameters object.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:223
DiffusionProblem1P(Grid &grid)
The constructor.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:106
DiffusionProblem1P(TimeManager &timeManager, Grid &grid, SpatialParams &spatialParams)
Constructs a DiffusionProblem1P object.
Definition: porousmediumflow/1p/sequential/diffusion/problem.hh:92
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
The type of the mode.
Definition: porousmediumflow/sequential/properties.hh:70
Specifies the properties for 1p pressure models.
Class including data of one grid cell.