27#ifndef OPM_BASE_FLUID_SYSTEM_HPP
28#define OPM_BASE_FLUID_SYSTEM_HPP
30#include <opm/common/utility/Demangle.hpp>
44template <
class ScalarT,
class Implementation>
60 template <
class Evaluation>
78 throw std::runtime_error(not_implemented(
"phaseName"));
88 throw std::runtime_error(not_implemented(
"isLiquid"));
107 throw std::runtime_error(not_implemented(
"isIdealMixture"));
121 throw std::runtime_error(not_implemented(
"isCompressible"));
132 throw std::runtime_error(not_implemented(
"isIdealGas"));
142 throw std::runtime_error(not_implemented(
"componentName"));
152 throw std::runtime_error(not_implemented(
"molarMass"));
162 throw std::runtime_error(not_implemented(
"acentricFactor"));
177 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
182 throw std::runtime_error(not_implemented(
"density"));
199 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
205 throw std::runtime_error(not_implemented(
"fugacityCoefficient"));
214 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
219 throw std::runtime_error(not_implemented(
"viscosity"));
239 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
245 throw std::runtime_error(not_implemented(
"diffusionCoefficient"));
255 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
260 throw std::runtime_error(not_implemented(
"enthalpy"));
269 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
274 throw std::runtime_error(not_implemented(
"thermalConductivity"));
283 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
288 throw std::runtime_error(not_implemented(
"heatCapacity"));
299 static std::string not_implemented(
const char* method)
301 return "Not implemented: The fluid system '" +
302 demangle(
typeid(Implementation).name()) +
303 "' does not provide a " + method +
"() method!";
A parameter cache which does nothing.
The base class for all fluid systems.
Definition BaseFluidSystem.hpp:46
static char * phaseName(unsigned)
Return the human readable name of a fluid phase.
Definition BaseFluidSystem.hpp:76
static LhsEval heatCapacity(const FluidState &, ParamCache &, unsigned)
Specific isobaric heat capacity of a fluid phase [J/kg].
Definition BaseFluidSystem.hpp:284
static unsigned phaseIsActive(unsigned)
Returns whether a fluid phase is active.
Definition BaseFluidSystem.hpp:293
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:256
static const int numPhases
Number of fluid phases in the fluid system.
Definition BaseFluidSystem.hpp:69
static bool isIdealGas(unsigned)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition BaseFluidSystem.hpp:130
static bool isCompressible(unsigned)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition BaseFluidSystem.hpp:119
static Scalar molarMass(unsigned)
Return the molar mass of a component in [kg/mol].
Definition BaseFluidSystem.hpp:150
static bool isIdealMixture(unsigned)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition BaseFluidSystem.hpp:105
static const char * componentName(unsigned)
Return the human readable name of a component.
Definition BaseFluidSystem.hpp:140
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:240
static bool isLiquid(unsigned)
Return whether a phase is liquid.
Definition BaseFluidSystem.hpp:86
static void init()
Initialize the fluid system's static parameters.
Definition BaseFluidSystem.hpp:168
ScalarT Scalar
The type used for scalar quantities.
Definition BaseFluidSystem.hpp:51
static const int numComponents
Number of chemical species in the fluid system.
Definition BaseFluidSystem.hpp:66
static LhsEval density(const FluidState &, const ParamCache &, unsigned)
Calculate the density [kg/m^3] of a fluid phase.
Definition BaseFluidSystem.hpp:178
static Scalar acentricFactor(unsigned)
Return the acetntric factor of a component.
Definition BaseFluidSystem.hpp:160
static LhsEval fugacityCoefficient(const FluidState &, ParamCache &, unsigned, unsigned)
Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
Definition BaseFluidSystem.hpp:200
static LhsEval viscosity(const FluidState &, ParamCache &, unsigned)
Calculate the dynamic viscosity of a fluid phase [Pa*s].
Definition BaseFluidSystem.hpp:215
static LhsEval thermalConductivity(const FluidState &, ParamCache &, unsigned)
Thermal conductivity of a fluid phase [W/(m K)].
Definition BaseFluidSystem.hpp:270
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
std::string demangle(const char *mangled_symbol)
Returns demangled name of symbol.
The type of the fluid system's parameter cache.
Definition BaseFluidSystem.hpp:61