27 #ifndef OPM_BASE_FLUID_SYSTEM_HPP
28 #define OPM_BASE_FLUID_SYSTEM_HPP
32 #include <opm/common/Exceptions.hpp>
33 #include <opm/common/ErrorMacros.hpp>
34 #include <dune/common/classname.hh>
42 template <
class ScalarT,
class Implementation>
58 template <
class Evaluation>
76 OPM_THROW(std::runtime_error,
77 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a phaseName() method!");
87 OPM_THROW(std::runtime_error,
88 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a isLiquid() method!");
107 OPM_THROW(std::runtime_error,
108 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a isIdealMixture() method!");
122 OPM_THROW(std::runtime_error,
123 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a isCompressible() method!");
134 OPM_THROW(std::runtime_error,
135 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a isIdealGas() method!");
145 OPM_THROW(std::runtime_error,
146 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a componentName() method!");
156 OPM_THROW(std::runtime_error,
157 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a molarMass() method!");
172 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
177 OPM_THROW(std::runtime_error,
178 "Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a density() method!");
195 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
201 OPM_THROW(std::runtime_error,
"Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a fugacityCoefficient() method!");
210 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
215 OPM_THROW(std::runtime_error,
"Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a viscosity() method!");
235 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
241 OPM_THROW(std::runtime_error,
"Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a diffusionCoefficient() method!");
251 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
256 OPM_THROW(std::runtime_error,
"Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide an enthalpy() method!");
265 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
270 OPM_THROW(std::runtime_error,
"Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a thermalConductivity() method!");
279 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
284 OPM_THROW(std::runtime_error,
"Not implemented: The fluid system '" << Dune::className<Implementation>() <<
"' does not provide a heatCapacity() method!");
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:236
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 int numComponents
Number of chemical species in the fluid system.
Definition: BaseFluidSystem.hpp:64
static const int numPhases
Number of fluid phases in the fluid system.
Definition: BaseFluidSystem.hpp:67
static void init()
Initialize the fluid system's static parameters.
Definition: BaseFluidSystem.hpp:163
static bool isIdealGas(unsigned)
Returns true if and only if a fluid phase is assumed to be an ideal gas.
Definition: BaseFluidSystem.hpp:132
static LhsEval thermalConductivity(const FluidState &, ParamCache &, unsigned)
Thermal conductivity of a fluid phase [W/(m K)].
Definition: BaseFluidSystem.hpp:266
A parameter cache which does nothing.
The type of the fluid system's parameter cache.
Definition: BaseFluidSystem.hpp:59
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:252
static LhsEval viscosity(const FluidState &, ParamCache &, unsigned)
Calculate the dynamic viscosity of a fluid phase [Pa*s].
Definition: BaseFluidSystem.hpp:211
static LhsEval density(const FluidState &, const ParamCache &, unsigned)
Calculate the density [kg/m^3] of a fluid phase.
Definition: BaseFluidSystem.hpp:173
The base class for all fluid systems.
Definition: BaseFluidSystem.hpp:43
static Scalar molarMass(unsigned)
Return the molar mass of a component in [kg/mol].
Definition: BaseFluidSystem.hpp:154
static char * phaseName(unsigned)
Return the human readable name of a fluid phase.
Definition: BaseFluidSystem.hpp:74
ScalarT Scalar
The type used for scalar quantities.
Definition: BaseFluidSystem.hpp:49
static const char * componentName(unsigned)
Return the human readable name of a component.
Definition: BaseFluidSystem.hpp:143
static bool isLiquid(unsigned)
Return whether a phase is liquid.
Definition: BaseFluidSystem.hpp:85
static LhsEval heatCapacity(const FluidState &, ParamCache &, unsigned)
Specific isobaric heat capacity of a fluid phase [J/kg].
Definition: BaseFluidSystem.hpp:280
static LhsEval fugacityCoefficient(const FluidState &, ParamCache &, unsigned, unsigned)
Calculate the fugacity coefficient [Pa] of an individual component in a fluid phase.
Definition: BaseFluidSystem.hpp:196
static bool isCompressible(unsigned)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: BaseFluidSystem.hpp:120