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

Refprop mixture with 4 components error #342

Closed
mayersre opened this issue Dec 11, 2014 · 9 comments
Closed

Refprop mixture with 4 components error #342

mayersre opened this issue Dec 11, 2014 · 9 comments
Milestone

Comments

@mayersre
Copy link

The code below fails for the Refprop mix R449A with :

ValueError: [SETUP error 101] error in opening file for component # 1; filename = (/opt/refprop/fluids/R32.ppf

the file should be R32.fld

Linux ubuntu 14.04 / Win 8.1 / Py 3.4 / Coolprop 5.0.3 and 5.0.4. Before Version 5.0.3 the errors were different on Linux and Windows.

regards
Reiner

Code:
import CoolProp
from CoolProp.CoolProp import PropsSI
print(CoolProp.version)

R407F='REFPROP-MIX:R32[0.473194694453358]&R125[0.205109095413331]&R134a[0.321696210133311]'
R422D='REFPROP-MIX:R125[0.596291711495645]&R134A[0.339399053279791]&ISOBUTAN[.064309235224564]'
R430A='REFPROP-MIX:R152a[0.735906531919507]&ISOBUTAN[0.264093468080493]'
R449A='REFPROP-MIX:R32[0.407364566995509]&R125[0.179481207732065]&R1234YF[0.193480840388364]&R134A[0.219673384884062]'

print(PropsSI("H","T",273.15,"Q",0,R407F))
print(PropsSI("H","T",273.15,"Q",0,R422D))
print(PropsSI("H","T",273.15,"Q",0,R430A))
print(PropsSI("H","T",273.15,"Q",0,R449A))

@jowr
Copy link
Member

jowr commented Dec 11, 2014

Thanks for reporting this interesting error. When loading REFPROP fluids, we try to find the fluid files by trying different endings. The order is std::string endings[number_of_endings] = {"", ".FLD", ".fld", ".PPF", ".ppf"};, which means that it will always fail with the .ppfif the files do not exist. Are you 100% sure that you have /opt/refprop/fluids/R32.fld in your file system?

@jowr
Copy link
Member

jowr commented Dec 11, 2014

It is also interesting that it fails the second time. Just noticed that R32 also is part of another mixture. Stay tuned.

@mayersre
Copy link
Author

Yes, on Linux R32.fld and R32.FLD ... on windows only R32.fld, but file
is there

Am 11.12.2014 um 10:17 schrieb Jorrit Wronski:

It is also interesting that it fails the second time. Just noticed
that R32 also is part of another mixture. Stay tuned.


Reply to this email directly or view it on GitHub
#342 (comment).

@ibell
Copy link
Contributor

ibell commented Dec 12, 2014

  1. What gitrevision are you using? We fixed some bugs along the way with REFPROP. You can get the git revision from
import CoolProp
CoolProp.__gitrevision__
  1. Try using all uppercase for all components when using REFPROP.

@ibell
Copy link
Contributor

ibell commented Dec 12, 2014

When I run that code, this is what I get on windows:

5.0.4
200996.831543
203534.220914
216192.447385
Traceback (most recent call last):
  File "trash2.py", line 13, in <module>
    print(PropsSI("H","T",273.15,"Q",0,R449A))
  File "CoolProp.pyx", line 204, in CoolProp.CoolProp.PropsSI (CoolProp\CoolProp.cpp:14608)
  File "CoolProp.pyx", line 236, in CoolProp.CoolProp.PropsSI (CoolProp\CoolProp.cpp:14403)
  File "CoolProp.pyx", line 173, in CoolProp.CoolProp.__Props_err2 (CoolProp\CoolProp.cpp:13248)
ValueError: [SETUP warning -117] No mixture data are available for one or more binary pairs in the specified mixture. The mixing parameters have been estimated. : PropsSI("H","T",273.15,"Q",0,"REFPROP-MIX:R32[0.407364566995509]&R125[0.179481207732065]&R1234YF[0.193480840388364]&R134A[0.219673384884062]")

@ibell
Copy link
Contributor

ibell commented Dec 12, 2014

Are you sure you are using the most up-to-date code?

@ibell
Copy link
Contributor

ibell commented Dec 12, 2014

Also, the standard syntax for calling REFPROP in v5 is 'REFPROP::' plus the fluid(s) name(s), though we do support 'REFPROP-' and 'REFPROP-MIX:' for backwards compatibility reasons

@mayersre
Copy link
Author

Hi Ian,

added gitrevision to output, error 101 remains. I get the same error
when I add a colon too much to
another REFPROP refrigerant, like R430A.

I use MIX in the name for autoscaling of lines in my diagrams. Is there
an equivalent for a triple point
temperature available in v 5? I approximate the lowest possible
temperature before I use it in the plot
to avoid errors.

Reiner

code:
import CoolProp
from CoolProp.CoolProp import PropsSI
print('Coolprop Version : ',CoolProp.version)
print('GIT revision : ',CoolProp.gitrevision)

