27#ifndef OPM_CO2BRINEFLUIDSYSTEM_HH
28#define OPM_CO2BRINEFLUIDSYSTEM_HH
47 template<
class Scalar>
52 static constexpr int numPhases=2;
53 static constexpr int numComponents = 2;
54 static constexpr int numMisciblePhases=2;
55 static constexpr int numMiscibleComponents = 2;
56 static constexpr int oilPhaseIdx = 0;
57 static constexpr int gasPhaseIdx = 1;
59 static constexpr int Comp0Idx = 0;
60 static constexpr int Comp1Idx = 1;
65 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 std::string_view name[] = {
"o",
149 assert(0 <= phaseIdx && phaseIdx < 2);
150 return name[phaseIdx];
156 static const std::string_view 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:47
Scalar Scalar
The type used for scalar quantities.
Definition BaseFluidSystem.hpp:52
A class for the brine fluid properties.
Definition Brine.hpp:48
static Scalar molarMass()
The molar mass in of the component.
Definition Brine.hpp:82
static Scalar criticalVolume()
Returns the critical volume of water.
Definition Brine.hpp:105
static Scalar criticalPressure()
Returns the critical pressure of water.
Definition Brine.hpp:99
static std::string_view name()
A human readable name for the component.
Definition Brine.hpp:56
static Scalar criticalTemperature()
Returns the critical temperature of water.
Definition Brine.hpp:93
static Scalar acentricFactor()
Definition Brine.hpp:111
A two phase two component system with components co2 brine.
Definition Co2BrineFluidSystem.hh:49
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 std::string_view componentName(unsigned compIdx)
Return the human readable name of a component.
Definition Co2BrineFluidSystem.hh:154
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 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
static std::string_view phaseName(unsigned phaseIdx)
Return the human readable name of a fluid phase.
Definition Co2BrineFluidSystem.hh:144
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:74
A simplistic class representing the fluid properties.
Definition SimpleCO2.hpp:50
static Scalar criticalVolume()
Critical volume of [m2/kmol].
Definition SimpleCO2.hpp:93
static Scalar criticalTemperature()
Returns the critical temperature of .
Definition SimpleCO2.hpp:69
static Scalar acentricFactor()
Acentric factor of .
Definition SimpleCO2.hpp:87
static Scalar criticalPressure()
Returns the critical pressure of .
Definition SimpleCO2.hpp:75
static std::string_view name()
A human readable name for the component.
Definition SimpleCO2.hpp:57
static Scalar molarMass()
The molar mass in of the component.
Definition SimpleCO2.hpp:63
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30