From 868d6d058962f4fad20666d484186e1b17f33a3b Mon Sep 17 00:00:00 2001 From: sarangbhagwat Date: Mon, 30 Nov 2026 14:59:58 -0800 Subject: [PATCH 1/2] regenerate the HeatExchangerNetwork doctest enthalpies for thermosteam's new default activity model CI went red on master without a hensmith change. The first cause was upstream and is gone: biosteam 2dd9b4dc (2026-10-08) made the fuel heat utility run a PH flash on its flue gas, whose bubble point (79.4 K) gives water a K of 8.2e-25, and thermosteam's Rachford-Rice objective then divided by exactly zero at a phase fraction of 1 (raised only with numba disabled, as CI runs; with numba the jitted division returns inf). thermosteam 4f7eab4c (2026-11-05) moves components with K <= 1e-24 to the non-volatile fraction, so that case passes again. (K in (1e-24, ~5.5e-17) still raises there without numba; left to thermosteam.) What remains against today's upstream (biosteam 07ddb417, thermosteam 49fc5160, 0.55.5) is one doctest: the stream life cycles printed in the HeatExchangerNetwork class docstring. 957 passed, 1 failed before this commit. Cause: thermosteam's default activity coefficient model changed from DortmundActivityCoefficients to ModifiedUNIFACActivityCoefficients. The pure component properties of water, methanol and glycerol are unchanged (Hvap, Tb, Psat and Cn agree to the printed digits), but the minimum reflux of the example's ShortcutColumn D1 rises from 13.04 to 13.98 (+7.2 %), and with k=2 so does its reflux: the condenser duty goes from -1.794e7 to -1.922e7 kJ/hr and the reboiler duty from 6.723e7 to 6.859e7 kJ/hr. The duties of D1_H1, D1_H2 and F1 and all temperatures are identical on both stacks (compared on biosteam a258953a + thermosteam 5a473e9b against the current clones). The network is the same one: same matches and exchanger IDs, status 'mer', utility load ratio 0.8248 -> 0.8217 (0.82 as printed, unchanged), energy balance error 1e-11 %. Only the printed enthalpies of streams 0 to 3 move, by 2 to 7 %. This is an intended doctest output change, regenerated by running the example on the current stack and pasting; no hensmith behavior changes. Validation: pytest . --disable-numba=1 -q -p no:cacheprovider, 958 passed. Not updated here: the tutorial pages and docs/source/_generated outputs show the same example with the old numbers (they are built by docs/_demo_src/build_all.py and are not run by the suite). Co-Authored-By: Claude Fable 5.2 --- hensmith/_heat_exchanger_network.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hensmith/_heat_exchanger_network.py b/hensmith/_heat_exchanger_network.py index 6a257c0..b3d5a2b 100644 --- a/hensmith/_heat_exchanger_network.py +++ b/hensmith/_heat_exchanger_network.py @@ -332,23 +332,23 @@ class HeatExchangerNetwork(bst.Facility): >>> HXN.stream_life_cycles [, H_in = 5.38e+06 kJ/hr, H_out = 4.24e+07 kJ/hr> - , H_in = 4.24e+07 kJ/hr, H_out = 6.92e+07 kJ/hr> + , H_in = 5.75e+06 kJ/hr, H_out = 4.25e+07 kJ/hr> + , H_in = 4.25e+07 kJ/hr, H_out = 7.09e+07 kJ/hr> ]>, , H_in = 0 kJ/hr, H_out = 5.05e+06 kJ/hr> - , H_in = 5.05e+06 kJ/hr, H_out = 5.08e+06 kJ/hr> - , H_in = 5.08e+06 kJ/hr, H_out = 2.3e+07 kJ/hr> - , H_in = 2.3e+07 kJ/hr, H_out = 2.79e+08 kJ/hr> + , H_in = 0 kJ/hr, H_out = 5.38e+06 kJ/hr> + , H_in = 5.38e+06 kJ/hr, H_out = 5.42e+06 kJ/hr> + , H_in = 5.42e+06 kJ/hr, H_out = 2.46e+07 kJ/hr> + , H_in = 2.46e+07 kJ/hr, H_out = 2.79e+08 kJ/hr> ]>, , H_in = 4.52e+07 kJ/hr, H_out = 8.12e+06 kJ/hr> - , H_in = 8.12e+06 kJ/hr, H_out = 3.07e+06 kJ/hr> + , H_in = 4.52e+07 kJ/hr, H_out = 8.46e+06 kJ/hr> + , H_in = 8.46e+06 kJ/hr, H_out = 3.07e+06 kJ/hr> , H_in = 3.07e+06 kJ/hr, H_out = 1.14e+06 kJ/hr> ]>, , H_in = 2.04e+07 kJ/hr, H_out = 2.47e+06 kJ/hr> - , H_in = 2.47e+06 kJ/hr, H_out = 2.47e+06 kJ/hr> + , H_in = 2.18e+07 kJ/hr, H_out = 2.6e+06 kJ/hr> + , H_in = 2.6e+06 kJ/hr, H_out = 2.6e+06 kJ/hr> ]>, , H_in = 7.51e+05 kJ/hr, H_out = 7.18e+05 kJ/hr> From 376bbcc370b393ade834bd371efeb4b342f5c815 Mon Sep 17 00:00:00 2001 From: sarangbhagwat Date: Tue, 1 Dec 2026 20:36:23 -0800 Subject: [PATCH 2/2] bump to 0.2.0 master has gained the MER synthesizer rewrite (#1) and stream splitting (#2, the new stream_splitting option) since 0.1.2 was released and tagged on 2026-09-04: the networks it synthesizes, and so their utility loads and costs, differ from those of 0.1.2. A minor version says so; a patch number would present the next release as a drop-in fix. Both places that record the version move together (hensmith/__init__.py and setup.py; the docs read hensmith.__version__). The citation in the README and the docs still names v0.1.2, the release its Zenodo record is of. biosteam requires hensmith>=0.1.2, which 0.2.0 satisfies. Full suite: 958 passed (pytest . --disable-numba=1) against biosteam 07ddb417 and thermosteam 49fc5160. Co-Authored-By: Claude Fable 5.2 --- hensmith/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hensmith/__init__.py b/hensmith/__init__.py index b8729c2..b2c34b2 100644 --- a/hensmith/__init__.py +++ b/hensmith/__init__.py @@ -10,7 +10,7 @@ hensmith: automated heat exchanger network synthesis, modeling, integration, thermodynamics, and heuristics for BioSTEAM systems. """ -__version__ = '0.1.2' +__version__ = '0.2.0' # IMPORTANT: never star-import biosteam at module scope anywhere in this # package (or in any module it imports during initialization). biosteam diff --git a/setup.py b/setup.py index 6f11f4b..37d190b 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ name='hensmith', packages=['hensmith'], license='NCSA', - version='0.1.2', + version='0.2.0', description=('Heat Exchanger Network Synthesis, Modeling, Integration, ' 'Thermodynamics, and Heuristics'), long_description=open('README.md', encoding='utf-8').read(),