28 #ifndef EWOMS_RICHARDS_RATE_VECTOR_HH 29 #define EWOMS_RICHARDS_RATE_VECTOR_HH 31 #include <dune/common/fvector.hh> 33 #include <opm/material/common/Valgrind.hpp> 34 #include <opm/material/constraintsolvers/NcpFlash.hpp> 50 template <
class TypeTag>
52 :
public Dune::FieldVector<GetPropType<TypeTag, Properties::Evaluation>,
53 getPropValue<TypeTag, Properties::NumEq>()>
61 enum { contiEqIdx = Indices::contiEqIdx };
62 enum { liquidCompIdx = getPropValue<TypeTag, Properties::LiquidComponentIndex>() };
63 enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
65 using ParentType = Dune::FieldVector<Evaluation, numEq>;
70 { Opm::Valgrind::SetUndefined(*
this); }
91 { ParentType::operator=(value); }
99 ParentType::operator[](contiEqIdx) =
100 value[contiEqIdx] * FluidSystem::molarMass(liquidCompIdx);
106 template <
class RhsEval>
108 { EnergyModule::setEnthalpyRate(*
this, rate); }
113 template <
class Flu
idState,
class RhsEval>
116 (*this)[contiEqIdx] =
117 fluidState.density(phaseIdx) *
118 fluidState.massFraction(phaseIdx, liquidCompIdx) *
121 EnergyModule::setEnthalpyRate(*
this, fluidState, phaseIdx, volume);
128 template <
class RhsEval>
131 for (
unsigned i = 0; i < this->size(); ++i) {
142 for (
unsigned i = 0; i < this->size(); ++i) {
143 (*this)[i] = other[i];
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:233
Defines the common properties required by the porous medium multi-phase models.
RichardsRateVector(const RichardsRateVector &value)
Default constructor.
Definition: richardsratevector.hh:83
void setVolumetricRate(const FluidState &fluidState, unsigned phaseIdx, const RhsEval &volume)
Set a volumetric rate of a phase.
Definition: richardsratevector.hh:114
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
void setMolarRate(const ParentType &value)
Set a molar rate of the conservation quantities.
Definition: richardsratevector.hh:96
Declare the properties used by the infrastructure code of the finite volume discretizations.
void setMassRate(const ParentType &value)
Set a mass rate of the conservation quantities.
Definition: richardsratevector.hh:90
void setEnthalpyRate(const RhsEval &rate)
Set an enthalpy rate [J/As] where .
Definition: richardsratevector.hh:107
Contains the property declarations for the Richards model.
Implements a vector representing mass, molar or volumetric rates.
Definition: richardsratevector.hh:51
RichardsRateVector & operator=(const RichardsRateVector &other)
Assignment operator from another rate vector.
Definition: richardsratevector.hh:140
RichardsRateVector & operator=(const RhsEval &value)
Assignment operator from a scalar or a function evaluation.
Definition: richardsratevector.hh:129
RichardsRateVector(const Evaluation &value)
Definition: richardsratevector.hh:75