usnistgov / REFPROP-wrappers

Wrappers around NIST REFPROP for languages such as Python, MATLAB, etc.
193 stars 127 forks source link

Problem using Refprop with Coolprop #547

Closed LouisLamarche closed 1 year ago

LouisLamarche commented 1 year ago

Description

Hi, I use to call refprop in CoolProp but now it does not work. It cannot load the fluid. Normally I was using mixture of Water and ammonia but now it does not work even with water

Steps to Reproduce

import numpy as np

import CoolProp.CoolProp as CP

T1 = 40
T3 = -10
T1k = T1 + 273.15
T3k = T3 + 273.15
fluide = 'WATER'
CP.set_config_string(CP.ALTERNATIVE_REFPROP_PATH, 'c:\\Program Files (x86)\\REFPROP\\')

REFPROP = CP.AbstractState('REFPROP','WATER')
REFPROP.update(QT_INPUTS, 0,T1k)
p1b = REFPROP.p()
REFPROP.update(QT_INPUTS, 1,T1k)
p2b = REFPROP.p()

I have the following message:

Traceback (most recent call last):
  File "D:\documents\PROJETS\absortion\Exemple1.py", line 14, in <module>
    REFPROP = CP.AbstractState('REFPROP','WATER')
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "CoolProp\AbstractState.pyx", line 32, in CoolProp.CoolProp.AbstractState.__cinit__
ValueError: Could not load these fluids: WATER

Versions

*REFPROP Version: 10.0.0.97 Operating System and Version: windows 10 Access Method:** python with coolprop

I tried with water ( lowercase) Water, nothing works. It use to work fine before I don't know what changed. The program refprop.exe works fine with all fluids and mixtures.

Thank you LOuis Lamarche

ianhbell commented 1 year ago

What version of coolprop?

LouisLamarche commented 1 year ago

6.5.0 , thank you

ianhbell commented 1 year ago

Worked fine for me with CoolProp 6.5.0 on a windows box with standard REFPROP