Ian Bell 3b23cb5409 Fix HAPropsSI T_db from T_wb + low RelHum failing for narrow pressure band (issue #2690) (#2697)
Three fixes to src/HumidAirProp.cpp:

1. WetbulbTemperature inner Brent upper bound: changed Brent(WBS, Tmax+1, 100)
   to Brent(WBS, Tmax, 100). The old Tmax+1 evaluated WBS at T_sat(P) where
   P_s == P, causing division-by-zero (W_s_wb infinite) and an exception that
   cascaded into the outer solver returning _HUGE for certain pressures.

2. _HAPropsSI_inputs T_max extension for T_wb / enthalpy secondary inputs: when
   MainInput is RelHum (>= 1e-10) and the secondary input is T_wb or enthalpy,
   use T_max = 640 K instead of T_sat(P) - 1. For very dry air at sub-atmospheric
   pressures the solution T_db can legitimately exceed T_sat(P); WetbulbTemperature
   already handles T_db > T_sat correctly via its fallback solver.

3. Replace CoolProp::PropsSI("T","P",p,"Q",0,"Water") with the already-instantiated
   Water singleton (Water->update(PQ_INPUTS,...); T_max = Water->T() - 1), consistent
   with the rest of HumidAirProp.cpp.

Also added a Catch regression test [humid_air][2690] covering 10 pressures
(including the previously-failing 90190–91160 Pa band) with round-trip
verification to < 1e-6 K.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 11:17:47 -04:00
2025-10-14 05:15:07 -04:00
2025-11-01 17:48:16 -04:00
2018-03-06 07:51:58 -07:00
2023-06-19 13:42:09 -04:00
2018-04-17 09:46:37 +02:00
2025-10-11 16:32:58 -04:00
2018-08-14 23:06:49 -06:00

Welcome to CoolProp

CoolProp is a thermophysical property database and wrappers for a selection of programming environments. It offers similar functionality to REFPROP, but CoolProp is open-source and free. It was originally developed by Ian Bell, at the time a post-doc at the University of Liege, in Liege, Belgium.

  • CoolProp has flexible licensing terms: Commercial - ok! Academic? - ok! license

  • For Python, get the latest release via pip install coolprop PyPI downloads PyPI version

  • ... other binaries are available from SourceForge sourceforge downloads CoolProp version tag

  • There is also a bleeding edge nightly build of the development version.

  • The documentation is available for the latest release and the development version

  • For any kind of question regarding CoolProp and its usage, you can ask the CoolProp Discussions

  • ... you might also find answers in our FAQ

  • If you found a bug or have an issue that requires the developers to become active, please file an issue in our issue tracker

  • Contributions to this project are welcomed and encouraged! If you wish to contribute bug fixes, patches, or new features, wrappers, or material properties, please submit a Pull Request with your code.

  • If you are new to Git and Github, please see the CoolProp Wiki for guidance on becoming a contributor to the project.

  • Have a look at the coverity stats Coverity Scan Build Status

Description
No description provided
Readme MIT Cite this repository 58 MiB
Languages
C++ 59.2%
Python 24%
CMake 3.2%
TeX 2.4%
Cython 2.2%
Other 8.7%