Crates.io | psychrometry |
lib.rs | psychrometry |
version | 0.3.0 |
source | src |
created_at | 2022-05-19 02:59:00.073898 |
updated_at | 2022-07-19 19:54:28.148518 |
description | Psychrometric calculations in Rust |
homepage | |
repository | https://github.com/idheepan/psychrometry |
max_upload_size | |
id | 589478 |
size | 39,201 |
Psychrometry is derived from PsychroLib https://github.com/psychrometrics/psychrolib.
This library should make it easy to integrate temperature and humidity sensors with your rust based dashboards. Versions of PsychroLib for other languages are available from the above repository. The names are as close to the original as possible. The one major difference is that the function calls in this library is in snake_case while the original repository uses CamelCase. This library will update when it merges upstream.
The following example lets you get the enthalpy of moist air with dry bulb temperature and relative humidty.
use psychrometry::psychrolib::*;
use psychrometry::quantities::{Pressure, SpecificEnthalpy, Temperature};
use psychrometry::units::{Atmosphere, Fahrenheit, JoulesPerKg, KilojoulesPerKg};
let rel_hum = 0.25;
let tdry_bulb = Temperature::<Fahrenheit>::from(86);
let pres_ambient = Pressure::<Atmosphere>::from(1);
let sp_enthalpy: SpecificEnthalpy<KilojoulesPerKg> =
get_moist_air_enthalpy_from_rel_hum(tdry_bulb, rel_hum, pres_ambient).unwrap();
let sp_enthalpy_exp = SpecificEnthalpy::<JoulesPerKg>::from(47015.61);
assert_eq!(sp_enthalpy_exp, sp_enthalpy);
For questions, issues, feature requests like compatibility with similar devices and other changes, please file an issue in the github project
Licensed under