Skip to main content

Crate tampines_steam_tables

Crate tampines_steam_tables 

Source
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 accessor fns return the same values as dimensioned uom quantities.
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 are mod/pub(crate) — kept in-tree for their FV building blocks (see openfoam_source) rather than exposed as part of this crate’s public API. The sole public export is [rhoPimpleFoam], which hosts TampinesSteamArray, 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 a uom RadiantExposure (J/m^2) because uom has 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.