- 30 Jan 2024
- Print
- PDF
Steam/Energy Functions
- Updated on 30 Jan 2024
- Print
- PDF
All the steam/energy functions take in at least two variables: Units and Vapor Quality (Q). Q is the mass fraction of the mixture that is vapor. Saturated vapor has Q=1, while a saturated liquid has Q=0. If Q is set to a value between 0 and 1, then the program will return the value for the two-phase system. The default value if left unspecified is 1.
Units is an optional text input, and the text parameters are not case sensitive. There are two possibilities in the units variable: either American Engineering units which is inputted as “AE” and the International System of units inputted as “SI”. If Units is left blank, it defaults to “AE”. For example, “=fnPVal(Temperature, Pressure, Q, “AE”)” gives the same answer as “=fnPVal(Temperature, Pressure, Q)”. If Units is neither AE nor SI, the function returns an error.
The dimensional units for AE and SI are listed below and are the same for all functions:
American Engineering (AE)
Temperature - Degrees Fahrenheit (°F)
Energy – British Thermal Units (Btu)
Length – Feet (ft)
Specific Volume - Cubic Feet per Pound (ft3/lb)
Pressure – Pounds Per Square Inch Absolute (psia)
Mass – Pounds (lb)
SI
Temperature – Degrees Celsius (°C)
Energy – Kilojoules (kJ)
Length – Meters (m)
Specific Volume – Cubic Meters per Kilogram (m3/kg)
Pressure – Kilopascals Absolute (kPa)
Mass – Kilograms (kg)
fnPVal(Pressure, Optional Q, Optional Units)
Returns the saturation temperature at the inputted Pressure as a double.
The Inputs are:
Pressure: Pressure (type Double) to calculate saturation temperature for, psia or kPa
Q: Quality
Units: Either “AE” or “SI”.
fnTVal(Temperature, Optional Q, Optional Units)
Returns the saturation pressure at the inputted Temperature as a double.
The Inputs are:
Temperature: Temperature (type Double) to calculate saturation pressure for, °F or °C.
Q: Quality.
Units: Either “AE” or “SI”.
fnPValSatT(Pressure, Optional Q, Optional Units)
Returns saturation temperature for the given pressure and quality. This is an alternate name for fnPVal and has the same inputs and return value.
fnTValSatP(Temperature, Optional Q, Optional Units)
Returns saturation pressure for the given temperature and quality. This is an alternate name for fnTVal and has the same inputs and return value.
fnPValSpecV(Temperature, Pressure, Optional Q, Optional Units)
Returns the specific volume for the given temperature, pressure, vapor quality and units as a double.
The Inputs are:
Temperature: Temperature (type Double) to calculate specific volume for, °F or °C.
Pressure: Pressure (type Double) to calculate specific volume for, psia or kPa
Q: Quality.
fnTPValEntropy(Temperature, Pressure, Optional Q, Optional Units)
Returns the entropy for the given temperature, pressure, vapor quality and units as a double.
The Inputs are:
Temperature: Temperature (type Double) to calculate entropy for, °F or °C.
Pressure: Pressure (type Double) to calculate entropy for, psia or kPa.
Q: Quality.
fnTPValEnthalpy(Temperature, Pressure, Optional Q, Optional Units)
Returns the enthalpy for the given temperature, pressure, vapor quality and units as a double.
The Inputs are:
Temperature: Temperature (type Double) to calculate enthalpy for, °F or °C.
Pressure: Pressure (type Double) to calculate enthalpy for, psia or kPa.
Q: Quality.
fnTPValCalcProp(Temperature, Pressure, Output, Optional Q, Optional Units)
Returns the specified property (if it has been made available) for the given temperature, pressure, vapor quality and units as a double. Currently the values of output that work are “Enthalpy”, “Entropy”, “SpecV” , “SatT” and “SatP”.
The Inputs are:
Temperature: Temperature (type Double) to calculate output for, °F or °C.
Pressure: Pressure (type Double) to calculate output for, psia or kPa.
Output: What property to return as a string.
Q: Quality.