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:
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: