| Name | Description |
|---|---|
| smoothModel | true if the (derived) model should not generate state events |
| onePhase | true if the (derived) model should never be called with two-phase inputs |
| validity limits for fluid model | |
| extended fluid constants | |
| fluidConstants | constant data for the fluid |
| Thermodynamic state of two phase medium | |
| Saturation properties of two phase medium | |
| FixedPhase | phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g. interactive use |
| Base properties (p, d, T, h, u, R, MM, sat) of two phase medium | |
| Return the thermodynamic state on the dew line | |
| Return the thermodynamic state on the bubble line | |
| Return thermodynamic state as function of d, T and composition X or Xi | |
| Return thermodynamic state as function of p, h and composition X or Xi | |
| Return thermodynamic state as function of p, s and composition X or Xi | |
| Return thermodynamic state as function of p, T and composition X or Xi | |
| Return saturation property record from temperature | |
| Return saturation property record from pressure | |
| Return bubble point specific enthalpy | |
| Return dew point specific enthalpy | |
| Return bubble point specific entropy | |
| Return dew point specific entropy | |
| Return bubble point density | |
| Return dew point density | |
| Return saturation pressure | |
| Return saturation temperature | |
| Return saturation temperature | |
| Return saturation temperature | |
| Return derivative of saturation temperature w.r.t. pressure | |
| Return derivative of saturation temperature w.r.t. pressure | |
| Return surface tension sigma in the two phase region | |
| Return the molar mass of the medium | |
| Return bubble point density derivative | |
| Return dew point density derivative | |
| Return bubble point specific enthalpy derivative | |
| Return dew point specific enthalpy derivative | |
| Return specific enthalpy from pressure, temperature and mass fraction | |
| Return temperature from p, h, and X or Xi | |
| Return density from p, h, and X or Xi | |
| Return temperature from p, s, and X or Xi | |
| Return density from p, s, and X or Xi | |
| Return specific enthalpy from p, s, and X or Xi | |
| Return thermodynamic state from p and T | |
| Return thermodynamic state from p and h | |
| Return thermodynamic state from p and s | |
| Return thermodynamic state from d and T | |
| Return thermodynamic state from pressure and vapour quality | |
| Return thermodynamic state from temperature and vapour quality | |
| Return vapour quality | |
| Return density from p and h | |
| Return temperature from p and h | |
| Return pressure from d and T | |
| Return specific enthalpy from d and T | |
| Return specific enthalpy from p and s | |
| Return temperature from p and s | |
| Return density from p and s | |
| Return specific enthalpy from p and T | |
| Return density from p and T | |
| Inherited | |
| ThermoStates | Enumeration type for independent variables |
| mediumName="unusablePartialMedium" | Name of the medium |
| substanceNames={mediumName} | Names of the mixture substances. Set substanceNames={mediumName} if only one substance. |
| extraPropertiesNames=fill("", 0) | Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused |
| singleState | = true, if u and d are not a function of pressure |
| reducedX=true | = true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details) |
| fixedX=false | = true if medium contains the equation X = reference_X |
| reference_p=101325 | Reference pressure of Medium: default 1 atmosphere |
| reference_T=298.15 | Reference temperature of Medium: default 25 deg Celsius |
| reference_X=fill(1/nX, nX) | Default mass fractions of medium |
| p_default=101325 | Default value for pressure of medium (for initialization) |
| T_default=Modelica.SIunits.Conversions.from_degC(20) | Default value for temperature of medium (for initialization) |
| h_default=specificEnthalpy_pTX(p_default, T_default, X_default) | Default value for specific enthalpy of medium (for initialization) |
| X_default=reference_X | Default value for mass fractions of medium (for initialization) |
| nS=size(substanceNames, 1) | Number of substances |
| nX=nS | Number of mass fractions |
| nXi=if fixedX then 0 else if reducedX then nS - 1 else nS | Number of structurally independent mass fractions (see docu for details) |
| nC=size(extraPropertiesNames, 1) | Number of extra (outside of standard mass-balance) transported properties |
| Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b | |
| Return dynamic viscosity | |
| Return thermal conductivity | |
| Return the Prandtl number | |
| Return pressure | |
| Return temperature | |
| Return density | |
| Return specific enthalpy | |
| Return specific internal energy | |
| Return specific entropy | |
| Return specific Gibbs energy | |
| Return specific Helmholtz energy | |
| Return specific heat capacity at constant pressure | |
| alias for deprecated name | |
| Return specific heat capacity at constant volume | |
| alias for deprecated name | |
| Return isentropic exponent | |
| Return isentropic enthalpy | |
| Return velocity of sound | |
| Return overall the isobaric expansion coefficient beta | |
| alias for isobaricExpansionCoefficient for user convenience | |
| Return overall the isothermal compressibility factor | |
| alias of isothermalCompressibility for user convenience | |
| Return density derivative wrt pressure at const specific enthalpy | |
| Return density derivative wrt specific enthalpy at constant pressure | |
| Return density derivative wrt pressure at const temperature | |
| Return density derivative wrt temperature at constant pressure | |
| Return density derivative wrt mass fraction | |
| Return density from p, T, and X or Xi | |
| AbsolutePressure | Type for absolute pressure with medium specific attributes |
| Density | Type for density with medium specific attributes |
| DynamicViscosity | Type for dynamic viscosity with medium specific attributes |
| EnthalpyFlowRate | Type for enthalpy flow rate with medium specific attributes |
| MassFlowRate | Type for mass flow rate with medium specific attributes |
| MassFraction | Type for mass fraction with medium specific attributes |
| MoleFraction | Type for mole fraction with medium specific attributes |
| MolarMass | Type for molar mass with medium specific attributes |
| MolarVolume | Type for molar volume with medium specific attributes |
| IsentropicExponent | Type for isentropic exponent with medium specific attributes |
| SpecificEnergy | Type for specific energy with medium specific attributes |
| SpecificInternalEnergy | Type for specific internal energy with medium specific attributes |
| SpecificEnthalpy | Type for specific enthalpy with medium specific attributes |
| SpecificEntropy | Type for specific entropy with medium specific attributes |
| SpecificHeatCapacity | Type for specific heat capacity with medium specific attributes |
| SurfaceTension | Type for surface tension with medium specific attributes |
| Temperature | Type for temperature with medium specific attributes |
| ThermalConductivity | Type for thermal conductivity with medium specific attributes |
| PrandtlNumber | Type for Prandtl number with medium specific attributes |
| VelocityOfSound | Type for velocity of sound with medium specific attributes |
| ExtraProperty | Type for unspecified, mass-specific property transported by flow |
| CumulativeExtraProperty | Type for conserved integral of unspecified, mass specific property |
| ExtraPropertyFlowRate | Type for flow rate of unspecified, mass-specific property |
| IsobaricExpansionCoefficient | Type for isobaric expansion coefficient with medium specific attributes |
| DipoleMoment | Type for dipole moment with medium specific attributes |
| DerDensityByPressure | Type for partial derivative of density with resect to pressure with medium specific attributes |
| DerDensityByEnthalpy | Type for partial derivative of density with resect to enthalpy with medium specific attributes |
| DerEnthalpyByPressure | Type for partial derivative of enthalpy with resect to pressure with medium specific attributes |
| DerDensityByTemperature | Type for partial derivative of density with resect to temperature with medium specific attributes |
| Types, constants to define menu choices | |
constant Boolean smoothModel "true if the (derived) model should not generate state events";
constant Boolean onePhase "true if the (derived) model should never be called with two-phase inputs";
constant FluidConstants[nS] fluidConstants "constant data for the fluid";
type FixedPhase = Integer(min=0,max=2) "phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g. interactive use";
Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidLimits
The minimum pressure mostly applies to the liquid state only. The minimum density is also arbitrary, but is reasonable for techical applications to limit iterations in non-linear systems. The limits in enthalpy and entropy are used as safeguards in inverse iterations.
Extends from Modelica.Icons.Record (Icon for a record).
record FluidLimits "validity limits for fluid model" extends Modelica.Icons.Record; Temperature TMIN "minimum temperature"; Temperature TMAX "maximum temperature"; Density DMIN "minimum density"; Density DMAX "maximum density"; AbsolutePressure PMIN "minimum pressure"; AbsolutePressure PMAX "maximum pressure"; SpecificEnthalpy HMIN "minimum enthalpy"; SpecificEnthalpy HMAX "maximum enthalpy"; SpecificEntropy SMIN "minimum entropy"; SpecificEntropy SMAX "maximum entropy";end FluidLimits;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants
Extends from (critical, triple, molecular and other standard data of fluid).
redeclare replaceable record extends FluidConstants
"extended fluid constants"
Temperature criticalTemperature "critical temperature";
AbsolutePressure criticalPressure "critical pressure";
MolarVolume criticalMolarVolume "critical molar Volume";
Real acentricFactor "Pitzer acentric factor";
Temperature triplePointTemperature "triple point temperature";
AbsolutePressure triplePointPressure "triple point pressure";
Temperature meltingPoint "melting point at 101325 Pa";
Temperature normalBoilingPoint "normal boiling point (at 101325 Pa)";
DipoleMoment dipoleMoment
"dipole moment of molecule in Debye (1 debye = 3.33564e10-30 C.m)";
Boolean hasIdealGasHeatCapacity=false
"true if ideal gas heat capacity is available";
Boolean hasCriticalData=false "true if critical data are known";
Boolean hasDipoleMoment=false "true if a dipole moment known";
Boolean hasFundamentalEquation=false "true if a fundamental equation";
Boolean hasLiquidHeatCapacity=false
"true if liquid heat capacity is available";
Boolean hasSolidHeatCapacity=false "true if solid heat capacity is available";
Boolean hasAccurateViscosityData=false
"true if accurate data for a viscosity function is available";
Boolean hasAccurateConductivityData=false
"true if accurate data for thermal conductivity is available";
Boolean hasVapourPressureCurve=false
"true if vapour pressure data, e.g. Antoine coefficents are known";
Boolean hasAcentricFactor=false "true if Pitzer accentric factor is known";
SpecificEnthalpy HCRIT0=0.0
"Critical specific enthalpy of the fundamental equation";
SpecificEntropy SCRIT0=0.0
"Critical specific entropy of the fundamental equation";
SpecificEnthalpy deltah=0.0
"Difference between specific enthalpy model (h_m) and f.eq. (h_f) (h_m - h_f)";
SpecificEntropy deltas=0.0
"Difference between specific enthalpy model (s_m) and f.eq. (s_f) (s_m - s_f)";
end FluidConstants;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.ThermodynamicState
Extends from (Minimal variable set that is available as input argument to every medium function).
redeclare replaceable record extends ThermodynamicState
"Thermodynamic state of two phase medium"
FixedPhase phase(min=0, max=2)
"phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g. interactive use";
end ThermodynamicState;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.SaturationProperties
Extends from Modelica.Icons.Record (Icon for a record).
replaceable record SaturationProperties "Saturation properties of two phase medium" extends Modelica.Icons.Record; AbsolutePressure psat "saturation pressure"; Temperature Tsat "saturation temperature";end SaturationProperties;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.BaseProperties
| Type | Name | Default | Description |
|---|---|---|---|
| Advanced | |||
| Boolean | preferredMediumStates | false | = true if StateSelect.prefer shall be used for the independent property variables of the medium |
redeclare replaceable partial model extends BaseProperties "Base properties (p, d, T, h, u, R, MM, sat) of two phase medium" SaturationProperties sat "Saturation properties at the medium pressure";end BaseProperties;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setDewState
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation point | |
| FixedPhase | phase | 1 | phase: default is one phase |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | complete thermodynamic state info |
replaceable partial function setDewState "Return the thermodynamic state on the dew line" extends Modelica.Icons.Function; input SaturationProperties sat "saturation point"; input FixedPhase phase(min = 1, max = 2) = 1 "phase: default is one phase"; output ThermodynamicState state "complete thermodynamic state info";end setDewState;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setBubbleState
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation point | |
| FixedPhase | phase | 1 | phase: default is one phase |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | complete thermodynamic state info |
replaceable partial function setBubbleState "Return the thermodynamic state on the bubble line" extends Modelica.Icons.Function; input SaturationProperties sat "saturation point"; input FixedPhase phase(min = 1, max = 2) = 1 "phase: default is one phase"; output ThermodynamicState state "complete thermodynamic state info";end setBubbleState;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_dTX
Extends from (Return thermodynamic state as function of d, T and composition X or Xi).
| Type | Name | Default | Description |
|---|---|---|---|
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Density | d | density [kg/m3] | |
| Temperature | T | Temperature [K] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable partial function extends setState_dTX "Return thermodynamic state as function of d, T and composition X or Xi" input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";end setState_dTX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_phX
Extends from (Return thermodynamic state as function of p, h and composition X or Xi).
| Type | Name | Default | Description |
|---|---|---|---|
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable partial function extends setState_phX "Return thermodynamic state as function of p, h and composition X or Xi" input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";end setState_phX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_psX
Extends from (Return thermodynamic state as function of p, s and composition X or Xi).
| Type | Name | Default | Description |
|---|---|---|---|
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable partial function extends setState_psX "Return thermodynamic state as function of p, s and composition X or Xi" input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";end setState_psX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_pTX
Extends from (Return thermodynamic state as function of p, T and composition X or Xi).
| Type | Name | Default | Description |
|---|---|---|---|
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| MassFraction | X[:] | reference_X | Mass fractions [kg/kg] |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable partial function extends setState_pTX "Return thermodynamic state as function of p, T and composition X or Xi" input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known";end setState_pTX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setSat_T
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| Temperature | T | temperature [K] |
| Type | Name | Description |
|---|---|---|
| SaturationProperties | sat | saturation property record |
replaceable function setSat_T "Return saturation property record from temperature" extends Modelica.Icons.Function; input Temperature T "temperature"; output SaturationProperties sat "saturation property record"; algorithm sat.Tsat := T; sat.psat := saturationPressure(T);end setSat_T;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setSat_p
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | pressure [Pa] |
| Type | Name | Description |
|---|---|---|
| SaturationProperties | sat | saturation property record |
replaceable function setSat_p "Return saturation property record from pressure" extends Modelica.Icons.Function; input AbsolutePressure p "pressure"; output SaturationProperties sat "saturation property record"; algorithm sat.psat := p; sat.Tsat := saturationTemperature(p);end setSat_p;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleEnthalpy
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | hl | boiling curve specific enthalpy [J/kg] |
replaceable partial function bubbleEnthalpy
"Return bubble point specific enthalpy"
extends Modelica.Icons.Function;
input SaturationProperties sat "saturation property record";
output SI.SpecificEnthalpy hl "boiling curve specific enthalpy";
end bubbleEnthalpy;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewEnthalpy
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | hv | dew curve specific enthalpy [J/kg] |
replaceable partial function dewEnthalpy "Return dew point specific enthalpy" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output SI.SpecificEnthalpy hv "dew curve specific enthalpy";end dewEnthalpy;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleEntropy
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| SpecificEntropy | sl | boiling curve specific entropy [J/(kg.K)] |
replaceable partial function bubbleEntropy "Return bubble point specific entropy" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output SI.SpecificEntropy sl "boiling curve specific entropy";end bubbleEntropy;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewEntropy
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| SpecificEntropy | sv | dew curve specific entropy [J/(kg.K)] |
replaceable partial function dewEntropy "Return dew point specific entropy" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output SI.SpecificEntropy sv "dew curve specific entropy";end dewEntropy;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleDensity
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| Density | dl | boiling curve density [kg/m3] |
replaceable partial function bubbleDensity "Return bubble point density" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output Density dl "boiling curve density";end bubbleDensity;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewDensity
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| Density | dv | dew curve density [kg/m3] |
replaceable partial function dewDensity "Return dew point density" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output Density dv "dew curve density";end dewDensity;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationPressure
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| Temperature | T | temperature [K] |
| Type | Name | Description |
|---|---|---|
| AbsolutePressure | p | saturation pressure [Pa] |
replaceable partial function saturationPressure "Return saturation pressure" extends Modelica.Icons.Function; input Temperature T "temperature"; output AbsolutePressure p "saturation pressure";end saturationPressure;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | pressure [Pa] |
| Type | Name | Description |
|---|---|---|
| Temperature | T | saturation temperature [K] |
replaceable partial function saturationTemperature "Return saturation temperature" extends Modelica.Icons.Function; input AbsolutePressure p "pressure"; output Temperature T "saturation temperature";end saturationTemperature;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationPressure_sat
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| AbsolutePressure | p | saturation pressure [Pa] |
replaceable function saturationPressure_sat "Return saturation temperature" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output AbsolutePressure p "saturation pressure"; algorithm p := sat.psat;end saturationPressure_sat;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_sat
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| Temperature | T | saturation temperature [K] |
replaceable function saturationTemperature_sat "Return saturation temperature" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output Temperature T "saturation temperature"; algorithm T := sat.Tsat;end saturationTemperature_sat;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_derp
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | pressure [Pa] |
| Type | Name | Description |
|---|---|---|
| Real | dTp | derivative of saturation temperature w.r.t. pressure |
replaceable partial function saturationTemperature_derp "Return derivative of saturation temperature w.r.t. pressure" extends Modelica.Icons.Function; input AbsolutePressure p "pressure"; output Real dTp "derivative of saturation temperature w.r.t. pressure";end saturationTemperature_derp;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_derp_sat
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| Real | dTp | derivative of saturation temperature w.r.t. pressure |
replaceable function saturationTemperature_derp_sat "Return derivative of saturation temperature w.r.t. pressure" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output Real dTp "derivative of saturation temperature w.r.t. pressure"; algorithm dTp := saturationTemperature_derp(sat.psat);end saturationTemperature_derp_sat;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.surfaceTension
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| SurfaceTension | sigma | Surface tension sigma in the two phase region [N/m] |
replaceable partial function surfaceTension "Return surface tension sigma in the two phase region" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output SurfaceTension sigma "Surface tension sigma in the two phase region";end surfaceTension;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.molarMass
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| MolarMass | MM | Mixture molar mass [kg/mol] |
redeclare replaceable partial function extends molarMass "Return the molar mass of the medium" algorithm MM := fluidConstants[1].molarMass; end molarMass;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dBubbleDensity_dPressure
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| DerDensityByPressure | ddldp | boiling curve density derivative [s2/m2] |
replaceable partial function dBubbleDensity_dPressure "Return bubble point density derivative" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output DerDensityByPressure ddldp "boiling curve density derivative";end dBubbleDensity_dPressure;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dDewDensity_dPressure
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| DerDensityByPressure | ddvdp | saturated steam density derivative [s2/m2] |
replaceable partial function dDewDensity_dPressure "Return dew point density derivative" extends Modelica.Icons.Function; input SaturationProperties sat "saturation property record"; output DerDensityByPressure ddvdp "saturated steam density derivative";end dDewDensity_dPressure;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dBubbleEnthalpy_dPressure
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| DerEnthalpyByPressure | dhldp | boiling curve specific enthalpy derivative [J.m.s2/kg2] |
replaceable partial function dBubbleEnthalpy_dPressure
"Return bubble point specific enthalpy derivative"
extends Modelica.Icons.Function;
input SaturationProperties sat "saturation property record";
output DerEnthalpyByPressure dhldp
"boiling curve specific enthalpy derivative";
end dBubbleEnthalpy_dPressure;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dDewEnthalpy_dPressure
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| SaturationProperties | sat | saturation property record |
| Type | Name | Description |
|---|---|---|
| DerEnthalpyByPressure | dhvdp | saturated steam specific enthalpy derivative [J.m.s2/kg2] |
replaceable partial function dDewEnthalpy_dPressure
"Return dew point specific enthalpy derivative"
extends Modelica.Icons.Function;
input SaturationProperties sat "saturation property record";
output DerEnthalpyByPressure dhvdp
"saturated steam specific enthalpy derivative";
end dDewEnthalpy_dPressure;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_pTX
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| MassFraction | X[nX] | Mass fractions [kg/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h | Specific enthalpy at p, T, X [J/kg] |
redeclare replaceable function specificEnthalpy_pTX "Return specific enthalpy from pressure, temperature and mass fraction" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input Temperature T "Temperature"; input MassFraction X[nX] "Mass fractions"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output SpecificEnthalpy h "Specific enthalpy at p, T, X"; algorithm h := specificEnthalpy(setState_pTX(p,T,X,phase));end specificEnthalpy_pTX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_phX
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| MassFraction | X[nX] | Mass fractions [kg/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Temperature | T | Temperature [K] |
redeclare replaceable function temperature_phX "Return temperature from p, h, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input MassFraction X[nX] "Mass fractions"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Temperature T "Temperature"; algorithm T := temperature(setState_phX(p,h,X,phase));end temperature_phX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_phX
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| MassFraction | X[nX] | Mass fractions [kg/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Density | d | density [kg/m3] |
redeclare replaceable function density_phX "Return density from p, h, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input MassFraction X[nX] "Mass fractions"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Density d "density"; algorithm d := density(setState_phX(p,h,X,phase));end density_phX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_psX
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[nX] | Mass fractions [kg/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Temperature | T | Temperature [K] |
redeclare replaceable function temperature_psX "Return temperature from p, s, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input MassFraction X[nX] "Mass fractions"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Temperature T "Temperature"; algorithm T := temperature(setState_psX(p,s,X,phase));end temperature_psX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_psX
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[nX] | Mass fractions [kg/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Density | d | Density [kg/m3] |
redeclare replaceable function density_psX "Return density from p, s, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input MassFraction X[nX] "Mass fractions"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Density d "Density"; algorithm d := density(setState_psX(p,s,X,phase));end density_psX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_psX
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| MassFraction | X[nX] | Mass fractions [kg/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h | specific enthalpy [J/kg] |
redeclare replaceable function specificEnthalpy_psX "Return specific enthalpy from p, s, and X or Xi" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input MassFraction X[nX] "Mass fractions"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output SpecificEnthalpy h "specific enthalpy"; algorithm h := specificEnthalpy(setState_psX(p,s,X,phase));end specificEnthalpy_psX;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_pT
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable function setState_pT "Return thermodynamic state from p and T" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input Temperature T "Temperature"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output ThermodynamicState state "thermodynamic state record"; algorithm state := setState_pTX(p,T,fill(0,0),phase);end setState_pT;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_ph
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable function setState_ph "Return thermodynamic state from p and h" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output ThermodynamicState state "thermodynamic state record"; algorithm state := setState_phX(p,h,fill(0, 0),phase);end setState_ph;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_ps
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable function setState_ps "Return thermodynamic state from p and s" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output ThermodynamicState state "thermodynamic state record"; algorithm state := setState_psX(p,s,fill(0,0),phase);end setState_ps;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_dT
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| Density | d | density [kg/m3] | |
| Temperature | T | Temperature [K] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
redeclare replaceable function setState_dT "Return thermodynamic state from d and T" extends Modelica.Icons.Function; input Density d "density"; input Temperature T "Temperature"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output ThermodynamicState state "thermodynamic state record"; algorithm state := setState_dTX(d,T,fill(0,0),phase);end setState_dT;
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| MassFraction | x | Vapour quality [kg/kg] |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
replaceable function setState_px
"Return thermodynamic state from pressure and vapour quality"
input AbsolutePressure p "Pressure";
input MassFraction x "Vapour quality";
output ThermodynamicState state "Thermodynamic state record";
algorithm
state := setState_ph(
p,
(1-x)*bubbleEnthalpy(setSat_p(p)) + x*dewEnthalpy(setSat_p(p)),
2);
end setState_px;
| Type | Name | Default | Description |
|---|---|---|---|
| Temperature | T | Temperature [K] | |
| MassFraction | x | Vapour quality [kg/kg] |
| Type | Name | Description |
|---|---|---|
| ThermodynamicState | state | thermodynamic state record |
replaceable function setState_Tx
"Return thermodynamic state from temperature and vapour quality"
input Temperature T "Temperature";
input MassFraction x "Vapour quality";
output ThermodynamicState state "thermodynamic state record";
algorithm
state := setState_ph(
saturationPressure_sat(setSat_T(T)),
(1-x)*bubbleEnthalpy(setSat_T(T)) + x*dewEnthalpy(setSat_T(T)),
2);
end setState_Tx;
| Type | Name | Default | Description |
|---|---|---|---|
| ThermodynamicState | state | Thermodynamic state record |
| Type | Name | Description |
|---|---|---|
| MassFraction | x | Vapour quality [kg/kg] |
replaceable function vapourQuality "Return vapour quality"
input ThermodynamicState state "Thermodynamic state record";
output MassFraction x "Vapour quality";
protected
constant SpecificEnthalpy eps = 1e-8;
algorithm
x := min(max(
(specificEnthalpy(state)-bubbleEnthalpy(setSat_p(pressure(state)))) /
(dewEnthalpy(setSat_p(pressure(state))) - bubbleEnthalpy(setSat_p(pressure(state))) + eps),
0),1);
end vapourQuality;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_ph
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Density | d | Density [kg/m3] |
redeclare replaceable function density_ph "Return density from p and h" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Density d "Density"; algorithm d := density_phX(p, h, fill(0,0), phase);end density_ph;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_ph
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEnthalpy | h | Specific enthalpy [J/kg] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Temperature | T | Temperature [K] |
redeclare replaceable function temperature_ph "Return temperature from p and h" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEnthalpy h "Specific enthalpy"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Temperature T "Temperature"; algorithm T := temperature_phX(p, h, fill(0,0),phase);end temperature_ph;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.pressure_dT
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| Density | d | Density [kg/m3] | |
| Temperature | T | Temperature [K] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| AbsolutePressure | p | Pressure [Pa] |
redeclare replaceable function pressure_dT "Return pressure from d and T" extends Modelica.Icons.Function; input Density d "Density"; input Temperature T "Temperature"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output AbsolutePressure p "Pressure"; algorithm p := pressure(setState_dTX(d, T, fill(0,0),phase));end pressure_dT;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_dT
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| Density | d | Density [kg/m3] | |
| Temperature | T | Temperature [K] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h | specific enthalpy [J/kg] |
redeclare replaceable function specificEnthalpy_dT "Return specific enthalpy from d and T" extends Modelica.Icons.Function; input Density d "Density"; input Temperature T "Temperature"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output SpecificEnthalpy h "specific enthalpy"; algorithm h := specificEnthalpy(setState_dTX(d, T, fill(0,0),phase));end specificEnthalpy_dT;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_ps
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h | specific enthalpy [J/kg] |
redeclare replaceable function specificEnthalpy_ps "Return specific enthalpy from p and s" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output SpecificEnthalpy h "specific enthalpy"; algorithm h := specificEnthalpy_psX(p,s,fill(0,0));end specificEnthalpy_ps;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_ps
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Temperature | T | Temperature [K] |
redeclare replaceable function temperature_ps "Return temperature from p and s" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Temperature T "Temperature"; algorithm T := temperature_psX(p,s,fill(0,0),phase);end temperature_ps;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_ps
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| SpecificEntropy | s | Specific entropy [J/(kg.K)] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Density | d | Density [kg/m3] |
redeclare replaceable function density_ps "Return density from p and s" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input SpecificEntropy s "Specific entropy"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Density d "Density"; algorithm d := density_psX(p, s, fill(0,0), phase);end density_ps;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_pT
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| SpecificEnthalpy | h | specific enthalpy [J/kg] |
redeclare replaceable function specificEnthalpy_pT "Return specific enthalpy from p and T" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input Temperature T "Temperature"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output SpecificEnthalpy h "specific enthalpy"; algorithm h := specificEnthalpy_pTX(p, T, fill(0,0),phase);end specificEnthalpy_pT;
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_pT
Extends from Modelica.Icons.Function (Icon for a function).
| Type | Name | Default | Description |
|---|---|---|---|
| AbsolutePressure | p | Pressure [Pa] | |
| Temperature | T | Temperature [K] | |
| FixedPhase | phase | 0 | 2 for two-phase, 1 for one-phase, 0 if not known |
| Type | Name | Description |
|---|---|---|
| Density | d | Density [kg/m3] |
redeclare replaceable function density_pT "Return density from p and T" extends Modelica.Icons.Function; input AbsolutePressure p "Pressure"; input Temperature T "Temperature"; input FixedPhase phase=0 "2 for two-phase, 1 for one-phase, 0 if not known"; output Density d "Density"; algorithm d := density(setState_pTX(p, T, fill(0,0),phase));end density_pT;