Open ianhbell opened 3 years ago
And if I try to set the interaction parameters, it doesn't change the values or yield an error:
import os
from ctREFPROP.ctREFPROP import REFPROPFunctionLibrary
RProot = os.environ['RPPREFIX']
RP = REFPROPFunctionLibrary(RProot)
print('REFPROP version:', RP.RPVersion())
here = os.path.abspath(os.path.dirname(__file__))
r0 = RP.SETUPdll(2, here+'/FLUIDS/'+'R1234YF.FLD;'+here+'/FLUIDS/R152A.FLD', here+'/FLUIDS/HMXBAG.BNC', 'DEF')
print(r0)
ktv = RP.GETKTVdll(1,2)
print(ktv)
ktv.fij[0] = -1
# ktv.fij[1] = -1
print(ktv)
sktv = RP.SETKTVdll(1, 2, ktv.hmodij, ktv.fij, ktv.hFmix)
print(sktv)
ktvnew = RP.GETKTVdll(1,2)
print(ktvnew)
yielding
REFPROP version: 10.0.1.16
SETUPdlloutput(ierr=0, herr='')
GETKTVdlloutput(hmodij='XR0', fij=array('d', [1.0, 1.0, 1.0, 1.0, 0.0, 0.0]), hFmix='estimated by ESTBNC', hfij='', hbinp='Mixture data have not been fitted for this binary pair; the mixing parameters have been estimated with the method of Lemmon and McLinden (2001).', hmxrul='')
GETKTVdlloutput(hmodij='XR0', fij=array('d', [-1.0, 1.0, 1.0, 1.0, 0.0, 0.0]), hFmix='estimated by ESTBNC', hfij='', hbinp='Mixture data have not been fitted for this binary pair; the mixing parameters have been estimated with the method of Lemmon and McLinden (2001).', hmxrul='')
SETKTVdlloutput(ierr=0, herr='')
GETKTVdlloutput(hmodij='XR0', fij=array('d', [1.0, 1.0, 1.0, 1.0, 0.0, 0.0]), hFmix='estimated by ESTBNC', hfij='', hbinp='The binary parameter(s) for (R1234yf+R152a) have been modified from their original values.', hmxrul='')
There are a few issues:
1) When passing absolute paths to
HMX.BNC
file, it appears the file must have the.BNC
extension. 2) In 10.0.0+, if absolute paths are passed to HMX.BNX and the fluid files, estimation scheme is not applied properly, and subsequent calls are unable to set the interaction parameters: 3) In development version, no warning is returned about estimated parameters: https://github.com/usnistgov/REFPROP-tests/commit/27bb3b4c40c95a9f7e7215af813c645889b3668a . Also the estimated parameters are incorrect.yields (in development)
and in version 10.0.0