R407F='REFPROP::R32[0.473194694453358]&R125[0.205109095413331]&R134a[0.321696210133311]'
R422D='REFPROP::R125[0.596291711495645]&R134A[0.339399053279791]&ISOBUTAN[.064309235224564]'
R430A='REFPROP::R152a[0.735906531919507]&ISOBUTAN[0.264093468080493]'
R449A='REFPROP::R32[0.407364566995509]&R125[0.179481207732065]&R1234YF[0.193480840388364]&R134A[0.219673384884062]'

print('R407F enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R407F))
print('R422D enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R422D))
print('R430A enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R430A))
print('R449A enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R449A))

result:
Coolprop Version : 5.0.4
GIT revision : 8cef862
R407F enthalpy 0°C liquid : 200996.83154258266
R422D enthalpy 0°C liquid : 203534.22091351735
R430A enthalpy 0°C liquid : 216192.44738457337
Traceback (most recent call last):
File "/home/mayers/workspace/Dampftafeln/r449test.py", line 14, in

print('R449A enthalpy 0°C liquid :
',PropsSI("H","T",273.15,"Q",0,R449A))
File "CoolProp.pyx", line 204, in CoolProp.CoolProp.PropsSI
(CoolProp/CoolProp.cpp:14608)
File "CoolProp.pyx", line 236, in CoolProp.CoolProp.PropsSI
(CoolProp/CoolProp.cpp:14403)
File "CoolProp.pyx", line 173, in CoolProp.CoolProp.__Props_err2
(CoolProp/CoolProp.cpp:13248)
ValueError: [SETUP error 101] error in opening file for component # 1;
filename = (/opt/refprop/fluids/R32.ppf

Am 12.12.2014 um 06:19 schrieb Ian Bell:

Also, the standard syntax for calling REFPROP in v5 is 'REFPROP::'
plus the fluid(s) name(s), though we do support 'REFPROP-' and
'REFPROP-MIX:' for backwards compatibility reasons


Reply to this email directly or view it on GitHub
#342 (comment).

@ibell ibell closed this as completed in 0e766ab Dec 12, 2014
@ibell
Copy link
Contributor

ibell commented Dec 12, 2014

This bug has been fixed - there is a warning on the last mixture because
there are missing binary pair parameters, they are estimated. For now we
silently ignore these warnings.

On Fri, Dec 12, 2014 at 12:30 PM, mayersre notifications@github.com wrote:

Hi Ian,

added gitrevision to output, error 101 remains. I get the same error
when I add a colon too much to
another REFPROP refrigerant, like R430A.

I use MIX in the name for autoscaling of lines in my diagrams. Is there
an equivalent for a triple point
temperature available in v 5? I approximate the lowest possible
temperature before I use it in the plot
to avoid errors.

Reiner

code:
import CoolProp
from CoolProp.CoolProp import PropsSI
print('Coolprop Version : ',CoolProp.version)
print('GIT revision : ',CoolProp.gitrevision)

R407F='REFPROP::R32[0.473194694453358]&R125[0.205109095413331]&R134a[0.321696210133311]'

R422D='REFPROP::R125[0.596291711495645]&R134A[0.339399053279791]&ISOBUTAN[.064309235224564]'
R430A='REFPROP::R152a[0.735906531919507]&ISOBUTAN[0.264093468080493]'

R449A='REFPROP::R32[0.407364566995509]&R125[0.179481207732065]&R1234YF[0.193480840388364]&R134A[0.219673384884062]'

print('R407F enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R407F))
print('R422D enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R422D))
print('R430A enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R430A))
print('R449A enthalpy 0°C liquid : ',PropsSI("H","T",273.15,"Q",0,R449A))

result:
Coolprop Version : 5.0.4
GIT revision : 8cef862
R407F enthalpy 0°C liquid : 200996.83154258266
R422D enthalpy 0°C liquid : 203534.22091351735
R430A enthalpy 0°C liquid : 216192.44738457337
Traceback (most recent call last):
File "/home/mayers/workspace/Dampftafeln/r449test.py", line 14, in

print('R449A enthalpy 0°C liquid :
',PropsSI("H","T",273.15,"Q",0,R449A))
File "CoolProp.pyx", line 204, in CoolProp.CoolProp.PropsSI
(CoolProp/CoolProp.cpp:14608)
File "CoolProp.pyx", line 236, in CoolProp.CoolProp.PropsSI
(CoolProp/CoolProp.cpp:14403)
File "CoolProp.pyx", line 173, in CoolProp.CoolProp.__Props_err2
(CoolProp/CoolProp.cpp:13248)
ValueError: [SETUP error 101] error in opening file for component # 1;
filename = (/opt/refprop/fluids/R32.ppf

Am 12.12.2014 um 06:19 schrieb Ian Bell:

Also, the standard syntax for calling REFPROP in v5 is 'REFPROP::'
plus the fluid(s) name(s), though we do support 'REFPROP-' and
'REFPROP-MIX:' for backwards compatibility reasons


Reply to this email directly or view it on GitHub
#342 (comment).


Reply to this email directly or view it on GitHub
#342 (comment).

@ibell ibell added this to the v5.0.4 milestone Dec 18, 2014
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

3 participants