Modelica.Media.Interfaces.PartialTwoPhaseMedium

Base class for two phase medium of one substance

Information

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

Package Content

NameDescription
smoothModeltrue if the (derived) model should not generate state events
onePhasetrue if the (derived) model should never be called with two-phase inputs
Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidLimits FluidLimits validity limits for fluid model
Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants FluidConstants extended fluid constants
fluidConstantsconstant data for the fluid
Modelica.Media.Interfaces.PartialTwoPhaseMedium.ThermodynamicState ThermodynamicState Thermodynamic state of two phase medium
Modelica.Media.Interfaces.PartialTwoPhaseMedium.SaturationProperties SaturationProperties 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
Modelica.Media.Interfaces.PartialTwoPhaseMedium.BaseProperties BaseProperties Base properties (p, d, T, h, u, R, MM, sat) of two phase medium
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setDewState setDewState Return the thermodynamic state on the dew line
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setBubbleState setBubbleState Return the thermodynamic state on the bubble line
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_dTX setState_dTX Return thermodynamic state as function of d, T and composition X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_phX setState_phX Return thermodynamic state as function of p, h and composition X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_psX setState_psX Return thermodynamic state as function of p, s and composition X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_pTX setState_pTX Return thermodynamic state as function of p, T and composition X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setSat_T setSat_T Return saturation property record from temperature
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setSat_p setSat_p Return saturation property record from pressure
Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleEnthalpy bubbleEnthalpy Return bubble point specific enthalpy
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewEnthalpy dewEnthalpy Return dew point specific enthalpy
Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleEntropy bubbleEntropy Return bubble point specific entropy
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewEntropy dewEntropy Return dew point specific entropy
Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleDensity bubbleDensity Return bubble point density
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewDensity dewDensity Return dew point density
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationPressure saturationPressure Return saturation pressure
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature saturationTemperature Return saturation temperature
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationPressure_sat saturationPressure_sat Return saturation temperature
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_sat saturationTemperature_sat Return saturation temperature
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_derp saturationTemperature_derp Return derivative of saturation temperature w.r.t. pressure
Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_derp_sat saturationTemperature_derp_sat Return derivative of saturation temperature w.r.t. pressure
Modelica.Media.Interfaces.PartialTwoPhaseMedium.surfaceTension surfaceTension Return surface tension sigma in the two phase region
Modelica.Media.Interfaces.PartialTwoPhaseMedium.molarMass molarMass Return the molar mass of the medium
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dBubbleDensity_dPressure dBubbleDensity_dPressure Return bubble point density derivative
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dDewDensity_dPressure dDewDensity_dPressure Return dew point density derivative
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dBubbleEnthalpy_dPressure dBubbleEnthalpy_dPressure Return bubble point specific enthalpy derivative
Modelica.Media.Interfaces.PartialTwoPhaseMedium.dDewEnthalpy_dPressure dDewEnthalpy_dPressure Return dew point specific enthalpy derivative
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_pTX specificEnthalpy_pTX Return specific enthalpy from pressure, temperature and mass fraction
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_phX temperature_phX Return temperature from p, h, and X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_phX density_phX Return density from p, h, and X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_psX temperature_psX Return temperature from p, s, and X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_psX density_psX Return density from p, s, and X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_psX specificEnthalpy_psX Return specific enthalpy from p, s, and X or Xi
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_pT setState_pT Return thermodynamic state from p and T
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_ph setState_ph Return thermodynamic state from p and h
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_ps setState_ps Return thermodynamic state from p and s
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_dT setState_dT Return thermodynamic state from d and T
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_px setState_px Return thermodynamic state from pressure and vapour quality
Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_Tx setState_Tx Return thermodynamic state from temperature and vapour quality
Modelica.Media.Interfaces.PartialTwoPhaseMedium.vapourQuality vapourQuality Return vapour quality
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_ph density_ph Return density from p and h
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_ph temperature_ph Return temperature from p and h
Modelica.Media.Interfaces.PartialTwoPhaseMedium.pressure_dT pressure_dT Return pressure from d and T
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_dT specificEnthalpy_dT Return specific enthalpy from d and T
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_ps specificEnthalpy_ps Return specific enthalpy from p and s
Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_ps temperature_ps Return temperature from p and s
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_ps density_ps Return density from p and s
Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_pT specificEnthalpy_pT Return specific enthalpy from p and T
Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_pT density_pT Return density from p and T
Inherited
ThermoStatesEnumeration 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=101325Reference pressure of Medium: default 1 atmosphere
reference_T=298.15Reference temperature of Medium: default 25 deg Celsius
reference_X=fill(1/nX, nX)Default mass fractions of medium
p_default=101325Default 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_XDefault value for mass fractions of medium (for initialization)
nS=size(substanceNames, 1)Number of substances
nX=nSNumber of mass fractions
nXi=if fixedX then 0 else if reducedX then nS - 1 else nSNumber of structurally independent mass fractions (see docu for details)
nC=size(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
C_nominal=1.0e-6*ones(nC)Default for the nominal values for the extra properties
Modelica.Media.Interfaces.PartialMedium.setSmoothState setSmoothState Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b
Modelica.Media.Interfaces.PartialMedium.dynamicViscosity dynamicViscosity Return dynamic viscosity
Modelica.Media.Interfaces.PartialMedium.thermalConductivity thermalConductivity Return thermal conductivity
Modelica.Media.Interfaces.PartialMedium.prandtlNumber prandtlNumber Return the Prandtl number
Modelica.Media.Interfaces.PartialMedium.pressure pressure Return pressure
Modelica.Media.Interfaces.PartialMedium.temperature temperature Return temperature
Modelica.Media.Interfaces.PartialMedium.density density Return density
Modelica.Media.Interfaces.PartialMedium.specificEnthalpy specificEnthalpy Return specific enthalpy
Modelica.Media.Interfaces.PartialMedium.specificInternalEnergy specificInternalEnergy Return specific internal energy
Modelica.Media.Interfaces.PartialMedium.specificEntropy specificEntropy Return specific entropy
Modelica.Media.Interfaces.PartialMedium.specificGibbsEnergy specificGibbsEnergy Return specific Gibbs energy
Modelica.Media.Interfaces.PartialMedium.specificHelmholtzEnergy specificHelmholtzEnergy Return specific Helmholtz energy
Modelica.Media.Interfaces.PartialMedium.specificHeatCapacityCp specificHeatCapacityCp Return specific heat capacity at constant pressure
Modelica.Media.Interfaces.PartialMedium.heatCapacity_cp heatCapacity_cp alias for deprecated name
Modelica.Media.Interfaces.PartialMedium.specificHeatCapacityCv specificHeatCapacityCv Return specific heat capacity at constant volume
Modelica.Media.Interfaces.PartialMedium.heatCapacity_cv heatCapacity_cv alias for deprecated name
Modelica.Media.Interfaces.PartialMedium.isentropicExponent isentropicExponent Return isentropic exponent
Modelica.Media.Interfaces.PartialMedium.isentropicEnthalpy isentropicEnthalpy Return isentropic enthalpy
Modelica.Media.Interfaces.PartialMedium.velocityOfSound velocityOfSound Return velocity of sound
Modelica.Media.Interfaces.PartialMedium.isobaricExpansionCoefficient isobaricExpansionCoefficient Return overall the isobaric expansion coefficient beta
Modelica.Media.Interfaces.PartialMedium.beta beta alias for isobaricExpansionCoefficient for user convenience
Modelica.Media.Interfaces.PartialMedium.isothermalCompressibility isothermalCompressibility Return overall the isothermal compressibility factor
Modelica.Media.Interfaces.PartialMedium.kappa kappa alias of isothermalCompressibility for user convenience
Modelica.Media.Interfaces.PartialMedium.density_derp_h density_derp_h Return density derivative w.r.t. pressure at const specific enthalpy
Modelica.Media.Interfaces.PartialMedium.density_derh_p density_derh_p Return density derivative w.r.t. specific enthalpy at constant pressure
Modelica.Media.Interfaces.PartialMedium.density_derp_T density_derp_T Return density derivative w.r.t. pressure at const temperature
Modelica.Media.Interfaces.PartialMedium.density_derT_p density_derT_p Return density derivative w.r.t. temperature at constant pressure
Modelica.Media.Interfaces.PartialMedium.density_derX density_derX Return density derivative w.r.t. mass fraction
Modelica.Media.Interfaces.PartialMedium.specificEntropy_pTX specificEntropy_pTX Return specific enthalpy from p, T, and X or Xi
Modelica.Media.Interfaces.PartialMedium.density_pTX density_pTX 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
Modelica.Media.Interfaces.PartialMedium.Choices Choices Types, constants to define menu choices

Types and constants

  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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidLimits

validity limits for fluid model

Information


          

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 records).

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.FluidConstants

