Contents - Index


EES_REFPROP Manual

REFPROP (http://www.nist.gov/srd/nist23.htm) is a program developed by the National Institute of Standards and Technology to provide the most accurate thermodynamic and transport property data currently available for pure fluids and fluid mixtures.  The property subroutines in these programs have been linked with an interface program called EES_REFPROP to form an external procedure callable from EES.

Installation Instructions

Accessing REFPROP property data using EES Property Functions

Starting with EES version 11.477, property data can be obtained from REFPROP with the EES_REFPROP interface using exactly the same property commands as used for built-in EES fluids.  All that is needed is to add _RP to the name of the fluid that REFPROP recognized.  For example, the following program calculates the properties of propane using REFPROP:

$UnitSystem SI C kPa mass
T=25 [C]
P=100 [kPa]
R$='Propane_RP'
h=enthalpy(R$,T=T,P=P) 
s=entropy(R$,T=T,P=P)
k=conductivity(R$,T=T,P=P)
ST=surfacetension(R$,T=T)

{Solution
h=630.4 [kJ/kg]
s=2.847 [kJ/kg-K]
k=0.01831 [W/m-K]
ST=0.00702 [N/m]
}

Property calls to made in this manner use the unit system specified in EES.  The independent properties in the above program are temperature and pressure, but any valid set of independent properties can be provided, just as for the built-in EES functions.  The fluid name that is provided in the property functions, (e.g., Propane_RP) must be recognized by REFPROP (without the _RP).  The fluid name may be a pure fluid (e.g., Propane_RP) or predefined mixture (e.g, R466A_RP).  It is not possible to specify a mixture with a fluid name containing a + symbol (e.g., propane_rp+butane_rp), which is possible using the Call EES_REFPROP procedure described below. 

The reference state for specific enthalpy and entropy will be as set by REFPROP, but it can be changed using a $Reference directive, e.g.,

$REFERENCE Propane_RP /EESREFPROP NBP

Property plots using data from the EES_REFPROP interface can be generated by selecting the EES_REFPROP button at the top of the Property Plot dialog. 

If you are planning to use the EES property command format with the EES_REFPROP interface, you do not need to review the information below which explains how to use EES_REFPROP with the Call EES_REFPROP procedure.

See the YouTube example.


Accessing REFPROP property data using the EES_REFPROP procedure

Starting with EES version 9.547, EES will check the unit consistency of the inputs and outputs in the calls to the EES_REFPROP interface.  A warning message will be issued if the units of the variables in the EES Call statement differ from the units that the EES_REFPROP interface expects.

Starting with EES version 10.119, EES will recognize the $CONVERTEESREFPROPUNITS directive.  This directive will automatically convert the inputs and outputs for a call to the EES_REFPROP interface so that the variables use same unit system as defined within EES.  If the /mass flag is provided, all compositions provided to and returned from the EES_REFPROP interface will be mass fractions.  (See example file R32_R134a_R32.EES for an example demonstrating this capability.)   Starting with version 11.348, the quality provided as an input in Modes TQ (17) and PQ (27) is assumed to be on a mass basis when the /mass flag is provided.

Starting with EES version 10.364, the $REFERENCE directive can be used for properties determined using the EES_REFPROP interface..  

Starting with EES version 11.366, Property Plots can be generated using data from REFPROP.


The general format of the an EES_REFPROP property call is:

Call EES_REFPROP(Fluid', MODE, Input1, Input2, ... : Output1, Output2, ...)

The Inputs and Outputs depend on the MODE.  Click on the links below for each MODE to see a list of the inputs and outputs and an example call.


'Fluid'
The first argument in the EES_REFPROP Call statement identifies the fluid system, which may be a pure fluid or a mixture of up to 20 components. Fluid names are ordinarily the familiar refrigerant names, e.g., R12, R134a, etc. or any mixture name previously defined within the REFPROP program, e.g., R406c.   A complete list of fluid names is provided in the REFPROP manual.  The fluid system name must be enclosed within single quotes.  A mixture of pure components can be provided by use of a plus (+ sign between the component names, e.g., 'R12+R152a') or by specifying the name of the mixture that has been previously saved in REFPROP as a REFPROP mixture.  Upper and lower case letters are treated identically.  Spaces should not appear in the fluid system name.


MODE
MODE is an integer that identifies the calculations to be done and the necessary inputs and outputs.  Rather than specify an integer for MODE, however, it is more convenient to use a text code in the form of an EES variable.  For example, MODE=12 indicates that thermodynamic properties corresponding to specified inputs of temperature and pressure are to be calculated.  It is preferable to use a variable TP (which is set to 12) rather than 12 itself for MODE for program readability. The file EES_REFPROP.TXT includes EES variables for each of the modes listed below.  To make use of these codes, place the EES_REFPROP.TXT file in the..\USERLIB\ sub-directory (use ..\USERLIB64 for the 64-bit version) and include the following line in your EES file.  

$INCLUDE C:\EES32\USERLIB\EES_REFPROP.TXT

You may need to modify the file name in the $INCLUDE directive if your version of EES is stored in a different directory.

EES_REFPROP will return thermodynamic property information for a specified state, fugacity, molecular weight, saturation property information, transport properties, or critical properties depending on the value of the parameter MODE.  The required inputs and calculated outputs differ for different values of MODE.  Click on a MODE to bring up inputs and output information for that mode.

MODE = MW (0)
MODE = BUBT (1)
MODE = DEWT (2)
MODE = BUBP (3)
MODE = DEWP (4)
MODE = TP (12)
MODE = TD (13)
MODE = TV (14)
MODE = TH (15)
MODE = TS (16)
MODE = TQ (17)
MODE = PD (23)
MODE =PH (25)
MODE = PS (26)
MODE = PQ (27)
MODE = DH (35)
MODE = DS (36)
MODE = ST (70)
MODE = FUG (80)
MODE = TRN (90)
MODE = DC (95)
MODE = CRIT (100)

Property Plots using the EES_REFPROP interface