What is calculated
PhaseGauge uses the IAPWS Industrial Formulation 1997 for the thermodynamic properties of ordinary water substance. The calculation engine is pinned toiapws-if97@2.2.0. Modules under src/engine/ form the only package boundary. Inputs cross it in MPa, K, kJ/kg, and kJ/(kg·K); returned values stay in those canonical units until display time.
Supported pairs are P–T, P–h, P–s, h–s, T–h, T–s, P–x, and T–x. A two-phase calculation returns the mixture, both saturation endpoints, and the differences hfg, sfg, and vfg. Region and phase are reported separately because an IF97 region is a formulation domain, while phase describes the physical state.
Verification results
| Gate | Coverage | Measured result |
|---|---|---|
| IF97 forward + saturation | 78 property assertions across Regions 1–5 and Tables 35/36 | worst relative error 6.898197 × 10⁻⁸ |
| IF97 backward equations | 24 published T(p,h) and T(p,s) points | worst absolute error 0.022374829 K; limit 0.025 K |
| Round-trip closure | 360 P–h and P–s states across regions | worst temperature closure 2.29655 × 10⁻⁸ K |
| Transport releases | 19 R12-08 and R15-11 viscosity/conductivity points | all within 1 × 10⁻⁷ relative |
| Independent NIST state check | 10 P–T states × 5 thermodynamic properties | worst difference 0.03173%; limit 0.1% |
| NIST response-property check | cp, cv, and speed of sound at the same 10 states | worst difference 0.2171%; measured limit 0.25% |
| Phase 0 engine browser gate | Real Chromium calculation and minified engine bundle | 39,257 bytes gzip; no Node globals |
Forward-equation checks use relative error because the official tables span many orders of magnitude. The backward releases specify absolute temperature tolerances of roughly 10–25 mK, so those tests use the published absolute limits.
NIST SRD 69 uses a separate reference surface, so small differences from IF97 are expected. The 0.1% gate covers density, specific volume, internal energy, enthalpy, and entropy. Heat capacities and speed of sound are derivatives and diverge more near dense or critical states; they use the measured 0.25% envelope. Separate gates expose unit, reference-state, phase, and implementation errors while accounting for differences between the two formulations.
Primary sources
- IAPWS R7-97(2012), Revised Release on the Industrial Formulation 1997: equations, regions, and official verification tables.
- IAPWS R12-08, Viscosity of Ordinary Water Substance: Table 4 verification values.
- IAPWS R15-11, Thermal Conductivity of Ordinary Water Substance: base and industrial verification values.
- NIST Chemistry WebBook SRD 69, Thermophysical Properties of Water: independent P–T spot checks.
- NIST SP 811, Appendix B.8: psi and Btu conversion factors.
Validity and limitations
The calculator enforces the IF97 pressure and temperature envelope and the 50 MPa cap for high-temperature Region 5. Saturation endpoints end at the critical point. Some response functions become numerically singular there, so the interface asks for a small input change instead of displaying an unstable value.
Supplemental IAPWS correlations have narrower validity ranges than IF97. Outside those ranges, PhaseGauge shows a dash. Generated table rows are direct equation evaluations. Equipment limits, boundary conditions, governing codes, and safety factors remain part of the engineering analysis that uses these properties.
Viscosity follows the industrial form permitted by IAPWS R12-08, including the dilute-gas and finite-density terms but omitting the near-critical enhancement. Single-phase thermal conductivity includes the IAPWS R15-11 critical enhancement. The difference comes from the selected correlations, not display precision.
Run a calculation or inspect the generated saturation table.