Using The Graphical User Interface - usnistgov/REFPROP-docs GitHub Wiki
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.
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 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.
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.
Dealing with saturation or 2-phase states in Refprop can be a bit confusing when first using the program. The text and pictures given below address some of these issues to help users better understand how to obtain properties from the program.
As an example, consider the methane/ethane system with a molar composition of 50% methane and 50% ethane. For mixtures in the 2-phase (or at saturation), it is always best to turn on the composition columns (under Properties/Mixtures/Composition). For saturation states, bring up a saturation table [under Calculate/Saturation Points (at equilibrium)]. The table shows two entries for each property. It is very important to place the known property under the correct column. For example, the input property for bubble points (liquid state) should be placed under the “Liquid” column; dew points (vapor state) should be placed under the “Vapor” column. An example picture is given below. On the first line, 150 K was entered under the liquid column. This calculated a liquid bubble point pressure of 0.552 MPa. The liquid phase mole fractions show the input composition of 0.5/0.5. The vapor phase mole fractions show that the first bit of vapor will have a composition of 0.987/0.013. In the second row, 150 K was entered in the vapor column, producing a dew point pressure of 0.019 MPa. The vapor mole fractions show the input composition of 0.5/0.5. The first drop of liquid to form will have a mole fraction of 0.0074/0.9926.
For 2-phase states, turn on the option labeled “Bulk, liquid, and vapor properties” under Options/Properties. Then bring up a table under Calculate/Specified State Points. The information obtained above shows that pressures for 2-phase state points at 150 K will lie between 0.019 and 0.552 MPa. Enter 150 K in the temperature column and 0.3 MPa in the pressure column. The program will then calculate the 2-phase point. The output shows that the overall composition of the mixture is still 0.5/0.5. The composition of the fluid in the liquid phase will be 0.246/0.754 and that of the vapor phase will be 0.972/0.028. This is shown in the picture below.
The Excel sample spreadsheet included in the Refprop directory shows an example for the mixture R410A (between rows 70 and 98).