28#ifndef EWOMS_NCP_PRIMARY_VARIABLES_HH
29#define EWOMS_NCP_PRIMARY_VARIABLES_HH
36#include <opm/material/constraintsolvers/NcpFlash.hpp>
37#include <opm/material/fluidstates/CompositionalFluidState.hpp>
38#include <opm/material/densead/Math.hpp>
40#include <dune/common/fvector.hh>
53template <
class TypeTag>
65 enum { pressure0Idx = Indices::pressure0Idx };
66 enum { saturation0Idx = Indices::saturation0Idx };
67 enum { fugacity0Idx = Indices::fugacity0Idx };
71 using ComponentVector = Dune::FieldVector<Scalar, numComponents>;
99 template <
class Flu
idState>
109 assert(fluidState.temperature(0) == fluidState.temperature(
phaseIdx));
156 template <
class Flu
idState>
163 EnergyModule::setPriVarTemperatures(*
this, fluidState);
177 (*this)[fugacity0Idx +
compIdx] =
182 (*this)[pressure0Idx] = FsToolbox::value(fluidState.pressure(0));
186 (*
this)[saturation0Idx +
phaseIdx] = FsToolbox::value(fluidState.saturation(
phaseIdx));
Provides the auxiliary methods required for consideration of the energy equation.
Definition energymodule.hh:50
Represents the primary variables used by the a model.
Definition fvbaseprimaryvariables.hh:52
Represents the primary variables used by the compositional multi-phase NCP model.
Definition ncpprimaryvariables.hh:55
void assignNaive(const FluidState &fluidState, unsigned refPhaseIdx=0)
Directly retrieve the primary variables from an arbitrary fluid state.
Definition ncpprimaryvariables.hh:157
NcpPrimaryVariables(Scalar value)
Constructor with assignment from scalar.
Definition ncpprimaryvariables.hh:86
void assignMassConservative(const FluidState &fluidState, const MaterialLawParams &matParams, bool isInEquilibrium=false)
Set the primary variables from an arbitrary fluid state in a mass conservative way.
Definition ncpprimaryvariables.hh:100
NcpPrimaryVariables(const NcpPrimaryVariables &value)=default
Contains the classes required to consider energy as a conservation quantity in a multi-phase module.
Represents the primary variables used by the a model.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
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:235
Declares the properties required for the NCP compositional multi-phase model.