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!");
160 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a acentricFactor() method!");
175 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
180 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a density() method!");
197 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
203 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a fugacityCoefficient() method!");
212 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
217 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a viscosity() method!");
237 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
243 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a diffusionCoefficient() method!");
253 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
258 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide an enthalpy() method!");
267 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
272 throw std::runtime_error(
"Not implemented: The fluid system '"+Dune::className<Implementation>()+
"' does not provide a thermalConductivity() method!");
281 template <
class Flu
idState,
class LhsEval =
typename Flu
idState::Scalar,
class ParamCache>
286 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:282
static unsigned phaseIsActive(unsigned)
Returns whether a fluid phase is active.
Definition: BaseFluidSystem.hpp:291
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:254
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:238
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:166
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:176
static const char * componentName(unsigned)
Return the human readable name of a component.
Definition: BaseFluidSystem.hpp:138
static Scalar acentricFactor(unsigned)
Return the acetntric factor of a component.
Definition: BaseFluidSystem.hpp:158
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:198
static LhsEval viscosity(const FluidState &, ParamCache &, unsigned)
Calculate the dynamic viscosity of a fluid phase [Pa*s].
Definition: BaseFluidSystem.hpp:213
static LhsEval thermalConductivity(const FluidState &, ParamCache &, unsigned)
Thermal conductivity of a fluid phase [W/(m K)].
Definition: BaseFluidSystem.hpp:268
The type of the fluid system's parameter cache.
Definition: BaseFluidSystem.hpp:59