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];
81 return min( maxPoro, max(minPoro, (refPoro+divU)/(1.0+divU)) );
98 template<
class FVGr
idGeom,
class ElemSol >
100 const typename FVGridGeom::GridView::template Codim<0>::Entity& element,
101 const typename FVGridGeom::SubControlVolume& scv,
102 const ElemSol& elemSol,
104 Scalar minPoro = 0.0)
107 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:55
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:99
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