extended fluid constants

Information

Extends from (critical, triple, molecular and other standard data of fluid).

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.ThermodynamicState

Thermodynamic state of two phase medium

Information

Extends from (Minimal variable set that is available as input argument to every medium function).

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.SaturationProperties

Saturation properties of two phase medium

Information

Extends from Modelica.Icons.Record (Icon for records).

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.BaseProperties

Base properties (p, d, T, h, u, R, MM, sat) of two phase medium

Information

Extends from .

Parameters

TypeNameDefaultDescription
Advanced
BooleanpreferredMediumStatesfalse= true if StateSelect.prefer shall be used for the independent property variables of the medium

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setDewState

Return the thermodynamic state on the dew line

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation point
FixedPhasephase1phase: default is one phase

Outputs

TypeNameDescription
ThermodynamicStatestatecomplete thermodynamic state info

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setBubbleState

Return the thermodynamic state on the bubble line

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation point
FixedPhasephase1phase: default is one phase

Outputs

TypeNameDescription
ThermodynamicStatestatecomplete thermodynamic state info

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_dTX

Return thermodynamic state as function of d, T and composition X or Xi

Information

Extends from (Return thermodynamic state as function of d, T and composition X or Xi).

Inputs

TypeNameDefaultDescription
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known
Densityd density [kg/m3]
TemperatureT Temperature [K]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_phX

