CoolProp.Plots.HSFlashTimingMap module#
Interactive map of the single-phase H,S-flash cascade cost over the full fluid domain (water by default), in p-T and/or h-s coordinates.
The data is produced by the C++ Catch2 test [HS_watermap] (see
src/Tests/CoolProp-Tests-HS.cpp), which sweeps a dense (log p, linear T) grid
– single-phase points only, exactly as the ConsistencyPlot suite samples – and
writes one CSV row per point with the EOS-evaluation count, wall time, and the
cascade leg that solved it:
./build_rel/CatchTestRunner “[HS_watermap]” # writes water_hs_map.csv
Then render the interactive HTML (hover shows every field; pan/zoom/box-select):
python -m CoolProp.Plots.HSFlashTimingMap water_hs_map.csv # both coords python -m CoolProp.Plots.HSFlashTimingMap water_hs_map.csv –coords hs
Each coordinate system gets a 3-panel figure (EOS evals, solve time, winning cascade leg) with the phase boundary overlaid – the p-T saturation curve, or the h-s two-phase dome. Requires plotly for the interactive HTML; falls back to a static matplotlib figure if plotly is unavailable.
- CoolProp.Plots.HSFlashTimingMap.load(csv_path)#
- CoolProp.Plots.HSFlashTimingMap.log_color(values)#
Map positive values to log10 for color, plus 1-2-5 decade colorbar ticks labelled with the ORIGINAL values (so the bulk variation is visible instead of being washed out by a few high-cost outliers).
- CoolProp.Plots.HSFlashTimingMap.main(argv=None)#
- CoolProp.Plots.HSFlashTimingMap.make_matplotlib(df, title, png_path, xcol, ycol, xlabel, ylabel, overlay)#
- CoolProp.Plots.HSFlashTimingMap.make_plotly(df, title, html_path, xcol, ycol, xlabel, ylabel, overlay)#
- CoolProp.Plots.HSFlashTimingMap.phase_boundary(fluid, n=240)#
Phase boundary in both coordinate systems, computed from CoolProp.
Returns a dict with the p-T saturation curve and the h-s two-phase dome (liquid branch up + vapor branch back down, a closed outline) plus the critical point in each system. Returns {} if CoolProp is unavailable.
- CoolProp.Plots.HSFlashTimingMap.render(df, title, base, coord, overlay)#