binary pair CO2&N2 gives wrong density and fails on saturation pressure caluculation
Good evening,
CoolProp fails to calculate the saturation pressure of a binary mixture and exits with an error message.
Steps to Reproduce
- set binary pair CO2&N2 at 0.95,0.05
- try to update to saturation state (Q=0), fails for all temperatures I tested.
throws:
ValueError Traceback (most recent call last)
CoolProp/AbstractState.pyx in CoolProp.CoolProp.AbstractState.update()
CoolProp/AbstractState.pyx in CoolProp.CoolProp.AbstractState.update()
ValueError: solver_rho_Tp was unable to find a solution for T= 290, p=7.05883e+06, with guess value 13230 with error: The molar density of -4230.149318 mol/m3 is below the minimum of 0.000000 mol/m3
Expected behavior: [What you expect to happen] return the saturation pressure of roughly 75 bar.
Actual behavior: [What actually happens] CooolProp calculates negative density and fails, throws an error message
Versions
In [16]: import CoolProp In [17]: print(CoolProp.version) 6.4.2dev
downloaded and compiled September 14th, 2022
Access via python (ipython interface, python 3.10) on Debian Linux .
Additional Information
if you change Q to a value near 0, it works:
In [18]: HEOS.update(CP.QT_INPUTS, 0.001,290.)
In [19]: HEOS.p() Out[19]: 7484127.52168147
If possible, please post examples and/or screenshots of the issue.
import CoolProp.CoolProp as CP
HEOS = CP.AbstractState("HEOS", "CO2&N2")
HEOS.set_mole_fractions([0.95,0.05])
HEOS.update(CP.QT_INPUTS, 0,290.)
Thanks for the great work!