28 #ifndef EWOMS_FLASH_RATE_VECTOR_HH 29 #define EWOMS_FLASH_RATE_VECTOR_HH 31 #include <dune/common/fvector.hh> 33 #include <opm/material/common/Valgrind.hpp> 44 template <
class TypeTag>
46 :
public Dune::FieldVector<GetPropType<TypeTag, Properties::Evaluation>,
47 getPropValue<TypeTag, Properties::NumEq>()>
54 enum { conti0EqIdx = Indices::conti0EqIdx };
55 enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
56 enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
58 using ParentType = Dune::FieldVector<Evaluation, numEq>;
64 { Valgrind::SetUndefined(*
this); }
87 ParentType molarRate(value);
88 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
89 molarRate[conti0EqIdx + compIdx] /= FluidSystem::molarMass(compIdx);
99 { ParentType::operator=(value); }
105 { EnergyModule::setEnthalpyRate(*
this, rate); }
110 template <
class Flu
idState,
class RhsEval>
113 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
114 (*this)[conti0EqIdx + compIdx] =
115 fluidState.density(phaseIdx, compIdx) *
116 fluidState.moleFraction(phaseIdx, compIdx) *
120 EnergyModule::setEnthalpyRate(*
this, fluidState, phaseIdx, volume);
126 template <
class RhsEval>
129 for (
unsigned i = 0; i < this->size(); ++i) {
140 for (
unsigned i = 0; i < this->size(); ++i) {
141 (*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
void setMassRate(const ParentType &value)
Set a mass rate of the conservation quantities.
Definition: flashratevector.hh:84
void setMolarRate(const ParentType &value)
Set a molar rate of the conservation quantities.
Definition: flashratevector.hh:98
FlashRateVector & operator=(const FlashRateVector &other)
Assignment operator from another rate vector.
Definition: flashratevector.hh:138
Contains the classes required to consider energy as a conservation quantity in a multi-phase module...
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
FlashRateVector(const FlashRateVector &value)
Default constructor.
Definition: flashratevector.hh:77
FlashRateVector & operator=(const RhsEval &value)
Assignment operator from a scalar or a function evaluation.
Definition: flashratevector.hh:127
FlashRateVector(const Evaluation &value)
Definition: flashratevector.hh:69
void setVolumetricRate(const FluidState &fluidState, unsigned phaseIdx, const RhsEval &volume)
Set a volumetric rate of a phase.
Definition: flashratevector.hh:111
Implements a vector representing rates of conserved quantities.
Definition: flashratevector.hh:45
Provides the auxiliary methods required for consideration of the energy equation. ...
Definition: energymodule.hh:54
void setEnthalpyRate(const Evaluation &rate)
Set an enthalpy rate [J/As] where .
Definition: flashratevector.hh:104