Luau implementation of the IAPWS Industrial Formulation 1997 (IF97).
- Luau 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| lib | ||
| .gitignore | ||
| aftman.toml | ||
| default.project.json | ||
| LICENSE | ||
| README.md | ||
| selene.toml | ||
| stylua.toml | ||
IF97
A Luau implementation of the IAPWS Industrial Formulation 1997 (IF97) for the thermodynamic and transport properties of water and steam, built for Roblox.
Installation
Download the rbxm file from the latest release or build it from source. Import the file into your Roblox project or sync it with Rojo.
Usage
Here is a basic example:
const IF97 = require("@game/ReplicatedStorage/IF97")
const p = 1000 -- pressure (kPa)
const T = 477 -- temperature (K)
const v = IF97.vpt(p, T) -- specific volume (m^3/kg)
const h = IF97.hpt(p, T) -- specific enthalpy (kJ/kg)
const s = IF97.spt(p, T) -- specific entropy (kJ/kg-K)
const Tsat = IF97.Tsat(p) -- saturation temperature (K)
const hf = IF97.hfp(p) -- specific enthalpy of saturated liquid (kJ/kg)
const sg = IF97.sgt(T) -- specific entropy of saturated vapor (kJ/kg-K)
Refer to init.luau for information about all available functions.
License
This project is licensed under the MIT License - see the LICENSE file for details.