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.htm).  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 month or two are identified with a «.  For questions not answered here, please see the user's guide at www.nist.gov/srd/PDFfiles/REFPROP8.PDF

«Please note:  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.

1.      Reference States (enthalpy and entropy differences)

2.      REFPROP is a Program, not a Database Containing Measurements

3.      Referencing the REFPROP Program in Publications

4.      Fitting Equations of State

5.      Updates to Version 8.0

Questions about Installing the Program

6.      Installation Problems

7.      Help File

Fluids

8.      HFC-1234yf

9.      Humid Air

10.  Transport Properties for Nitrogen, Oxygen, Argon, and Air

11.  Dimethyl Ether

12.  Solids

Two-Phase States

13.  Defining Two-Phase States for Pure Fluids

14.  Multiple and Metastable States

15.  FLSH Routines and Metastable States

Error Messages

16.  Convergence Failures and Forcing Phase Calculations

17.  Mixture Error Messages

Linking with other Applications

18.  .NET Applications

19.  Required Fluids for Distribution

20.  Mixture Files

21.  Python Applications

22.  MatLab Applications

23.  Excel Applications

 

 

Reference 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.

Referencing 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 8.0, National Institute of Standards and Technology, Standard Reference Data Program, Gaithersburg, 2007.

Fitting Equations of State.  The number of modelers developing new highly-accurate equations of state is decreasing rapidly throughout the world.  Equations of state include equations for the thermodynamic properties for pure fluids, for the thermodynamic properties of mixtures, and for the transport properties of pure fluids.  Many have expressed interest in acquiring new equations of state, but we do not have the time here at NIST to fulfill all these requests.  The amount of work required to develop these equations can be seen in the paper for R-125 (see the link below).  If you are interested in learning the procedure for developing new equations, please contact Eric Lemmon for further information (contact information is given at the bottom of this document).

Equation of State for HFC-125

Updates to Version 8.0.  Version 8.0 (from April, 2007) is still the current version of the Refprop program.  We are currently working on version 8.1 which will contain several important updates.  Some of these include the addition of the heating values for the natural gas components, better convergence of VLE states, and the extended GERG-2004 equation of state for natural gas mixtures.  The release date of this new version is unknown, but will not be within the next six months.

(Feb. 18, 2009) Those that wish to play with the latest beta version of the DLL can do so by downloading the file below and placing it in your Refprop directory.  Before you do this you should rename your old DLL file in case this one produces severe mistakes (in which case you should revert back to the original one that came with 8.0.)  This latest DLL contains updates to the saturation routines in SATT and SATP.  A new algorithm has been added that is much more stable than the one in 8 for finding the saturation states for binary mixtures.  The change has not yet been made for ternary or higher order mixtures, but that should soon become available.  These new routines are especially helpful with the ammonia/water system.  This file will be updated from day to day as additional pieces are added.

(Mar. 9, 2009) Several minor problems have been removed and the routine TPFLSH now uses the new algorithms resulting in much better convergence in the 2-phase region.

(Nov. 18, 2009) A new algorithm written by Diego Ortiz has now been added to the code.  The program speed is still about the same, but the convergence is now better for both binaries and multicomponent mixtures.  Keep an eye on this web page for new updates during the next few weeks.

REFPROP.DLL

 

 

Installation Problems.  In some applications where calculations fail after installing version 8.0, the old DLL from version 7.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 only the Refprop directory along with the executable.

If the following error message 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

then 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 file from the link below and save it in your Windows\System32 or Windows\System directory.

      MSHFLXGD.OCX

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.

The comdlg32.ocx file may also sometimes be needed:

      COMDLG32.OCX

If an error message occurs referencing the file REFPROP.MSI (which can occur after installing Google Chrome), try the following:  Delete everything in the registry and on the hard drive that has "refprop" in the title.  Search for "NIST" in the registry and you should find a folder that contains something similar to the format "{79C12B2A-D29F-45A3-BEDD-9003DCFB723C}".  Write down the sequence of numbers and letters that you find in your registry and then delete this entry.  Search the registry for the sequence of numbers and letters that you just deleted.  You should find an instance of something like "HKEY_CURRENT_USER\ Software\ Microsoft\ Installer\ Products\ 6398724E8B370524FA88122E26945D8F".  Delete that folder and then the installation should work.

Help File.  The most recent help file from Refprop is available below (has not changed since version 8.0 came out).

      REFPROP.HLP

 

 

HFC-1234yf.  A very preliminary equation of state is now available (May 8) for this new fluid developed by DuPont and Honeywell.  The fluid file is located below and should be placed in your Refprop\Fluids directory.  This new equation has been developed with limited data only and should not be referenced in any publication or other use.  It is for use only in preliminary calculations involving systems with R-1234yf and the user of this fluid file should check this website from time to time for updates to this fluid file.

      R1234yf.fld

Humid Air.  Although version 8.0 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.  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.  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 to data.

      N2-Ar-O2 Transport equations documentation

