Container for compositional variables in a 1p2c situation. More...
#include <dumux/material/fluidstates/pseudo1p2c.hh>
Container for compositional variables in a 1p2c situation.
This class holds variables for single-phase situations in a 2p2c context. It is used in case of a multiphysics approach. For the non-present phase, no information is stored but 0-values are returned to allow for general output methods. The "flash" calculation routines are in the sequential flash constrain solver, see CompositionalFlash .
Public Types | |
enum | { phase0Idx = FluidSystem::phase0Idx , phase1Idx = FluidSystem::phase1Idx , comp0Idx = FluidSystem::comp0Idx , comp1Idx = FluidSystem::comp1Idx } |
using | Scalar = ScalarType |
export the scalar type More... | |
Public Member Functions | |
Acess functions | |
Scalar | saturation (int phaseIdx) const |
Returns the saturation \(S_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[-]}\). More... | |
int | presentPhaseIdx () const |
Returns the index of the phase that is present in that cell. More... | |
Scalar | partialPressure (int compIdx) const |
Return the partial pressure of a component in the gas phase. More... | |
Scalar | partialPressure (int phaseIdx, int compIdx) const |
The partial pressure of a component in a phase \(\mathrm{[Pa]}\). More... | |
Scalar | pressure (int phaseIdx) const |
The pressure \(p_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[Pa]}\). More... | |
Scalar | density (int phaseIdx) const |
Set the density of a phase \(\mathrm{[kg / m^3]}\). More... | |
Scalar | molarDensity (int phaseIdx) const |
The molar density \(\rho_\alpha\) of the fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\). More... | |
Scalar | massFraction (int phaseIdx, int compIdx) const |
Returns the mass fraction \(X^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\). More... | |
Scalar | moleFraction (int phaseIdx, int compIdx) const |
Returns the molar fraction \(x^\kappa_\alpha\) of the component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\). More... | |
Scalar | viscosity (int phaseIdx) const |
The dynamic viscosity \(\mu_\alpha\) of fluid phase \(\alpha\) in \(\mathrm{[Pa s]}\). More... | |
Scalar | averageMolarMass (int phaseIdx) const |
The average molar mass \(\overline M_\alpha\) of phase \(\alpha\) in \(\mathrm{[kg/mol]}\). More... | |
Scalar | enthalpy (int phaseIdx) const |
The specific enthalpy \(h_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\). More... | |
Scalar | internalEnergy (int phaseIdx) const |
The specific internal energy \(u_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\). More... | |
Scalar | temperature (int phaseIdx) const |
Returns the temperature of the fluids \(\mathrm{[K]}\). More... | |
Static Public Attributes | |
static constexpr int | numPhases = FluidSystem::numPhases |
static constexpr int | numComponents = FluidSystem::numComponents |
Functions to set Data | |
Scalar | pressure_ [numPhases] = {} |
Scalar | massConcentration_ [numComponents] = {} |
Scalar | averageMolarMass_ = 0.0 |
Scalar | massFractionWater_ = 0.0 |
Scalar | moleFractionWater_ = 0.0 |
Scalar | density_ = 0.0 |
Scalar | molarDensity_ = 0.0 |
Scalar | viscosity_ = 0.0 |
Scalar | enthalpy_ = 0.0 |
Scalar | temperature_ = 0.0 |
int | presentPhaseIdx_ = 0 |
void | setViscosity (int phaseIdx, Scalar value) |
Sets the viscosity of a phase \(\mathrm{[Pa*s]}\). More... | |
void | setMassFraction (int phaseIdx, int compIdx, Scalar value) |
Sets the mass fraction of a component in a phase. More... | |
void | setMoleFraction (int phaseIdx, int compIdx, Scalar value) |
Sets the molar fraction of a component in a fluid phase. More... | |
void | setDensity (int phaseIdx, Scalar value) |
Sets the density of a phase \(\mathrm{[kg/m^3]}\). More... | |
void | setMolarDensity (int phaseIdx, Scalar value) |
Set the molar density of a phase \(\mathrm{[mol / m^3]}\). More... | |
void | setPresentPhaseIdx (int phaseIdx) |
Sets the phase Index that is present in this fluidState. More... | |
void | setTemperature (Scalar value) |
Sets the temperature. More... | |
void | setAverageMolarMass (int phaseIdx, Scalar value) |
Set the average molar mass of a fluid phase [kg/mol]. More... | |
void | setPressure (int phaseIdx, Scalar value) |
Sets the phase pressure \(\mathrm{[Pa]}\). More... | |
void | setEnthalpy (int phaseIdx, Scalar value) |
Sets phase enthalpy. More... | |
using Dumux::PseudoOnePTwoCFluidState< ScalarType, FluidSystem >::Scalar = ScalarType |
export the scalar type
anonymous enum |
|
inline |
The average molar mass \(\overline M_\alpha\) of phase \(\alpha\) in \(\mathrm{[kg/mol]}\).
The average molar mass is the mean mass of a mole of the fluid at current composition. It is defined as the sum of the component's molar masses weighted by the current mole fraction:
\[\mathrm{ \overline M_\alpha = \sum_\kappa M^\kappa x_\alpha^\kappa}\]
|
inline |
Set the density of a phase \(\mathrm{[kg / m^3]}\).
|
inline |
The specific enthalpy \(h_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\).
|
inline |
The specific internal energy \(u_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[J/kg]}\).
The specific internal energy is defined by the relation:
\[u_\alpha = h_\alpha - \frac{p_\alpha}{\rho_\alpha}\]
|
inline |
Returns the mass fraction \(X^\kappa_\alpha\) of component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\).
The mass fraction \(X^\kappa_\alpha\) is defined as the weight of all molecules of a component divided by the total mass of the fluid phase. It is related with the component's mole fraction by means of the relation
\[X^\kappa_\alpha = x^\kappa_\alpha \frac{M^\kappa}{\overline M_\alpha}\;,\]
where \(M^\kappa\) is the molar mass of component \(\kappa\) and \(\overline M_\alpha\) is the mean molar mass of a molecule of phase \(\alpha\).
phaseIdx | the index of the phase |
compIdx | the index of the component |
|
inline |
The molar density \(\rho_\alpha\) of the fluid phase \(\alpha\) in \(\mathrm{[mol/m^3]}\).
|
inline |
Returns the molar fraction \(x^\kappa_\alpha\) of the component \(\kappa\) in fluid phase \(\alpha\) in \(\mathrm{[-]}\).
This is either set to 1 or 0 depending on the phase presence for the non-wetting phase in general. It is set to the mole fraction of water or 1-moleFractionWater if the considered component is the main component of the wetting phase.
phaseIdx | the index of the phase |
compIdx | the index of the component |
|
inline |
Return the partial pressure of a component in the gas phase.
For an ideal gas, this means \( R*T*c \). Unit: \(\mathrm{[Pa] = [N/m^2]}\)
compIdx | the index of the component |
|
inline |
The partial pressure of a component in a phase \(\mathrm{[Pa]}\).
|
inline |
Returns the index of the phase that is present in that cell.
|
inline |
The pressure \(p_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[Pa]}\).
|
inline |
Returns the saturation \(S_\alpha\) of a fluid phase \(\alpha\) in \(\mathrm{[-]}\).
The saturation is defined as the pore space occupied by the fluid divided by the total pore space:
\[S_\alpha := \frac{\phi \mathcal{V}_\alpha}{\phi \mathcal{V}}\]
This is set either to 1 or 0 depending on the phase presence.
phaseIdx | the index of the phase |
|
inline |
Set the average molar mass of a fluid phase [kg/mol].
The average molar mass is the mean mass of a mole of the fluid at current composition. It is defined as the sum of the component's molar masses weighted by the current mole fraction:
\[ \bar M_\alpha = \sum_\kappa M^\kappa x_\alpha^\kappa \]
|
inline |
Sets the density of a phase \(\mathrm{[kg/m^3]}\).
phaseIdx | the index of the phase |
value | Value to be stored |
|
inline |
Sets phase enthalpy.
phaseIdx | the index of the phase |
value | Value to be stored |
|
inline |
Sets the mass fraction of a component in a phase.
phaseIdx | the index of the phase |
compIdx | the index of the component |
value | Value to be stored |
|
inline |
Set the molar density of a phase \(\mathrm{[mol / m^3]}\).
phaseIdx | the index of the phase |
value | Value to be stored |
|
inline |
Sets the molar fraction of a component in a fluid phase.
phaseIdx | the index of the phase |
compIdx | the index of the component |
value | Value to be stored |
|
inline |
Sets the phase Index that is present in this fluidState.
phaseIdx | the index of the phase |
|
inline |
Sets the phase pressure \(\mathrm{[Pa]}\).
|
inline |
Sets the temperature.
value | Value to be stored |
|
inline |
Sets the viscosity of a phase \(\mathrm{[Pa*s]}\).
phaseIdx | the index of the phase |
value | Value to be stored |
|
inline |
Returns the temperature of the fluids \(\mathrm{[K]}\).
Note that we assume thermodynamic equilibrium, so all fluids and the rock matrix exhibit the same temperature.
|
inline |
The dynamic viscosity \(\mu_\alpha\) of fluid phase \(\alpha\) in \(\mathrm{[Pa s]}\).
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
|
protected |
|
protected |
|
protected |
|
protected |