24#ifndef DUMUX_POROSITY_PRECIPITATION_HH
25#define DUMUX_POROSITY_PRECIPITATION_HH
39template<
class Scalar,
int numComp,
int numSol
idPhases>
51 template<
class Element,
class SubControlVolume,
class ElemSol>
53 const SubControlVolume& scv,
54 const ElemSol& elemSol,
56 Scalar minPoro = 0.0)
const
58 auto priVars =
evalSolution(element, element.geometry(), elemSol, scv.center());
60 Scalar sumPrecipitates = 0.0;
61 for (
unsigned int solidPhaseIdx = 0; solidPhaseIdx < numSolidPhases; ++solidPhaseIdx)
62 sumPrecipitates += priVars[numComp + solidPhaseIdx];
65 return max(minPoro, refPoro - sumPrecipitates);
free functions for the evaluation of primary variables inside elements.
PrimaryVariables evalSolution(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)
Interpolates a given box element solution at a given global position. Uses the finite element cache o...
Definition: evalsolution.hh:165
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Calculates the porosity depending on the volume fractions of precipitated minerals.
Definition: porosityprecipitation.hh:41
Scalar evaluatePorosity(const Element &element, const SubControlVolume &scv, const ElemSol &elemSol, Scalar refPoro, Scalar minPoro=0.0) const
Calculates the porosity in a sub-control volume.
Definition: porosityprecipitation.hh:52