Repository navigation
Release 1.6.0 - #49
Conversation
Where an isoline of a mixture crosses the phase envelope and CoolProp's saturation flash does not converge, the crossing was interpolated on a straight line between two envelope points. Near the critical point, where the points are up to 4 K apart and the dome bends, that is off by up to 2e-3 in pressure. Whether the flash converges there differs between platforms: on macOS the bubble flash of R32/R125 converges at 340 K and gives the exact state, which failed test_blend_lines_meet_the_dome_near_the_critical_point against its straight-line reference (conda-forge staged-recipes build). - the crossing is a cubic through the four envelope points around it, with the isoline quantity as the variable; a straight line where that quantity turns over the four points, where the steps are uneven by more than 100 to 1, or where the cubic strays from the straight line - the envelope's repeated points (CoolProp repeats some where its pieces join, sometimes differing in the last digits) are taken once - against the exact flash, over isotherms and isobars of R32/R125, R32/R1234yf and R32/R1234ze(E): pressure within 1.2e-6 (R32/R125) and 1.1e-4 (R32/R1234yf, at the top of the dome) instead of 2.6e-3, enthalpy within 4e-4 instead of 1.5e-3; worse than before in 2 of 2542 values, by at most 1.1e-4, at the top of the dome - the test compares with a cubic reference below the top of the envelope; a new test checks a crossing against the exact flash at 339 K. Both fail with the straight line. CoolProp's C++ port of these numerics (envelope_crossings in src/CoolPropPlot.cpp) still interpolates linearly and needs the same change to give the same points. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bsHH7N2gNABwvNHsDaKn9
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…in 1.5.2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bsHH8qQUqPxK3TzHzpc72
The release adds a path kind ("isochoric"), a change of the public API,
so it is a minor release. The upgrade guide gets a section from 1.5 to
1.6. Notes that still said the features of 1.5.0 came with 1.6 (dome
labels, the saturation scale, the marked points, the versions line) say
1.5, as the rest of the code and the changelog do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013bsHH8qQUqPxK3TzHzpc72
Release 1.6.0, with two fixes:
"isochoric"as a new path kind (The via keyword misses phase boundaries #47, merged in Cycle paths bend exactly on the dome (#47), release checklist with conda-forge #50)This was planned as 1.5.2. The new path kind is a change of the public API, so it is a minor release.
Version 1.6.0
VERSION = (1, 6, 0, ''), and the changelog section[1.6.0]holds both fixes and the new path kind.docs/upgrade.mdgets a section "From 1.5 to 1.6". There is nothing to change in user code; cycle lines get one or two more points where they cross the dome.make_data.py).Envelope crossings: why
The conda-forge build of 1.5.1 (conda-forge/staged-recipes#35603) failed one test on macOS only:
test_blend_lines_meet_the_dome_near_the_critical_point.Where an isoline of a mixture crosses the phase envelope, CoolPlot first tries the exact saturation flash. Near the critical point that flash often does not converge, and the crossing was then interpolated on a straight line between two envelope points. There the points are up to 4 K apart and the dome bends, so the straight line is off by up to 2e-3 in pressure.
For R32/R125 at 340 K, 4 K below the critical point:
The macOS result is the correct one; the reference was not.
Envelope crossings: changes
isolines._envelope_crossings:test_envelope_crossings_follow_the_curved_dome, checks a crossing against the exact flash at 339 K, where it converges.Accuracy
Measured against the exact flash, over isotherms and isobars of R32/R125, R32/R1234yf and R32/R1234ze(E):
CoolProp's C++ port
envelope_crossingsin CoolProp'ssrc/CoolPropPlot.cpp(the port inCoolProp.CoolProp.Plot) still interpolates linearly. It needs the same change before both copies give the same points. It is in no released CoolProp wheel yet (8.0.0 has none), so nothing breaks in the meantime.Testing
--run-slow), CoolProp 8.0.0, Python 3.13: 624 passed, 97 skipped (browser and Kaleido tests).mypyas configured inpyproject.toml: no issues.tests/test_numerics.py(22 passed), the path tests oftests/test_cycles.py, andtest_api_vocabulary,test_branding,test_dome_labels,test_marked_points,test_saturation_scale,test_contracts,test_thermo(113 passed). CI runs the full suite.After merging
Tag the merge commit
v1.6.0. The staged-recipes PR then moves to 1.6.0.