Return thermodynamic state as function of p, h and composition X or Xi

Information

Extends from (Return thermodynamic state as function of p, h and composition X or Xi).

Inputs

TypeNameDefaultDescription
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_psX

Return thermodynamic state as function of p, s and composition X or Xi

Information

Extends from (Return thermodynamic state as function of p, s and composition X or Xi).

Inputs

TypeNameDefaultDescription
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_pTX

Return thermodynamic state as function of p, T and composition X or Xi

Information

Extends from (Return thermodynamic state as function of p, T and composition X or Xi).

Inputs

TypeNameDefaultDescription
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known
AbsolutePressurep Pressure [Pa]
TemperatureT Temperature [K]
MassFractionX[:]reference_XMass fractions [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setSat_T

Return saturation property record from temperature

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
TemperatureT temperature [K]

Outputs

TypeNameDescription
SaturationPropertiessatsaturation property record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setSat_p

Return saturation property record from pressure

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep pressure [Pa]

Outputs

TypeNameDescription
SaturationPropertiessatsaturation property record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleEnthalpy

Return bubble point specific enthalpy

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
SpecificEnthalpyhlboiling curve specific enthalpy [J/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewEnthalpy

Return dew point specific enthalpy

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
SpecificEnthalpyhvdew curve specific enthalpy [J/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleEntropy

Return bubble point specific entropy

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
SpecificEntropyslboiling curve specific entropy [J/(kg.K)]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewEntropy

Return dew point specific entropy

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
SpecificEntropysvdew curve specific entropy [J/(kg.K)]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.bubbleDensity

Return bubble point density

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
Densitydlboiling curve density [kg/m3]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.dewDensity

Return dew point density

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
Densitydvdew curve density [kg/m3]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationPressure

Return saturation pressure

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
TemperatureT temperature [K]

Outputs

TypeNameDescription
AbsolutePressurepsaturation pressure [Pa]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature

Return saturation temperature

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep pressure [Pa]

Outputs

TypeNameDescription
TemperatureTsaturation temperature [K]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationPressure_sat

Return saturation temperature

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
AbsolutePressurepsaturation pressure [Pa]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_sat

Return saturation temperature

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
TemperatureTsaturation temperature [K]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_derp

Return derivative of saturation temperature w.r.t. pressure

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep pressure [Pa]

Outputs

TypeNameDescription
RealdTpderivative of saturation temperature w.r.t. pressure

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.saturationTemperature_derp_sat

Return derivative of saturation temperature w.r.t. pressure

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
RealdTpderivative of saturation temperature w.r.t. pressure

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.surfaceTension

Return surface tension sigma in the two phase region

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
SurfaceTensionsigmaSurface tension sigma in the two phase region [N/m]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.molarMass

Return the molar mass of the medium

Information

Extends from (Return the molar mass of the medium).

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate thermodynamic state record

Outputs

TypeNameDescription
MolarMassMMMixture molar mass [kg/mol]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.dBubbleDensity_dPressure

Return bubble point density derivative

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
DerDensityByPressureddldpboiling curve density derivative [s2/m2]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.dDewDensity_dPressure

Return dew point density derivative

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
DerDensityByPressureddvdpsaturated steam density derivative [s2/m2]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.dBubbleEnthalpy_dPressure

Return bubble point specific enthalpy derivative

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
DerEnthalpyByPressuredhldpboiling curve specific enthalpy derivative [J.m.s2/kg2]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.dDewEnthalpy_dPressure

Return dew point specific enthalpy derivative

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
SaturationPropertiessat saturation property record

Outputs

TypeNameDescription
DerEnthalpyByPressuredhvdpsaturated steam specific enthalpy derivative [J.m.s2/kg2]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_pTX

Return specific enthalpy from pressure, temperature and mass fraction

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
TemperatureT Temperature [K]
MassFractionX[nX] Mass fractions [kg/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
SpecificEnthalpyhSpecific enthalpy at p, T, X [J/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_phX

Return temperature from p, h, and X or Xi

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
MassFractionX[nX] Mass fractions [kg/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
TemperatureTTemperature [K]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_phX

Return density from p, h, and X or Xi

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
MassFractionX[nX] Mass fractions [kg/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
Densityddensity [kg/m3]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_psX

Return temperature from p, s, and X or Xi

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
MassFractionX[nX] Mass fractions [kg/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
TemperatureTTemperature [K]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_psX

Return density from p, s, and X or Xi

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
MassFractionX[nX] Mass fractions [kg/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
DensitydDensity [kg/m3]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_psX

Return specific enthalpy from p, s, and X or Xi

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
MassFractionX[nX] Mass fractions [kg/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
SpecificEnthalpyhspecific enthalpy [J/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_pT

Return thermodynamic state from p and T

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
TemperatureT Temperature [K]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_ph

Return thermodynamic state from p and h

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_ps

Return thermodynamic state from p and s

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_dT

Return thermodynamic state from d and T

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Densityd density [kg/m3]
TemperatureT Temperature [K]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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;

Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_px

Return thermodynamic state from pressure and vapour quality

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
MassFractionx Vapour quality [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestateThermodynamic state record

Modelica definition

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;

Modelica.Media.Interfaces.PartialTwoPhaseMedium.setState_Tx

Return thermodynamic state from temperature and vapour quality

Inputs

TypeNameDefaultDescription
TemperatureT Temperature [K]
MassFractionx Vapour quality [kg/kg]

Outputs

TypeNameDescription
ThermodynamicStatestatethermodynamic state record

Modelica definition

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;

Modelica.Media.Interfaces.PartialTwoPhaseMedium.vapourQuality

Return vapour quality

Inputs

TypeNameDefaultDescription
ThermodynamicStatestate Thermodynamic state record

Outputs

TypeNameDescription
MassFractionxVapour quality [kg/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_ph

Return density from p and h

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
DensitydDensity [kg/m3]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_ph

Return temperature from p and h

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEnthalpyh Specific enthalpy [J/kg]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
TemperatureTTemperature [K]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.pressure_dT

Return pressure from d and T

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Densityd Density [kg/m3]
TemperatureT Temperature [K]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
AbsolutePressurepPressure [Pa]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_dT

Return specific enthalpy from d and T

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
Densityd Density [kg/m3]
TemperatureT Temperature [K]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
SpecificEnthalpyhspecific enthalpy [J/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_ps

Return specific enthalpy from p and s

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
SpecificEnthalpyhspecific enthalpy [J/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.temperature_ps

Return temperature from p and s

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
TemperatureTTemperature [K]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_ps

Return density from p and s

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
SpecificEntropys Specific entropy [J/(kg.K)]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
DensitydDensity [kg/m3]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.specificEnthalpy_pT

Return specific enthalpy from p and T

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
TemperatureT Temperature [K]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
SpecificEnthalpyhspecific enthalpy [J/kg]

Modelica definition

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 Modelica.Media.Interfaces.PartialTwoPhaseMedium.density_pT

Return density from p and T

Information

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
AbsolutePressurep Pressure [Pa]
TemperatureT Temperature [K]
FixedPhasephase02 for two-phase, 1 for one-phase, 0 if not known

Outputs

TypeNameDescription
DensitydDensity [kg/m3]

Modelica definition

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;

Automatically generated Fri Nov 12 16:31:30 2010.