26#ifndef DUMUX_IMMISCIBLE_FLUID_STATE_HH
27#define DUMUX_IMMISCIBLE_FLUID_STATE_HH
40template <
class ScalarType,
class Flu
idSystem>
44 static constexpr int numPhases = FluidSystem::numPhases;
54 template <class FluidState, typename std::enable_if_t<!std::is_same<FluidState, ImmiscibleFluidState>::value,
int> = 0>
96 {
return (phaseIdx == compIdx) ? 1.0 : 0.0; }
107 {
return (phaseIdx == compIdx) ? 1.0 : 0.0; }
121 {
return FluidSystem::molarMass(phaseIdx); }
159 {
return phaseIdx == compIdx ?
pressure(phaseIdx) : 0.0; }
170 {
return phaseIdx == compIdx ? 1.0 : std::numeric_limits<Scalar>::infinity(); }
180 {
return phaseIdx == compIdx ?
pressure(phaseIdx) : 0.0; }
277 template <
class Flu
idState>
280 for (
int phaseIdx = 0; phaseIdx <
numPhases; ++phaseIdx)
282 pressure_[phaseIdx] = fs.pressure(phaseIdx);
284 density_[phaseIdx] = fs.density(phaseIdx);
286 enthalpy_[phaseIdx] = fs.enthalpy(phaseIdx);
287 viscosity_[phaseIdx] = fs.viscosity(phaseIdx);
303 for (
int phaseIdx = 0; phaseIdx <
numPhases; ++phaseIdx)
Adaption of the non-isothermal two-phase two-component flow model to problems with CO2.
Definition: adapt.hh:29
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:42
ImmiscibleFluidState(ImmiscibleFluidState &&fs)=default
Scalar temperature() const
The temperature within the domain .
Definition: immiscible.hh:250
Scalar averageMolarMass(int phaseIdx) const
The average molar mass of phase in .
Definition: immiscible.hh:120
Scalar enthalpy(int phaseIdx) const
The specific enthalpy of a fluid phase in .
Definition: immiscible.hh:223
Scalar molarDensity(int phaseIdx) const
The molar density of a fluid phase in .
Definition: immiscible.hh:205
void assign(const FluidState &fs)
Retrieve all parameters from an arbitrary fluid state.
Definition: immiscible.hh:278
Scalar fugacityCoefficient(int phaseIdx, int compIdx) const
The fugacity coefficient of component in fluid phase in .
Definition: immiscible.hh:169
Scalar temperature_[numPhases]
Definition: immiscible.hh:356
static constexpr int numComponents
Definition: immiscible.hh:45
ImmiscibleFluidState(const ImmiscibleFluidState &fs)=default
Scalar partialPressure(int phaseIdx, int compIdx) const
The partial pressure of a component in a phase .
Definition: immiscible.hh:179
Scalar saturation(int phaseIdx) const
Returns the saturation of a fluid phase in .
Definition: immiscible.hh:83
Scalar moleFraction(int phaseIdx, int compIdx) const
Returns the molar fraction of the component in fluid phase in .
Definition: immiscible.hh:95
Scalar enthalpy_[numPhases]
Definition: immiscible.hh:354
ImmiscibleFluidState(const FluidState &fs)
copy constructor from arbitrary fluid state
Definition: immiscible.hh:55
ImmiscibleFluidState & operator=(const ImmiscibleFluidState &fs)=default
Scalar pressure(int phaseIdx) const
The pressure of a fluid phase in .
Definition: immiscible.hh:217
Scalar viscosity(int phaseIdx) const
The dynamic viscosity of fluid phase in .
Definition: immiscible.hh:239
Scalar molarVolume(int phaseIdx) const
The molar volume of a fluid phase in .
Definition: immiscible.hh:187
Scalar fugacity(int phaseIdx, int compIdx) const
The fugacity of component in fluid phase in .
Definition: immiscible.hh:158
ScalarType Scalar
export the scalar type
Definition: immiscible.hh:48
Scalar density_[numPhases]
Definition: immiscible.hh:352
void setDensity(int phaseIdx, Scalar value)
Set the density of a phase .
Definition: immiscible.hh:322
int wettingPhase() const
Returns the index of the most wetting phase in the fluid-solid configuration (for porous medium syste...
Definition: immiscible.hh:73
static constexpr int numPhases
Definition: immiscible.hh:44
Scalar massFraction(int phaseIdx, int compIdx) const
Returns the mass fraction of component in fluid phase in .
Definition: immiscible.hh:106
Scalar molarity(int phaseIdx, int compIdx) const
The molar concentration of component in fluid phase in .
Definition: immiscible.hh:132
void setTemperature(int phaseIdx, Scalar value)
Set the temperature of a fluid phase.
Definition: immiscible.hh:295
Scalar internalEnergy(int phaseIdx) const
The specific internal energy of a fluid phase in .
Definition: immiscible.hh:233
Scalar viscosity_[numPhases]
Definition: immiscible.hh:355
Scalar saturation_[numPhases]
Definition: immiscible.hh:351
int wPhaseIdx_
Definition: immiscible.hh:358
Scalar pressure_[numPhases]
zero-initialize all data members with braces syntax
Definition: immiscible.hh:350
void setSaturation(int phaseIdx, Scalar value)
Set the saturation of a phase .
Definition: immiscible.hh:316
Scalar fugacity(int compIdx) const
The fugacity of a component .
Definition: immiscible.hh:258
Scalar molarDensity_[numPhases]
Definition: immiscible.hh:353
Scalar temperature(int phaseIdx) const
The absolute temperature of a fluid phase in .
Definition: immiscible.hh:211
ImmiscibleFluidState & operator=(ImmiscibleFluidState &&fs)=default
void setWettingPhase(int phaseIdx)
Set the index of the most wetting phase.
Definition: immiscible.hh:346
void setMolarDensity(int phaseIdx, Scalar value)
Set the molar density of a phase .
Definition: immiscible.hh:328
ImmiscibleFluidState()=default
default constructor
void setViscosity(int phaseIdx, Scalar value)
Set the dynamic viscosity of a phase .
Definition: immiscible.hh:340
void setEnthalpy(int phaseIdx, Scalar value)
Set the specific enthalpy of a phase .
Definition: immiscible.hh:334
void setTemperature(Scalar value)
Set the temperature of a fluid phase.
Definition: immiscible.hh:301
void setPressure(int phaseIdx, Scalar value)
Set the fluid pressure of a phase .
Definition: immiscible.hh:310
Scalar density(int phaseIdx) const
The mass density of the fluid phase in .
Definition: immiscible.hh:194