psychrometrics-si
v0.6.0
Published
Moist-air (psychrometric) property calculations in SI units per ASHRAE fundamentals.
Maintainers
Readme
psychrometrics-si
Moist-air (psychrometric) property calculations in SI units, following the ASHRAE Handbook of Fundamentals. No dependencies.
Everything you normally read off a psychrometric chart — saturation pressure, humidity ratio, relative humidity, dew point, enthalpy, specific volume — as plain functions.
Conventions
- Temperature: degrees Celsius
- Pressure: pascals (default total pressure is sea-level, 101325 Pa)
- Humidity ratio
W: kg water vapour per kg dry air - Relative humidity: fraction in
[0, 1]
Install
npm install psychrometrics-siUsage
import {
saturationPressure,
humidityRatio,
dewPoint,
enthalpy,
} from "psychrometrics-si";
saturationPressure(25); // ~3169.7 Pa
humidityRatio(25, 0.5); // ~0.00988 kg/kg
dewPoint(25, 0.5); // ~13.9 C
enthalpy(25, 0.010); // ~50.6 kJ/kg dry airAt a non-standard altitude, pass the local barometric pressure as the last argument:
humidityRatio(25, 0.5, 90000); // PaFunctions
saturationPressure(tC)— Hyland–Wexler, over ice below 0 C.humidityRatio(tC, rh, p?)/relativeHumidity(tC, W, p?)humidityRatioFromVaporPressure(pv, p?)/vaporPressureFromHumidityRatio(W, p?)dewPoint(tC, rh, p?)/dewPointFromVaporPressure(pv)enthalpy(tC, W)— kJ per kg dry airspecificVolume(tC, W, p?)— m³ per kg dry air
Accuracy
The saturation-pressure correlation is valid roughly from −100 to +200 C. Dew point is recovered by bisecting that curve, so it inherits the same accuracy.
License
MIT
