Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract state triple point out of range error for REFPROP mixture #2378

Open
matlawicebox opened this issue May 14, 2024 · 3 comments
Open

Comments

@matlawicebox
Copy link

I get an inputs out of range error message when attempting to get triple point pressure for an abstract state made from a REFPROP mixture.

If I define an abstract state and then try to get its triple point pressure with this:

import CoolProp as CP
R513a = CP.AbstractState('REFPROP','R1234yf&R134a'); R513a.set_mole_fractions([0.56,0.44])
p_trip = R513a.trivial_keyed_output(CP.iP_triple)

with the following error message:

Traceback (most recent call last):
  File "/Users/matlawicebox/Desktop/Python/CondaHeatPump/testrefprop.py", line 14, in <module>
    p_trip = R513a.trivial_keyed_output(CP.iP_triple)
  File "CoolProp/AbstractState.pyx", line 227, in CoolProp.CoolProp.AbstractState.trivial_keyed_output
  File "CoolProp/AbstractState.pyx", line 229, in CoolProp.CoolProp.AbstractState.trivial_keyed_output
ValueError: [TQFLSH error 2] One or more inputs are out of range; Density above upper limit: D = 14.6560 mol/L, Dmax = 14.4635 mol/L.                                                                                                                                     

When I use non-mixtures, I get no error at all:

singlefluid = CP.AbstractState('REFPROP','R134a')
p_trip = singlefluid.trivial_keyed_output(CP.iP_triple)

Versions

CoolProp Version: 6.4.1
Mac OS 14.0
Python

@ibell
Copy link
Contributor

ibell commented May 17, 2024

Pmin isn't a trivial output for REFPROP backend, instead Tmin is a trivial output and then you need to do a saturation call to get the corresponding pressure

@matlawicebox
Copy link
Author

matlawicebox commented May 23, 2024

By "do a saturation call" I'm assuming you mean use Ttrip along with quality to find Ptrip?

I tried with water and that seemed to work (and PropsSI with my Refprop mixture works elsewhere), but with T_trip my mixture I get a similar error as with CP.iP_triple:

import CoolProp as CP
R513a = CP.AbstractState('REFPROP','R1234yf&R134a'); R513a.set_mole_fractions([0.56,0.44])
T_trip = R513a.trivial_keyed_output(CP.iT_triple)

That part works. But when I try this:

p_trip = CP.CoolProp.PropsSI('P','T',T_trip,'Q',0,'REFPROP::R1234yf[0.56]&R134a[0.44]')

I get this error:

Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
  File "<input>", line 1, in <module>
  File "CoolProp/CoolProp.pyx", line 377, in CoolProp.CoolProp.PropsSI
  File "CoolProp/CoolProp.pyx", line 457, in CoolProp.CoolProp.PropsSI
  File "CoolProp/CoolProp.pyx", line 344, in CoolProp.CoolProp.__Props_err2
ValueError: TQ(/opt/refprop/fluids/R1234YF|/opt/refprop/fluids/R134A): [TQFLSH error 2] One or more inputs are out of range; Density above upper limit: D = 14.6560 mol/L, Dmax = 14.4635 mol/L.         

@ibell
Copy link
Contributor

ibell commented May 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants