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>
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!
-
... other binaries are available from SourceForge
-
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.