27 #ifndef OPM_CO2BRINEFLUIDSYSTEM_HH
28 #define OPM_CO2BRINEFLUIDSYSTEM_HH
46 template<
class Scalar>
51 static constexpr
int numPhases=2;
52 static constexpr
int numComponents = 2;
53 static constexpr
int numMisciblePhases=2;
54 static constexpr
int numMiscibleComponents = 2;
55 static constexpr
int oilPhaseIdx = 0;
56 static constexpr
int gasPhaseIdx = 1;
58 static constexpr
int Comp0Idx = 0;
59 static constexpr
int Comp1Idx = 1;
64 template <
class ValueType>
82 default:
throw std::runtime_error(
"Illegal component index for acentricFactor");
95 default:
throw std::runtime_error(
"Illegal component index for criticalTemperature");
107 default:
throw std::runtime_error(
"Illegal component index for criticalPressure");
120 default:
throw std::runtime_error(
"Illegal component index for criticalVolume");
130 default:
throw std::runtime_error(
"Illegal component index for molarMass");
146 static const char* name[] = {
"o",
149 assert(0 <= phaseIdx && phaseIdx < 2);
150 return name[phaseIdx];
156 static const char* name[] = {
161 assert(0 <= compIdx && compIdx < 3);
162 return name[compIdx];
168 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCacheEval = LhsEval>
169 static LhsEval
density(
const FluidState& fluidState,
175 if (phaseIdx == oilPhaseIdx || phaseIdx == gasPhaseIdx) {
176 dens = fluidState.averageMolarMass(phaseIdx) / paramCache.
molarVolume(phaseIdx);
185 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCacheEval = LhsEval>
192 mu = ViscosityModel::LBC(fluidState, paramCache, phaseIdx);
200 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCacheEval = LhsEval>
206 assert(phaseIdx < numPhases);
207 assert(compIdx < numComponents);
The base class for all fluid systems.
A class for the brine fluid properties.
Material properties of pure water .
Specifies the parameter cache used by the SPE-5 fluid system.
A simplistic class representing the fluid properties.
The base class for all fluid systems.
Definition: BaseFluidSystem.hpp:44
Scalar Scalar
The type used for scalar quantities.
Definition: BaseFluidSystem.hpp:49
A class for the brine fluid properties.
Definition: Brine.hpp:46
static Scalar molarMass()
The molar mass in of the component.
Definition: Brine.hpp:80
static Scalar criticalVolume()
Returns the critical volume of water.
Definition: Brine.hpp:103
static Scalar criticalPressure()
Returns the critical pressure of water.
Definition: Brine.hpp:97
static const char * name()
A human readable name for the component.
Definition: Brine.hpp:54
static Scalar criticalTemperature()
Returns the critical temperature of water.
Definition: Brine.hpp:91
static Scalar acentricFactor()
Definition: Brine.hpp:109
A two phase two component system, co2 brine.
Definition: Co2BrineFluidSystem.hh:48
static const char * componentName(unsigned compIdx)
Return the human readable name of a component.
Definition: Co2BrineFluidSystem.hh:154
static Scalar criticalVolume(unsigned compIdx)
Critical volume of a component [m3].
Definition: Co2BrineFluidSystem.hh:115
static Scalar acentricFactor(unsigned compIdx)
The acentric factor of a component [].
Definition: Co2BrineFluidSystem.hh:77
static Scalar molarMass(unsigned compIdx)
Return the molar mass of a component in [kg/mol].
Definition: Co2BrineFluidSystem.hh:125
static LhsEval viscosity(const FluidState &fluidState, const ParameterCache< ParamCacheEval > ¶mCache, unsigned phaseIdx)
Calculate the dynamic viscosity of a fluid phase [Pa*s].
Definition: Co2BrineFluidSystem.hh:186
static Scalar criticalPressure(unsigned compIdx)
Critical pressure of a component [Pa].
Definition: Co2BrineFluidSystem.hh:103
static LhsEval density(const FluidState &fluidState, const ParameterCache< ParamCacheEval > ¶mCache, unsigned phaseIdx)
Calculate the density [kg/m^3] of a fluid phase.
Definition: Co2BrineFluidSystem.hh:169
static LhsEval fugacityCoefficient(const FluidState &fluidState, const ParameterCache< ParamCacheEval > ¶mCache, unsigned phaseIdx, unsigned compIdx)
Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
Definition: Co2BrineFluidSystem.hh:201
static const char * phaseName(unsigned phaseIdx)
Return the human readable name of a fluid phase.
Definition: Co2BrineFluidSystem.hh:144
static Scalar criticalTemperature(unsigned compIdx)
Critical temperature of a component [K].
Definition: Co2BrineFluidSystem.hh:90
static Scalar interactionCoefficient(unsigned, unsigned)
Returns the interaction coefficient for two components.
Definition: Co2BrineFluidSystem.hh:138
Specifies the parameter cache used by the SPE-5 fluid system.
Definition: PTFlashParameterCache.hpp:48
Scalar molarVolume(unsigned phaseIdx) const
Returns the molar volume of a phase [m^3/mol].
Definition: PTFlashParameterCache.hpp:199
Implements the Peng-Robinson equation of state for a mixture.
Definition: PengRobinsonMixture.hpp:41
static LhsEval computeFugacityCoefficient(const FluidState &fs, const Params ¶ms, unsigned phaseIdx, unsigned compIdx)
Returns the fugacity coefficient of an individual component in the phase.
Definition: PengRobinsonMixture.hpp:89
A simplistic class representing the fluid properties.
Definition: SimpleCO2.hpp:51
static Scalar criticalVolume()
Critical volume of [m2/kmol].
Definition: SimpleCO2.hpp:94
static const char * name()
A human readable name for the component.
Definition: SimpleCO2.hpp:58
static Scalar criticalTemperature()
Returns the critical temperature of .
Definition: SimpleCO2.hpp:70
static Scalar acentricFactor()
Acentric factor of .
Definition: SimpleCO2.hpp:88
static Scalar criticalPressure()
Returns the critical pressure of .
Definition: SimpleCO2.hpp:76
static Scalar molarMass()
The molar mass in of the component.
Definition: SimpleCO2.hpp:64