Excel spreadsheets: A sample spreadsheet is included that demonstrates how the REFPROP DLL can be linked to Excel. Most properties that are available in the graphical interface can also be calculated in the spreadsheet.
Additionally, users should cite the reference for either the equation of state or the transport equations used in their work, for example, if you used calculations for CO2, you will find the reference for the equation of state under the Options/Fluid Information option in Refprop and you should cite the reference given under that option, like this:
For all issues related to ordering the program contact data [at] nist.gov
For questions concerning the installation and running the program, with linking the program with other applications, or with issues concerning the fluid properties, please visit the FAQ site first: -docs/.
Further answers can be found at GitHub: -issues/issues . Please use this site to post new questions as well so that all REFPROP users may learn from the correspondence. If you still need assistance, or have other matters that that you need to discuss, email refprop [at] nist.gov
The mini-REFPROP program is a free sample version of the full REFPROP program(located at www.nist.gov/srd/refprop) and is meant for use as a teaching tool inthe introduction of thermodynamics to students. It contains a limited number ofpure fluids (water, CO2, R134a, nitrogen, oxygen, methane, propane, helium,hydrogen, and dodecane), along with air as a pseudo-pure fluid. It also allowsmixture calculations of a 50/50 molar mix of nitrogen and methane or of a 79/21molar mix of nitrogen and oxygen for teaching vapor-liquid equilibrium (VLE).Please note carefully that the 79/21 N2/O2 mixture is not meant for aircalculations, but as a teaching tool to study composition changes as the mixturepasses through the two phase. For actual air properties, please selectSubstance/Pseudo-Pure Fluid/Air when running the GUI.
To install the program, right-click on the file below and select "Save TargetAs..." Place this file in a temporary directory (which is not labeled Refprop),then run the executable to install mini-REFPROP to your harddrive.
The executable for Version 10 of mini-Refprop was set to expire on Dec. 31,2019. If your version no longer works, please download the exe below and placeit in your mini-Refprop directory AFTER you have installed the program from thesetup file above. This version does not expire, but may contain new bugs. Ifyou find them, please report them to us. (Eric....@nist.gov)
Unfortunately, because there is no charge for the mini-Refprop software, weare not able to provide technical support due to the limited number of staffavailable at NIST in the thermophysical properties division. Support isavailable only with the full version.
I'm writing a C++ application using Visual Studio Express 2013. My application makes calls to a module called refprop.dll. However, the call to SETUPdll fails sometimes (about half the time). Other times it works perfectly. My code is like so.
When calling Windows API (or any other) functions, never ignore the return codes, otherwise you might end up having hard to find problems, like the current one. But in our case there were no such errors.
Your code didn't work (when it wasn't failing with Acces violation), because the file paths were incorrect. Here's the error that it used to return: [SETUP error 101] error in opening file for component # 2; filename = (ETHANE.FLD ). I fixed that by specifying the full paths.
Note that I also downloaded the other code from NIST, but it was too complex and it requires stuff that I don't have installed, so I focused on your code (I even copied the files onto the same paths to have an environment as close as possible to yours).
A personal opinion on RefProp: I am not aware of what exactly it does, I know it's a kind of property DB for different chemical substances (most of them part of organic chemistry), but in terms of programming:
However I've checked REFPROP.DLL dependencies, and there are only 2: KERNEL32.DLL and USER32.DLL (no MSVCR*.DLL). That means that it has been statically linked to the VC runtime (or any C runtime equivalent). On the other hand your executable also has its own VC runtime (how it's linked to it it's not important).
As a consequence, you have 2 C runtimes in your executable (one in the exe and one in the dll). One of a C runtime tasks is memory management: how memory (pointers) is being allocated/deallocated (check malloc/free functions). In some cases (if the dll code and the exe code are not in "sync"), you might end up allocating a pointer from one runtime and deallocating it from the other, and that could lead to the very behavior that we have here.
RefpropdllInstance is a member of a class (RefPropPack) which handles the setup and calls. I'm now catching the access violation error (See details here: -us/library/1deeycx5(v=vs.80).aspx). I've tried reloading the dll (FreeLibrary(), set pointers to NULL, reload and remap functions and recall SETUPdll) but did not solve the problem. So instead, when the error occurs I just delete the RefPropPack object and reinstantiate/setup it. It may take more than one try but will eventually succeed.
In addition to this page, further answers can be found at GitHub: REFPROP-issues. Please use the GitHub site to post new bugs or questions so that all REFPROP users may learn from the correspondence. If you still need assistance, or have other matters that you need to discuss, email ref...@nist.gov and we will get back to you as soon as we can.
There are three ways to purchase REFPROP: For your use only, for company wide use, or for use in distribution in your code. These are all explained at If you purchase the program for your use only, the copy you will receive can be installed on all machines that you use (not including servers where others can also access the program). You do not need to purchase a copy for each machine you own.
In some applications where calculations fail after installing versions 9.0 or 9.1, the oldDLL from version 7.0 or 8.0 may be hiding in your Windows\System32 directory. Open up this directory and search for Refprop.dll. If you find it, delete it (it should never be stored in the Windows directory). The new one belongs in the Refprop directory along with the executable.
check to see if you have a firewall or antivirus software that can be turned off. Deactivating these will often allow successful installs, especially on Vista machines. If this fails or is not an option, then >download the corresponding file from the link below and save it in your Windows\System32 directory on 32 bit machines or to your Windows\SysWOW64 directory on 64 bit machines.
In some cases where you are not allowed to be the administrator on a machine, this message will appear because it cannot access the System32 directory. Try placing the file in your Windows directory to get the program to work.
If you are feeling brave, you can also try to install REFPROP into the wine environment (a windows-emulation environment). Once you have installed wine (via homebrew on OSX, or via package manager of your linux distribution, google for more information), you can install REFPROP (along with its GUI) into wine with (for instance with REFPROP 10):
Lemmon, E.W., Bell, I.H., Huber, M.L., McLinden, M.O. NIST Standard Reference Database 23: Reference Fluid Thermodynamic and Transport Properties-REFPROP, Version 10.0, National Institute of Standards and Technology, Standard Reference Data Program, Gaithersburg, 2018.
Additionally, users should cite the reference for either the equation of stateor the transport equations used in their work, for example, if you usedcalculations for CO2, you will find the reference for the equationof state under the Options/Fluid Information option in Refprop and you shouldcite the reference given under that option, like this:
Enhancements have been made to most areas of the NIST REFPROP program, including the equations of state for many of the pure fluids and mixtures, the transport equations, the graphical interface, the Excel spreadsheet, the Fortran files (i.e., core property routines), the sample programs in Python, C++, MATLAB, VB, etc. Some of the more important improvements are listed below:
Several problems in version 9.0 (listed below) were found after its release, and these have all been corrected in 9.1. There are also a few issues with 9.1. If these affect you, please let us know and we will send you the update.
The most recent help file from Refprop is available below. You should download it to yourmachine before launching it, otherwise the help file will appear blank. The PDF is an alternative form of the documentation that may be more convenient for you. The most up-to-date version of the documentation is at -docs.readthedocs.io/en/latest/
The following predefined mixtures are included in the ASHRAE 34 Standard and are supported by REFPROP. In REFPROP 10, many of the predefined mixture files are already included, and additional ones can be generated with the script at -issues/issues/358#issuecomment-872394368
Warning: if interaction parameters are estimated, you should be somewhat skeptical of the model results, and confirm model accuracy against experimental measurements. A good place to start to figure out whether the model might be adequate for your use case, is the survey of measurements and models in
For differences in enthalpy and entropy between the Refprop graphical interface and the Refprop Excel sample spreadsheet, or for differences in enthalpy and entropy between Refprop and tables of properties given in handbooks:
The absolute values of enthalpy, entropy, and energy at a single state point are meaningless. It is only the difference between two different state points that matter. Thus, the value for a single state point can be set to any arbitrary value. Many handbooks set the arbitrary state point so that the values of these properties are positive for most liquid or gas states. The user can change the values of the arbitrary state points by going to the Options/Reference State menu.
c80f0f1006