Skip to main content
14-Alexandrite
February 13, 2023
Solved

Mathcad - REFPROP

  • February 13, 2023
  • 2 replies
  • 5838 views

Hello everyone.

 

I wanted to use the refprop database in Mathcad. I used the file of Nagimov: Link below:

https://github.com/nagimov/refprop2mathcad

 

I also have the REFPROP installed in MS Excell and it works. I have windows11 and Office 2019. 

 

But the problem when trying to get some result in Mathcad. It says: The range value specified is invalid:

 

I tried different values, but it doesn't want to calculate.

 

Any advice would be helpful

 

Regards

Jacob 

Best answer by Werner_E

If nobody here can help and you can't get it work, maybe CoolProp can be a replacement.
I have no experience with either, though, just read about it here in the forum

https://community.ptc.com/t5/Mathcad/CoolProp-6-3-0-Released-Wrappers-for-Mathcad-15-and-Prime/m-p/611352

2 replies

25-Diamond I
February 13, 2023

I don't have installed that add-in, but from the docs it seems that you are supposed to provide units for the last two arguments of the function (pressure and temperature).  In your picture its shown that you provide just numbers without units - can't be sure but maybe providing units fixes your problem.

Frome the readme (https://github.com/nagimov/refprop2mathcad/blob/master/README.md)

Werner_E_1-1676302632480.png

 

 

Murarz14-AlexandriteAuthor
14-Alexandrite
February 13, 2023

Thanks. Actually, I also tried with units but with no success. 

 

From the readme:

 

  • All the fluid properties (pressure, temperature, density, enthalpy, etc) inside of RP2MATH functions can be defined with units. Unitless variables are assumed to be in SI system.

So I guess the problem lies somewhere else. 

25-Diamond I
February 13, 2023

OK, it was just a try, a shot in the dark.
So you may have to wait for someone who has installed the add-in and the Excel data to jump in.

Does the error occur no matter which arguments you use - does it also fail if you use the very same example given in the readme which is shown in my picture above?

Unfortunately we can't trace the error as the function is defined in a locked and collapsed area (which is also positioned so far up that it can't even be seen). The error message may indicate that the import from Excel does not work because of an invalid cell range provided.  It may also mean that the name of the first sheet is not as the add-in expected it to be. We can't see how the author access the Excel sheet.
I am not aware of significant problems concerning the combination of MC15 and XL2019 and W11, but who knows ...

In the past it sometimes cured Excel access problems if the Excel sheet was resaved to some older Excel format (nut as far as I remember it has still to be *xlsx). Nor sure if this could help in your case, but it might be worth a try.

16-Pearl
March 16, 2023

Jacob,

 

There is a REFPROP add-in for Mathcad Prime at https://github.com/usnistgov/REFPROP-wrappers.  This is NIST's repository for official wrappers for REFPROP.  There are others there as well.

 

Browse down to the Mathcad folder under wrappers.  Works best with REFPROP 10.

 

Jeff