Expand description
§TAMPINES Steam Tables
In-house Rust implementation of the IAPWS-IF97 industrial formulation for
the thermodynamic and transport properties of water and steam, used by the
TAMPINES (Thermo-hydraulic Artificial-intelligence Multi-Phase INtegrated
Emulator System) solver. Unlike the upstream rust-steam library it draws
from, every public property function takes and returns uom dimensioned
quantities (SI units) rather than bare f64.
§Organisation
Properties are grouped by IAPWS-IF97 region:
- Region 1 — subcooled liquid (273.15–623.15 K, up to 100 MPa, below saturation)
- Region 2 — vapour / superheated steam (incl. a metastable subregion)
- Region 3 — single-phase near-critical liquid/vapour + supercritical fluid
- Region 4 — vapour-liquid equilibrium (the saturation line)
- Region 5 — ultra-high-temperature steam (> 800 °C, up to ~2273 K)
Forward equations are (p,T) / (v,T) flashes; the backward (inverse)
equations solve from (p,h), (p,s), or (h,s). The user-facing
region-dispatch entry points (both a functional API and the
TampinesSteamTableCV control-volume type) live in interfaces. Transport
and miscellaneous properties are in dynamic_viscosity,
thermal_conductivity, surface_tension, and dielectric_constant.
Nozzle / turbine and HEM choked-flow equations are in
steam_turbine_equations.
All quantities are SI: pressure in Pa, temperature in K, specific enthalpy and energy in J/kg, specific entropy and heat capacity in J/(kg·K), specific volume in m³/kg, density in kg/m³.
Re-exports§
pub use openfoam_algorithms::rhoPimpleFoam::AdvectionTerminalState;pub use openfoam_algorithms::rhoPimpleFoam::SolverMode;pub use openfoam_algorithms::rhoPimpleFoam::TampinesSteamArray;pub use openfoam_algorithms::rhoPimpleFoam::TampinesSteamArrayError;
Modules§
- backward_
eqn_ hs_ region_ 1_ to_ 4 - backward equations hs boundary equations
overall equation
(h,s)region-dispatch / boundary equations across IAPWS-IF97 Regions 1-4. Given an enthalpy-entropy pair, the code determines which region a state lies in — Region 1 (subcooled liquid), Region 2 (vapour), Region 3 (near-critical/supercritical single phase), or Region 4 (vapour-liquid equilibrium / saturation) — and calls that region’s backward equations. The submodules supply the boundary curves used to make that decision: the saturated-liquid (bubble) and saturated-vapour (dew) lines, and the B13 (Region 1/3) and B23 (Region 2/3) inter-region boundaries. - backward_
eqn_ ph_ region_ 1_ to_ 4 - backward equations ph boundary equations
overall equation
(p,h)region-dispatch / boundary equations across IAPWS-IF97 Regions 1-4. Given a pressure-enthalpy pair, the surrounding code decides which region a state lies in — Region 1 (subcooled liquid), Region 2 (vapour), Region 3 (near-critical/supercritical single phase), or Region 4 (vapour-liquid equilibrium / saturation) — using the boundary curves described below, then calls that region’s backward equations. This module supplies the near-critical Region 3/4 saturation boundary (boundary_eqn_ps3). - backward_
eqn_ ps_ region_ 1_ to_ 4 - backward equations ps boundary equations
overall equation
(p,s)region-dispatch / boundary equations across IAPWS-IF97 Regions 1-4. Given a pressure-entropy pair, the code determines which region a state lies in — Region 1 (subcooled liquid), Region 2 (vapour), Region 3 (near-critical/supercritical single phase), or Region 4 (vapour-liquid equilibrium / saturation) — and calls that region’s backward equations. This module supplies the near-critical Region 3/4 saturation boundary (boundary_eqn_ps3, the p_s3(s) curve). - constants
- constants for the steam table calculations
Physical and reference constants for the IAPWS-IF97 steam-table
calculations: water’s critical point, triple point, normal boiling
point, gas constants, and molecular constants (dipole moment,
polarisability) used by the dielectric-constant correlation. Scalar
pub consts carry their SI unit in the name suffix; the accessorfns return the same values as dimensioneduomquantities. - dielectric_
constant - dielectric constant
IAPWS correlation for the static (relative) dielectric constant of water,
epsilon — dimensionless — via the Harris-Alder g-bar factor, as a
function of density (
MassDensity, kg/m^3) and temperature (ThermodynamicTemperature, K). - dynamic_
viscosity - dynamic viscosity calcs
IAPWS R12-08 dynamic viscosity of water/steam, mu, in pascal-seconds
(Pa*s, uom
DynamicViscosity). The viscosity is built from a dilute-gas/background factor (psi_0) times a density-and-temperature residual factor (psi_1), evaluated at the density (MassDensity, kg/m^3) and temperature (ThermodynamicTemperature, K) of the state; the critical-enhancement term is omitted (fast path). Public entry points flash the state from(T, p),(rho, T), or(p, h)first. - interfaces
- public facing interfaces where the user simply inputs pressure and temperature or pressure and enthalpy etc and gets all the required data automatically
- openfoam_
algorithms - reference openfoam algorithms which will be combined with steam
tables for solving simple two phase flow problems
Pure-Rust ports of OpenFOAM finite-volume solver algorithms, used as
reference/study material and (for
rhoPimpleFoam) as an actively-used solver. Most submodules here aremod/pub(crate)— kept in-tree for their FV building blocks (seeopenfoam_source) rather than exposed as part of this crate’s public API. The sole public export is [rhoPimpleFoam], which hostsTampinesSteamArray, a 1-D compressible PIMPLE pipe solver built on TAMPINES IAPWS-IF97 steam-table properties. - prelude
- allows for easy importing as with most rust crates.
- region_
1_ subcooled_ liquid - region 1
- region_
2_ vapour - region 2
- region_
3_ single_ phase_ plus_ supercritical_ steam - region 3
- region_
4_ vap_ liq_ equilibrium - region 4
- region_
5_ steam_ at_ 800_ plus_ degc - region 5
- steam_
turbine_ equations - useful equations for steam turbines
These include nozzles, impulse turbines
and reaction turbines at some steady
state,
as well as angular momentum balance
Steam-turbine equations: converging-diverging nozzle / choked-flow
relations ([
converging_diverging_nozzles]) and three-phase electric generator equations ([generator]). - surface_
tension - surface tension
important for boiling
IAPWS surface tension sigma of water against its own vapour along the
saturation line, in newtons per metre (N/m, equivalently J/m^2), as a
function of temperature (
ThermodynamicTemperature, K). Returned as auomRadiantExposure(J/m^2) becauseuomhas no dedicated surface-tension quantity — the units coincide (kg/s^2). - thermal_
conductivity - thermal conductivity calcs
IAPWS R15-11 thermal conductivity of water/steam, lambda, in watts per
metre-kelvin (W/(m*K), uom
ThermalConductivity), as a function of the state’s density (MassDensity, kg/m^3) and temperature (ThermodynamicTemperature, K). The conductivity is assembled from a dilute-gas term (lambda_0), a density-dependent residual term (lambda_1), and a near-critical enhancement term (lambda_2). Public entry points flash the density from a(T, p)or(T, p, x)state.