27 #ifndef OPM_CO2BRINEFLUIDSYSTEM_HH 28 #define OPM_CO2BRINEFLUIDSYSTEM_HH 38 #include <string_view> 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
bool waterEnabled =
false;
57 static constexpr
int oilPhaseIdx = 0;
58 static constexpr
int gasPhaseIdx = 1;
59 static constexpr
int waterPhaseIdx = -1;
61 static constexpr
int Comp0Idx = 0;
62 static constexpr
int Comp1Idx = 1;
67 template <
class ValueType>
84 default:
throw std::runtime_error(
"Illegal component index for acentricFactor");
97 default:
throw std::runtime_error(
"Illegal component index for criticalTemperature");
109 default:
throw std::runtime_error(
"Illegal component index for criticalPressure");
122 default:
throw std::runtime_error(
"Illegal component index for criticalVolume");
132 default:
throw std::runtime_error(
"Illegal component index for molarMass");
148 static const std::string_view name[] = {
"o",
151 assert(phaseIdx < 2);
152 return name[phaseIdx];
158 static const std::string_view name[] = {
164 return name[compIdx];
170 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::ValueType,
class ParamCacheEval = LhsEval>
171 static LhsEval
density(
const FluidState& fluidState,
177 if (phaseIdx == oilPhaseIdx || phaseIdx == gasPhaseIdx) {
178 dens = fluidState.averageMolarMass(phaseIdx) / paramCache.
molarVolume(phaseIdx);
187 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::ValueType,
class ParamCacheEval = LhsEval>
194 mu = ViscosityModel::LBC(fluidState, paramCache, phaseIdx);
202 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::ValueType,
class ParamCacheEval = LhsEval>
208 assert(phaseIdx < numPhases);
209 assert(compIdx < numComponents);
211 LhsEval phi = CubicEOS::computeFugacityCoefficient(fluidState, paramCache, phaseIdx, compIdx);
218 #endif //OPM_CO2BRINEFLUIDSYSTEM_HH
A simplistic class representing the fluid properties.
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:171
Specifies the parameter cache used by the SPE-5 fluid system.
Definition: PTFlashParameterCache.hpp:49
A class for the brine fluid properties.
static Scalar molarMass()
The molar mass in of the component.
Definition: Brine.hpp:82
static Scalar acentricFactor()
Acentric factor of .
Definition: SimpleCO2.hpp:87
static Scalar criticalVolume(unsigned compIdx)
Critical volume of a component [m3].
Definition: Co2BrineFluidSystem.hh:117
static std::string_view name()
A human readable name for the component.
Definition: SimpleCO2.hpp:57
static Scalar criticalPressure()
Returns the critical pressure of .
Definition: SimpleCO2.hpp:75
static Scalar interactionCoefficient(unsigned, unsigned)
Returns the interaction coefficient for two components.
Definition: Co2BrineFluidSystem.hh:140
A class for the brine fluid properties.
Definition: Brine.hpp:47
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Scalar molarVolume(unsigned phaseIdx) const
Returns the molar volume of a phase [m^3/mol].
Definition: PTFlashParameterCache.hpp:283
static std::string_view componentName(unsigned compIdx)
Return the human readable name of a component.
Definition: Co2BrineFluidSystem.hh:156
Definition: CubicEOS.hpp:33
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:188
Material properties of pure water .
static Scalar criticalTemperature()
Returns the critical temperature of .
Definition: SimpleCO2.hpp:69
static std::string_view name()
A human readable name for the component.
Definition: Brine.hpp:56
static Scalar molarMass()
The molar mass in of the component.
Definition: SimpleCO2.hpp:63
static Scalar criticalTemperature(unsigned compIdx)
Critical temperature of a component [K].
Definition: Co2BrineFluidSystem.hh:92
The base class for all fluid systems.
Definition: BaseFluidSystem.hpp:42
static Scalar acentricFactor(unsigned compIdx)
The acentric factor of a component [].
Definition: Co2BrineFluidSystem.hh:79
static Scalar criticalPressure()
Returns the critical pressure of water.
Definition: Brine.hpp:99
A two phase two component system with components co2 brine.
Definition: Co2BrineFluidSystem.hh:48
static Scalar criticalVolume()
Critical volume of [m2/kmol].
Definition: SimpleCO2.hpp:93
static std::string_view phaseName(unsigned phaseIdx)
Return the human readable name of a fluid phase.
Definition: Co2BrineFluidSystem.hh:146
static Scalar acentricFactor()
Definition: Brine.hpp:111
static Scalar criticalVolume()
Returns the critical volume of water.
Definition: Brine.hpp:105
Scalar Scalar
The type used for scalar quantities.
Definition: BaseFluidSystem.hpp:48
A simplistic class representing the fluid properties.
Definition: SimpleCO2.hpp:49
Specifies the parameter cache used by the SPE-5 fluid system.
static Scalar criticalTemperature()
Returns the critical temperature of water.
Definition: Brine.hpp:93
static Scalar criticalPressure(unsigned compIdx)
Critical pressure of a component [Pa].
Definition: Co2BrineFluidSystem.hh:105
static Scalar molarMass(unsigned compIdx)
Return the molar mass of a component in [kg/mol].
Definition: Co2BrineFluidSystem.hh:127
The base class for all fluid systems.
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:203