CoolProp: LIMITATION: DOES NOT accept specific enthalpy 'H' and vapor quality 'Q' as input pairs

This page identifies a possible issue, inconsistency, concern, error, or bug!
One of the ways Webel IT Australia helps promote tools, technologies, and languages is by donating a lot of time identifying, tracking, and reporting potential issues, in order to help vendors and developers improve the tools and technologies. In some cases, we also offer workarounds and advice for users. All issues tracked on our public site are offered most constructively and with sincerest gratitude to the tool vendors and technology developers.
DISCLAIMER: Vendors do not officially endorse issue analysis by Webel IT Australia.
Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Keywords

So you've tried to reproduce a saturation curve for a pressure-enthalpy diagram (Mollier diagram) directly using in CoolProp and - no matter what values you use from other authoritative sources - it keeps giving you infinity and/or an error and leaves you wondering whether you are going completely mad or just doing something silly.

The following attempt at getting the pressure on the liquid side of the saturation curve for a given enthalpy does not work AT ALL in CoolProp (the example uses the Java wrapper):


CoolProp.PropsSI("P","H",288642,"Q",0,"R32");

Depending on which wrapper (if any) you are using, you'll get infinity ∞, or minus infinity -∞, or a warning like this:
ERROR: Input pair variable is invalid and output(s) are non-trivial; cannot do state update

The reason seems to be that, although for most fluids there is only one pressure for a given enthalpy on the liquid side of the p-h curve, on the vapour side there are often two (such as for R32 refrigerant).

The problem is kindly explained by Matthis Thorade on the CoolProp forums:

saturated liquid enthalpy and saturated liquid entropy should be unique, but saturated vapour enthalpy is not unique. I believe this input pair is just not implemented. So, what you can do is use PQ, or TQ as input pair, or write a small function in whatever wrapper language you are using to find the saturated liquid state. Saturated liquid enthalpy is monotonous between triple point liquid and criti[c]al liquid, so any 1D root finding algorithm should work (bisection, Brent, bounded Newton).
If you just want to reproduce a P-H chart you don't need all that fancy iteration stuff:
Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)
External links