13#ifndef DUMUX_POROMECHANICS_POROELASTIC_FV_SPATIAL_PARAMS_HH
14#define DUMUX_POROMECHANICS_POROELASTIC_FV_SPATIAL_PARAMS_HH
22#include "spatialparamstraits_.hh"
31template<
class Gr
idGeometry,
class Scalar,
class Implementation>
36 using FVElementGeometry =
typename GridGeometry::LocalView;
37 using SubControlVolume =
typename GridGeometry::SubControlVolume;
38 using GridView =
typename GridGeometry::GridView;
39 using Element =
typename GridView::template Codim<0>::Entity;
40 using GlobalPosition =
typename Element::Geometry::GlobalCoordinate;
56 const SubControlVolume& scv)
const
58 static_assert(
decltype(
isValid(Detail::hasEffFluidDensityAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n"
59 " Your problem class has to either implement\n\n"
60 " Scalar effectiveFluidDensityAtPos(const GlobalPosition& globalPos) const\n\n"
61 " or overload this function\n\n"
62 " template<class ElementSolution>\n"
63 " Scalar effectiveFluidDensity(const Element& element,\n\
64 const SubControlVolume& scv) const\n\n");
66 return this->
asImp_().effectiveFluidDensityAtPos(scv.center());
82 template<
class ElemVolVars,
class FluxVarsCache>
84 const FVElementGeometry& fvGeometry,
85 const ElemVolVars& elemVolVars,
86 const FluxVarsCache& fluxVarsCache)
const
88 static_assert(
decltype(
isValid(Detail::hasEffPorePressureAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n"
89 " Your problem class has to either implement\n\n"
90 " Scalar effectivePorePressureAtPos(const GlobalPosition& globalPos) const\n\n"
91 " or overload this function\n\n"
92 " template<class ElementSolution>\n"
93 " Scalar effectivePorePressure(const Element& element,\n"
94 " const FVElementGeometry& fvGeometry,\n"
95 " const ElemVolVars& elemVolVars,\n"
96 " const FluxVarsCache& fluxVarsCache) const\n\n");
98 return this->
asImp_().effectivePorePressureAtPos(element.geometry().center());
117 template<
class SolidSystem,
class ElementSolution,
118 std::enable_if_t< SolidSystem::isInert() &&
119 !
decltype(
isValid(Detail::hasReactiveVolumeFractionAtPos<GlobalPosition, SolidSystem>())
120 (std::declval<Implementation>()))::value,
int > = 0 >
122 const SubControlVolume& scv,
123 const ElementSolution& elemSol,
128 template<
class SolidSystem,
class ElementSolution,
129 std::enable_if_t< !SolidSystem::isInert() ||
130 decltype(
isValid(Detail::hasReactiveVolumeFractionAtPos<GlobalPosition, SolidSystem>())
131 (std::declval<Implementation>()))::value,
int > = 0 >
133 const SubControlVolume& scv,
134 const ElementSolution& elemSol,
137 static_assert(
decltype(
isValid(Detail::hasReactiveVolumeFractionAtPos<GlobalPosition, SolidSystem>())(this->
asImp_()))::value,
" \n\n"
138 " Your spatial params class has to either implement\n\n"
139 " template<class SolidSystem>\n"
140 " Scalar inertVolumeFractionAtPos(const GlobalPosition& globalPos, int compIdx) const\n\n"
141 " or overload this function\n\n"
142 " template<class SolidSystem, class ElementSolution>\n"
143 " Scalar inertVolumeFraction(const Element& element,\n"
144 " const SubControlVolume& scv,\n"
145 " const ElementSolution& elemSol,\n"
146 " int compIdx) const\n\n");
148 return this->
asImp_().template reactiveVolumeFractionAtPos<SolidSystem>(scv.center(), compIdx);
164 template<
class ElemVolVars,
class FluxVarsCache>
166 const FVElementGeometry& fvGeometry,
167 const ElemVolVars& elemVolVars,
168 const FluxVarsCache& fluxVarsCache)
const
170 static_assert(
decltype(
isValid(Detail::hasLameParamsAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n"
171 " Your spatial params class has to either implement\n\n"
172 " const LameParams& lameParamsAtPos(const GlobalPosition& globalPos) const\n\n"
173 " or overload this function\n\n"
174 " template<class ElementSolution>\n"
175 " const LameParams& lameParams(const Element& element,\n"
176 " const FVElementGeometry& fvGeometry,\n"
177 " const ElemVolVars& elemVolVars,\n"
178 " const FluxVarsCache& fluxVarsCache) const\n\n");
180 return this->
asImp_().lameParamsAtPos(fluxVarsCache.ipGlobal());
196 template<
class ElemVolVars,
class FluxVarsCache>
198 const FVElementGeometry& fvGeometry,
199 const ElemVolVars& elemVolVars,
200 const FluxVarsCache& fluxVarsCache)
const
202 static_assert(
decltype(
isValid(Detail::hasBiotCoeffAtPos<GlobalPosition>())(this->
asImp_()))::value,
" \n\n"
203 " Your spatial params class has to either implement\n\n"
204 " const LameParams& biotCoefficientAtPos(const GlobalPosition& globalPos) const\n\n"
205 " or overload this function\n\n"
206 " template<class ElementSolution>\n"
207 " const LameParams& biotCoefficient(const Element& element,\n"
208 " const FVElementGeometry& fvGeometry,\n"
209 " const ElemVolVars& elemVolVars,\n"
210 " const FluxVarsCache& fluxVarsCache) const\n\n");
212 return this->
asImp_().biotCoefficientAtPos(fluxVarsCache.ipGlobal());
The base class for spatial parameters of poro-elastic geomechanical problems.
Definition: poromechanics/poroelastic/fvspatialparams.hh:34
decltype(auto) lameParams(const Element &element, const FVElementGeometry &fvGeometry, const ElemVolVars &elemVolVars, const FluxVarsCache &fluxVarsCache) const
Define the Lame parameters.
Definition: poromechanics/poroelastic/fvspatialparams.hh:165
Scalar effectiveFluidDensity(const Element &element, const SubControlVolume &scv) const
Returns the effective fluid density within an scv.
Definition: poromechanics/poroelastic/fvspatialparams.hh:55
Scalar reactiveVolumeFraction(const Element &element, const SubControlVolume &scv, const ElementSolution &elemSol, int compIdx) const
Function for defining the solid volume fraction of a solid component that takes part in some sort of ...
Definition: poromechanics/poroelastic/fvspatialparams.hh:121
Scalar biotCoefficient(const Element &element, const FVElementGeometry &fvGeometry, const ElemVolVars &elemVolVars, const FluxVarsCache &fluxVarsCache) const
Returns the Biot coefficient in an element.
Definition: poromechanics/poroelastic/fvspatialparams.hh:197
FVPoroElasticSpatialParams(std::shared_ptr< const GridGeometry > gridGeometry)
The constructor.
Definition: poromechanics/poroelastic/fvspatialparams.hh:44
Scalar effectivePorePressure(const Element &element, const FVElementGeometry &fvGeometry, const ElemVolVars &elemVolVars, const FluxVarsCache &fluxVarsCache) const
Returns the effective pore pressure.
Definition: poromechanics/poroelastic/fvspatialparams.hh:83
The base class for spatial parameters of porous-medium problems.
Definition: fvporousmediumspatialparams.hh:51
The base class for spatial parameters used with finite-volume schemes.
Definition: common/fvspatialparams.hh:34
Implementation & asImp_()
Returns the implementation of the spatial parameters (static polymorphism)
Definition: common/fvspatialparams.hh:166
const GridGeometry & gridGeometry() const
The finite volume grid geometry.
Definition: common/fvspatialparams.hh:161
The base class for spatial parameters in porous medium problems.
constexpr auto isValid(const Expression &t)
A function that creates a test functor to do class member introspection at compile time.
Definition: isvalid.hh:81
A helper function for class member function introspection.