Medium model for R134a and p,h as states
Calculation of fluid properties for Tetrafluoroethane (R134a) in the fluid region of 0.0039 bar (Triple pressure) to 700 bar and 169.85 Kelvin (Triple temperature) to 455 Kelvin.
The functions provided by this package shall be used inside of the restricted limits according to the referenced literature.
References
Extends from Modelica.Media.Interfaces.PartialTwoPhaseMedium (Base class for two phase medium of one substance).
Name | Description |
---|---|
ph_explicit=true | |
dT_explicit=false | |
r134aLimits | |
r134aConstants | |
SaturationProperties | |
ThermodynamicState | Thermodynamic state |
BaseProperties | Base properties of R134a |
setState_phX | Set state for pressure and specific enthalpy (X not used since single substance) |
setState_dTX | Set state for density and temperature (X not used since single substance) |
setState_psX | Set state for pressure and specific entropy (X not used since single substance) |
setState_pTX | Set state for pressure and temperature (X not used since single substance) |
setBubbleState | Return the thermodynamic state on the bubble line |
setDewState | Return the thermodynamic state on the dew line |
density_ph | Density as function of pressure and specific enthalpy |
density | Density as function of pressure and specific enthalpy | use setState_phX function for input |
temperature_ph | Temperature as function of pressure and specific enthalpy |
temperature | Temperature as function of pressure and specific enthalpy | use setState_phX function for input |
pressure | Pressure w.r.t. thermodynamic state |
specificInternalEnergy | Specific internal energy w.r.t. thermodynamic state |
specificEnthalpy | Specific enthalpy w.r.t. thermodynamic state | use setState_phX function for input |
specificEntropy | Specific entropy w.r.t. thermodynamic state | use setState_phX function for input if necessary |
saturationTemperature | Saturation temperature in two-phase region |
saturationTemperature_derp | Derivative of saturation temperature in two-phase region |
saturationTemperature_der_p | Time derivative of saturation temperature in two-phase region |
bubbleDensity | Density of liquid phase w.r.t. saturation pressure | use setSat_p function for input |
dBubbleDensity_dPressure | Derivative of liquid density in two-phase region w.r.t. pressure |
dBubbleDensity_dPressure_der_sat | Time derivative of liquid density in two-phase region w.r.t. pressure |
dewDensity | Density of vapor phase w.r.t. saturation pressure | use setSat_p function for input |
dDewDensity_dPressure | Derivative of vapor density in two-phase region w.r.t. pressure |
dDewDensity_dPressure_der_sat | Time derivative of vapor density in two-phase region w.r.t. pressure |
bubbleEnthalpy | Specific enthalpy of liquid phase w.r.t. saturation pressure | use setSat_p function for input |
dBubbleEnthalpy_dPressure | Derivative of liquid specific enthalpy in two-phase region w.r.t. pressure |
dBubbleEnthalpy_dPressure_der_sat | Time derivative of liquid specific enthalpy in two-phase region w.r.t. pressure |
dewEnthalpy | Specific enthalpy of vapor phase w.r.t. saturation pressure | use setSat_p function for input |
dDewEnthalpy_dPressure | Derivative of vapor specific enthalpy in two-phase region w.r.t. pressure |
dDewEnthalpy_dPressure_der_sat | Time derivative of vapor specific enthalpy in two-phase region w.r.t. pressure |
dewEntropy | Specific entropy of vapor phase w.r.t. saturation pressure | use setSat_p function for input |
dDewEntropy_dPressure | Derivative of vapor specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input |
dDewEntropy_dPressure_der_sat | Time derivative of vapor specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input |
bubbleEntropy | Specific entropy of liquid phase w.r.t. saturation pressure | use setSat_p function for input |
dBubbleEntropy_dPressure | Derivative of liquid specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input |
dBubbleEntropy_dPressure_der_sat | Time derivative of liquid specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input |
saturationPressure | Saturation pressure w.r.t. temperature |
specificHeatCapacityCp | Specific heat capacity at constant pressure | turns infinite in two-phase region! | use setState_phX function for input |
specificHeatCapacityCv | Specific heat capacity at constant volume | use setState_phX function for input |
dynamicViscosity | Dynamic viscosity w.r.t. temperature and density | use setState_phX function for input |
thermalConductivity | Thermal conductivity w.r.t. thermodynamic state | use setState_phX function for input |
surfaceTension | Surface tension as a function of temperature (below critical point) |
velocityOfSound | Velocity of sound w.r.t. thermodynamic state (only valid for one-phase) |
isothermalCompressibility | Isothermal compressibility w.r.t. thermodynamic state (only valid for one-phase) |
isobaricExpansionCoefficient | Isobaric expansion coefficient w.r.t. thermodynamic state (only valid for one-phase) |
isentropicExponent | Isentropic exponent gamma w.r.t. thermodynamic state | not defined in two-phase region | use setState_phX function for input |
specificGibbsEnergy | Specific gibbs energy w.r.t. thermodynamic state |
specificHelmholtzEnergy | Helmholtz energy w.r.t. thermodynamic state |
density_derh_p | Density derivative by specific enthalpy | use setState_phX function for input |
density_derp_h | Density derivative by pressure | use setState_phX function for input |
isentropicEnthalpy | Isentropic enthalpy of downstream pressure and upstream thermodynamic state (specific entropy) |
derivsOf_ph | Derivatives required for inversion of temperature and density functions |
dt_ph | Density and temperature w.r.t. pressure and specific enthalpy |
dtofphOnePhase | Density and temperature w.r.t. pressure and specific enthalpy in one-phase region |
dtofpsOnePhase | Inverse iteration in one phase region (d,T) = f(p,s) |
f_R134a | Calculation of helmholtz derivatives by density and temperature |
fid_R134a | Helmholtz coefficients of ideal part |
fres_R134a | Calculation of helmholtz derivatives |
getPhase_ph | Number of phases by pressure and specific enthalpy |
getPhase_ps | Number of phases by pressure and entropy |
hofpsTwoPhase | Isentropic specific enthalpy in two phase region h(p,s) |
R134a_liqofdT | Properties on liquid boundary phase |
R134a_vapofdT | Properties on vapor boundary phase |
rho_ph_der | Time derivative function of density_ph |
rho_props_ph | Density as function of pressure and specific enthalpy |
T_ph_der | Time derivative function of T_ph |
T_props_ph | Temperature as function of pressure and specific enthalpy |
setSmoothState | Smooth transition function between state_a and state_b |
dofpT | Compute d for given p and T |
hofpT | Compute h for given p and T |
phaseBoundaryAssert | Assert function for checking threshold to phase boundary |
Inherited | |
smoothModel=false | True if the (derived) model should not generate state events |
onePhase=false | True if the (derived) model should never be called with two-phase inputs |
fluidConstants=r134aConstants | Constant data for the fluid |
setSat_T | Return saturation property record from temperature |
setSat_p | Return saturation property record from pressure |
saturationPressure_sat | Return saturation pressure |
saturationTemperature_sat | Return saturation temperature |
saturationTemperature_derp_sat | Return derivative of saturation temperature w.r.t. pressure |
molarMass | Return the molar mass of the medium |
specificEnthalpy_pTX | Return specific enthalpy from pressure, temperature and mass fraction |
temperature_phX | Return temperature from p, h, and X or Xi |
density_phX | Return density from p, h, and X or Xi |
temperature_psX | Return temperature from p, s, and X or Xi |
density_psX | Return density from p, s, and X or Xi |
specificEnthalpy_psX | Return specific enthalpy from p, s, and X or Xi |
setState_pT | Return thermodynamic state from p and T |
setState_ph | Return thermodynamic state from p and h |
setState_ps | Return thermodynamic state from p and s |
setState_dT | Return thermodynamic state from d and T |
setState_px | Return thermodynamic state from pressure and vapour quality |
setState_Tx | Return thermodynamic state from temperature and vapour quality |
vapourQuality | Return vapour quality |
pressure_dT | Return pressure from d and T |
specificEnthalpy_dT | Return specific enthalpy from d and T |
specificEnthalpy_ps | Return specific enthalpy from p and s |
temperature_ps | Return temperature from p and s |
density_ps | Return density from p and s |
specificEnthalpy_pT | Return specific enthalpy from p and T |
density_pT | Return density from p and T |
ThermoStates=Modelica.Media.Interfaces.Choices.IndependentVariables.ph | Enumeration type for independent variables |
mediumName="R134a_ph" | Name of the medium |
substanceNames={"tetrafluoroethane"} | 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=false | = 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=true | = 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.Units.Conversions.from_degC(20) | Default value for temperature of medium (for initialization) |
h_default=420e3 | Default value for specific enthalpy of medium (for initialization) |
X_default=reference_X | Default value for mass fractions of medium (for initialization) |
C_default=fill(0, nC) | Default value for trace substances 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 |
C_nominal=1.0e-6*ones(nC) | Default for the nominal values for the extra properties |
FluidConstants | Critical, triple, molecular and other standard data of fluid |
prandtlNumber | Return the Prandtl number |
heatCapacity_cp | Alias for deprecated name |
heatCapacity_cv | Alias for deprecated name |
beta | Alias for isobaricExpansionCoefficient for user convenience |
kappa | Alias of isothermalCompressibility for user convenience |
density_derp_T | Return density derivative w.r.t. pressure at const temperature |
density_derT_p | Return density derivative w.r.t. temperature at constant pressure |
density_derX | Return density derivative w.r.t. mass fraction |
specificEntropy_pTX | Return specific enthalpy from p, T, and X or Xi |
density_pTX | Return density from p, T, and X or Xi |
MassFlowRate | Type for mass flow rate with medium specific attributes |
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 |
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 respect to pressure with medium specific attributes |
DerDensityByEnthalpy | Type for partial derivative of density with respect to enthalpy with medium specific attributes |
DerEnthalpyByPressure | Type for partial derivative of enthalpy with respect to pressure with medium specific attributes |
DerDensityByTemperature | Type for partial derivative of density with respect to temperature with medium specific attributes |
DerTemperatureByPressure | Type for partial derivative of temperature with respect to pressure with medium specific attributes |
FluidLimits | Validity limits for fluid model |
FixedPhase | Phase of the fluid: 1 for 1-phase, 2 for two-phase, 0 for not known, e.g., interactive use |
Basic | The most basic version of a record used in several degrees of detail |
IdealGas | The ideal gas version of a record used in several degrees of detail |
TwoPhase | The two phase fluid version of a record used in several degrees of detail |
Extends from (Saturation properties of two phase medium).
Thermodynamic state
Extends from (Thermodynamic state of two phase medium).
Base properties of R134a
Extends from (Base properties (p, d, T, h, u, R_s, MM, sat) of two phase medium).
Name | Description |
---|---|
Advanced | |
preferredMediumStates | = true if StateSelect.prefer shall be used for the independent property variables of the medium |
Set state for pressure and specific enthalpy (X not used since single substance)
This function should be used by default in order to calculate the thermodynamic state record used as input by many functions.
Example:
parameter Medium.AbsolutePressure p = 3e5; parameter Medium.SpecificEnthalpy h = 4.2e5; Medium.Density rho; equation rho = Medium.density(setState_phX(p, h, fill(0, Medium.nX)));
Extends from (Return thermodynamic state as function of p, h and composition X or Xi).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
X[:] | Mass fractions [kg/kg] |
phase | 2 for two-phase, 1 for one-phase, 0 if not known |
Name | Description |
---|---|
state | Thermodynamic state record |
Set state for density and temperature (X not used since single substance)
Although the medium package is explicit for pressure and specific enthalpy, this function may be used in order to calculate the thermodynamic state record used as input by many functions. It will calculate the missing states:
Example:
parameter Medium.Density d = 4; parameter Medium.Temperature T = 298; Medium.SpecificEntropy s; equation s = Medium.specificEntropy(setState_dTX(d, T, fill(0, Medium.nX)));
Extends from (Return thermodynamic state as function of d, T and composition X or Xi).
Name | Description |
---|---|
d | Density [kg/m3] |
T | Temperature [K] |
X[:] | Mass fractions [kg/kg] |
phase | 2 for two-phase, 1 for one-phase, 0 if not known |
Name | Description |
---|---|
state | Thermodynamic state record |
Set state for pressure and specific entropy (X not used since single substance)
This function may be used in order to calculate the thermodynamic state record used as input by many functions. It will calculate the missing states:
Example:
parameter Medium.AbsolutePressure p = 3e5; parameter Medium.SpecificEntropy s = 1.7e3; Medium.SpecificEnthalpy h; equation h = Medium.specificEnthalpy(setState_psX(p, s, fill(0, Medium.nX)));
Extends from (Return thermodynamic state as function of p, s and composition X or Xi).
Name | Description |
---|---|
p | Pressure [Pa] |
s | Specific entropy [J/(kg.K)] |
X[:] | Mass fractions [kg/kg] |
phase | 2 for two-phase, 1 for one-phase, 0 if not known |
Name | Description |
---|---|
state | Thermodynamic state record |
Set state for pressure and temperature (X not used since single substance)
This function should be used by default in order to calculate the thermodynamic state record used as input by many functions.
Example:
parameter Medium.AbsolutePressure p = 3e5; parameter Medium.Temperature T = 290; Medium.Density rho; equation rho = Medium.density(setState_pTX(p, T, fill(0, Medium.nX)));
Please note, that in contrast to setState_phX, setState_dTX and setState_psX this function can not calculate properties in the two-phase region since pressure and temperature are dependent variables. A guard function will be called if the temperature difference to the phase boundary is lower than 1K or the pressure difference to the critical pressure is lower than 1000 Pa.
Extends from (Return thermodynamic state as function of p, T and composition X or Xi).
Name | Description |
---|---|
p | Pressure [Pa] |
T | Temperature [K] |
X[:] | Mass fractions [kg/kg] |
phase | 2 for two-phase, 1 for one-phase, 0 if not known |
Name | Description |
---|---|
state | Thermodynamic state record |
Return the thermodynamic state on the bubble line
This function shall be used in order to calculate the thermodynamic state record for the liquid phase boundary. It requires the saturation record as input which can be determined by both functions setSat_p and setSat_T:
Example:
Medium.AbsolutePressure p=3e5; // Viscosity on the liquid phase boundary SI.DynamicViscosity eta_liq; equation eta_liq = Medium.DynamicViscosity(Medium.setBubbleState(Medium.setSat_p(p)));
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return the thermodynamic state on the bubble line).
Name | Description |
---|---|
sat | Saturation point |
phase | Phase: default is one phase |
Name | Description |
---|---|
state | Complete thermodynamic state info |
Return the thermodynamic state on the dew line
This function shall be used in order to calculate the thermodynamic state record for the vapor phase boundary. It requires the saturation record as input which can be determined by both functions setSat_p and setSat_T:
Example:
Medium.AbsolutePressure p=3e5; // Viscosity on the vapor phase boundary SI.DynamicViscosity eta_vap; equation eta_vap = Medium.DynamicViscosity(Medium.setBubbleState(Medium.setSat_p(p)));
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return the thermodynamic state on the dew line).
Name | Description |
---|---|
sat | Saturation point |
phase | Phase: default is one phase |
Name | Description |
---|---|
state | Complete thermodynamic state info |
Density as function of pressure and specific enthalpy
This function calculates the density of R134a from the state variables p (absolute pressure) and h (specific enthalpy). The density is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
phase | 2 for two-phase, 1 for one-phase, 0 if not known |
Name | Description |
---|---|
d | Density [kg/m3] |
Density as function of pressure and specific enthalpy | use setState_phX function for input
This function calculates the density of R134a from the state record (e.g., use setState_phX function for input). The density is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from (Return density).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
d | Density [kg/m3] |
Temperature as function of pressure and specific enthalpy
This function calculates the Kelvin temperature of R134a from the state variables p (absolute pressure) and h (specific enthalpy). The temperature is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
phase | 2 for two-phase, 1 for one-phase, 0 if not known |
Name | Description |
---|---|
T | Temperature [K] |
Temperature as function of pressure and specific enthalpy | use setState_phX function for input
This function calculates the Kelvin temperature of R134a from the state record (e.g., use setState_phX function for input). The temperature is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from (Return temperature).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
T | Temperature [K] |
Pressure w.r.t. thermodynamic state
This function is included for the sake of completeness.
Extends from (Return pressure).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
p | Pressure [Pa] |
Specific internal energy w.r.t. thermodynamic state
This function calculates the specific internal energy of R134a from the state record (e.g., use setState_phX function for input). The specific internal energy is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from (Return specific internal energy).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
u | Specific internal energy [J/kg] |
Specific enthalpy w.r.t. thermodynamic state | use setState_phX function for input
This function is included for the sake of completeness.
Extends from (Return specific enthalpy).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Specific entropy w.r.t. thermodynamic state | use setState_phX function for input if necessary
This function calculates the specific entropy of R134a from the state record (e.g., use setState_phX function for input). The specific entropy is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from (Return specific entropy).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
s | Specific entropy [J/(kg.K)] |
Saturation temperature in two-phase region
This function calculates the saturation temperature of R134a from the state variable p (absolute pressure). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return saturation temperature).
Name | Description |
---|---|
p | Pressure [Pa] |
Name | Description |
---|---|
T | Saturation temperature [K] |
Derivative of saturation temperature in two-phase region
This function calculates the derivative of saturation temperature of R134a with regard to the state variable p (absolute pressure). The non-derivative function is saturatuionTemperature.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return derivative of saturation temperature w.r.t. pressure).
Name | Description |
---|---|
p | Pressure [Pa] |
Name | Description |
---|---|
dTp | Derivative of saturation temperature w.r.t. pressure [K/Pa] |
Time derivative of saturation temperature in two-phase region
This function calculates the time derivative of saturation temperature of R134a with regard to the time derivative of p. The non-derivative function is saturatuionTemperature.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
der_p | Time derivative of pressure |
Name | Description |
---|---|
der_Tsat | Time derivative of saturation temperature |
Density of liquid phase w.r.t. saturation pressure | use setSat_p function for input
This function calculates the liquid phase density of R134a from the state variable p (absolute pressure). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return bubble point density).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
dl | Boiling curve density [kg/m3] |
Derivative of liquid density in two-phase region w.r.t. pressure
This function calculates the derivative of liquid density of R134a in the two-phase region with regard to the state variable p (absolute pressure). The non-derivative function is bubbleDensity.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return bubble point density derivative).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
ddldp | Boiling curve density derivative [s2/m2] |
Time derivative of liquid density in two-phase region w.r.t. pressure
This function calculates the time derivative of liquid density of R134a with regard to the time derivative of p. The non-derivative function is bubbleDensity.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
der_sat | Derivative of saturation properties |
Name | Description |
---|---|
der_ddldp | Time derivative of liquid density in two-phase region w.r.t. pressure |
Density of vapor phase w.r.t. saturation pressure | use setSat_p function for input
This function calculates the vapor phase density of R134a from the state variable p (absolute pressure). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return dew point density).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
dv | Dew curve density [kg/m3] |
Derivative of vapor density in two-phase region w.r.t. pressure
This function calculates the derivative of vapor density of R134a in two-phase region with regard to the state variable p (absolute pressure). The non-derivative function is dewDensity.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return dew point density derivative).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
ddvdp | Saturated steam density derivative [s2/m2] |
Time derivative of vapor density in two-phase region w.r.t. pressure
This function calculates the time derivative of vapor density of R134a with regard to the time derivative of p. The non-derivative function is dewDensity.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
der_sat | Derivative of saturation properties |
Name | Description |
---|---|
der_ddvdp | Time derivative of vapor density in two-phase region w.r.t. pressure |
Specific enthalpy of liquid phase w.r.t. saturation pressure | use setSat_p function for input
This function calculates the liquid phase enthalpy of R134a from the state variable p (absolute pressure). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return bubble point specific enthalpy).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
hl | Boiling curve specific enthalpy [J/kg] |
Derivative of liquid specific enthalpy in two-phase region w.r.t. pressure
This function calculates the derivative of liquid enthalpy of R134a with regard to the state variable p (absolute pressure). The non-derivative function is bubbleEnthalpy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return bubble point specific enthalpy derivative).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
dhldp | Boiling curve specific enthalpy derivative [J.m.s2/kg2] |
Time derivative of liquid specific enthalpy in two-phase region w.r.t. pressure
This function calculates the time derivative of liquid specific enthalpy of R134a with regard to the time derivative of p. The non-derivative function is bubbleEnthalpy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
der_sat | Derivative of saturation properties |
Name | Description |
---|---|
der_dhldp | Time derivative of liquid specific enthalpy in two-phase region w.r.t. pressure |
Specific enthalpy of vapor phase w.r.t. saturation pressure | use setSat_p function for input
This function calculates the vapor phase enthalpy of R134a from the state variable p (absolute pressure). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return dew point specific enthalpy).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
hv | Dew curve specific enthalpy [J/kg] |
Derivative of vapor specific enthalpy in two-phase region w.r.t. pressure
This function calculates the derivative of vapor enthalpy of R134a in the two-phase region with regard to the state variable p (absolute pressure). The non-derivative function is dewEnthalpy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return dew point specific enthalpy derivative).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
dhvdp | Saturated steam specific enthalpy derivative [J.m.s2/kg2] |
Time derivative of vapor specific enthalpy in two-phase region w.r.t. pressure
This function calculates the time derivative of vapor enthalpy of R134a with regard to the time derivative of p. The non-derivative function is dewEnthalpy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
der_sat | Derivative of saturation properties |
Name | Description |
---|---|
der_dhvdp | Derivative of vapor specific enthalpy in two-phase region w.r.t. pressure |
Specific entropy of vapor phase w.r.t. saturation pressure | use setSat_p function for input
This function calculates the vapor phase entropy of R134a from the state variable p (absolute pressure). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return dew point specific entropy).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
sv | Dew curve specific entropy [J/(kg.K)] |
Derivative of vapor specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
This function calculates the derivative of vapor entropy of R134a with regard to the state variable p (absolute pressure). The non-derivative function is dewEntropy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
Name | Description |
---|---|
dsvdp | Derivative of vapor specific entropy in two-phase region w.r.t. pressure |
Time derivative of vapor specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
This function calculates the time derivative of vapor specific entropy of R134a with regard to the time derivative of p. The non-derivative function is dewEntropy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
der_sat | Derivative of saturation properties |
Name | Description |
---|---|
der_dsvdp | Derivative of vapor specific entropy in two-phase region w.r.t. pressure |
Specific entropy of liquid phase w.r.t. saturation pressure | use setSat_p function for input
This function calculates the liquid phase entropy of R134a from the state variable p (absolute pressure). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return bubble point specific entropy).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
sl | Boiling curve specific entropy [J/(kg.K)] |
Derivative of liquid specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
This function calculates the derivative of liquid entropy of R134a with regard to the state variable p (absolute pressure). The non-derivative function is bubbleEntropy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
Name | Description |
---|---|
dsldp | Derivative of liquid specific entropy in two-phase region w.r.t. pressure |
Time derivative of liquid specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
This function calculates the time derivative of liquid specific entropy of R134a with regard to the time derivative of p. The non-derivative function is bubbleEntropy.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
sat | Saturation properties | pressure is used for interpolation |
der_sat | Derivative of saturation properties |
Name | Description |
---|---|
der_dsldp | Derivative of liquid specific entropy in two-phase region w.r.t. pressure |
Saturation pressure w.r.t. temperature
This function calculates the saturation pressure of R134a from the state variable T (temperature). It is modelled by cubic splines which are fitted with non-equidistant grid points derived from the fundamental equation of state of Tillner-Roth and Baehr (1994) and the Maxwell criteria.
It is only valid in the two-phase region (i.e., ptriple ≤ p ≤ pcrit ).
Extends from (Return saturation pressure).
Name | Description |
---|---|
T | Temperature [K] |
Name | Description |
---|---|
p | Saturation pressure [Pa] |
Specific heat capacity at constant pressure | turns infinite in two-phase region! | use setState_phX function for input
This function calculates the specific heat capacity of R134a at constant pressure from the state record (e.g., use setState_phX function for input). The specific heat capacity is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
This property is only defined in one-phase region.
Extends from (Return specific heat capacity at constant pressure).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
cp | Specific heat capacity at constant pressure [J/(kg.K)] |
Specific heat capacity at constant volume | use setState_phX function for input
This function calculates the specific heat capacity of R134a at constant volume from the state record (e.g., use setState_phX function for input). The specific heat capacity is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Please note, that the function can also be called in the two-phase region, but the output is not continuous for a phase transition (see Tillner-Roth and Baehr, 1994). Values in two-phase region are considerably higher than in one-phase domain. The following figure just shows one-phase properties.
Extends from (Return specific heat capacity at constant volume).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
cv | Specific heat capacity at constant volume [J/(kg.K)] |
Dynamic viscosity w.r.t. temperature and density | use setState_phX function for input
This function calculates the dynamic viscosity of R134a from the state record (e.g., use setState_phX function for input). The dynamic viscosity is modelled by the corresponding states method of Klein, McLinden and Laesecke (1997).
This property is only defined in one-phase region.
Extends from (Return dynamic viscosity).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
eta | Dynamic viscosity [Pa.s] |
Thermal conductivity w.r.t. thermodynamic state | use setState_phX function for input
This function calculates the thermal conductivity of R134a from the state record (e.g., use setState_phX function for input). The thermal conductivity is modelled by the corresponding states model of McLinden, Klein. and Perkins (2000).
This property is only defined in one-phase region.
Extends from (Return thermal conductivity).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
lambda | Thermal conductivity [W/(m.K)] |
Surface tension as a function of temperature (below critical point)
This function calculates the surface tension of R134a from the saturation record (e.g., use setSat_T function for input). The property is modelled by an approach of Okada and Higashi (1994).
This property is only defined in two-phase region.
Extends from (Return surface tension sigma in the two phase region).
Name | Description |
---|---|
sat | Saturation property record |
Name | Description |
---|---|
sigma | Surface tension sigma in the two phase region [N/m] |
Velocity of sound w.r.t. thermodynamic state (only valid for one-phase)
This function calculates the velocity of sound of R134a from the state record (e.g., use setState_phX function for input). The velocity of sound is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
This property is only defined in one-phase region.
Extends from (Return velocity of sound).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
a | Velocity of sound [m/s] |
Isothermal compressibility w.r.t. thermodynamic state (only valid for one-phase)
This function calculates the isothermal compressibility of R134a from the state record (e.g., use setState_phX function for input). The isothermal compressibility is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
This property is only defined in one-phase region.
Extends from (Return overall the isothermal compressibility factor).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
kappa | Isothermal compressibility [1/Pa] |
Isobaric expansion coefficient w.r.t. thermodynamic state (only valid for one-phase)
This function calculates the isobaric expansion coefficient of R134a from the state record (e.g., use setState_phX function for input). The isobaric expansion coefficient is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
This property is only defined in one-phase region.
Extends from (Return overall the isobaric expansion coefficient beta).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
beta | Isobaric expansion coefficient [1/K] |
Isentropic exponent gamma w.r.t. thermodynamic state | not defined in two-phase region | use setState_phX function for input
This function calculates the isentropic exponent of R134a from the state record (e.g., use setState_phX function for input). The isentropic exponent is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
This property is only defined in one-phase region.
Extends from (Return isentropic exponent).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
gamma | Isentropic exponent [1] |
Specific gibbs energy w.r.t. thermodynamic state
This function calculates the specific Gibbs energy of R134a from the state record (e.g., use setState_phX function for input). The isentropic exponent is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from (Return specific Gibbs energy).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
g | Specific Gibbs energy [J/kg] |
Helmholtz energy w.r.t. thermodynamic state
This function calculates the specific Helmholtz energy of R134a from the state record (e.g., use setState_phX function for input). The Helmholtz energy is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994).
Extends from (Return specific Helmholtz energy).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
f | Specific Helmholtz energy [J/kg] |
Density derivative by specific enthalpy | use setState_phX function for input
This function calculates the density derivative w.r.t. specific enthalpy at constant pressure of R134a (e.g., use setState_phX function for input). The derivative is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994). It can be used for manual state transformations (e.g. from density to specific enthalpy).
Extends from (Return density derivative w.r.t. specific enthalpy at constant pressure).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
ddhp | Density derivative w.r.t. specific enthalpy [kg.s2/m5] |
Density derivative by pressure | use setState_phX function for input
This function calculates the density derivative w.r.t. absolute pressure at constant specific enthalpy of R134a (e.g., use setState_phX function for input). The derivative is modelled by the fundamental equation of state of Tillner-Roth and Baehr (1994). It can be used for manual state transformations (e.g. from density to pressure).
Extends from (Return density derivative w.r.t. pressure at const specific enthalpy).
Name | Description |
---|---|
state | Thermodynamic state record |
Name | Description |
---|---|
ddph | Density derivative w.r.t. pressure [s2/m2] |
Isentropic enthalpy of downstream pressure and upstream thermodynamic state (specific entropy)
This function calculates the specific enthalpy of R134a for an isentropic pressure change from refState.p to p_downstream (e.g., use setState_phX function for input of refState).
The function can be used for instance to calculate an isentropic efficiency of a compressor or calculate the power consumption (obtained from the isentropic enthalpy) for a given efficiency.
Example:
Medium.AbsolutePressure p_downstream=10e5; Medium.SpecificEnthalpy h_downstream=4.1e5; Medium.AbsolutePressure p_upstream=3e5; Medium.SpecificEnthalpy h_upstream=4.0e5; // Isentropic efficiency of a compressor: Real eta_is; equation h_is = isentropicEnthalpy(p_downstream, Medium.setState_phX(p_upstream, h_upstream)); eta_is = (h_is-h_upstream)/(h_downstream - h_upstream);
The isentropic efficiency function should not be applied in liquid region.
Extends from (Return isentropic enthalpy).
Name | Description |
---|---|
p_downstream | Downstream pressure [Pa] |
refState | Reference state for entropy |
Name | Description |
---|---|
h_is | Isentropic enthalpy [J/kg] |
Derivatives required for inversion of temperature and density functions
This function calculates the derivatives required for an inversion of temperature and density function.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
phase | Number of phases |
Name | Description |
---|---|
derivs | Inverse derivatives for density and temperature |
Density and temperature w.r.t. pressure and specific enthalpy
This function calculates the density and temperature of R134a from absolute pressure and specific enthalpy. In one-phase region the function calls the fundamental Helmholtz equation of Tillner-Roth (1994). In two-phase the density and temperature is computed from cubic splines for saturated pressure, liquid and vapor density.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
d | Density [kg/m3] |
T | Temperature [K] |
Density and temperature w.r.t. pressure and specific enthalpy in one-phase region
This function calculates the density and temperature of R134a from absolute pressure and specific enthalpy in one-phase region. The function calls the fundamental Helmholtz equation of Tillner-Roth (1994) which is requiring density and temperature for input. Thus, a newton iteration is performed to determine density and temperature. The newton iteration stops if the inputs for pressure difference delp and specific enthalpy difference delh are larger than the actual differences derived from the newton iteration.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Enthalpy [J/kg] |
delp | Absolute error in p in iteration [Pa] |
delh | Absolute error in h in iteration [J/kg] |
Name | Description |
---|---|
d | Density [kg/m3] |
T | Temperature [K] |
error | 1 if did not converged |
Inverse iteration in one phase region (d,T) = f(p,s)
This function calculates the density and temperature of R134a from absolute pressure and specific entropy in one-phase region. The function calls the fundamental helmholtz equation of Tillner-Roth (1994) which is requiring density and temperature for input. Thus, a newton iteration is performed to determine density and temperature. The newton iteration stops if the inputs for pressure difference delp and specific entropy difference dels are larger than the actual differences derived from the newton iteration.
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
s | Specific entropy [J/(kg.K)] |
delp | Absolute iteration accuracy [Pa] |
dels | Absolute iteration accuracy [J/(kg.K)] |
Name | Description |
---|---|
d | Density [kg/m3] |
T | Temperature [K] |
error | Error flag: trouble if different from 0 |
Calculation of helmholtz derivatives by density and temperature
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
d | Density [kg/m3] |
T | Temperature [K] |
Name | Description |
---|---|
f | Helmholtz derivatives |
Helmholtz coefficients of ideal part
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
delta | Reduced density (delta=d/dcrit) |
tau | Reduced temperature (tau=Tcrit/T) |
Name | Description |
---|---|
fid | Helmholtz derivatives of ideal part |
Calculation of helmholtz derivatives
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
delta | Reduced density (delta=d/dcrit) |
tau | Reduced temperature (tau=Tcrit/T) |
Name | Description |
---|---|
f | Helmholtz derivatives |
Number of phases by pressure and specific enthalpy
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
Name | Description |
---|---|
phase | Number of phases |
Number of phases by pressure and entropy
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
s | Specific entropy [J/(kg.K)] |
Name | Description |
---|---|
phase | Number of phases |
Isentropic specific enthalpy in two phase region h(p,s)
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
s | Specific entropy [J/(kg.K)] |
Name | Description |
---|---|
h | Specific enthalpy [J/kg] |
Properties on liquid boundary phase
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
T | Temperature [K] |
Name | Description |
---|---|
liq | Properties on liquid boundary phase |
Properties on vapor boundary phase
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
T | Temperature [K] |
Name | Description |
---|---|
vap | Properties on vapor boundary phase |
Time derivative function of density_ph
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
derivs | Record for derivatives |
p_der | Derivative of pressure |
h_der | Derivative of specific enthalpy |
Name | Description |
---|---|
d_der | Derivative of density |
Density as function of pressure and specific enthalpy
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
derivs | Record for the calculation of rho_ph_der |
Name | Description |
---|---|
d | Density [kg/m3] |
Time derivative function of T_ph
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
derivs | Auxiliary record |
p_der | Derivative of pressure |
h_der | Derivative of specific enthalpy |
Name | Description |
---|---|
T_der | Derivative of temperature |
Temperature as function of pressure and specific enthalpy
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
h | Specific enthalpy [J/kg] |
derivs | Record for the calculation of T_ph_der |
Name | Description |
---|---|
T | Temperature [K] |
Smooth transition function between state_a and state_b
Extends from (Return thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b).
Name | Description |
---|---|
x | m_flow or dp |
state_a | Thermodynamic state if x > 0 |
state_b | Thermodynamic state if x < 0 |
x_small | Smooth transition in the region -x_small < x < x_small |
Name | Description |
---|---|
state | Smooth thermodynamic state for all x (continuous and differentiable) |
Compute d for given p and T
This function calculates the density of R134a from absolute pressure and temperature. The function can only be executed in one-phase region. The safety margin to the phase boundary is 1[K] and 1000[Pa].
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
T | Temperature [K] |
delp | Iteration converged if (p-pre(p) < delp) [Pa] |
Name | Description |
---|---|
d | Density [kg/m3] |
Compute h for given p and T
This function calculates the specific enthalpy of R134a from absolute pressure and temperature. The function can only be executed in one-phase region. The safety margin to the phase boundary is 1[K] and 1000[Pa].
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Pressure [Pa] |
T | Temperature [K] |
delp | Iteration converged if (p-pre(p) < delp) [Pa] |
Name | Description |
---|---|
h | Specific Enthalpy [J/kg] |
Assert function for checking threshold to phase boundary
Extends from Modelica.Icons.Function (Icon for functions).
Name | Description |
---|---|
p | Refrigerant pressure [Pa] |
T | Refrigerant temperature [K] |