12#ifndef DUMUX_BASE_FLUID_SYSTEM_HH
13#define DUMUX_BASE_FLUID_SYSTEM_HH
17#include <dune/common/exceptions.hh>
22namespace FluidSystems {
31template <
class ScalarType,
class Implementation>
59 template<
class I = Implementation, std::enable_if_t<!I::isTracerFlu
idSystem(),
int> = 0>
72 template<
class T = Implementation>
82 template<
class T = Implementation>
104 {
return "DefaultPhaseName"; }
112 {
return "DefaultComponentName"; }
121 template <
class Flu
idState>
125 DUNE_THROW(Dune::NotImplemented,
"density() method not implemented by the fluid system.");
134 template <
class Flu
idState>
147 template <
class Flu
idState>
151 DUNE_THROW(Dune::NotImplemented,
"molarDensity() method not implemented by the fluid system.");
165 template <
class Flu
idState>
189 template <
class Flu
idState>
194 DUNE_THROW(Dune::NotImplemented,
"fugacityCoefficient() method not implemented by the fluid system.");
214 template <
class Flu
idState>
220 return Implementation::fugacityCoefficient(fluidState, phaseIdx, compIdx);
228 template <
class Flu
idState>
232 DUNE_THROW(Dune::NotImplemented,
"viscosity() method not implemented by the fluid system.");
241 template <
class Flu
idState>
271 template <
class Flu
idState>
276 DUNE_THROW(Dune::NotImplemented,
"diffusionCoefficient() method not implemented by the fluid system.");
303 template <
class Flu
idState>
309 return Implementation::diffusionCoefficient(fluidState, phaseIdx, compIdx);
321 template <
class Flu
idState>
328 DUNE_THROW(Dune::NotImplemented,
"binaryDiffusionCoefficient() method not implemented by the fluid system.");
341 template <
class Flu
idState>
349 return Implementation::binaryDiffusionCoefficient(fluidState, phaseIdx, compIIdx, compJIdx);
358 template <
class Flu
idState>
362 DUNE_THROW(Dune::NotImplemented,
"enthalpy() method not implemented by the fluid system.");
372 template <
class Flu
idState>
377 return Implementation::enthalpy(fluidState, phaseIdx);
385 template <
class Flu
idState>
389 DUNE_THROW(Dune::NotImplemented,
"thermalConductivity() method not implemented by the fluid system.");
398 template <
class Flu
idState>
403 return Implementation::thermalConductivity(fluidState, phaseIdx);
419 template <
class Flu
idState>
423 DUNE_THROW(Dune::NotImplemented,
"heatCapacity() method not implemented by the fluid system.");
439 template <
class Flu
idState>
444 return Implementation::heatCapacity(fluidState, phaseIdx);
Fluid system base class.
Definition: fluidsystems/base.hh:33
static constexpr bool viscosityIsConstant(int phaseIdx)
Returns true if and only if a fluid phase is assumed to have a constant viscosity.
Definition: fluidsystems/base.hh:95
ScalarType Scalar
export the scalar type
Definition: fluidsystems/base.hh:36
static constexpr bool isTracerFluidSystem()
Some properties of the fluid system.
Definition: fluidsystems/base.hh:47
static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIIdx, int compJIdx)
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for c...
Definition: fluidsystems/base.hh:342
static Scalar density(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:135
static Scalar fugacityCoefficient(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIdx)
Calculate the fugacity coefficient of an individual component in a fluid phase.
Definition: fluidsystems/base.hh:215
static constexpr bool isMiscible()
Returns whether the fluids are miscible.
Definition: fluidsystems/base.hh:83
static Scalar density(const FluidState &fluidState, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:122
static Scalar heatCapacity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:440
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:386
static std::string phaseName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: fluidsystems/base.hh:103
static Scalar molarDensity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/base.hh:166
static constexpr bool isCompressible(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: fluidsystems/base.hh:73
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the fugacity coefficient of an individual component in a fluid phase.
Definition: fluidsystems/base.hh:190
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase .
Definition: fluidsystems/base.hh:272
static Scalar binaryDiffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIIdx, int compJIdx)
Given a phase's composition, temperature and pressure, return the binary diffusion coefficient for c...
Definition: fluidsystems/base.hh:322
static std::string componentName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: fluidsystems/base.hh:111
static Scalar enthalpy(const FluidState &fluidState, int phaseIdx)
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy .
Definition: fluidsystems/base.hh:359
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/base.hh:148
static constexpr int getMainComponent(int phaseIdx)
Get the main component of a given phase if possible.
Definition: fluidsystems/base.hh:60
static Scalar enthalpy(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Given a phase's composition, temperature, pressure and density, calculate its specific enthalpy .
Definition: fluidsystems/base.hh:373
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:229
static Scalar viscosity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:242
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:420
static Scalar diffusionCoefficient(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx, int compIdx)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase .
Definition: fluidsystems/base.hh:304
static Scalar thermalConductivity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:399
The a parameter cache which does nothing.
Definition: nullparametercache.hh:22
std::string viscosity(int phaseIdx) noexcept
I/O name of viscosity for multiphase systems.
Definition: name.hh:62
std::string molarDensity(int phaseIdx) noexcept
I/O name of molar density for multiphase systems.
Definition: name.hh:71
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:53
The a parameter cache which does nothing.
Template which always yields a false value.
Definition: common/typetraits/typetraits.hh:24