14#ifndef DUMUX_COMPOSITIONAL_MINERALIZATION_LOCAL_RESIDUAL_HH
15#define DUMUX_COMPOSITIONAL_MINERALIZATION_LOCAL_RESIDUAL_HH
27template<
class TypeTag>
33 using SubControlVolume =
typename FVElementGeometry::SubControlVolume;
39 static constexpr int numPhases = ModelTraits::numFluidPhases();
40 static constexpr int numSolidComps = ModelTraits::numSolidComps();
41 static constexpr int numInertSolidComps = ModelTraits::numInertSolidComps();
42 static constexpr int numComponents = ModelTraits::numFluidComponents();
43 static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>();
46 using ParentType::ParentType;
63 const SubControlVolume& scv,
64 const VolumeVariables& volVars)
const
68 const auto massOrMoleSolidDensity = [](
const auto& volVars,
const int sCompIdx)
69 {
return useMoles ? volVars.solidComponentMolarDensity(sCompIdx) : volVars.solidComponentDensity(sCompIdx); };
72 for (
int sCompIdx = 0; sCompIdx < numSolidComps-numInertSolidComps; ++sCompIdx)
74 auto eqIdx = Indices::conti0EqIdx + numComponents + sCompIdx;
75 storage[eqIdx] += volVars.solidVolumeFraction(sCompIdx)
76 * massOrMoleSolidDensity(volVars, sCompIdx);
Element-wise calculation of the local residual for problems using compositional fully implicit model.
Definition: porousmediumflow/compositional/localresidual.hh:33
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:77
Element-wise calculation of the local residual for problems using a one/two-phase n-component mineral...
Definition: porousmediumflow/mineralization/localresidual.hh:29
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:62
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:34
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
A helper to deduce a vector with the same size as numbers of equations.
Element-wise calculation of the local residual for problems using compositional fully implicit model.