Dimethyl Ether.  The synonym "ethylene oxide" was incorrectly included in the DME.FLD file for dimethyl ether.  The correct fluid file is available below:

     
DME.FLD

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).

 

 

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.  (Please also see the updates section above with improved convergences.)  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." The most common occurrence of this message comes from mixing methane with higher hydrocarbons that are not in the GERG-2004 mixture model.  For example, mixing natural gas components with propylene will generate this message.  With time we will add additional interaction parameters for those binary mixtures which are currently not described.  At that time, further information will be made available about the status of the new mixing file.

 

 

.NET Applications.  A wrapper for .NET and C applications has been written by Craig Fennessy (of Cryogenic Industries) and he has given us permission to distribute his code to others.  The applications are included below:

      RefProp_NET.vb
      RefProp_NET.cs

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.  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.

Python Applications.  An example file for the Python programming language has been written by Bruce Wernick and he has given us permission to distribute his code to others.  The application is included below:

      Refprop.py

MatLab Applications.  The files that came with Refprop 8.0 for MatLab will no longer work with version 2009a.  Chris Muzny of NIST has updated the files and made them available below.  The following information should help those trying to link Refprop with MatLab:

To first test the specified configuration, unzip the file, go to the resulting directory, and run refprop_example in MatLab.  This will use the g95 version of repropm.mexa64.  For 2009a, MatLab now needs to specify types for pointers to values and arrays being passed to and from MatLab.  The types are mwPointer and mwSize.  These are in the refpropm.f90 file.  In order to use them you must include a c-style header file in your Fortran code with the line #include "fintrf.h". The compiler must be able to find this file with a -I path specified.  In order for g95 to preprocess the file you will need to use the -cpp switch.  Because refprop is coded in fixed format Fortran you will also need -ffixed-format.  In order to recompile, several files are included to help with rebuilding the mexa64 file; these are:

#to rebuild refpropm.mexa64 from within matlab using the g95 compiler use
make_refprop_mex_g95.m

#to rebuild refpropm.mexa64 from a shell prompt using the g95 compiler use
make_refprop_mex_g95.sh

#to rebuild refpropm.mexa64 from within matlab using the gFortran compiler use
make_refprop_mex_gFortran.m

#to rebuild refpropm.mexa64 from a shell prompt using the gFortran compiler use
make_refprop_mex_gFortran.sh

MatLab may not be able to recognize and compile Fortran files with the .FOR extension, rather the extensions .for should work.  refpropm.f90 was changed so it will work on Windows 32 and 64 bit machines and Linux.  You can look there to see what paths were defined for the fluid files in each case.  If recompiling works then you can reset the path however you would like.  64-bit Linux is the GLNXA64 case.

      MatLab2009a.zip
      MatLab2009a64bit.zip
      2009a 64bit linux.zip

Excel Applications.  When using the methods described in the help file (REFPROP.HLP) to make the Excel routines available globally, the Step 1 Instructions will only work if Excel is restarted after the environment variables have been modified.  The environment variables RPprefix and Path should look similar to the following examples:



In the case of the path statement, only the highlighted text in the last picture above should be added, do NOT delete anything else in the Path variable.  The information in the examples worksheet of the Refprop Excel file explains where to find the environment variables. 

Another problem that occurs on some systems is that an old refprop.dll file had been copied to the Windows or Windows\System32 directories.  You should do a full search of your machine, making sure that system directories are included, for the refprop.dll file.  If you find one in the Windows, System, or System32 directories, then that file should be deleted.

In some cases where Excel cannot find the Refprop files, you can copy the Refprop files into the root directory; thus if you work on C:, you can copy the Refprop files into a new C:\REFPROP directory.  If you work on D:, then create a D:\REFPROP directory.  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.

In Excel 2003, the following may apply:  If a user has called REFPROP from within their own spreadsheet and has enabled the refprop Add-In as well as the macros but it still fails to calculate data, the error can be overcome by first loading the example spreadsheet and re-enabling macros when requested.  The calculations invoked within the user's spreadsheet should then work.

In Excel 2007,
 you can add "C:\Program Files\REFPROP" to the Trust Center as a trusted folder, which tells Excel to enable macros without asking beforehand.  It offers the option to include sub-folders as trusted, which should be accepted.

Excel 2007 appears to have a "feature" that is not in the 2003 version.  In the older version, the
following is allowed:
 =Pressure("water", "TVAP", "SI", 298)
This results in a #VALUE! in the newer version.  Excel 2007 may require the comma for the missing parameter:
 =Pressure("water", "TVAP", "SI", 298,)


The property quality in version 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 is available below.  This file also contains the new subroutine FluidString which replaces the Concatenate command making it easier to set up mixtures.

      Refprop.xls (last updated October 6, 2009)


Please send questions to Eric Lemmon:   Eric.Lemmon@NIST.gov

Last modified: Nov. 18, 2009

Counter Tracker