28 #ifndef EWOMS_IMMISCIBLE_RATE_VECTOR_HH 29 #define EWOMS_IMMISCIBLE_RATE_VECTOR_HH 31 #include <dune/common/fvector.hh> 33 #include <opm/material/common/Valgrind.hpp> 34 #include <opm/material/constraintsolvers/NcpFlash.hpp> 47 template <
class TypeTag>
49 :
public Dune::FieldVector<GetPropType<TypeTag, Properties::Evaluation>,
50 getPropValue<TypeTag, Properties::NumEq>()>
57 enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
58 enum { conti0EqIdx = Indices::conti0EqIdx };
59 enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
60 enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
62 using ParentType = Dune::FieldVector<Evaluation, numEq>;
70 { Opm::Valgrind::SetUndefined(*
this); }
100 { ParentType::operator=(value); }
114 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
115 ParentType::operator[](conti0EqIdx + compIdx) =
116 value[conti0EqIdx + compIdx]*FluidSystem::molarMass(compIdx);
126 template <
class RhsEval>
128 { EnergyModule::setEnthalpyRate(*
this, rate); }
145 template <
class Flu
idState,
class RhsEval>
148 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
149 (*
this)[conti0EqIdx + compIdx] =
150 fluidState.density(phaseIdx, compIdx)
151 * fluidState.massFraction(phaseIdx, compIdx)
154 EnergyModule::setEnthalpyRate(*
this, fluidState, phaseIdx, volume);
160 template <
class RhsEval>
163 for (
unsigned i=0; i < this->size(); ++i)
173 for (
unsigned i=0; i < this->size(); ++i)
174 (*
this)[i] = other[i];
Contains the quantities which are are constant within a finite volume for the immiscible multi-phase ...
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 setVolumetricRate(const FluidState &fluidState, unsigned phaseIdx, const RhsEval &volume)
Set a volumetric rate of a phase.
Definition: immiscibleratevector.hh:146
void setEnthalpyRate(const RhsEval &rate)
Set an enthalpy rate [J/As] where .
Definition: immiscibleratevector.hh:127
void setMassRate(const ParentType &value)
Set a mass rate of the conservation quantities.
Definition: immiscibleratevector.hh:99
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: blackoilbioeffectsmodules.hh:45
ImmiscibleRateVector(const ImmiscibleRateVector &value)
Copy constructor.
Definition: immiscibleratevector.hh:86
ImmiscibleRateVector & operator=(const RhsEval &value)
Assignment operator from a scalar or a function evaluation.
Definition: immiscibleratevector.hh:161
ImmiscibleRateVector(const Evaluation &value)
Constructor with assignment from scalar.
Definition: immiscibleratevector.hh:77
ImmiscibleRateVector & operator=(const ImmiscibleRateVector &other)
Assignment operator from another rate vector.
Definition: immiscibleratevector.hh:171
Implements a vector representing rates of conserved quantities.
Definition: immiscibleratevector.hh:48
void setMolarRate(const ParentType &value)
Set a molar rate of the conservation quantities.
Definition: immiscibleratevector.hh:111
Provides the auxiliary methods required for consideration of the energy equation. ...
Definition: energymodule.hh:54
ImmiscibleRateVector()
Default constructor.
Definition: immiscibleratevector.hh:69