27 #ifndef OPM_BASE_FLUID_SYSTEM_HPP
28 #define OPM_BASE_FLUID_SYSTEM_HPP
34 #include <dune/common/classname.hh>
42 template <
class ScalarT,
class Implementation>
58 template <
class Evaluation>
76 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a phaseName() method!");
86 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a isLiquid() method!");
105 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a isIdealMixture() method!");
119 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a isCompressible() method!");
130 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a isIdealGas() method!");
140 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a componentName() method!");
150 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a molarMass() method!");
165 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
170 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a density() method!");
187 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
193 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a fugacityCoefficient() method!");
202 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
207 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a viscosity() method!");
227 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
233 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a diffusionCoefficient() method!");
243 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
248 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide an enthalpy() method!");
257 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
262 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a thermalConductivity() method!");
271 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
276 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a heatCapacity() method!");
A parameter cache which does nothing.
The base class for all fluid systems.
Definition: BaseFluidSystem.hpp:44
static LhsEval heatCapacity(const FluidState &, ParamCache &, unsigned)
Specific isobaric heat capacity of a fluid phase [J/kg].
Definition: BaseFluidSystem.hpp:272
static unsigned phaseIsActive(unsigned)
Returns whether a fluid phase is active.
Definition: BaseFluidSystem.hpp:281
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:244
static const int numPhases
Number of fluid phases in the fluid system.
Definition: BaseFluidSystem.hpp:67
static bool isIdealGas(unsigned)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition: BaseFluidSystem.hpp:128
static bool isCompressible(unsigned)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: BaseFluidSystem.hpp:117
static Scalar molarMass(unsigned)
Return the molar mass of a component in [kg/mol].
Definition: BaseFluidSystem.hpp:148
static bool isIdealMixture(unsigned)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition: BaseFluidSystem.hpp:103
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:228
static bool isLiquid(unsigned)
Return whether a phase is liquid.
Definition: BaseFluidSystem.hpp:84
static void init()
Initialize the fluid system's static parameters.
Definition: BaseFluidSystem.hpp:156
ScalarT Scalar
The type used for scalar quantities.
Definition: BaseFluidSystem.hpp:49
static const int numComponents
Number of chemical species in the fluid system.
Definition: BaseFluidSystem.hpp:64
static LhsEval density(const FluidState &, const ParamCache &, unsigned)
Calculate the density [kg/m^3] of a fluid phase.
Definition: BaseFluidSystem.hpp:166
static const char * componentName(unsigned)
Return the human readable name of a component.
Definition: BaseFluidSystem.hpp:138
static char * phaseName(unsigned)
Return the human readable name of a fluid phase.
Definition: BaseFluidSystem.hpp:74
static LhsEval fugacityCoefficient(const FluidState &, ParamCache &, unsigned, unsigned)
Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
Definition: BaseFluidSystem.hpp:188
static LhsEval viscosity(const FluidState &, ParamCache &, unsigned)
Calculate the dynamic viscosity of a fluid phase [Pa*s].
Definition: BaseFluidSystem.hpp:203
static LhsEval thermalConductivity(const FluidState &, ParamCache &, unsigned)
Thermal conductivity of a fluid phase [W/(m K)].
Definition: BaseFluidSystem.hpp:258
The type of the fluid system's parameter cache.
Definition: BaseFluidSystem.hpp:59