24#ifndef DUMUX_GAS_PHASE_HH
25#define DUMUX_GAS_PHASE_HH
30#include <dune/common/exceptions.hh>
43template <
class Scalar,
class ComponentT>
45:
public Base<Scalar, OnePGas<Scalar, ComponentT> >
102 static constexpr bool isGas(
int phaseIdx = 0)
184 template <
class Flu
idState>
188 return density(fluidState.temperature(phaseIdx),
189 fluidState.pressure(phaseIdx));
214 template <
class Flu
idState>
219 fluidState.pressure(phaseIdx));
242 template <
class Flu
idState>
246 return enthalpy(fluidState.temperature(phaseIdx),
247 fluidState.pressure(phaseIdx));
270 template <
class Flu
idState>
274 return viscosity(fluidState.temperature(phaseIdx),
275 fluidState.pressure(phaseIdx));
286 template <
class Flu
idState>
291 assert(0 <= phaseIdx && phaseIdx <
numPhases);
294 if (phaseIdx == compIdx)
300 return std::numeric_limits<Scalar>::infinity();
311 template <
class Flu
idState>
316 DUNE_THROW(Dune::InvalidStateException,
"Not applicable: Diffusion coefficients");
328 template <
class Flu
idState>
335 DUNE_THROW(Dune::InvalidStateException,
"Not applicable: Binary diffusion coefficients");
350 template <
class Flu
idState>
355 fluidState.pressure(phaseIdx));
370 template <
class Flu
idState>
375 fluidState.pressure(phaseIdx));
A collection of input/output field names for common physical quantities.
Component traits, i.e. information extracted from components.
make the local view function available whenever we use the grid geometry
Definition adapt.hh:29
std::string gaseousPhase() noexcept
I/O name of gaseous phase.
Definition name.hh:123
Definition 1padapter.hh:35
static Scalar gasDensity(Scalar temperature, Scalar pressure)
The density of Air at a given pressure and temperature.
Definition air.hh:84
static constexpr Scalar molarMass()
The molar mass in of Air.
Definition air.hh:61
static const Scalar gasHeatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of pure air.
Definition air.hh:305
static Scalar criticalPressure()
Returns the critical pressure of Air.
Definition air.hh:73
static Scalar gasViscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of Air at a given pressure and temperature.
Definition air.hh:186
static constexpr bool gasIsCompressible()
Returns true, the gas phase is assumed to be compressible.
Definition air.hh:102
static Scalar gasThermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of air.
Definition air.hh:342
static constexpr bool gasIsIdeal()
Returns true, the gas phase is assumed to be ideal.
Definition air.hh:108
static Scalar gasEnthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of Air with 273.15 as basis.
Definition air.hh:268
static Scalar criticalTemperature()
Returns the critical temperature of Air.
Definition air.hh:67
static const Scalar gasInternalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of Air .
Definition air.hh:284
static std::string name()
A human readable name for Air.
Definition air.hh:53
static Scalar gasPressure(Scalar temperature, Scalar density)
The pressure of gaseous Air at a given density and temperature.
Definition air.hh:119
static Scalar gasMolarDensity(Scalar temperature, Scalar pressure)
The molar density of air in , depending on pressure and temperature.
Definition air.hh:96
static constexpr Scalar tripleTemperature()
Definition components/base.hh:117
static constexpr Scalar triplePressure()
Definition components/base.hh:127
static Scalar vaporPressure(Scalar t)
Definition components/base.hh:140
static constexpr bool hasGasState
if the component implements a gaseous state
Definition componenttraits.hh:49
A gaseous phase consisting of a single component.
Definition 1pgas.hh:46
static Scalar density(Scalar temperature, Scalar pressure)
The density of the component at a given pressure and temperature.
Definition 1pgas.hh:177
static Scalar triplePressure(int compIdx=0)
Returns the pressure in at the component's triple point.
Definition 1pgas.hh:161
static Scalar fugacityCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the fugacity coefficient of an individual component in a fluid phase.
Definition 1pgas.hh:287
static std::string componentName(int compIdx=0)
A human readable name for the component.
Definition 1pgas.hh:84
static Scalar thermalConductivity(const FluidState &fluidState, const int phaseIdx)
Thermal conductivity of the fluid .
Definition 1pgas.hh:351
static Scalar viscosity(Scalar temperature, Scalar pressure)
The dynamic viscosity of the pure component at a given pressure and temperature.
Definition 1pgas.hh:263
static constexpr bool isGas(int phaseIdx=0)
Returns whether the fluid is gaseous.
Definition 1pgas.hh:102
ComponentT Component
Definition 1pgas.hh:53
static Scalar molarDensity(Scalar temperature, Scalar pressure)
The molar density of a fluid phase in .
Definition 1pgas.hh:201
static Scalar heatCapacity(const FluidState &fluidState, const int phaseIdx)
Specific isobaric heat capacity of the fluid .
Definition 1pgas.hh:371
static Scalar molarMass(int compIdx=0)
The mass in of one mole of the component.
Definition 1pgas.hh:137
static constexpr int numPhases
Definition 1pgas.hh:56
static constexpr int comp0Idx
Definition 1pgas.hh:60
static constexpr int numComponents
Definition 1pgas.hh:57
static Scalar criticalPressure(int compIdx=0)
Returns the critical pressure in of the component.
Definition 1pgas.hh:149
static Scalar tripleTemperature(int compIdx=0)
Returns the temperature in at the component's triple point.
Definition 1pgas.hh:155
static std::string name()
A human readable name for the component.
Definition 1pgas.hh:90
static constexpr bool isIdealGas(int phaseIdx=0)
Returns true if the fluid is assumed to be an ideal gas.
Definition 1pgas.hh:131
static constexpr int phase0Idx
Definition 1pgas.hh:59
static Scalar diffusionCoefficient(const FluidState &fluidState, int phaseIdx, int compIdx)
Calculate the binary molecular diffusion coefficient for a component in a fluid phase .
Definition 1pgas.hh:312
static const Scalar internalEnergy(Scalar temperature, Scalar pressure)
Specific internal energy of the pure component as a gas.
Definition 1pgas.hh:255
static Scalar criticalTemperature(int compIdx=0)
Returns the critical temperature in of the component.
Definition 1pgas.hh:143
static Scalar density(const FluidState &fluidState, const int phaseIdx)
The density of the component at a given pressure and temperature.
Definition 1pgas.hh:185
static const Scalar enthalpy(Scalar temperature, Scalar pressure)
Specific enthalpy of the pure component as a gas.
Definition 1pgas.hh:235
static Scalar molarDensity(const FluidState &fluidState, const int phaseIdx)
Definition 1pgas.hh:215
static std::string phaseName(int phaseIdx=0)
Return the human readable name of a fluid phase.
Definition 1pgas.hh:76
NullParameterCache ParameterCache
Definition 1pgas.hh:54
static constexpr bool isIdealMixture(int phaseIdx=0)
Returns true if and only if a fluid phase is assumed to be an ideal mixture.
Definition 1pgas.hh:119
static Scalar viscosity(const FluidState &fluidState, const int phaseIdx)
The dynamic liquid viscosity of the pure component.
Definition 1pgas.hh:271
static constexpr bool isCompressible(int phaseIdx=0)
Returns true if the fluid is assumed to be compressible.
Definition 1pgas.hh:125
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 1pgas.hh:329
static Scalar pressure(Scalar temperature, Scalar density)
Definition 1pgas.hh:227
static constexpr bool isMiscible()
There is only one phase, so not mass transfer between phases can occur.
Definition 1pgas.hh:96
static void init()
Initialize the fluid system's static parameters generically.
Definition 1pgas.hh:65
static Scalar thermalConductivity(Scalar temperature, Scalar pressure)
Thermal conductivity of the fluid .
Definition 1pgas.hh:343
static Scalar vaporPressure(Scalar T)
The vapor pressure in of the component at a given temperature.
Definition 1pgas.hh:169
static Scalar heatCapacity(Scalar temperature, Scalar pressure)
Specific isobaric heat capacity of the fluid .
Definition 1pgas.hh:363
static Scalar enthalpy(const FluidState &fluidState, const int phaseIdx)
Definition 1pgas.hh:243
Fluid system base class.
Definition fluidsystems/base.hh:45
Scalar Scalar
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