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>
50template <
class TypeTag>
51class RichardsRateVector
52 :
public Dune::FieldVector<GetPropType<TypeTag, Properties::Evaluation>,
53 getPropValue<TypeTag, Properties::NumEq>()>
61 enum { contiEqIdx = Indices::contiEqIdx };
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) {
140 RichardsRateVector&
operator=(
const RichardsRateVector& other)
142 for (
unsigned i = 0; i < this->size(); ++i) {
143 (*this)[i] = other[i];
RichardsRateVector(const Evaluation &value)
Definition richardsratevector.hh:75
void setEnthalpyRate(const RhsEval &rate)
Set an enthalpy rate [J/As] where .
Definition richardsratevector.hh:107
void setMassRate(const ParentType &value)
Set a mass rate of the conservation quantities.
Definition richardsratevector.hh:90
void setVolumetricRate(const FluidState &fluidState, unsigned phaseIdx, const RhsEval &volume)
Set a volumetric rate of a phase.
Definition richardsratevector.hh:114
RichardsRateVector(const RichardsRateVector &value)
Definition richardsratevector.hh:83
void setMolarRate(const ParentType &value)
Set a molar rate of the conservation quantities.
Definition richardsratevector.hh:96
RichardsRateVector & operator=(const RhsEval &value)
Assignment operator from a scalar or a function evaluation.
Definition richardsratevector.hh:129
RichardsRateVector & operator=(const RichardsRateVector &other)
Assignment operator from another rate vector.
Definition richardsratevector.hh:140
Declare the properties used by the infrastructure code of the finite volume discretizations.
Defines the common properties required by the porous medium multi-phase models.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
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
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:240
Contains the property declarations for the Richards model.