24#ifndef DUMUX_BASE_FLUID_SYSTEM_HH
25#define DUMUX_BASE_FLUID_SYSTEM_HH
29#include <dune/common/exceptions.hh>
34namespace FluidSystems {
43template <
class ScalarType,
class Implementation>
71 template<
class I = Implementation, std::enable_if_t<!I::isTracerFlu
idSystem(),
int> = 0>
84 template<
class T = Implementation>
94 template<
class T = Implementation>
116 {
return "DefaultPhaseName"; }
124 {
return "DefaultComponentName"; }
133 template <
class Flu
idState>
137 DUNE_THROW(Dune::NotImplemented,
"density() method not implemented by the fluid system.");
146 template <
class Flu
idState>
159 template <
class Flu
idState>
163 DUNE_THROW(Dune::NotImplemented,
"molarDensity() method not implemented by the fluid system.");
172 template <
class Flu
idState>
196 template <
class Flu
idState>
201 DUNE_THROW(Dune::NotImplemented,
"fugacityCoefficient() method not implemented by the fluid system.");
221 template <
class Flu
idState>
227 return Implementation::fugacityCoefficient(fluidState, phaseIdx, compIdx);
235 template <
class Flu
idState>
239 DUNE_THROW(Dune::NotImplemented,
"viscosity() method not implemented by the fluid system.");
248 template <
class Flu
idState>
277 template <
class Flu
idState>
282 DUNE_THROW(Dune::NotImplemented,
"diffusionCoefficient() method not implemented by the fluid system.");
307 template <
class Flu
idState>
313 return Implementation::diffusionCoefficient(fluidState, phaseIdx, compIdx);
325 template <
class Flu
idState>
332 DUNE_THROW(Dune::NotImplemented,
"binaryDiffusionCoefficient() method not implemented by the fluid system.");
345 template <
class Flu
idState>
353 return Implementation::binaryDiffusionCoefficient(fluidState, phaseIdx, compIIdx, compJIdx);
362 template <
class Flu
idState>
366 DUNE_THROW(Dune::NotImplemented,
"enthalpy() method not implemented by the fluid system.");
376 template <
class Flu
idState>
381 return Implementation::enthalpy(fluidState, phaseIdx);
389 template <
class Flu
idState>
393 DUNE_THROW(Dune::NotImplemented,
"thermalConductivity() method not implemented by the fluid system.");
402 template <
class Flu
idState>
407 return Implementation::thermalConductivity(fluidState, phaseIdx);
423 template <
class Flu
idState>
427 DUNE_THROW(Dune::NotImplemented,
"heatCapacity() method not implemented by the fluid system.");
444 template <
class Flu
idState>
449 return Implementation::heatCapacity(fluidState, phaseIdx);
The a parameter cache which does nothing.
std::string viscosity(int phaseIdx) noexcept
I/O name of viscosity for multiphase systems.
Definition: name.hh:74
std::string molarDensity(int phaseIdx) noexcept
I/O name of molar density for multiphase systems.
Definition: name.hh:83
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
Template which always yields a false value.
Definition: typetraits.hh:36
Fluid system base class.
Definition: fluidsystems/base.hh:45
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:107
ScalarType Scalar
export the scalar type
Definition: fluidsystems/base.hh:48
static constexpr bool isTracerFluidSystem()
Some properties of the fluid system.
Definition: fluidsystems/base.hh:59
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:346
static Scalar density(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:147
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:222
static constexpr bool isMiscible()
Returns whether the fluids are miscible.
Definition: fluidsystems/base.hh:95
static Scalar density(const FluidState &fluidState, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:134
static Scalar heatCapacity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:445
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:390
static std::string phaseName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: fluidsystems/base.hh:115
static Scalar molarDensity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/base.hh:173
static constexpr bool isCompressible(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: fluidsystems/base.hh:85
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:197
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:278
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:326
static std::string componentName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: fluidsystems/base.hh:123
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:363
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/base.hh:160
static constexpr int getMainComponent(int phaseIdx)
Get the main component of a given phase if possible.
Definition: fluidsystems/base.hh:72
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:377
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:236
static Scalar viscosity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:249
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:424
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:308
static Scalar thermalConductivity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:403
The a parameter cache which does nothing.
Definition: nullparametercache.hh:34