tpt-thermodynamics

Rust

Pure-Rust computational thermodynamics workspace — multi-component mixture properties, phase equilibria, and advanced Equations of State (cubic, SAFT, activity models) from first principles, with WASM support.

0 stars0 forks0 watchers1 open issuesApache License 2.0

Languages

Rust88.0%Python11.8%Just0.1%
README

tpt-thermodynamics

Multi-component mixture properties, phase equilibria, and equations of state for the TPT Solutions engineering / materials / earth / energy stack.

This workspace is the thermodynamics layer referenced by downstream tpt-* crates (process modelling, materials, earth sciences, energy systems). It is built bottom-up: a no_std-capable core trait surface, then data, then the equation-of-state families, then flash / phase-stability / bubble-dew solvers, transport properties, electrolytes, and polymers, finally re-exported through a flat-feature umbrella crate.

Crate inventory

Build order follows todo.md (Phases 2-13). Each crate depends only on earlier layers plus the upstream tpt-math-* / tpt-eng-props substrate.

OrderCratePurpose
1tpt-thermo-coreFoundation: EquationOfState trait, composition types, mixing-rule traits, convergence enums. no_std + alloc.
2tpt-thermo-dataComponent database, TOML/JSON (de)serialization, curated seed compound set, BIP tables, provenance.
3tpt-thermo-eos-cubicCubic EoS: PR / SRK / volume-translated PR, alpha functions, vdW1f / Huron-Vidal / Wong-Sandler mixing.
4tpt-thermo-eos-activityActivity models: NRTL, UNIQUAC, Wilson, UNIFAC (+ Dortmund). Implements ExcessGibbsModel.
5tpt-thermo-eos-saftPC-SAFT, association term, SAFT-VR Mie.
6tpt-thermo-flashRachford-Rice / Newton flash: PT, PH, TV, TS, PU, PV, LLE.
7tpt-thermo-phasePhase stability (TPD), multiphase equilibrium, SLE, critical locus, continuation. Implements StabilityTest.
8tpt-thermo-bubble-dewBubble / dew point solvers, phase envelopes, azeotrope + cricondenbar/therm detection.
9tpt-thermo-transportViscosity, thermal conductivity, diffusivity, mixture averaging, residual-entropy scaling.
10tpt-thermo-electrolytePitzer, eNRTL, HKF, ion association, gas solubility.
11tpt-thermo-polymerFlory-Huggins, Sanchez-Lacombe, PC-SAFT-for-polymers, cloud point, MWD.
12tpt-thermoUmbrella crate: flat feature tree re-exporting every constituent.

Build order & dependencies

The crates are consumed/published like every other tpt-* repo: upstream dependencies (tpt-math-*, tpt-eng-props) are crates.io version strings, never path/git deps across repo boundaries. In-workspace path deps are added to [workspace.dependencies] as each phase lands.

Note: this repo does not publish to crates.io as part of the build-out (left to the user). See todo.md "Known Deferred Scope".

A no_std + alloc split lives only in tpt-thermo-core; every other crate is std-based.

Quick start

cargo xtask check      # fast compile check across the workspace
cargo xtask test       # tests + doctests
cargo xtask all        # fmt, clippy, test, deny, wasm, check

just recipes mirror the cargo xtask commands above.

Tracking

  • spec.txt — full design specification (phases, validation targets, feature matrix).
  • todo.md — per-session progress tracker for the bootstrap + 12-crate build-out.

License

Licensed under either of MIT or Apache-2.0 at your option. © TPT Solutions.