28#ifndef EWOMS_NCP_RATE_VECTOR_HH
29#define EWOMS_NCP_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>
52 :
public Dune::FieldVector<GetPropType<TypeTag, Properties::Evaluation>,
53 getPropValue<TypeTag, Properties::NumEq>()>
58 using ParentType = Dune::FieldVector<Evaluation, numEq>;
62 enum { conti0EqIdx = Indices::conti0EqIdx };
68 using Toolbox = MathToolbox<Evaluation>;
71 NcpRateVector() : ParentType()
72 { Valgrind::SetUndefined(*
this); }
93 ParentType molarRate(value);
94 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
95 molarRate[conti0EqIdx + compIdx] /= FluidSystem::molarMass(compIdx);
106 { ParentType::operator=(value); }
111 template <
class RhsEval>
113 { EnergyModule::setEnthalpyRate(*
this, rate); }
118 template <
class Flu
idState,
class RhsEval>
122 for (
unsigned compIdx = 0; compIdx < numComponents; ++compIdx) {
123 (*this)[conti0EqIdx + compIdx] = fluidState.molarity(phaseIdx, compIdx) * volume;
126 EnergyModule::setEnthalpyRate(*
this, fluidState, phaseIdx, volume);
127 Valgrind::CheckDefined(*
this);
133 template <
class RhsEval>
136 for (
unsigned i = 0; i < this->size(); ++i) {
147 for (
unsigned i = 0; i < this->size(); ++i) {
148 (*this)[i] = other[i];
Provides the auxiliary methods required for consideration of the energy equation.
Definition energymodule.hh:54
void setMolarRate(const ParentType &value)
Set a molar rate of the conservation quantities.
Definition ncpratevector.hh:105
NcpRateVector & operator=(const NcpRateVector &other)
Assignment operator from another rate vector.
Definition ncpratevector.hh:145
NcpRateVector(const NcpRateVector &value)=default
void setEnthalpyRate(const RhsEval &rate)
Set an enthalpy rate [J/As] where .
Definition ncpratevector.hh:112
NcpRateVector & operator=(const RhsEval &value)
Assignment operator from a scalar or a function evaluation.
Definition ncpratevector.hh:134
void setVolumetricRate(const FluidState &fluidState, unsigned phaseIdx, const RhsEval &volume)
Set a volumetric rate of a phase.
Definition ncpratevector.hh:119
void setMassRate(const ParentType &value)
Set a mass rate of the conservation quantities.
Definition ncpratevector.hh:90
NcpRateVector(const Evaluation &value)
Definition ncpratevector.hh:77
Contains the classes required to consider energy as a conservation quantity in a multi-phase module.
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