28 #ifndef EWOMS_PVS_RATE_VECTOR_HH
29 #define EWOMS_PVS_RATE_VECTOR_HH
34 #include <opm/material/constraintsolvers/NcpFlash.hpp>
35 #include <opm/common/Valgrind.hpp>
37 #include <dune/common/fvector.hh>
49 template <
class TypeTag>
51 :
public Dune::FieldVector<typename GET_PROP_TYPE(TypeTag, Evaluation),
52 GET_PROP_VALUE(TypeTag, NumEq)>
54 typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
55 typedef typename GET_PROP_TYPE(TypeTag, Evaluation) Evaluation;
56 typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
57 typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
59 enum { conti0EqIdx = Indices::conti0EqIdx };
64 typedef Dune::FieldVector<Evaluation, numEq> ParentType;
69 { Opm::Valgrind::SetUndefined(*
this); }
90 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
91 (*this)[conti0EqIdx + compIdx] = value[conti0EqIdx + compIdx];
92 (*this)[conti0EqIdx + compIdx] /= FluidSystem::molarMass(compIdx);
100 { ParentType::operator=(value); }
105 template <
class RhsEval>
107 { EnergyModule::setEnthalpyRate(*
this, rate); }
112 template <
class Flu
idState,
class RhsEval>
115 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
116 (*
this)[conti0EqIdx + compIdx] =
117 fluidState.density(phaseIdx, compIdx)
118 * fluidState.moleFraction(phaseIdx, compIdx)
121 EnergyModule::setEnthalpyRate(*
this, fluidState, phaseIdx, volume);
127 template <
class RhsEval>
130 for (
unsigned i=0; i < this->size(); ++i)
140 for (
unsigned i=0; i < this->size(); ++i)
141 (*
this)[i] = other[i];
Provides the auxiliary methods required for consideration of the energy equation. ...
Definition: energymodule.hh:59
#define GET_PROP_VALUE(TypeTag, PropTagName)
Access the value attribute of a property for a type tag.
Definition: propertysystem.hh:469
Implements a vector representing molar, mass or volumetric rates.
Definition: pvsratevector.hh:50
Contains the classes required to consider energy as a conservation quantity in a multi-phase module...
void setVolumetricRate(const FluidState &fluidState, unsigned phaseIdx, const RhsEval &volume)
Set a volumetric rate of a phase.
Definition: pvsratevector.hh:113
The indices for the compositional multi-phase primary variable switching model.
PvsRateVector(const Evaluation &value)
Definition: pvsratevector.hh:74
void setMassRate(const ParentType &value)
Set a mass rate of the conservation quantities.
Definition: pvsratevector.hh:87
void setMolarRate(const ParentType &value)
Set a molar rate of the conservation quantities.
Definition: pvsratevector.hh:99
PvsRateVector & operator=(const PvsRateVector &other)
Assignment operator from another rate vector.
Definition: pvsratevector.hh:138
PvsRateVector(const PvsRateVector &value)
Copy constructor.
Definition: pvsratevector.hh:81
void setEnthalpyRate(const RhsEval &rate)
Set an enthalpy rate [J/As] where .
Definition: pvsratevector.hh:106
PvsRateVector & operator=(const RhsEval &value)
Assignment operator from a scalar or a function evaluation.
Definition: pvsratevector.hh:128