RealThermoProps
RealThermoProps is a built-in procedure that provides a coding shortcut when determining two or more thermodynamic properties at a specified state. This procedure will return temperature, pressure, specific volume, specific enthalpy, specific entropy, specific internal energy and quality (in that order) for a specified fluid and state. The procedure requires as inputs, two arguments with property identifiers, in addition to the substance name. The list of property identifiers needed in the calling arguments and instructions are available in the Thermophysical Function help. The value and units of the inputs and outputs are determined by the Unit System setting. Note that this procedure can only be used for real fluids. It is not applicable for ideal gases, solutions or incompressible substances. Note that there is a similar procedure called IdealGasThermoProps that provide properties for ideal gas substances.
Example:
$UnitSystem SI C kPa mass
T=25 [C]
P=100 [kPa]
R$='R134a'
Call realthermoprops(R$, T=T, P=P : T, P ,v ,h ,s ,u ,x)
{Solution
h=276.4 [kJ/kg]
P=100 [kPa]
R$='R134a'
s=1.106 [kJ/kg-K]
T=25 [C]
u=252.6 [kJ/kg]
v=0.238 [m^3/kg]
x=100 }
The procedure will return values for the outputs in the specified unit system. The outputs must be in the following order:
Temperature, Pressure, specific volume, specific enthalpy, specific entropy, specific internal energy and quality.
Note that in this example, T and P already have values. RealThermoProps will recognize that T and P already have values and will not try to reevaluate these properties and thereby avoids an EES error that would occur if the values of these variables were reassigned.
It is not necessary to have all of the output properties provided. If, one or more properties are not needed, just remove the variable name (but retain the commas) from the output list, or if they are at the end of the list, just don't include them. The following example evaluates just specific enthalpy and specific entropy at the specified temperature and pressure.
$UnitSystem SI C kPa mass
T=25 [C]
P=100 [kPa]
R$='R134a'
Call realthermoprops(R$, T=T, P=P : , , , h ,s)
See also: IdealGasThermoProps and PsychProps