Repository navigation
regenerate the HeatExchangerNetwork doctest for thermosteam's new activity model; bump to 0.2.0 - #4
Merged
Conversation
…m'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 <noreply@anthropic.com>
|
📖 2 files modified Preview · build overview · hensmith · built Dec. 2, 2026, 4:41 a.m. UTC |
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The
masterbuild has been red since it was re-run on 2026-10-21, with no change in hensmith. CI installs thermosteam and biosteam from git HEAD, and two upstream changes reached the suite:2dd9b4dcmade the fuel (natural_gas) heat utility flash its flue gas. At the flue's bubble point the Rachford-Rice objective in thermosteam divided by zero, which raises only with numba disabled (as CI runs). thermosteam4f7eab4chas since fixed this case upstream, so nothing in hensmith changes for it.mastertoday: theHeatExchangerNetworkclass doctest prints stream enthalpies that depend on it.Why the numbers moved
The example's column
D1separates methanol and water. With the new activity model its minimum reflux rises from 13.04 to 13.98 (+7.2 %), so its condenser duty goes from -1.794e7 to -1.922e7 kJ/hr and its reboiler duty from 6.723e7 to 6.859e7 kJ/hr. Everything else in the example is unchanged: the same streams, the same matches, the same network, still at MER.The fix
Regenerate the doctest's stream life cycle enthalpies by re-running the example and pasting its output. No library code changes, and no other doctest or test output changes.
Validation
Full suite, as CI runs it (
pytest . --disable-numba=1), against biosteam07ddb417(2.55.5) and thermosteam49fc5160(0.55.5): 958 passed.Version
Bumps hensmith to 0.2.0 (
hensmith/__init__.pyandsetup.py).masterhas gained the MER synthesizer rewrite (#1) and stream splitting (#2) since 0.1.2 was released, so its networks and their costs differ from that release; a minor version says so. The citation still names v0.1.2, the release its Zenodo record is of. Nothing is tagged or published by this pull request.Relation to #3
devcarries the same doctest commit (cherry-picked), so the two can merge in either order;devdoes not carry the version bump, and will need its own once this is merged.🤖 Generated with Claude Code