packagePartialTwoPhaseMedium

Base class for two phase medium of one substance

Extends from PartialPureSubstance (Base class for pure substances of one chemical substance).

Parameters

TypeNameDefaultDescription
Modelica.Media.Interfaces.Choices.IndependentVariablesThermoStates (from PartialMedium)Enumeration type for independent variables
StringmediumName (from PartialMedium)"unusablePartialMedium"Name of the medium
String[:]substanceNames (from PartialMedium){mediumName}Names of the mixture substances. Set substanceNames={mediumName} if only one substance.
String[:]extraPropertiesNames (from PartialMedium)fill("", 0)Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused
BooleansingleState (from PartialMedium)= true, if u and d are not a function of pressure
BooleanreducedX (from PartialMedium)true= true, if medium contains the equation sum(X) = 1.0; set reducedX=true, if only one substance (see docu for details)
BooleanfixedX (from PartialMedium)false= true, if medium contains the equation X = reference_X
AbsolutePressurereference_p (from PartialMedium)101325Reference pressure of Medium: default 1 atmosphere
Temperaturereference_T (from PartialMedium)298.15Reference temperature of Medium: default 25 deg Celsius
MassFraction[nX]reference_X (from PartialMedium)fill(1/nX, nX)Default mass fractions of medium
AbsolutePressurep_default (from PartialMedium)101325Default value for pressure of medium (for initialization)
TemperatureT_default (from PartialMedium)Modelica.Units.Conversions.from_degC(20)Default value for temperature of medium (for initialization)
SpecificEnthalpyh_default (from PartialMedium)specificEnthalpy_pTX(p_default, T_default, X_default)Default value for specific enthalpy of medium (for initialization)
MassFraction[nX]X_default (from PartialMedium)reference_XDefault value for mass fractions of medium (for initialization)
ExtraProperty[nC]C_default (from PartialMedium)fill(0, nC)Default value for trace substances of medium (for initialization)
IntegernS (from PartialMedium)size(substanceNames, 1)Number of substances
IntegernX (from PartialMedium)nSNumber of mass fractions
IntegernXi (from PartialMedium)if fixedX then 0 else if reducedX then nS - 1 else nSNumber of structurally independent mass fractions (see docu for details)
IntegernC (from PartialMedium)size(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
Real[nC]C_nominal (from PartialMedium)1.0e-6*ones(nC)Default for the nominal values for the extra properties
BooleansmoothModelfalse= true, if the (derived) model should not generate state events
BooleanonePhasefalse= true, if the (derived) model should never be called with two-phase inputs
FluidConstantsfluidConstantsConstant data for the fluid

Contents

NameDescription
ThermodynamicStateThermodynamic state of two phase medium
BasePropertiesBase properties (p, d, T, h, u, R_s, MM, sat) of two phase medium
setDewStateReturn the thermodynamic state on the dew line
setBubbleStateReturn the thermodynamic state on the bubble line
setState_dTXReturn thermodynamic state as function of d, T and composition X or Xi
setState_phXReturn thermodynamic state as function of p, h and composition X or Xi
setState_psXReturn thermodynamic state as function of p, s and composition X or Xi
setState_pTXReturn thermodynamic state as function of p, T and composition X or Xi
setSat_TReturn saturation property record from temperature
setSat_pReturn saturation property record from pressure
bubbleEnthalpyReturn bubble point specific enthalpy
dewEnthalpyReturn dew point specific enthalpy
bubbleEntropyReturn bubble point specific entropy
dewEntropyReturn dew point specific entropy
bubbleDensityReturn bubble point density
dewDensityReturn dew point density
saturationPressureReturn saturation pressure
saturationTemperatureReturn saturation temperature
saturationPressure_satReturn saturation pressure
saturationTemperature_satReturn saturation temperature
saturationTemperature_derpReturn derivative of saturation temperature w.r.t. pressure
saturationTemperature_derp_satReturn derivative of saturation temperature w.r.t. pressure
surfaceTensionReturn surface tension sigma in the two phase region
molarMassReturn the molar mass of the medium
dBubbleDensity_dPressureReturn bubble point density derivative
dDewDensity_dPressureReturn dew point density derivative
dBubbleEnthalpy_dPressureReturn bubble point specific enthalpy derivative
dDewEnthalpy_dPressureReturn dew point specific enthalpy derivative
specificEnthalpy_pTXReturn specific enthalpy from pressure, temperature and mass fraction
temperature_phXReturn temperature from p, h, and X or Xi
density_phXReturn density from p, h, and X or Xi
temperature_psXReturn temperature from p, s, and X or Xi
density_psXReturn density from p, s, and X or Xi
specificEnthalpy_psXReturn specific enthalpy from p, s, and X or Xi
setState_pTReturn thermodynamic state from p and T
setState_phReturn thermodynamic state from p and h
setState_psReturn thermodynamic state from p and s
setState_dTReturn thermodynamic state from d and T
setState_pxReturn thermodynamic state from pressure and vapour quality
setState_TxReturn thermodynamic state from temperature and vapour quality
vapourQualityReturn vapour quality
density_phReturn density from p and h
temperature_phReturn temperature from p and h
pressure_dTReturn pressure from d and T
specificEnthalpy_dTReturn specific enthalpy from d and T
specificEnthalpy_psReturn specific enthalpy from p and s
temperature_psReturn temperature from p and s
density_psReturn density from p and s
specificEnthalpy_pTReturn specific enthalpy from p and T
density_pTReturn density from p and T