26#ifndef DUMUX_COMPOSITIONAL_MINERALIZATION_LOCAL_RESIDUAL_HH
27#define DUMUX_COMPOSITIONAL_MINERALIZATION_LOCAL_RESIDUAL_HH
39template<
class TypeTag>
45 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
51 static constexpr int numPhases = ModelTraits::numFluidPhases();
52 static constexpr int numSolidComps = ModelTraits::numSolidComps();
53 static constexpr int numInertSolidComps = ModelTraits::numInertSolidComps();
54 static constexpr int numComponents = ModelTraits::numFluidComponents();
55 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
58 using ParentType::ParentType;
75 const SubControlVolume& scv,
76 const VolumeVariables& volVars)
const
80 const auto massOrMoleSolidDensity = [](
const auto& volVars,
const int sCompIdx)
81 {
return useMoles ? volVars.solidComponentMolarDensity(sCompIdx) : volVars.solidComponentDensity(sCompIdx); };
84 for (
int sCompIdx = 0; sCompIdx < numSolidComps-numInertSolidComps; ++sCompIdx)
86 auto eqIdx = Indices::conti0EqIdx + numComponents + sCompIdx;
87 storage[eqIdx] += volVars.solidVolumeFraction(sCompIdx)
88 * massOrMoleSolidDensity(volVars, sCompIdx);
A helper to deduce a vector with the same size as numbers of equations.
typename NumEqVectorTraits< PrimaryVariables >::type NumEqVector
A vector with the same size as numbers of equations This is the default implementation and has to be ...
Definition: numeqvector.hh:46
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:46
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:90
Element-wise calculation of the local residual for problems using a one/two-phase n-component mineral...
Definition: porousmediumflow/mineralization/localresidual.hh:41
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:74
Element-wise calculation of the local residual for problems using compositional fully implicit model.