26#ifndef DUMUX_COMPOSITIONAL_MINERALIZATION_LOCAL_RESIDUAL_HH
27#define DUMUX_COMPOSITIONAL_MINERALIZATION_LOCAL_RESIDUAL_HH
38template<
class TypeTag>
44 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
50 static constexpr int numPhases = ModelTraits::numFluidPhases();
51 static constexpr int numSolidComps = ModelTraits::numSolidComps();
52 static constexpr int numInertSolidComps = ModelTraits::numInertSolidComps();
53 static constexpr int numComponents = ModelTraits::numFluidComponents();
54 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
57 using ParentType::ParentType;
74 const SubControlVolume& scv,
75 const VolumeVariables& volVars)
const
79 const auto massOrMoleDensity = [](
const auto& volVars,
const int phaseIdx)
80 {
return useMoles ? volVars.solidComponentMolarDensity(phaseIdx) : volVars.solidComponentDensity(phaseIdx); };
83 for (
int phaseIdx = 0; phaseIdx < numSolidComps-numInertSolidComps; ++phaseIdx)
85 auto eqIdx = Indices::conti0EqIdx + numComponents + phaseIdx;
86 storage[eqIdx] += volVars.solidVolumeFraction(phaseIdx)
87 * massOrMoleDensity(volVars, phaseIdx);
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
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
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:43
NumEqVector computeStorage(const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
Evaluates the amount of all conservation quantities (e.g. phase mass) within a sub-control volume.
Definition: porousmediumflow/compositional/localresidual.hh:87
Element-wise calculation of the local residual for problems using a one/two-phase n-component mineral...
Definition: porousmediumflow/mineralization/localresidual.hh:40
NumEqVector computeStorage(const Problem &problem, const SubControlVolume &scv, const VolumeVariables &volVars) const
Evaluates the amount of all conservation quantities (e.g. phase mass) within a sub-control volume.
Definition: porousmediumflow/mineralization/localresidual.hh:73
Element-wise calculation of the local residual for problems using compositional fully implicit model.