Expression functions
The module adds 17 expression functions, in a Psychrometrics category. Use them in expression tags and bindings, straight from sensor tags, in the gateway, Vision client and Designer scopes. Each one does the same calculation as the script function of the same name.
| Expression function | Arguments | Returns |
|---|---|---|
psychroDewPoint | dryBulb (°C), relHum (%) | Dew point, °C |
psychroFrostPoint | dryBulb (°C), relHum (%) | Frost point below 0 °C, else dew point, °C |
psychroWetBulb | dryBulb (°C), relHum (%), pressure (Pa) | Wet bulb, °C |
psychroHumidityRatio | dryBulb (°C), relHum (%), pressure (Pa) | Humidity ratio, kg/kg |
psychroAbsoluteHumidity | dryBulb (°C), relHum (%) | Absolute humidity, kg/m³ |
psychroEnthalpy | dryBulb (°C), relHum (%), pressure (Pa) | Enthalpy, J/kg |
psychroSpecificVolume | dryBulb (°C), relHum (%), pressure (Pa) | Specific volume, m³/kg |
psychroDensity | dryBulb (°C), relHum (%), pressure (Pa) | Density, kg/m³ |
psychroVaporPressure | dryBulb (°C), relHum (%) | Vapour pressure, Pa |
psychroSatPressure | temperature (°C) | Saturation pressure, Pa |
psychroVpd | dryBulb (°C), relHum (%) | Vapour pressure deficit, Pa |
psychroRhFromDewPoint | dryBulb (°C), dewPoint (°C) | Relative humidity, % |
psychroRhFromWetBulb | dryBulb (°C), wetBulb (°C), pressure (Pa) | Relative humidity, % |
psychroRhFromHumidityRatio | dryBulb (°C), humidityRatio (kg/kg), pressure (Pa) | Relative humidity, % |
psychroHumidityRatioFromDewPoint | dewPoint (°C), pressure (Pa) | Humidity ratio, kg/kg |
psychroDewPointAtPressure | dewPoint (°C), fromPressure (Pa), toPressure (Pa) | Dew point at toPressure, °C |
psychroPressureFromAltitude | altitude (m) | Pressure, Pa |
Every pressure is absolute, in Pa. There is no expression function for state.
Quality and null inputs
Expression functions follow tag quality:
- The result carries the first input quality that is not good, so a bad sensor makes the result bad too.
- A null input gives a null result.
- An invalid input, such as a relative humidity above 100 % or a pressure in kPa, gives an expression error with the reason.
Example
An expression tag or binding, straight from two sensor tags:
psychroDewPoint({[.]AirTemp}, {[.]AirRH})