14#ifndef DUMUX_IMMISCIBLE_FLUID_STATE_HH
15#define DUMUX_IMMISCIBLE_FLUID_STATE_HH
28template <
class ScalarType,
class Flu
idSystem>
32 static constexpr int numPhases = FluidSystem::numPhases;
42 template <class FluidState, typename std::enable_if_t<!std::is_same<FluidState, ImmiscibleFluidState>::value,
int> = 0>
84 {
return (phaseIdx == compIdx) ? 1.0 : 0.0; }
95 {
return (phaseIdx == compIdx) ? 1.0 : 0.0; }
109 {
return FluidSystem::molarMass(phaseIdx); }
147 {
return phaseIdx == compIdx ?
pressure(phaseIdx) : 0.0; }
158 {
return phaseIdx == compIdx ? 1.0 : std::numeric_limits<Scalar>::infinity(); }
168 {
return phaseIdx == compIdx ?
pressure(phaseIdx) : 0.0; }
265 template <
class Flu
idState>
268 for (
int phaseIdx = 0; phaseIdx <
numPhases; ++phaseIdx)
270 pressure_[phaseIdx] = fs.pressure(phaseIdx);
272 density_[phaseIdx] = fs.density(phaseIdx);
274 enthalpy_[phaseIdx] = fs.enthalpy(phaseIdx);
275 viscosity_[phaseIdx] = fs.viscosity(phaseIdx);
291 for (
int phaseIdx = 0; phaseIdx <
numPhases; ++phaseIdx)
Represents all relevant thermodynamic quantities of a multi-phase fluid system assuming immiscibility...
Definition: immiscible.hh:30
ImmiscibleFluidState(ImmiscibleFluidState &&fs)=default
Scalar temperature() const
The temperature within the domain .
Definition: immiscible.hh:238
Scalar averageMolarMass(int phaseIdx) const
The average molar mass of phase in .
Definition: immiscible.hh:108
Scalar enthalpy(int phaseIdx) const
The specific enthalpy of a fluid phase in .
Definition: immiscible.hh:211
Scalar molarDensity(int phaseIdx) const
The molar density of a fluid phase in .
Definition: immiscible.hh:193
void assign(const FluidState &fs)
Retrieve all parameters from an arbitrary fluid state.
Definition: immiscible.hh:266
Scalar fugacityCoefficient(int phaseIdx, int compIdx) const
The fugacity coefficient of component in fluid phase in .
Definition: immiscible.hh:157
Scalar temperature_[numPhases]
Definition: immiscible.hh:344
static constexpr int numComponents
Definition: immiscible.hh:33
ImmiscibleFluidState(const ImmiscibleFluidState &fs)=default
Scalar partialPressure(int phaseIdx, int compIdx) const
The partial pressure of a component in a phase .
Definition: immiscible.hh:167
Scalar saturation(int phaseIdx) const
Returns the saturation of a fluid phase in .
Definition: immiscible.hh:71
Scalar moleFraction(int phaseIdx, int compIdx) const
Returns the molar fraction of the component in fluid phase in .
Definition: immiscible.hh:83
Scalar enthalpy_[numPhases]
Definition: immiscible.hh:342
ImmiscibleFluidState(const FluidState &fs)
copy constructor from arbitrary fluid state
Definition: immiscible.hh:43
ImmiscibleFluidState & operator=(const ImmiscibleFluidState &fs)=default
Scalar pressure(int phaseIdx) const
The pressure of a fluid phase in .
Definition: immiscible.hh:205
Scalar viscosity(int phaseIdx) const
The dynamic viscosity of fluid phase in .
Definition: immiscible.hh:227
Scalar molarVolume(int phaseIdx) const
The molar volume of a fluid phase in .
Definition: immiscible.hh:175
Scalar fugacity(int phaseIdx, int compIdx) const
The fugacity of component in fluid phase in .
Definition: immiscible.hh:146
ScalarType Scalar
export the scalar type
Definition: immiscible.hh:36
Scalar density_[numPhases]
Definition: immiscible.hh:340
void setDensity(int phaseIdx, Scalar value)
Set the density of a phase .
Definition: immiscible.hh:310
int wettingPhase() const
Returns the index of the most wetting phase in the fluid-solid configuration (for porous medium syste...
Definition: immiscible.hh:61
static constexpr int numPhases
Definition: immiscible.hh:32
Scalar massFraction(int phaseIdx, int compIdx) const
Returns the mass fraction of component in fluid phase in .
Definition: immiscible.hh:94
Scalar molarity(int phaseIdx, int compIdx) const
The molar concentration of component in fluid phase in .
Definition: immiscible.hh:120
void setTemperature(int phaseIdx, Scalar value)
Set the temperature of a fluid phase.
Definition: immiscible.hh:283
Scalar internalEnergy(int phaseIdx) const
The specific internal energy of a fluid phase in .
Definition: immiscible.hh:221
Scalar viscosity_[numPhases]
Definition: immiscible.hh:343
Scalar saturation_[numPhases]
Definition: immiscible.hh:339
int wPhaseIdx_
Definition: immiscible.hh:346
Scalar pressure_[numPhases]
zero-initialize all data members with braces syntax
Definition: immiscible.hh:338
void setSaturation(int phaseIdx, Scalar value)
Set the saturation of a phase .
Definition: immiscible.hh:304
Scalar fugacity(int compIdx) const
The fugacity of a component .
Definition: immiscible.hh:246
Scalar molarDensity_[numPhases]
Definition: immiscible.hh:341
Scalar temperature(int phaseIdx) const
The absolute temperature of a fluid phase in .
Definition: immiscible.hh:199
ImmiscibleFluidState & operator=(ImmiscibleFluidState &&fs)=default
void setWettingPhase(int phaseIdx)
Set the index of the most wetting phase.
Definition: immiscible.hh:334
void setMolarDensity(int phaseIdx, Scalar value)
Set the molar density of a phase .
Definition: immiscible.hh:316
ImmiscibleFluidState()=default
default constructor
void setViscosity(int phaseIdx, Scalar value)
Set the dynamic viscosity of a phase .
Definition: immiscible.hh:328
void setEnthalpy(int phaseIdx, Scalar value)
Set the specific enthalpy of a phase .
Definition: immiscible.hh:322
void setTemperature(Scalar value)
Set the temperature of a fluid phase.
Definition: immiscible.hh:289
void setPressure(int phaseIdx, Scalar value)
Set the fluid pressure of a phase .
Definition: immiscible.hh:298
Scalar density(int phaseIdx) const
The mass density of the fluid phase in .
Definition: immiscible.hh:182