IdealGasThermoProps
IdealGasThermoProps is a built-in procedure that provides a coding shortcut when determining two or more thermodynamic properties at a specified state for an ideal gas substance. This procedure will return temperature, pressure, specific volume, specific enthalpy, specific entropy and specific internal energy (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 ideal gases and NASA gases. It is not applicable for real fluids, solutions or incompressible substances. However, there is a similar procedure called RealThermoProps that is intended for real fluids.
IdealGasThermoProps 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, and specific internal energy.
Example:
$UnitSystem SI C kPa mass
F$='air'
h[1]=400 [kJ/kg]
s[1]=5.80 [kJ/kg-K]
Call idealgasthermoprops(F$,h=h[1],s=s[1]: T[1], P[1], v[1], h[1], s[1], u[1])
Note that in this example, h[1] and s[1] already have values. The IdealGasThermoProps will recognize that h[1] and s[1] have assigned values and not reevaluate these properties and thereby avoid 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 (or comment out) 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 the temperature and specific enthalpy at the specified pressure and specific entropy.
$UnitSystem SI C kPa mass
P[1]=200 [kJ/kg]
s[1]=5.792 [kJ/kg-K]
F$='air'
Call idealgasthermoprops(F$,P=P[1],s=s[1]: T[1], {P[1]} ,{v[1]}, h[1])
See also: ReadlThermoProps and PsychProps