24#ifndef DUMUX_MATERIAL_POROSITY_DEFORMATION_HH
25#define DUMUX_MATERIAL_POROSITY_DEFORMATION_HH
64 template<
class FVGr
idGeom,
class ElemSol >
66 const typename FVGridGeom::GridView::template Codim<0>::Entity& element,
67 const typename FVGridGeom::GridView::template Codim<0>::Entity::Geometry::GlobalCoordinate& globalPos,
68 const ElemSol& elemSol,
75 const auto gradU =
evalGradients(element, element.geometry(), gridGeometry, elemSol, globalPos);
76 for (
int dir = 0; dir < FVGridGeom::GridView::dimension; ++dir)
77 divU += gradU[dir][dir];
80 return clamp((refPoro+divU)/(1.0+divU), minPoro, maxPoro);
97 template<
class FVGr
idGeom,
class ElemSol >
99 const typename FVGridGeom::GridView::template Codim<0>::Entity& element,
100 const typename FVGridGeom::SubControlVolume& scv,
101 const ElemSol& elemSol,
103 Scalar minPoro = 0.0)
106 return evaluatePorosity(gridGeometry, element, scv.center(), elemSol, refPoro, minPoro);
free functions for the evaluation of primary variable gradients inside elements.
auto evalGradients(const Element &element, const typename Element::Geometry &geometry, const typename FVElementGeometry::GridGeometry &gridGeometry, const BoxElementSolution< FVElementGeometry, PrimaryVariables > &elemSol, const typename Element::Geometry::GlobalCoordinate &globalPos, bool ignoreState=false)
Evaluates the gradient of a given box element solution to a given global position.
Definition: evalgradients.hh:125
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
A relationship for the porosity of a porous medium under mechanical deformation.
Definition: porositydeformation.hh:39
static Scalar evaluatePorosity(const FVGridGeom &gridGeometry, const typename FVGridGeom::GridView::template Codim< 0 >::Entity &element, const typename FVGridGeom::SubControlVolume &scv, const ElemSol &elemSol, Scalar refPoro, Scalar minPoro=0.0)
Calculates the porosity at a position inside an element.
Definition: porositydeformation.hh:98
static Scalar evaluatePorosity(const FVGridGeom &gridGeometry, const typename FVGridGeom::GridView::template Codim< 0 >::Entity &element, const typename FVGridGeom::GridView::template Codim< 0 >::Entity::Geometry::GlobalCoordinate &globalPos, const ElemSol &elemSol, Scalar refPoro, Scalar minPoro=0.0, Scalar maxPoro=1.0)
Calculates the porosity at a position inside an element.
Definition: porositydeformation.hh:65