27#ifndef OPM_BASE_FLUID_SYSTEM_HPP
28#define OPM_BASE_FLUID_SYSTEM_HPP
30#include <opm/common/utility/DemangledType.hpp>
41template <
class ScalarT,
class Implementation>
57 template <
class Evaluation>
75 throw std::runtime_error(not_implemented(
"phaseName"));
85 throw std::runtime_error(not_implemented(
"isLiquid"));
104 throw std::runtime_error(not_implemented(
"isIdealMixture"));
118 throw std::runtime_error(not_implemented(
"isCompressible"));
129 throw std::runtime_error(not_implemented(
"isIdealGas"));
139 throw std::runtime_error(not_implemented(
"componentName"));
149 throw std::runtime_error(not_implemented(
"molarMass"));
159 throw std::runtime_error(not_implemented(
"acentricFactor"));
174 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
179 throw std::runtime_error(not_implemented(
"density"));
196 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
202 throw std::runtime_error(not_implemented(
"fugacityCoefficient"));
211 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
216 throw std::runtime_error(not_implemented(
"viscosity"));
236 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
242 throw std::runtime_error(not_implemented(
"diffusionCoefficient"));
252 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
257 throw std::runtime_error(not_implemented(
"enthalpy"));
266 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
271 throw std::runtime_error(not_implemented(
"thermalConductivity"));
280 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
285 throw std::runtime_error(not_implemented(
"heatCapacity"));
296 static std::string not_implemented(
const std::string_view method)
298 return "Not implemented: The fluid system '" +
299 getDemangledType<Implementation>() +
300 "' does not provide a " + method.data() +
"() method!";
The base class for all fluid systems.
Definition BaseFluidSystem.hpp:43
static bool phaseIsActive(unsigned)
Returns whether a fluid phase is active.
Definition BaseFluidSystem.hpp:290
static LhsEval heatCapacity(const FluidState &, ParamCache &, unsigned)
Specific isobaric heat capacity of a fluid phase [J/kg].
Definition BaseFluidSystem.hpp:281
static std::string_view phaseName(unsigned)
Return the human readable name of a fluid phase.
Definition BaseFluidSystem.hpp:73
static LhsEval enthalpy(const FluidState &, ParamCache &, unsigned)
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy [J/kg...
Definition BaseFluidSystem.hpp:253
static const int numPhases
Number of fluid phases in the fluid system.
Definition BaseFluidSystem.hpp:66
static bool isIdealGas(unsigned)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition BaseFluidSystem.hpp:127
static bool isCompressible(unsigned)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition BaseFluidSystem.hpp:116
static Scalar molarMass(unsigned)
Return the molar mass of a component in [kg/mol].
Definition BaseFluidSystem.hpp:147
static bool isIdealMixture(unsigned)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition BaseFluidSystem.hpp:102
static LhsEval diffusionCoefficient(const FluidState &, ParamCache &, unsigned, unsigned)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase [mol^2 * s / (k...
Definition BaseFluidSystem.hpp:237
static bool isLiquid(unsigned)
Return whether a phase is liquid.
Definition BaseFluidSystem.hpp:83
static void init()
Initialize the fluid system's static parameters.
Definition BaseFluidSystem.hpp:165
ScalarT Scalar
The type used for scalar quantities.
Definition BaseFluidSystem.hpp:48
static const int numComponents
Number of chemical species in the fluid system.
Definition BaseFluidSystem.hpp:63
static LhsEval density(const FluidState &, const ParamCache &, unsigned)
Calculate the density [kg/m^3] of a fluid phase.
Definition BaseFluidSystem.hpp:175
static Scalar acentricFactor(unsigned)
Return the acetntric factor of a component.
Definition BaseFluidSystem.hpp:157
static LhsEval fugacityCoefficient(const FluidState &, ParamCache &, unsigned, unsigned)
Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
Definition BaseFluidSystem.hpp:197
static LhsEval viscosity(const FluidState &, ParamCache &, unsigned)
Calculate the dynamic viscosity of a fluid phase [Pa*s].
Definition BaseFluidSystem.hpp:212
static std::string_view componentName(unsigned)
Return the human readable name of a component.
Definition BaseFluidSystem.hpp:137
static LhsEval thermalConductivity(const FluidState &, ParamCache &, unsigned)
Thermal conductivity of a fluid phase [W/(m K)].
Definition BaseFluidSystem.hpp:267
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
The type of the fluid system's parameter cache.
Definition BaseFluidSystem.hpp:58