usnistgov / REFPROP-wrappers

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

Problem with linking Matlab 2019a to REFPROP 10.0 #622

Open mCoder75 opened 1 month ago

mCoder75 commented 1 month ago

Good morning,

I m working to link Matlab to REFPROP 10.0 and I m following the instruction given here: [REFPROP-wrappers/wrappers/MATLAB at master · usnistgov/REFPROP-wrappers. I m using Matlab 2019.a 64 bit and python 2.7.

I have the 'REFPROP.DLL' on my REFPROP folder but I do not have 'REFPRP64.DLL'. I uploaded it from REFPROP-wrappers.

When I open the software I see that I have the license for REFPROP 10 (image 2 image2). However, through Matlab script, the function RP.RPVersion() gives REFPROP 9.1111 as shown in image 1 image1 .

When I follow the legacy instructions, and I run: refpropm('T','P',101.325,'Q',0,'WATER'), I get the error message shown in image3 image3 .

When I try the example (… MOLSI = RP.GETENUMdll(int8(0),'MOLAR BASE SI').iEnum;) I get the error shown in image 4 image4 .

It seems that matlab is recognizing the methods of RP but somehow (image 5 image5 ) , it is not able to use them.

Do you have any suggestion that can help? perhaps I downloaded the REFPRP64.DLL of REFPROP 9 and I have REFPROP 10. Perhaps that is the issue. Is there a file version of REFPRP64.dll for REFPROP 10?

Thank you

ianhbell commented 1 month ago

Well first thing is you need to update your python to 3.x. 2.7 has been beyond dead for a few years now: https://devguide.python.org/versions/

Definitely you don't want to mix REFPROP versions. When you purchased REFPROP 10, you should have received all the necessary files that match each other.

ianhbell commented 1 month ago

Also, refpropm is not to be used anymore. It is retained only for historical reasons.

mCoder75 commented 1 month ago

Thank you for your reply. I copied REFPRP64.DLL into the folder and overwrote the original one. I will reinstall REFPROP 10.0.

ianhbell commented 1 month ago

We always recommend you fully remove REFPROP 9 from your machine when installing 10, or at least keep them in separate installation folders. If you find you need to go back to REFPROP 9, you can ask us for the installer