xsteamrs
An IAPWS-IF97 water/steam thermophysical properties library for Rust. It provides two usage styles:
- IF97 low-level functions: region-based
*_p_t/*_rho_tfunctions using IF97 conventional SI units (p: MPa,T: K,h/u: kJ/kg,s: kJ/(kg·K),v: m³/kg). - Public string-dispatch API:
props/props_si, dispatching by function name strings (e.g."h_pT","T_ph").
Installation
Add this to your Cargo.toml:
[]
= "0.1"
Quick start
XSteam-style units: props
- Pressure
p: bar - Temperature
T: °C
use props;
SI pressure unit: props_si
- Pressure
p: Pa - Temperature
T: K
use props_si;
Low-level IF97 example
If you want to work directly with IF97 conventional SI units (p: MPa, T: K), call the low-level functions:
use ;
Build and test
Generate and open local documentation:
Documentation
After publishing to crates.io, docs are built and hosted by docs.rs: