Answers to Frequently Asked Questions
The following information gives answers to some of the most frequently asked questions concerning the REFPROP program (www.nist.gov/srd/nist23.cfm). To download any of the files listed below, right-click on the file and select Save Target As... and then add the file to your Refprop or other appropriate directory. Sections with new information added during the last several months are identified with a «. For questions not answered here, please see the user's guide at www.nist.gov/srd/upload/REFPROP9.PDF
«There are a few changes in versions 9.0 and 9.1 that may confuse you when you first run the program. The number of fluids will appear to be much shorter. Look under Substance/Specify Fluid Set and you will see the ability to select a set of fluids rather than list all of them. In the Options/Properties menu, the composition box is now missing from the Thermodynamic tab; you will find it in the Mixtures tab along with other properties that are generally displayed only for mixtures. When copying data from a table, the headers are no longer copied with the data. If you like that feature, select it in Options/Preferences, then save the defaults.prf file under Options/Save Current Options. Concerning the Fortran files and the calling routines to the DLL, all of the inputs/outputs to the routines are the same as those to 8.0 so your own code will not have to be updated. Just replace your old DLL with that from 9.0 or 9.1 and you will be set to go (of course you will also need the new FLD files and the HMX.BNC file).
2. Reference States (enthalpy and entropy differences)
6. Help File
15. Humid Air
Linking with other Applications
20. Mixture Files
21. C Applications
27. MatLab Applications«
28. Excel Applications«
Problems. In some applications where
calculations fail after installing versions 9.0 or 9.1, the old DLL 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.
If one of the following error messages appears when the graphical interface is launched:
run-time error 339
component MSHFLXGD.OCX or one of its dependencies not correctly registered:
a file is missing or invalid
component COMDLG32.OCX or one of its dependencies not correctly registered:
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.
If the error message continues, you will need to register the file by running the appropriate command below for your system and the missing file:
If an error message occurs referencing the file REFPROP.MSI, try the following: Press your Start button, and then click on "Run …". Type in Regedit. If it does not start at the top of registry, scroll to the top and click on "My Computer". Search for "Refprop 8.1.msi", or whatever msi file it is complaining about in the install error message. You should find something like "HKEY_CLASSES_ROOT\ Installer\ Products\ 6398724E8B370524FA88122E26945D8F". For every occurrence of the item in the registry, you should either rename or delete it. To rename, simply add an underscore in the sequence of numbers, such as "_6398724…". Then try reinstalling the program.
States. 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.
For mixtures, there are additional options that can be set to affect the manner in which these properties are calculated. The preset values sent out with Refprop 7.0 are different between the graphical interface and the Excel file. In the Options/Reference State menu, there are two choices at the bottom of the menu on the far right. By changing this option, the two programs will then return the same values. This option can be permanently saved in the graphical interface by selecting Options/Save Options, and the saving the options under the file name defaults.prf. To change the default in the Excel file, press Alt-F11 to bring up the VB code. If the code does not appear, make sure the project explorer is visible (View/Project Explorer), and then click on modules and then on module1. Search for the call to SETREF, and change the second input from 2& to 1&. More information on this can be found in your Refprop\Fortran directory in the file SETUP.FOR under the SETREF subroutine.
To permanently change the default setting for a pure fluid, edit the fluid file and look at the 14th line of the file, which will appear similar to this:
IIR !default reference state
Remove this line and add two lines in its place, similar to the following:
OTH !default reference state
300.0 1.0 10000.0 100.0 !tref, Pref, Href, Sref
These lines will set the enthalpy to 10000 J/mol and the entropy to 100 J/mol-K at 300 K and 1 kPa. These values can be changed to any other desired values.
REFPROP is a Program, not a Database Containing Measurements. The REFPROP "database" is actually a program and does not contain any experimental information, aside from the critical and triple points of the pure fluids. The program uses equations for the thermodynamic and transport properties to calculate the state points of the fluid or mixture. These equations are the most accurate equations available world wide. A link to one of these equations for R-125 is given below. Their high accuracy is obtained through many coefficients in the equations, and thus the calculation speed will be slower than other equations such as the Peng-Robinson cubic equations. The equations are generally valid over the entire vapor and liquid regions of the fluid, including supercritical states; the upper temperature limit is usually near the point of decomposition of the fluid, and the upper pressure (or density) limit is defined by the melting line of the substance.
the REFPROP Program in Publications. The following reference can be used to cite
the REFPROP program in publications:
Lemmon, E.W., Huber, M.L., McLinden, M.O. NIST Standard Reference Database 23: Reference Fluid Thermodynamic and Transport Properties-REFPROP, Version 9.1, National Institute of Standards and Technology, Standard Reference Data Program, Gaithersburg, 2013.
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:
Span, R. and Wagner, W., J. Phys. Chem. Ref. Data, 25(6):1509-1596, 1996.
Updates to Version
9.1. Version 9.1 is now the current release and
there are no updates to this version.
Several problems in version 9.0 (listed below) were found after its
release, and these have all been corrected in 9.1.
1. The calculation of d2p/dT2 at constant density is incorrect.
2. The reference state for R1234yf and ze should be changed from NBP to IIR. Updated files are given further below.
3. Calculation of isobars for pure fluids at pressures less than the triple point pressure may incorrectly return properties in the liquid phase rather than the vapor phase.
4. The manual REFPROP9.PDF and the UserInformation sheet in Refprop.xls incorrectly listed isobutene instead of isobutane for R430A. (However, the graphical interface and mixture file are correct.)
Changing Fluids and Calling SETUP Multiple Times. Calling SETUP (or SETUPdll)
many many times can result in a memory loss error and
in a substantial increase of computation speed.
In many situations, it is better to load all of the fluids at the start
of the program, calling SETUP only once.
You can then switch between fluids through the use of calls to SETNC and
PUREFLD. The example below shows how
this can be done for a mixture combined with several pure fluids. If two different mixtures are required, load
all fluids and set the composition to 0 for those fluids not involved in a
particular application. This could
easily be done by using two different arrays for the composition.
Defining Two-Phase States for Pure Fluids. Defining the state of a fluid normally requires two inputs, such as pressure-temperature, temperature-enthalpy, pressure-enthalpy, and so forth. This is true for the single-phase states and for two-phase solutions with mixtures of fluids. (Some inputs may have two solutions, this was described earlier.) For pure fluids, using inputs of pressure and temperature is not sufficient to describe the state of the fluid since both remain constant between the liquid and vapor states. Some other property, such as quality, enthalpy, or density, is required to specify the two-phase state point for the pure fluid. Once the quality is known, some of the other thermodynamic properties can be calculated with the equation M=q*Mvap + (1-q)*Mliq, where M is the property of interest and q is the quality. There are several properties that cannot be calculated this way, including the heat capacities, the speed of sound, and the transport properties. These quantities are undefined in the two-phase region for any fluid, except Cv, which is defined very differently than one would expect. There are some people who use a different formula to calculate the speed of sound in the two phase, but it is applicable only in certain specific applications. In these situations, it is best to consider the properties of the liquid and of the vapor separately, and how they interact with the application being developed.
As an example, consider Cp, which could be calculated from any equation of state using the quality, but thermodynamically is not defined for a two-phase mixture. Cp is the heat capacity along an isobaric process and is equal to dH/dT. Since pressure and temperature do not change across the two phase for a pure fluid, then that means Cp would be equal to infinity because the heat capacity changes but the temperature does not, thus the definition makes it thermodynamically impossible to calculate it. The only place that Cp can be infinity is at the critical point.
Multiple and Metastable States. There are cases where an input state point can result in two separate valid states. The most common is temperature-enthalpy inputs. Viewing a P-H diagram (or a T-H diagram with very high pressures) will help show how there can be two valid states points for a given input. For example, nitrogen at 140 K and 1000 J/mol can exist at 6.85 MPa and at 60.87 MPa. When this situation occurs, Refprop returns the state with the higher density. For these state points , the character '<' or '>' can be added to the number (before or after) to find the lower or upper root, respectively. In the Excel sample file, the use of these characters was added after the release of version 8.0; the new example file REFPROP.XLS (given below in the Excel section) contains new code and an example of its use. These same characters can also be used to find metastable fluid states for temperature and pressure inputs. For example, the saturation pressure for nitrogen at 100 K is 0.778 MPa. Inputs of 100 K and 0.777 MPa will return a vapor state, but inputs of '100' for temperature and '0.777>' for pressure will return a metastable liquid state. See below for additional information about the use of the '>' and '<' symbols.
FLSH Routines and Metastable States. For subroutines such as ENTHAL, ENTRO, CVCP, etc., where temperature and density are the input properties, the output property data will differ from those returned when using routines such as PHFLSH or TPFLSH when in the two-phase region. Any routine (except TDFLSH) that uses temperature and density as inputs will return what appears to be erroneous results in the two-phase region. These results actually show calculations directly from the equation of state without taking into account the fact that the mixture has split into two phases. The results would be valid for such situations where a substance is heated beyond its boiling point (a metastable state), but without boiling (such as water in a glass container being heated in a microwave). The results eventually end up at the spinodal, beyond which it is no longer possible to increase the temperature without boiling the liquid. Thus, for typical results these routines should never be used for two-phase calculations, rather the FLSH routines should be called. The flash routines return the properties in the liquid and vapor states, and these can be used to call routines such as THERM, CVCP, TRNPRP, etc., with the associated liquid or vapor density at the saturated temperature.
Convergence Failures and Forcing Phase Calculations. When using mixtures, error messages will sometimes be reported when Refprop fails to converge during an iteration, usually during the calculation of a VLE state close to the critical point. In some situations you may know that the point is in the single phase and wish to force the calculation in spite of the error message. This can be done with the '>' and '<' symbols. When one of these is attached to a number in the Specified State Points table, Refprop will assume that the point is in the liquid phase when '>' is attached and in the vapor phase when '<' is attached. Care must be taken because metastable states will be returned in the point is in the two phase. When a state point is above the critical point but Refprop reports a nonconvergence, you can use either of these symbols to force the calculation. For example, a 0.5/0.5 mixture of methane/propane will report a nonconvergence at 300 K and 10 MPa. A P-rho diagram shows that the point is above the critical pressure. Entering '300' for temperature and '10>' for pressure will return the valid state point at 10.826 mol/l.
Mixture Error Messages. The error message "No mixture data are available for one or more binary pairs in the specified mixture. The mixing parameters have been estimated." (message #117) occurs when an interaction parameter for two different fluids is not available in the program. The most common reason for this occurrence is a lack of experimental data to describe VLE, densities, and so forth for the binary pair. In other situations, such as many mixtures with water, interaction parameters have not been fitted to the REFPROP model even though data exist. An estimation scheme is available in the program to approximate one of the interaction parameters that helps improve bubble and dew point pressures. This error message indicates that you should be aware that calculated properties are estimates only. For similar fluids, especially among the refrigerants, the scheme works fairly well. It breaks down with dissimilar fluids and eventually the scheme will produce large interaction parameters and will report the error message "No mixture data are available for one or more binary pairs in the specified mixture. The mixture is outside the range of the model and calculations will not be made."
Equation of State for Natural Gas Mixtures. The current equation of state for calculating
the properties of natural gas mixtures is the GERG-2008 equation (GERG is the
European Gas Research Group). This
equation is based on an excess Helmholtz energy approach using pure fluid
equations of state (either those specified by GERG, or the current standards
that have slightly higher accuracies) and a mixture model that specifies the
excess contribution. The 2008 version is
an extension of the 2004 version, containing the additional fluids nonane,
decane, and hydrogen sulfide in addition to methane, nitrogen, carbon dioxide,
ethane, propane, n-butane, isobutane, n-pentane, isopentane, n-hexane,
n-heptane, n-octane, hydrogen, oxygen, carbon monoxide, water, helium, and argon. The 2008 edition also replaced the pure fluid
equations of state for isopentane and carbon monoxide with published
versions. These two models are fully
described in the following publications:
Kunz, O. and Wagner, W., The GERG-2008 Wide-Range Equation of State for Natural Gases and Other Mixtures: An Expansion of GERG-2004, to be submitted to J. Chem. Eng. Data, 2012.
Kunz, O., Klimeck, R., Wagner, W., and Jaescke, M., The GERG-2004 Wide-Range Equation of State for Natural Gases and Other Mixtures: GERG Technical Monograph 15 and Fortschr.-Ber. VDI, Reihe 6, Nr. 557, VDI Verlag, Düsseldorf, 2007.
In the Refprop 9.1 program, the natural gas equation of state has been expanded to include ethylene, propylene, methanol, ethanol, toluene, benzene, cyclohexane, sulfur dioxide, ammonia, dodecane, acetone, and butylene. When selecting the option to use the full GERG-2008 equation of state (either through the GUI or by calling the “GERG2004” subroutine), the use of these additional fluids is still allowed. This is not the same as when the AGA-8 equation of state is selected, in which case only the original 21 fluids (same as those in the GERG-2008 model) are allowed.
HFC-1234yf and HFC-1234ze. Equations
of state are now available for these two fluids. The fluid files are located below and should
be placed in your Refprop\Fluids directory.
The fluid files included in version 9.0 incorrectly used the NBP
R1234yf.fld (uploaded June 6, 2012 with updated transport equations)
R1234ze.fld (uploaded June 6, 2012 with new CAS number and updated transport equations)
Humid Air. Although version 9.1 allows mixtures of nitrogen, argon, oxygen, and water as a consequence from the addition of the new natural gas mixture model, calculations for moist air have not been tested yet. It is likely that calculated values are reasonable, however, Refprop may not return results because the saturation routines may fail. The program calls the saturation routines to determine if the state is vapor, liquid, or two-phase. If you know that your state point is in the vapor phase, you can avoid the call to the saturation routines by using TPRHO instead of TPFLSH. The Fortran file FLSH_SUB.FOR gives additional information concerning the inputs to these routines. In the graphical interface, see the section below on forcing phase calculations. A moist air mixture could be made up starting with the composition of dry air used in Refprop: 0.7812 nitrogen, 0.0092 argon, and 0.2096 oxygen (on a mole basis). A small amount of water could be added to this composition and then normalized.
Transport Properties for Nitrogen, Oxygen, Argon, and
Air. The transport properties for nitrogen, argon, and
oxygen in version 7.0 did not include the thermal conductivity enhancement for
the critical region and did not represent the experimental data as well as
possible. The transport equations for these fluids have been redone and
now represent the data to within their experimental uncertainties. The
publication below documents the new equations and shows all of the comparisons
N2-Ar-O2 Transport equations documentation
Properties for Pseudo-pure Fluids, Adding Pure Fluids to a Mixture Setup. The ability to load both a mixture and a pure fluid
not associated with the mixture is now possible with the DLL given above (under
the Updates section). For example, a
natural gas mixture of methane, ethane, and propane could be loaded, along with
R134a, which is not part of the mixture.
By calling SETNC and PUREFLD, properties for either the mixture or the
pure fluid can be made without ever calling SETUP more than once at the
beginning. This is also useful for
calculating transport properties when the pseudo-pure fluid equation of state
is in use (for R-404A, R-407C, R-410A, and R-507A). Since transport properties are not available
in the PPF files, the full mixture has to be loaded as well. The example program below gives all the
Solids. The REFPROP program does not know the location of the solid-liquid interface for a mixture. For many of the pure fluids, melting line auxiliary equations are available and can be used to calculate liquid properties at the point where solids begin to form and can be used to keep the program from entering the solid phase. When melting lines are not available, the program uses the liquid phase density at the triple point as the maximum density, thus valid states between this density and the melting line will not be available. The location of the solid-liquid boundary can be calculated under the Calculate/Saturation Tables option. This option will also print out the vapor phase properties along the sublimation line if requested (and if an auxiliary equation is available).
The following simple application can be used to link Refprop with VB.NET:
Other Refprop users have also submitted different wrappers for .NET and C applications and they have each given us permission to distribute their code.
.NET and C applications by Craig Fennessy (of Cryogenic Industries)
.NET applications in visual basic (VB2008) by Ismail Alkan (of Foster Wheeler North America Corp.)
VB2008 sample code by Letizia Conter (of S.E.I.C. srl).
Applications. A sample C++ file comes with the Refprop
program and is installed in the Examples directory and explained in the help
file. An example for the C
programming language has been written by Ian
Bell and he has given us permission to distribute his code to others. The
zip file is included below:
Mixture Files. The Fortran code and Excel sample file in version 7.0 are not able to read the *.mix files, but that has changed in version 8.0 and later. However, the .mix files are ASCII files and thus can be read from any editor and are quite simple to understand. The first two lines are just information and can be ignored.
Required Fluids for Distribution. There are several fluid files that Refprop accesses in order to run properly. These are nitrogen.fld, propane.fld, R134a.fld, and C12.fld (dodecane). These fluids are used as reference fluids in extended corresponding states methods employed in Refprop to predict transport properties for some instances. These fluids (and the hmx.bnc file) should be distributed in addition to those required in a particular application if the Refprop routines have been incorporated into a software package.
Applications. The following weblink
gives the details of a third-party application for linking Refprop to CAPE-OPEN
Applications. Two example files for the Python
programming language have been written by Bruce
Wernick, and he has given us permission to distribute his code to others.
The applications are included below:
Ben Thelen of Leukothea Pte. Ltd. has updated these files and made them available:
Applications. The following example file for the Perl
programming language has been written by Chermac Rolle, and he has given
us permission to distribute his code to others.
Keith Wait from GE Home Business Solutions has made the following
MatLab application available. This
application calls the Refprop DLL directly rather than through the mex file provided in previous versions of Refprop. This release now includes the molar mass, compressibility factor, gross
and net heating values,
critical point properties, volumetric expansivity, and a number of other properties. The routines can now read mixture files
(*.mix). When using these new
files, be sure to delete the old refpropm.mexw32 or refpropm.mexw64 files if
you downloaded them previously.
refpropm.m (uploaded April 30, 2013)
Note: These file names are now lowercase, if you downloaded uppercase versions, delete them before downloading otherwise the case will be changed and the files will not work.
For 64-bit MatLab, the following files should be placed in your Refprop directory:
If an error message such as "...is not a valid Win32 application" occurs, try downloading the file again, most likely the file was corrupted during the first attempt
LabView Applications. A LabView
application has been written by Greg Sussman and
substantially expanded by Yan Ding. The
application is given below:
Applications. The Refprop.xls file that comes with the
program has Visual Basic (VB) code embedded within it to make the connection
between the workbook and the Refprop DLL.
However, when working with anything other than temporary calculations,
it is best to start with a blank workbook that does not have the VB code. In this manner, future updates to the Refprop
program can be made available to all of your old workbooks through the
To make the Excel routines in Refprop available to any worksheet in 9.0 (in version 9.1, this is done automatically for you during the installation), two environment variables called RPprefix and Path should be added (you will need administrative rights in order to do this) in a similar manner as shown below in the User variables section:
Do not add these to your System variables section (and more importantly, do NOT damage your path statement in the System variables section!). In XP, the environment variables can be set under Start/Settings/Control Panel/System/Advanced/Environment Variables, under the "User variables" option. In Windows 7, this can be found in Start/Control Panel/System And Security/System/Change settings/Advanced/Environment variables.
In 64-bit versions of Windows, Microsoft added another Program Files directory called "Program Files (x86)", which is the default directory where Refprop gets installed. For the connections to work, you need to either point to this directory in your path statement or copy all the Refprop files to the old "Program Files" directory.
The property quality in versions 7 and 8 was assumed to always be given on a molar basis, even though it was labeled as on a mass basis when mass units were in effect (this only affects mixture calculations). The file has been fixed and the latest version is available below, along with many other updates. This file also contains the new subroutine FluidString that replaces the Concatenate command making it much easier to set up mixtures. The latest version now contains code that does not call Setup if the compositions have changed, but not the fluid names, increasing calculation speed for mixtures with varying composition.
Refprop.xls (last updated April 30, 2013)
For 64-bit Excel and users of Refprop 9.0, the following file should be placed in your Refprop directory (an updated file comes with 9.1):
If an error message such as "...is not a valid Win32 application" occurs, try downloading the file again, most likely the file was corrupted during the first attempt
The following outlines the procedure for using REFPROP within any spreadsheet in Office 2007 or 2010:
1. Open REFPROP.xls and save it as an add-in, REFPROP.xla or REFPROP.xlam, in the main REFPROP folder, C:\Program Files\REFPROP.
2. Go to File/Options/Trust Center/Trust Center Settings (button at bottom right).
3. Select "Trusted Locations" on the left. Click "Add new location". Browse to C:\Program Files\REFPROP, select "Subfolders of this location are also trusted", and click "OK".
4. Go to File/Options/Add-Ins and select "Excel Add-ins" in the Manage drop-down box at the bottom, and click Go.
5. Click "Browse", and navigate to C:\Program Files\REFPROP, select REFPROP.xlam and click OK. IMPORTANT: Do not simply select REFPROP.xlam when it first comes up, as this will be in the wrong folder (C:\Documents and Settings\Username\Application Data\Microsoft\AddIns), which is not trusted and will not work.
6. Select the Data tab, and click on Edit Links. Select REFPROP.xlam. Click on Change Source and navigate to C:\Program Files\REFPROP. Select REFPROP.xlam there and click OK. (This is just to make sure you are connected to the correct Add-in.) If the Data tab is greyed out, start typing in a Refprop command [such as “=Density(“water”,“TP”,,300,1)] and the button should become active.
7. Once you have the xla or xlam file set up, you can open a brand new work book and the functions should be available to you. Do not continue working with the Refprop.xls file since it still contains the VB code that is also in the xlam file. In this manner, future updates from NIST of the Refprop.xls file can be resaved as the xlam file, and all of your work books will have access to the most recent code.
1. In some cases the macros may not work. Try saving the file as a macro-enabled workbook (under Save As…).
2. The xls file distributed with version 9.0 sometimes will give false answers depending on the sequence of calculations if multiple xls files are open. Switching between the open files may cause the initial setup to be lost. The updated xls file given above fixes this.
3. For inputs that do not required a 5th parameter, Excel may require the comma at the end, for example: =Pressure("water", "TVAP", "SI", 298,)
4. If Excel cannot find the Refprop fluid files, you can copy the *.FLD and HMX.BNC files into a default directory: C:\REFPROP\FLUIDS. When the program fails to find the fluid files, it will look to see if a C:\REFPROP\FLUIDS (or D:) is available, and if so it will use the files from that source.
5. If you see dual entries for each function in your workbook, then you have either saved two xla files, or you are working with a file that still contains the VB code. Start with a blank workbook to eliminate the dual entries for the latter case.
There have been a number of users who have had problems with the Excel link to Refprop. In some of these cases and in other situations we have found that the refprop.dll file had also been installed in either the c:\windows directory or the c:\windows\system32 directory. If you experience problems, please do a full hard drive search for refprop.dll and delete all occurrences except the one in your c:\program files\refprop directory.
Please send questions to Eric Lemmon: Eric.Lemmon@NIST.gov
«(If you send a question and do not receive a response within several days, it is quite likely that your email did not make it or that my email was removed by your system administrators as spam or junk mail. I try to respond to all emails within two days, so please write/call again if you do not receive a response.)
Last modified: May 8, 2013.