28 #ifndef EWOMS_FLASH_PRIMARY_VARIABLES_HH 29 #define EWOMS_FLASH_PRIMARY_VARIABLES_HH 31 #include <opm/material/common/MathToolbox.hpp> 32 #include <opm/material/common/Valgrind.hpp> 50 template <
class TypeTag>
62 enum { cTot0Idx = Indices::cTot0Idx };
64 enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
65 enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
67 using Toolbox = MathToolbox<Evaluation>;
73 { Valgrind::SetDefined(*
this); }
86 using ParentType::operator=;
91 template <
class Flu
idState>
93 const MaterialLawParams&,
105 template <
class Flu
idState>
113 EnergyModule::setPriVarTemperatures(*
this, fluidState);
116 for (
unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
117 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
118 (*this)[cTot0Idx + compIdx] +=
119 fluidState.molarity(phaseIdx, compIdx) * fluidState.saturation(phaseIdx);
129 void print(std::ostream& os = std::cout)
const 131 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
132 os <<
"(c_tot," << FluidSystem::componentName(compIdx) <<
" = " 133 << (*this)[cTot0Idx + compIdx];
135 os <<
")" << std::flush;
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
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
void print(std::ostream &os=std::cout) const
Prints the names of the primary variables and their values.
Definition: flashprimaryvariables.hh:129
Represents the primary variables used by the a model.
Definition: fvbaseprimaryvariables.hh:51
Represents the primary variables used by the compositional flow model based on flash calculations...
Definition: flashprimaryvariables.hh:51
Represents the primary variables used by the a model.
Provides the auxiliary methods required for consideration of the energy equation. ...
Definition: energymodule.hh:54
void assignNaive(const FluidState &fluidState)
Directly retrieve the primary variables from an arbitrary fluid state.
Definition: flashprimaryvariables.hh:106
void assignMassConservative(const FluidState &fluidState, const MaterialLawParams &, bool=false)
< Import base class assignment operators.
Definition: flashprimaryvariables.hh:92