12#ifndef DUMUX_BASE_FLUID_SYSTEM_HH
13#define DUMUX_BASE_FLUID_SYSTEM_HH
17#include <dune/common/exceptions.hh>
30template <
class ScalarType,
class Implementation>
58 template<
class I = Implementation, std::enable_if_t<!I::isTracerFlu
idSystem(),
int> = 0>
71 template<
class T = Implementation>
81 template<
class T = Implementation>
103 {
return "DefaultPhaseName"; }
111 {
return "DefaultComponentName"; }
120 template <
class Flu
idState>
124 DUNE_THROW(Dune::NotImplemented,
"density() method not implemented by the fluid system.");
133 template <
class Flu
idState>
146 template <
class Flu
idState>
150 DUNE_THROW(Dune::NotImplemented,
"molarDensity() method not implemented by the fluid system.");
164 template <
class Flu
idState>
188 template <
class Flu
idState>
193 DUNE_THROW(Dune::NotImplemented,
"fugacityCoefficient() method not implemented by the fluid system.");
213 template <
class Flu
idState>
219 return Implementation::fugacityCoefficient(fluidState, phaseIdx, compIdx);
227 template <
class Flu
idState>
231 DUNE_THROW(Dune::NotImplemented,
"viscosity() method not implemented by the fluid system.");
240 template <
class Flu
idState>
270 template <
class Flu
idState>
275 DUNE_THROW(Dune::NotImplemented,
"diffusionCoefficient() method not implemented by the fluid system.");
302 template <
class Flu
idState>
308 return Implementation::diffusionCoefficient(fluidState, phaseIdx, compIdx);
320 template <
class Flu
idState>
327 DUNE_THROW(Dune::NotImplemented,
"binaryDiffusionCoefficient() method not implemented by the fluid system.");
340 template <
class Flu
idState>
348 return Implementation::binaryDiffusionCoefficient(fluidState, phaseIdx, compIIdx, compJIdx);
357 template <
class Flu
idState>
361 DUNE_THROW(Dune::NotImplemented,
"enthalpy() method not implemented by the fluid system.");
371 template <
class Flu
idState>
376 return Implementation::enthalpy(fluidState, phaseIdx);
384 template <
class Flu
idState>
388 DUNE_THROW(Dune::NotImplemented,
"thermalConductivity() method not implemented by the fluid system.");
397 template <
class Flu
idState>
402 return Implementation::thermalConductivity(fluidState, phaseIdx);
418 template <
class Flu
idState>
422 DUNE_THROW(Dune::NotImplemented,
"heatCapacity() method not implemented by the fluid system.");
438 template <
class Flu
idState>
443 return Implementation::heatCapacity(fluidState, phaseIdx);
Fluid system base class.
Definition: fluidsystems/base.hh:32
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:94
ScalarType Scalar
export the scalar type
Definition: fluidsystems/base.hh:35
static constexpr bool isTracerFluidSystem()
Some properties of the fluid system.
Definition: fluidsystems/base.hh:46
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:341
static Scalar density(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:134
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:214
static constexpr bool isMiscible()
Returns whether the fluids are miscible.
Definition: fluidsystems/base.hh:82
static Scalar density(const FluidState &fluidState, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:121
static Scalar heatCapacity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:439
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:385
static std::string phaseName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: fluidsystems/base.hh:102
static Scalar molarDensity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/base.hh:165
static constexpr bool isCompressible(int phaseIdx)
Returns true if and only if a fluid phase is assumed to be compressible.
Definition: fluidsystems/base.hh:72
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:189
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:271
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:321
static std::string componentName(int phaseIdx)
Return the human readable name of a fluid phase.
Definition: fluidsystems/base.hh:110
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:358
static Scalar molarDensity(const FluidState &fluidState, int phaseIdx)
Calculate the molar density of a fluid phase.
Definition: fluidsystems/base.hh:147
static constexpr int getMainComponent(int phaseIdx)
Get the main component of a given phase if possible.
Definition: fluidsystems/base.hh:59
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:372
static Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:228
static Scalar viscosity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:241
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:419
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:303
static Scalar thermalConductivity(const FluidState &fluidState, const ParameterCache ¶mCache, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:398
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