24#ifndef DUMUX_LIQUID_PHASE_HH
25#define DUMUX_LIQUID_PHASE_HH
30#include <dune/common/exceptions.hh>
37namespace FluidSystems {
43template <
class Scalar,
class ComponentT>
45:
public Base<Scalar, OnePLiquid<Scalar, ComponentT> >
85 {
return Component::name(); }
91 {
return Component::name(); }
102 static constexpr bool isGas(
int phaseIdx = 0)
126 {
return Component::liquidIsCompressible(); }
132 {
return Component::liquidViscosityIsConstant(); }
144 {
return Component::molarMass(); }
150 {
return Component::criticalTemperature(); }
156 {
return Component::criticalPressure(); }
162 {
return Component::tripleTemperature(); }
168 {
return Component::triplePressure(); }
175 {
return Component::vaporPressure(T); }
187 template <
class Flu
idState>
191 return density(fluidState.temperature(phaseIdx),
192 fluidState.pressure(phaseIdx));
205 template <
class Flu
idState>
209 fluidState.pressure(phaseIdx));
234 template <
class Flu
idState>
238 return enthalpy(fluidState.temperature(phaseIdx),
239 fluidState.pressure(phaseIdx));
258 template <
class Flu
idState>
262 return viscosity(fluidState.temperature(phaseIdx),
263 fluidState.pressure(phaseIdx));
274 template <
class Flu
idState>
279 assert(0 <= phaseIdx && phaseIdx <
numPhases);
282 if (phaseIdx == compIdx)
288 return std::numeric_limits<Scalar>::infinity();
299 template <
class Flu
idState>
304 DUNE_THROW(Dune::InvalidStateException,
"Not applicable: Diffusion coefficients");
316 template <
class Flu
idState>
322 DUNE_THROW(Dune::InvalidStateException,
"Not applicable: Binary diffusion coefficients");
335 template <
class Flu
idState>
340 fluidState.pressure(phaseIdx));
353 template <
class Flu
idState>
358 fluidState.pressure(phaseIdx));
A collection of input/output field names for common physical quantities.
Component traits, i.e. information extracted from components.
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
std::string temperature() noexcept
I/O name of temperature for equilibrium models.
Definition: name.hh:51
std::string liquidPhase() noexcept
I/O name of liquid phase.
Definition: name.hh:119
Component traits, i.e. information extracted from components.
Definition: componenttraits.hh:43
A liquid phase consisting of a single component.
Definition: 1pliquid.hh:46
static constexpr int numComponents
Number of components in the fluid system.
Definition: 1pliquid.hh:57
static constexpr bool isCompressible(int phaseIdx=0)
Returns true if the fluid is assumed to be compressible.
Definition: 1pliquid.hh:125
static const Scalar enthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy the pure component as a liquid.
Definition: 1pliquid.hh:227
static Scalar molarDensity(const FluidState &fluidState, const int phaseIdx)
The molar density of a fluid phase in .
Definition: 1pliquid.hh:206
static Scalar enthalpy(const FluidState &fluidState, const int phaseIdx)
Specific enthalpy the pure component as a liquid.
Definition: 1pliquid.hh:235
static std::string phaseName(int phaseIdx=0)
Return the human readable name of a fluid phase.
Definition: 1pliquid.hh:76
static constexpr bool isGas(int phaseIdx=0)
Returns whether the fluid is a liquid.
Definition: 1pliquid.hh:102
static constexpr bool isIdealGas(int phaseIdx=0)
Returns true if the fluid is assumed to be an ideal gas.
Definition: 1pliquid.hh:137
static constexpr bool isIdealMixture(int phaseIdx=0)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition: 1pliquid.hh:119
static void init()
Initialize the fluid system's static parameters generically.
Definition: 1pliquid.hh:65
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase .
Definition: 1pliquid.hh:300
static Scalar molarMass(int compIdx=0)
The mass in of one mole of the component.
Definition: 1pliquid.hh:143
static Scalar triplePressure(int compIdx=0)
Returns the pressure at the component's triple point.
Definition: 1pliquid.hh:167
static Scalar criticalPressure(int compIdx=0)
Returns the critical pressure of the component.
Definition: 1pliquid.hh:155
static Scalar thermalConductivity(const FluidState &fluidState, const int phaseIdx)
Thermal conductivity of the fluid .
Definition: 1pliquid.hh:336
static Scalar density(const FluidState &fluidState, const int phaseIdx)
The density of the component at a given pressure and temperature.
Definition: 1pliquid.hh:188
static std::string name()
A human readable name for the component.
Definition: 1pliquid.hh:90
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: 1pliquid.hh:317
static constexpr bool isMiscible()
There is only one phase, so not mass transfer between phases can occur.
Definition: 1pliquid.hh:96
static Scalar viscosity(const FluidState &fluidState, const int phaseIdx)
The dynamic liquid viscosity of the pure component.
Definition: 1pliquid.hh:259
static Scalar density(Scalar temperature, Scalar pressure)
The density of the component at a given pressure and temperature.
Definition: 1pliquid.hh:180
static Scalar pressure(Scalar temperature, Scalar density)
The pressure of the component at a given density and temperature.
Definition: 1pliquid.hh:221
static Scalar thermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the fluid .
Definition: 1pliquid.hh:328
static Scalar vaporPressure(Scalar T)
The vapor pressure in of the component at a given temperature.
Definition: 1pliquid.hh:174
static Scalar heatCapacity(const FluidState &fluidState, const int phaseIdx)
Specific isobaric heat capacity of the fluid .
Definition: 1pliquid.hh:354
static const Scalar internalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy the pure component as a liquid.
Definition: 1pliquid.hh:245
static Scalar viscosity(Scalar temperature, Scalar pressure)
The dynamic liquid viscosity of the pure component.
Definition: 1pliquid.hh:251
static Scalar heatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the fluid .
Definition: 1pliquid.hh:346
static Scalar tripleTemperature(int compIdx=0)
Returns the temperature at the component's triple point.
Definition: 1pliquid.hh:161
static constexpr int comp0Idx
index of the only component
Definition: 1pliquid.hh:60
static Scalar criticalTemperature(int compIdx=0)
Returns the critical temperature of the component.
Definition: 1pliquid.hh:149
static constexpr int phase0Idx
index of the only phase
Definition: 1pliquid.hh:59
static Scalar molarDensity(Scalar temperature, Scalar pressure)
The density of the component at a given pressure and temperature.
Definition: 1pliquid.hh:215
static constexpr bool viscosityIsConstant(int phaseIdx=0)
Returns true if the fluid viscosity is constant.
Definition: 1pliquid.hh:131
ComponentT Component
Definition: 1pliquid.hh:53
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the fugacity coefficient of an individual component in a fluid phase.
Definition: 1pliquid.hh:275
static std::string componentName(int compIdx=0)
A human readable name for the component.
Definition: 1pliquid.hh:84
static constexpr int numPhases
Number of phases in the fluid system.
Definition: 1pliquid.hh:56
Fluid system base class.
Definition: fluidsystems/base.hh:45
Scalar Scalar
export the scalar type
Definition: fluidsystems/base.hh:48
static Scalar density(const FluidState &fluidState, int phaseIdx)
Calculate the density of a fluid phase.
Definition: fluidsystems/base.hh:134
static Scalar thermalConductivity(const FluidState &fluidState, int phaseIdx)
Thermal conductivity of a fluid phase .
Definition: fluidsystems/base.hh:390
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 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 Scalar viscosity(const FluidState &fluidState, int phaseIdx)
Calculate the dynamic viscosity of a fluid phase .
Definition: fluidsystems/base.hh:236
static Scalar heatCapacity(const FluidState &fluidState, int phaseIdx)
Specific isobaric heat capacity of a fluid phase .
Definition: fluidsystems/base.hh:424
The a parameter cache which does nothing.
Definition: nullparametercache.hh:34