NPSS REFPROP Thermodynamic Property Package User...
-
Upload
vuongxuyen -
Category
Documents
-
view
225 -
download
0
Transcript of NPSS REFPROP Thermodynamic Property Package User...
Numerical Propulsion System Simulation Consortium
NPSS™ REFPROP Thermodynamic Property
Package User Guide
Software Release: NPSSTM_2.4.1 Doc. #: NPSSTM–Thermo
Doc Revision: 1 Revision Date: June 21, 2012
© Copyright 2008, 2009, 2010, 2011, 2012.
The Ohio Aerospace Institute, on behalf of the NPSSTM Consortium. All rights reserved.
Controlled Distribution
Further distribution requires written approval of the Ohio Aerospace Institute, Cleveland, OH. Neither title nor
ownership of the
software is hereby transferred.
NPSSTM software and related documentation is export controlled with an Export Control Classification
Number(ECCN)of 9D991, controlled for Anti-Terrorism reasons, under U.S. Export Administration Regulations 15
CFR 730-774. It may not be transferred to a country checked under anti-terrorism on the Commerce Country Chart
structure or to foreign nationals of those countries in the U.S. or abroad without first obtaining a license from the
Bureau of Industry and Security, United States Department of Commerce. Violations are punishable by fine,
imprisonment, or both.
Disclaimer: This software is provided “as is” without any warranty of any kind, either expressed, implied, or statutory.
In no event shall NPSSTM Consortium member organizations, the Ohio Aerospace Institute., or OAI’s contractors or
subcontractors, be held liable for any damages, including, but not limited to, direct, indirect, special, or consequential
damage.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
1
Table of Contents PREFACE ..................................................................................................................... 2
1 REFPROP ............................................................................................................. 3
1.1 CREATING A REFPROPFLOWSTATION ......................................................................... 4
1.2 FLUID COMPOSITION ................................................................................................ 4
1.3 FLOWSTATION THERMODYNAMIC PROPERTIES ............................................................. 10
1.4 FLOWSTATION STATIC PROPERTIES ............................................................................ 13
1.5 FLOWSTATION ADD AND COPY FUNCTIONS .................................................................. 15
List of Tables Table 1-1: REFPROPFlowStation Defaults and Assumptions ................................................ 4
Table 1-2: List of REFPROPFlowStation Supported Parameters ...................................... 18
Table 1-3: List of REFPROPFlowStation Switches .................................................................. 22
Table 1-4: List of REFPROPFlowStation Functions ................................................................ 22
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
2
Preface This document is a user guide for the thermal dynamic property packages and is intended to be used in
conjunction with the NPSS User Guide Reference Sheets.
Calculations involving fluid properties require a thermodynamics package that models the fluid. NPSS
offers the user the ability to choose the thermodynamics package to be used.
NOTE: The REFPROPFlowStation is currently only supported for the Windows system.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
3
1 REFPROP REFPROP is an acronym for REFerence fluid PROPerties, and it is a commercially available software
package developed by the National Institute of Standards and Technology (NIST). The REFPROP software
comes with a graphical user interface as well as a "refprop.dll" file that may be utilized to interface with
other languages and applications such as FORTRAN, C++, and Excel. REFPROP also comes with files that
contain fluid property information for several pure fluids (".fld" extension, in the "fluids" directory),
pseudo-pure fluids (".ppf" extension, in the "fluids" directory), and predefined mixtures (".mix" extension,
in the "mixtures" directory). The REFPROP software and related files DO NOT COME WITH NPSS; the
user must contact NIST to purchase his/her own copy of REFPROP in order for the NPSS
REFPROPFlowStation to work.
The NPSS REFPROPFlowStation is an interface to REFPROP in the form of an NPSS FlowStation, which
means that it has similar look, feel, and functionality of other NPSS FlowStations (such as allFuel, Janaf,
etc.). In order for the REFPROPFlowStation to work the user must own a copy of REFPROP and place the
"reprop.dll" file, "mixtures" directory, and "fluids" in the desired model's local directory. Once that is done,
the user may proceed to create an NPSS model and set the thermodynamic property package to REFPROP,
create FlowStations and Elements as desired, set the fluid composition as desired, and run the model. The
REFPROPFlowStation will look for the "refprop.dll" and fluid file directories in the model's local
directory. Figure 1 depicts an example of placing the "reprop.dll" file and "fluids" and "mixtures"
directories in the local model directory.
Figure 1. Example of placing "refprop.dll" and "fluids"
and "mixtures" directories in local directory
REFPROP, and therefore the REFPROPFlowStation, runs fast if the composition is set to a pure fluid or a
pseudo-pure fluid. However, execution speed slows when composition comprises multiple fluids, whether
set via a predefined mixture file (".mix" extension) or defined manually via the FlowStation comp attribute.
The speed impact is especially evident when static properties are calculated because multiple internal calls
to REFPROP are required.
The REFPROPFlowStation was developed and tested using REFPROP version 8.0 (NIST Standard
Referenc Database 23). It has not been tested using any other versions of REFPROP and is not guaranteed
to work with any other versions. While the REFPROPFlowStation has been designed to report errors
generated by the REFPROP code, it is always a good idea to test fluids out using the REFPROP graphical
interface, especially when defining new mixtures.
The REFPROPFlowStation will only work on the Windows operating system.
Some defaults and assumptions have been built into the REFPROPFlowStation, as shown in Table 1-1.
Some of these values can be changed and some cannot.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
4
Table 1-1: REFPROPFlowStation Defaults and Assumptions
Item Description Default Changeable? Fluid model The model used for
fluid equation of
state thermodynamic
and transport
properties
NBS – use NIST
recommendation
for specified
fluid/mixture
No
Mixture
coefficient
file name
File that contains
binary mixing
coefficients
hmx.bnc No, the file name is
fixed as "hmx.bnc", but
the contents of the file
can be changed.
REFPROP dll
and fluid
file
locations
The location of the
"refprop.dll" file,
"fluids" directory,
and "mixtures"
directory
Model's local
directory
No
Reference
State Method
The method used to set
the fluid's reference
state temperature,
pressure, enthalpy,
and entropy.
OTH – other,
user specified
for real fluid
No, the reference state
method is always set to
OTH. However, the user
may change the reference
state using the
FlowStation function
"setRefState"
Tref Reference state
temperature
518.69 R Yes, using the
FlowStation function
"setRefState"
Pref Reference state
pressure
14.696 R Yes, using the
FlowStation function
"setRefState"
hRef Reference state
enthalpy
0.0 Btu/lbm Yes, using the
FlowStation function
"setRefState"
sRef Reference state
entropy
0.0 Btu/lbm*R Yes, using the
FlowStation function
"setRefState"
1.1 Creating a REFPROPFlowStation
The thermo package must be set before any FlowStation objects can be created. If the thermo package is
already set to “REFPROP” then it does not need to be set again before creating a REFPROP FlowStation.
The setThermoPackage function is used to set the thermo package. The "refprop.dll" file and "fluids" and
"mixtures" directories must exist in the model's local directory.
// Specify REFPROP thermo package
setThermoPackage("REFPROP");
After the thermo package is set FlowStations can be created as usual.
// Create FlowStation(s)
FlowStation FS;
FlowStation FS2;
1.2 Fluid Composition
The REFPROP software package comes with three different file types that define fluid properties: pure
fluid files have a ".fld" extension, predefined mixture files have a ".mix" extension, and pseudo-pure fluid
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
5
files have a ".ppf" extension. A single ".fld" file is used to set the composition to a pure fluid, a single
".ppf" file is used to set the composition to a pseudo-pure fluid, and a single ".mix" file is used to set the
composition to a predefined mixture. Multiple ".fld" files may be used to define a mixture, but ".ppf" and
".mix" files cannot be used in conjunction with each other or other ".fld" files.
If the composition is to be set to a mixture of fluids, then the FlowStation's comp variable should contain
"mass" or "mole" at the end of the string. If mass or mole is not specified, then the fractions entered in
the comp string will be treated on a mole basis.
Setting the Composition
Once a REFPROPFlowStation has been created its composition is set using the comp string variable. The
formal syntax for setting comp using pure fluid files uses the following comma-delimited format: fluid file
fluid's mass or mole fraction, then repeat for the next fluid if the composition is a mixture of other pure
fluid files. The final value of comp is "mole" or "mass" preceded by a comma, as shown below:
FlowStation.comp = "fluid1.fld, frac1, fluid2.fld, frac2, mass or mole"
Pure Fluids
Composition may be set to a pure fluid as follows:
// Set FS composition to pure water
FS.comp = "water.fld, 1.0, mole";
Because the example above has a composition of a single pure fluid (water), specifying a mole or mass
fraction is not necessary. In fact, if it is not set to 1.0 the FlowStation will throw a warning message.
Therefore, a FlowStation's composition may be set to a pure fluid without specifying the mole or mass
fraction.
// Set FS composition to pure water (fraction not specified)
FS.comp = "water.fld"; // 1.0 fraction implied, mole/mass not applicable
Moreover, pure fluids do not require the ".fld" file extension to be specified, so the previous example may
be written as follows:
// Set FS composition to pure water (no mole fraction
FS.comp = "water"; // .fld assumed, 1.0 fraction implied
Mixtures of Pure Fluids
Mixture composition may be set on a mass basis using ".fld" files as follows. Note that the last constituent
is followed by a comma and the word "mass".
// Set composition to 24% oxygen, 76% nitrogen on a mass basis
FS.comp = "oxygen.fld, 0.24, nitrogen.fld, 0.76, mass";
Mixture composition may be set on a mole basis using ".fld" files as follows. Note that the last constituent
is followed by a comma and the word "mole".
// Set composition to 22% oxygen, 78% nitrogen on a mole basis
FS.comp = "oxygen.fld, 0.22, nitrogen.fld, 0.78, mole";
Because fluid files do not require the ".fld" extension to be specified, the previous example can be written
as follows:
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
6
// Set composition to 22% oxygen, 78% nitrogen on a mole basis
FS.comp = "oxygen, 0.22, nitrogen, 0.78, mole"; // .fld files assumed
Predefined Mixtures
The REFPROP "mixtures" directory contains several predefined fluid mixture files (".mix" extension) that
essentially list the fluid files and mole fractions that comprise a mixture. Figure 2 shows the mixture file
"R401A.mix," which happens to comprise three pure fluids: R22, R152, and R124. In this example file, the
pertinent information read in by the REFPROPFlowStation is on lines 3 through 9. Line 3 is the number of
components (in this example, three), lines 4 through 6 lists the fluid files ("R22.fld", "R152A.fld", and
"R124.fld"), and lines 7 through 9 list the respective fluid mole fractions. Lines 1 and 2 contain information
used by the REFPROP software graphical interface but not by REFPROPFlowStation. However, the
REFPROPFlowStation still requires that the mixture file format is consistent, with the number of
components specified on line 3, followed by the fluid files and mole fractions.
Figure 2. Example predefined mixture file "R401A.mix"
for Refrigerant R401A
You may create your own predefined mixture file for use in the REFPROPFlowStation using the same
format as shown in Fig. 2. The fluid fractions MUST BE SPECIFED ON A MOLE BASIS. For example, a
predefine mixture file for 22% oxygen and 78% nitrogen (mole basis) would be written as shown in Fig. 3.
Line 1 contains the mixture name (not used by REFPROPFlowStation), line 2 contains mixture molecular
weight and critical point (not used by REFPROPFlowStation, so all are set to 0.0), line 3 denotes the
number of components (two), lines 4 and 5 list the fluid files, and lines 6 and 7 list the respective fluid mole
fractions. Save the new file in the "mixtures" directory and give it a ".mix" extension.
Figure 3. Example custom predefined mixture file for 22% oxygen,
78% nitrogen on a mole fraction basis
To set the FlowStation's composition using a mixture file, simply set comp equal to the name of the mixture
file. Note that constituent fractions listed in the mixture file MUST BE IN MOLE FRACTIONS.
// Set composition using predefined mixture file
FS.comp = "air.mix";
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
7
Notice in the example above that FS.comp did not require a mole fraction to be entered because the
mixture mole fractions are already defined in the "air.mix" file. In fact, any mole fraction specified in comp
would have been ignored.
Composition may only be set using one mixture file. If multiple mixture files are specified the first will be
used, the other(s) will be ignored, and the FlowStation will throw a warning. For example, the code below
will result in "R401A.mix" being used to defined the fluid mixture and will ignore the "R401B.mix" file
and two mole fractions specified. The following example should be avoided:
// Try setting composition using two predefined mixture file
// !!!! Second file and two mole fractions will be ignored !!!!
FS.comp = "R401A.mix, 0.5, R401B.mix, 0.5, mole"; // will throw warning
Predefined mixture files may not be used in conjunction with ".fld" or ".ppf" files. Doing so will result in a
FlowStation error. The following example is not allowed:
// Try setting comp using a predefined mixture file and pure fluid file
FS.comp = "air.mix, 0.5, nitrogen.fld, 0.5, mole"; // NOT ALLOWED !!!
Pseudo-pure Fluids
The REFPROP "fluids" directory also contains files that define a handful of pseudo-pure fluids (".ppf"
extension) such as AIR, R404, R407C, R410A, and R507A. Even though these fluids are technically
mixtures of other pure fluids, the ".ppf" files contain all the information necessary for REFPROP to treat
these fluids as if they were pure fluids, which means the computation time is much faster than mixtures
defined using a collection of fluid files (".fld") or predefined mixture file (".mix"). However, pseudo-pure
fluid files and compositions cannot be changed or mixed with any other fluid files. FlowStation
composition may be set using a pseudo-pure fluid file as follows:
// Set composition using pseudo-pure fluid file
FS.comp = "air.ppf";
Notice in the example above that a mole fraction is not specified because a mole fraction of 1.0 is implied.
In fact, any mole or mass fraction specified in comp would have been ignored.
Composition may only be set using one pseudo-pure fluid file. If multiple pseudo-pure fluid files are
specified the first will be used, the other(s) will be ignored, and the FlowStation will throw a warning. For
example, the code below will result in "R404A.ppf" being used to define the fluid mixture and will ignore
the "R407C.mix" file and two mole fractions specified. This is should be avoided:
// Try setting composition using two predefined mixture file
// !!!! Second file and two mole fractions will be ignored !!!!
FS.comp = "R404A.ppf, 0.5, R407C.ppf, 0.5, mole"; // will throw warning
Pseudo-pure fluid files may not be used in conjunction with ".fld" or ".mix" files. Doing so will result in a
FlowStation error.
// Try setting comp using a predefined mixture file and pure fluid file
// !!!! THIS IS NOT ALLOWED !!!!
FS.comp = "air.ppf, 0.5, nitrogen.fld, 0.5"; // will throw an error
Each FlowStation is a separate object and nothing is shared between REFPROPFlowStations, therefore,
each FlowStation can have its own composition. Below is an example of setting three different
FlowStations (FS1, FS2, and FS3) to three different compositions.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
8
// Set FS1 composition to pure water
FS1.comp = "water"; // assumes .fld file
// Set FS2 composition to pseudo-pure fluid R410A
FS2.comp = "R410A.ppf";
// Set FS3 composition to mixture of oxygen and nitrogen, mole basis
FS3.comp = "oxygen, 0.22, nitrogen, 0.78, mole"; // assumes .fld files
Retrieving the Composition
Once composition is set the FlowStation can be queried for the composition, constituent fluid names, fluid
file names, molecular weight, and mole and mass fraction. A complete list of FlowStation attributes is
presented in Table 1-2.
The following example sets the composition to 22% oxygen and 78% nitrogen on a mole basis and queries
the FlowStation for various composition-related attributes. Note that if comp is asked for, the returned
string will contain the fluid file names (converted to all capital letters) and the constituent fractions will be
on a mass or mole basis as indicated by "MASS" or "MOLE" at the end of the string. The fraction basis
will reflect the basis that was used to originally set comp. // Set FS composition to mixture of oxygen and nitrogen
FS.comp = "oxygen, 0.22, nitrogen, 0.78, mole"; // assumes .fld files
// Print composition string
cout << "comp = " << FS.comp << endl;
Returns the following string. Note that the end of the string indicates that composition was set using mole
fractions.
comp = "OXYGEN.FLD, 0.22, NITROGEN.FLD, 0.78, MOLE"
Ask for list of mixture constituents, compFluids:
// Print composition constituents
cout << "compFluids = " << FS.compFluids << endl;
Returns the following string array. Note that fluid names have been converted to upper case for
consistency.
compFluids = {"OXYGEN", "NITROGEN"}
Ask for mixture mass and mole fractions: compMassFrac and compMoleFrac. Note that the fractions are
in the same order is the same as the compFluids string array.
// Print composition mass fractions and mole fractions
cout << "mass fractions = " << FS.compMassFrac << endl;
cout << "mole fractions = " << FS.compMoleFrac << endl;
Returns the real arrays:
mass fractions = { 0.243672, 0.756328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0 }
mole fractions = { 0.22, 0.78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0 }
If composition is set using a predefined mixture file and then the value of comp is asked for, comp will
return the mixture's ".fld" fluid file names and not the ".mix" file name.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
9
// Set composition using predefined mixture file
FS.comp = "air.mix";
Now ask for the value of comp:
// Print composition string (will return mole fractions)
cout << "comp = " << FS.comp << endl;
Returns the comp string in mole fractions:
comp = "NITROGEN.FLD, 0.781200, ARGON.FLD, 0.009200,
OXYGEN.FLD, 0.209600, MOLE"
Setting Composition in a Model
Many models will utilize a FlowStart element to initiate the fluid flow. The following example shows
how to instantiate FlowStart, Duct, and FlowEnd elements, link them together, and set fluid composition
in the FlowStart element's Fl_O fluid output port. Note that composition will get passed from element to
element via the fluid port linkages.
// Instantiate a FlowStart element named FsWater
Element FlowStart FsWater {
// Set temperature, pressure, and flow rate
Tt = 520;
Pt = 14.7;
W = 5.;
// Set fluid composition at the fluid output port
Fl_O.comp = "water"; // pure water
}
// Instantiate a Duct element named D010
Element Duct D010;
// Instantiate a FlowEnd element named FeWater
Element FlowEnd FeWater;
// Link the elements together
linkPorts("FsWater.Fl_O", "D010.Fl_I", "F010");
linkPorts("D010.Fl_O", "FeWater.Fl_I", "F020");
// Run the model
run();
// Print composition at F010 and F020
cout << "F010.comp = " << F010.comp << endl;
cout << "F020.comp = " << F020.comp << endl;
The example model above will run and print the results shown below. Notice that station F010 and F020
compositions are the same because composition was passed from the FlowStart, to the Duct, to the
FlowEnd.
F010.comp = "WATER.FLD, 1.0, MOLE"
F020.comp = "WATER.FLD, 1.0, MOLE"
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
10
1.3 FlowStation Thermodynamic Properties
After a REFPROPFlowStation has been declared and its composition has been defined, the thermodynamic
state may be set using one of the following functions. Table 1-4 lists all of the supported
REFPROPFlowStation functions:
- setTotalTP(Tt, Pt) – set total conditions using total temperature and total pressure
- setTotal_hP(ht, Pt) – set total conditions using total enthalpy and total pressure
- setTotalSP(s, Pt) – set total conditions using entropy and total pressure
- setTotal_hS(ht, s) – set total conditions using total enthalpy and entropy
- setTotal_xP(xt, Pt) – set total conditions using total two-phase quality (mass basis) and total
pressure
- setTotal_xT(xt, Tt) – set total conditions using total two-phase quality (mass basis) and total
temperature
- setTotalTsPsMN(Ts, Ps, MN) – set total and static conditions using static temperature, static
pressure, and Mach number
- setTotalTsPsV(Ts, Ps, V) – set total and static conditions using static temperature, static
pressure, and velocity
- setTotal_hsPsV(hs, Ps, V) – set total and static conditions using static enthalpy, static
pressure, and velocity
The following example sets the thermo package to REFPROP, creates a FlowStation, sets the composition
to pure nitrogen, and sets the total conditions using temperature and pressure:
// Specify REFPROP thermo package
setThermoPackage("REFPROP");
// Create FlowStation
FlowStation FS;
// Set FS composition to pure nitrogen
FS.comp = "nitrogen";
// Set total condition using temperature and pressure
FS.setTotalTP(600, 20); // 600 R, 20 psia
After the total condition has been set the FlowStation can be queried for other total properties such as
enthalpy, density, entropy, etc. Table 1-2 lists all of the REFPROPFlowStation attributes.
// Print FlowStation enthalpy, density, and entropy
cout << "ht = " << FS.ht << " " << FS.ht.units << endl;
cout << "rhot = " << FS.rhot << " " << FS.rhot.units << endl;
cout << "s = " << FS.s << " " << FS.s.units << endl;
Returns the values:
ht = 20.2174 Btu/lbm
rhot = 0.0870072 lbm/ft3
s = 0.0143515 Btu/(lbm*R)
The values for enthalpy and entropy in the example above reflect a default reference state of 518.67 R,
14.696 psia, 0.0 Btu/lbm, and 0.0 Btu/lbm*R. Reference state can be change via the setRefState
function. However, caution should be used when changing the reference state because two FlowStations
cannot be added (via the add function) unless both FlowStations have the same reference temperature,
pressure, and enthalpy. Reference state can be changed as follows:
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
11
// Change reference temperature, pressure, enthalpy and entropy
FS.setRefState(500, 100, 20, 5); // 500 R, 100 psia,
// 20 Btu/lbm, 5 Btu/lbm*R
REFPROPFlowStation has the ability to handle fluids that are superheated, supercritical, subcooled,
saturated liquid, saturated vapor, and two-phase liquid-vapor. The setTotalTP function cannot be used to
set the state to two-phase, but the setTotal_hP, setTotalSP, setTotal_hS, setTotal_xP, and
setTotal_xT can be used to set the state to two-phase. For example, the setTotal_xT function uses
total quality (mass basis) and pressure to set the state as follows:
// Create FlowStation
FlowStation FS2;
// Set composition to pure water
FS2.comp = "water";
// Set state to 90% quality (mass basis) at 118 psia
FS2.setTotal_xP(0.90, 118);
Ask for some fluid properties (state is currently two-phase liquid-vapor):
cout << "xt = " << FS.xt << endl;
cout << "Pt = " << FS.Pt << endl;
cout << "Tt = " << FS.Tt << endl;
cout << "ht = " << FS.ht << endl;
cout << "rhot = " << FS.rhot << endl;
cout << "PtSat = " << FS.PtSat << endl; // saturation pressure at Tt
cout << "TtSat = " << FS.TtSat << endl; // saturation temp at Pt
cout << "hSatL_Pt = " << FS.hSatL_Pt << endl; // sat liq. enthalpy at Pt
cout << "hSatV_Pt = " << FS.hSatV_Pt << endl; // sat vapor enthalpy at Pt
Returns the values:
xt = 0.9
Tt = 799.66
Pt = 118
rhot = 0.293106
ht = 1076.13
PtSat = 118
TtSat = 799.66
hSatL_Pt = 284.304
hSatV_Pt = 1164.11
Figure 4 is a plot of water at 90% quality and 118 psia on a temperature-enthalpy diagram. The diagram
shows that TtSat is approximately 800 R, which agrees with the value for TtSat printed in the example
above. The plotted points for ht, hSatL_Pt, and hSatV_Pt also agree with the results of the example
above.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
12
0
200
400
600
800
1000
1200
1400
1600
-200 0 200 400 600 800 1000 1200 1400 1600
Tem
per
atu
re, R
Enthalpy, Btu/lbm
Liquid Two-phase Vapor
Supercritical
90% quality, 118 psia
Sat. Liq. enthalpy(hSatL_Pt)
Sat. Vap. enthalpy(hSatV_Pt)
Critical Point
Figure 4. Water T-h diagram with state at 90% quality and 118 psia
Note that values returned for Cp, Cv, gamma, Vsound, mu, and k are not valid for two-phase fluid. Cp, Cv,
gamma, and Vsound will typically return negative values. For example:
cout << "Cpt = " << FS.Cpt << endl;
cout << "Cvt = " << FS.Cvt << endl;
cout << "gamt = " << FS.gamt << endl;
cout << "Vsoundt = " << FS.Vsoundt << endl;
Will return:
Cpt = -132667 (not valid)
Cvt = -132667 (not valid)
gamt = -132667 (not valid)
Vsoundt = -3.28081e+007 (not valid)
The example above used quality to set the fluid's total state. The input quality for setTotal_xP and
setTotal_xT must be 0 < x < 1.0, inclusive. If the two-phase state was set using a function such as
setTotal_hP, the output value for quality may take on a value below 0.0 or above 1.0 to indicate that the
fluid is a subcooled liquid (negative value), superheated vapor (positive value), or supercritical fluid (998
or 999), but the value for quality in these regions is otherwise meaningless.
Some models might require the solver to drive a particular cycle state point to saturated liquid or saturated
vapor condition. For example, to target a saturated vapor condition a solver dependent could be employed
to drive fluid quality equal to 1.0 (xt = 1.0) or drive enthalpy equal to saturated vapor enthalpy (ht =
hSatV_Pt). Similarly, to target a saturated liquid condition a solver dependent could be employed to drive
enthalpy equal to saturated liquid enthalpy (ht = hSatL_Pt). However, caution should be used when
driving quality to 0.0 (xt = 0.0) for two reasons: 1) targeting a value of 0.0 requires an additional solver
dependent attribute to be set, namely eq_Ref, and 2) the solver may converge on a quality just below 0.0
due to the solver tolerance but produce results far from the true saturated liquid point, because small
changes in quality for subcooled liquids (negative value) can result in large changes in fluid properties.
Another important item to keep in mind when using the solver and two-phase fluids is that for a given
pressure, temperature is constant under the vapor dome (Tt = TtSat) because phase change is an
isothermal process (this is why setTotalTP cannot be used to set a two-phase state). Therefore, if the
solver is trying to drive a particular cycle state point equal a temperature close to TtSat, the solver could
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
13
throw an error if during the convergence process the fluid becomes two-phase. The error would likely
report that Tt is not affected by any solver independents.
1.4 FlowStation Static Properties
Once the flow rate and total conditions have been set, the static condition can be calculated by setting any
one of the following: area (A), static enthalpy (hs), static pressure (Ps), static temperature (Ts), or Mach
number (MN) , Velocity (V). Note that Mach number cannot be used to set the static condition for a two-
phase fluid because speed of sound is not valid in the two-phase region.
The following example sets the composition to pure hydrogen, sets flow rate, sets the total condition using
the setTotalTP function (liquid phase in this example), and then sets the static condition using velocity.
// Create FlowStation named FS
FlowStation FS;
// Set composition to pure hydrogen
FS.comp = "hydrogen";
// Set flow rate
FS.W = 20; // lbm/sec
// Set state to 30 R, 14.7 psia (subcooled liquid)
FS.setTotalTP(30, 14.7);
// Set velocity. This will set the flow static conditions.
FS.V = 10; // ft/sec
// Print some FlowStation properties to the command window
cout << "Pt = " << FS.Pt << " , Ps = " << FS.Ps << endl;
cout << "Tt = " << FS.Tt << " , Ts = " << FS.Ts << endl;
cout << "rhot = " << FS.rhot << " , rhos = " << FS.rhos << endl;
cout << "ht = " << FS.ht << " , hs = " << FS.hs << endl;
cout << "xt = " << FS.xt << endl;
cout << "W = " << FS.W << endl;
cout << "V = " << FS.V << endl;
cout << "MN = " << FS.MN << endl;
cout << "A = " << FS.A << endl;
Returns the values:
Pt = 14.7 , Ps = 14.6497
Tt = 30 , Ts = 29.9998
rhot = 4.66543 , rhos = 4.66542
ht = -1644.05 , hs = -1644.05
xt = -5.61595e-006
W = 20
V = 10
MN = 0.00251132
A = 61.7308
The following example sets the composition to pure water, sets flow rate, sets the total condition using the
setTotalTP function (superheated vapor phase in this example), and then sets the static condition using
Mach number.
// Create FlowStation named FS
FlowStation FS;
// Set composition to pure water
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
14
FS.comp = "water";
// Set flow rate
FS.W = 5; // lbm/sec
// Set total condition to 1000 R, 50 psia (superheated vapor)
FS.setTotalTP(1000, 50);
// Set Mach number. This will set the flow static condition.
FS.MN = 0.8;
// Print some FlowStation properties to the command window
cout << "Pt = " << FS.Pt << " , Ps = " << FS.Ps << endl;
cout << "Tt = " << FS.Tt << " , Ts = " << FS.Ts << endl;
cout << "rhot = " << FS.rhot << " , rhos = " << FS.rhos << endl;
cout << "ht = " << FS.ht << " , hs = " << FS.hs << endl;
cout << "xt = " << FS.xt << endl;
cout << "W = " << FS.W << endl;
cout << "V = " << FS.V << endl;
cout << "MN = " << FS.MN << endl;
cout << "A = " << FS.A << endl;
Returns the values:
Pt = 50 , Ps = 33.5596
Tt = 1000 , Ts = 910.996
rhot = 0.084735 , rhos = 0.0624117
ht = 1277.48 , hs = 1235.87
xt = 26.6127
W = 5
V = 1443.39
MN = 0.8
A = 7.9925
FlowStations support design and off-design mode, which is set via the switchDes option variable. During
design mode (default), the static parameter set (Ps, Ts, hs, V, MN, or A) will be honored even if the total
condition changes. However, once the FlowStation is switched to off-design mode, area (A) becomes the
static parameter that will be adhered to unless one of the other static parameters is explicitly set during off-
design mode, in which case area will be recalculated. The area used during off-design is the last known
value for area.
The following example is a continuation of the previous static condition example above, which used
superheated water as the fluid. Recall that Mach number was the input static parameter, which resulted in
an area of 7.9925 in2 for the given flow rate of 5 lbm/sec and total condition of 1000 R, 50 psia. The
FlowStation will now be set to off-design mode, and the total condition and flow rate will be manually
changed.
// Switch the FlowStation to OFFDESIGN
FS.switchDes = "OFFDESIGN"; // locks in area value
// Change total conditoin to 800 R, 40 psia (superheated vapor)
FS.setTotalTP(800, 40);
// Change flow rate
FS.W = 2; // lbm/sec, new flow rate
// Print some FlowStation properties to the command window
cout << "Pt = " << FS.Pt << " , Ps = " << FS.Ps << endl;
cout << "Tt = " << FS.Tt << " , Ts = " << FS.Ts << endl;
cout << "rhot = " << FS.rhot << " , rhos = " << FS.rhos << endl;
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
15
cout << "ht = " << FS.ht << " , hs = " << FS.hs << endl;
cout << "xt = " << FS.xt << endl;
cout << "W = " << FS.W << endl;
cout << "V = " << FS.V << endl;
cout << "MN = " << FS.MN << endl;
cout << "A = " << FS.A << endl;
Returns the values:
Pt = 40 , Ps = 38.2788
Tt = 800 , Ts = 791.717
rhot = 0.0855616 , rhos = 0.0827382
ht = 1180.88 , hs = 1177.09
xt = 3.10802
W = 2
V = 435.515
MN = 0.259802
A = 7.9925
Notice in the results above that the total and static conditions have changed, as have velocity and Mach
number. However, area remains the same as the previous (design) point because the FlowStation is now in
off-design mode.
1.5 FlowStation add and copy Functions
Table 1-4 lists all of the supported REFPROPFlowStation functions. A few functions that allow
FlowStations to transfer information from one station to another are copyFlow, copyFlowStatic, and
add. One requirement for all of these functions is that both FlowStations involved must of the same type,
in this case REFPROPFlowStation. Therefore, you cannot perform and add or copy between a
REFPROPFlowstation and a GasTblFlowStation.
The copyFlow function accepts one string argument that specifies the FlowStation from which to copy.
The parameters that get copied are composition, total condition, flow rate, and reference state. If the
primary FlowStation already has composition, flow rate, etc. set, copyFlow will overwrite those values.
The following example shows how to use the copyFlow function to copy attributes from FS1 to FS2.
// Specify REFPROP thermo package
setThermoPackage("REFPROP");
// Create two FlowStations
FlowStation FS1;
FlowStation FS2;
// Set FS1 composition to 24% oxygen, 76% nitrogen on a mass basis
FS1.comp = "oxygen.fld, 0.24, nitrogen.fld, 0.76, mass";
// Set FS2 composition to pure water
FS2.comp = "water";
// Set FS1 state to 700 R and 20 psia
FS1.setTotalTP(700, 20);
// Copy the attributes from FS1 to FS2
FS2.copyFlow("FS1");
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
16
In the example above, FS2.comp was originally set to "water" and total condition was not set. After the
call to copyFlow, FS2 composition is no longer "water"; it is now "oxygen.fld, 0.24,
nitrogen.fld, 0.76, mass". The total condition is now 700 R and 20 psia.
The copyFlowStatic function copies everything that copyFlow does and additionally copies the static
condition. The example below is a continuation of the example above.
// Set FS1 static pressure
FS1.Ps = 18; // psia
// Copy the total AND static conditions from FS1 to FS2
FS2.copyFlowStation("FS1");
The add function may be used to add one flow to another, conserving energy and mass but not momentum.
The resulting pressure is the same as the primary FlowStation's total pressure. Three requirements for the
add function to work are that both FlowStations must be of the same type (REFPROPFlowStation), both
must have the same reference state (Tref, Pref, and hRef), and must both have their composition defined
using pure fluid files (".fld"), which may have originally been set using predefined mixture files (".mix").
FlowStations can be also be added if both compositions were set using the same pseudo-pure fluid file
(".ppf"). For example, both have a composition of "air.ppf".
The following example adds a secondary flow with a composition of oxygen and argon at 600 R and 14
psia to a primary flow with a composition of nitrogen and oxygen.
// Set FS1 composition, total condition, and flow rate
FS1.comp = "nitrogen.fld, 0.8,oxygen.fld, 0.2, mass";
FS1.setTotalTP(600, 14); // T=600(R), P=14(psia)
FS1.W = 1.0; // lbm/sec
// Set FS2 composition, total condition, and flow rate
FS2.comp = "oxygen.fld, 0.95, argon.fld, 0.05, mass";
FS2.setTotalTP(700,20); // T=700(R), P=20(psia)
FS2.W = 0.5;
// Print some FS1 and FS2 properties before performing the add
cout<< endl <<"---- FS1 props (before add) -------" << endl<< endl;
cout<<"FS1.Tt = "<<FS1.Tt<<endl;
cout<<"FS1.Pt = "<<FS1.Pt<<endl;
cout<<"FS1.ht = "<<FS1.ht<<endl;
cout<<"FS1.W = "<<FS1.W<<endl;
cout<<"FS1.MW = "<<FS1.MW<<endl;
cout << "comp = " << FS1.comp << endl;
cout << "compMassFrac = " << FS1.compMassFrac << endl;
cout << "compMoleFrac = " << FS1.compMoleFrac << endl;
cout<< endl <<"---- FS2 props -------" << endl<< endl;
cout<<"FS2.Tt = "<<FS2.Tt<<endl;
cout<<"FS2.Pt = "<<FS2.Pt<<endl;
cout<<"FS2.ht = "<<FS2.ht<<endl;
cout<<"FS2.W = "<<FS2.W<<endl;
cout<<"FS2.MW = "<<FS2.MW<<endl;
cout << "comp = " << FS2.comp << endl;
cout << "compMassFrac = " << FS2.compMassFrac << endl;
cout << "compMoleFrac = " << FS2.compMoleFrac << endl;
// ============= Add FS2 to FS1 =============
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
17
FS1.add("FS2");
// Print some FS1 properties after the add
cout<< endl <<"---- FS1 props (after add) -------" << endl<< endl;
cout<<"FS1.Tt = "<<FS1.Tt<<endl;
cout<<"FS1.Pt = "<<FS1.Pt<<endl;
cout<<"FS1.ht = "<<FS1.ht<<endl;
cout<<"FS1.W = "<<FS1.W<<endl;
cout<<"FS1.MW = "<<FS1.MW<<endl;
cout << "comp = " << FS1.comp << endl;
cout << "compMassFrac = " << FS1.compMassFrac << endl;
cout << "compMoleFrac = " << FS1.compMoleFrac << endl;
Returns the results:
---- FS1 props (before add) -------
FS1.Tt = 600
FS1.Pt = 14
FS1.ht = 19.7826
FS1.W = 1
FS1.MW = 28.7291
comp = NITROGEN.FLD, 0.800000, OXYGEN.FLD, 0.200000, MASS
compMassFrac = { 0.8, 0.2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0 }
compMoleFrac = { 0.820436, 0.179564, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 }
---- FS2 props -------
FS2.Tt = 700
FS2.Pt = 20
FS2.ht = 39.2835
FS2.W = 0.5
FS2.MW = 32.3204
comp = OXYGEN.FLD, 0.950000, ARGON.FLD, 0.050000, MASS
compMassFrac = { 0.95, 0.05, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0 }
compMoleFrac = { 0.959547, 0.0404531, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0 }
---- FS1 props (after add) -------
FS1.Tt = 630.904
FS1.Pt = 14
FS1.ht = 26.2829
FS1.W = 1.5
FS1.MW = 29.8341
comp = NITROGEN.FLD, 0.533333, OXYGEN.FLD, 0.450000, ARGON.FLD,
0.016667, MASS
compMassFrac = { 0.533333, 0.45, 0.0166667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0 }
compMoleFrac = { 0.567995, 0.419558, 0.0124471, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0 }
Notice in the results above that the primary FlowStation (FS1) flow rate is increased (1.0 + 0.5 = 1.5
lbm/sec), the enthalpy and temperature increased, nitrogen mass (and mole) fraction decreased, oxygen
mass (and mole) fraction increased, and argon has been added as a constituent. Properties for the secondary
FlowStation (FS2) were not printed because FS2 was not affected by the add function.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
18
The example below shows how the add function can be used with two FlowStations that have the same
pseudo-pure fluid composition.
// Set FS1 composition, total condition, and flow rate
FS1.comp = "air.ppf";
FS1.setTotalTP(600,14); // T=600(R), P=14(psia)
FS1.W = 1.0;
// Set FS2 composition, total condition, and flow rate
FS2.comp = "air.ppf";
FS2.setTotalTP(700,20); // T=700(R), P=20(psia)
FS2.W = 0.5;
// Add FS2 to FS1
FS1.add("FS2"); // both fluids have air.ppf composition
Table 1-2: List of REFPROPFlowStation Supported Parameters
Name Units I/O Description A in2 I/O Physical cross sectional area. Can be
used to set static conditions.
Cps Btu/(lbm*R) O Constant pressure specific heat, based on
static conditions. Not valid for two-
phase fluid.
Cpt Btu/(lbm*R) O Constant pressure specific heat, based on
total conditions. Not valid for two-phase
fluid.
Cvs Btu/(lbm*R) O Constant volume specific heat, based on
static conditions. Not valid for two-
phase fluid.
Cvt Btu/(lbm*R) O Constant volume specific heat, based on
total conditions. Not valid for two-phase
fluid.
comp I/O String variable that sets and returns the
composition fluids and mass or mole
fractions, as indicated by "MASS" or
"MOLE" at the end of the string.
compFluids O String array of the constituent fluids
compFileNames O String array of the fluid property files.
Order is the same as compFluids string
array.
compMassFrac O Real array of composition mass fractions.
Order is the same as compFluids string
array.
compMoleFrac O Real array of composition mole fractions.
Order is the same as compFluids string
array.
description I FlowStation description
gams O Specific heat ratio (Cv/Cp) based on
static conditions
gamt O Specific heat ratio (Cv/Cp) based on
total conditions
hs Btu/lbm I/O Enthalpy based on static conditions. Can
be used to set static conditions.
ht Btu/lbm O Enthalpy based on total conditions
hCrit Btu/lbm O enthalpy at the critical point
hRef Btu/lbm O Reference state enthalpy. Default is 0.0
Btu/lbm. Can be changed using the flow
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
19
station setRefState function.
hSatV_Ps Btu/lbm O Saturated vapor enthalpy at current
static pressure. Applies to single and
two-phase fluids.
hSatV_Pt Btu/lbm O Saturated vapor enthalpy at current total
pressure. Applies to single and two-phase
fluids.
hSatL_Ps Btu/lbm O Saturated liquid enthalpy at current
static pressure. Applies to single and
two-phase fluids.
hSatL_Pt Btu/lbm O Saturated liquid enthalpy at current
total pressure. Applies to single and
two-phase fluids.
hSatV_Ts Btu/lbm O Saturated vapor enthalpy at current
static temperature. Applies to single and
two-phase fluids.
hSatV_Tt Btu/lbm O Saturated vapor enthalpy at current total
temperature. Applies to single and two-
phase fluids.
hSatL_Ts Btu/lbm O Saturated liquid enthalpy at current
static temperature. Applies to single and
two-phase fluids.
hSatL_Tt Btu/lbm O Saturated liquid enthalpy at current
total temperature. Applies to single and
two-phase fluids.
iDescription I
ks Btu/(sec*ft*R) Thermal conductivity based on static
conditions. Not valid for two-phase
fluid.
kt Btu/(sec*ft*R) Thermal conductivity based on total
conditions. Not valid for two-phase
fluid.
MN I/O Mach number. Can be used to set static
conditions for single-phase fluid.
MNdes I Design Mach number. Can be used to set
static conditions for single-phase fluid.
mus lbm/(ft*sec) O Viscosity based on static conditions. Not
valid for two-phase fluid.
mut lbm/(ft*sec) O Viscosity based on total conditions. Not
valid for two-phase fluid.
MW O Molecular weight
PminLimit_EOS psia O Pressure min limit for the equation of
state calculations
PmaxLimit_EOS psia O Pressure max limit for the equation of
state calculations
PminLimit_k psia O Pressure min limit for thermal
conductivity calculation
PmaxLimit_k psia O Pressure max limit for thermal
conductivity calculation
PminLimit_mu psia O Pressure min limit for viscosity
calculation
PmaxLimit_mu psia O Pressure max limit for viscosity
calculation
Prs O Prandtl number based on static
conditions. Not valid for two-phase
fluid.
Prt O Prandtl number based on total conditions.
Not valid for two-phase fluid.
Ps psia I/O Static pressure. Can be used to set
static conditions.
Pt psia O Total (stagnation) pressure
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
20
Pcrit psia O Pressure at the critical point
Pref psia O Reference state pressure. Default is
14.696 psia. Can be changed using the
flow station setRefState function.
PsMelt psia O Melting pressure for the current static
temperature
PtMelt psia O Melting pressure for the current total
temperature
PsSat psia O Saturation pressure for the current
static temperature
PtSat psia O Saturation pressure for the current total
temperature
rhos lbm/ft3 O Density based on static conditions
rhot lbm/ft3 O Density based on total conditions
rhoCrit lbm/ft3 O Density at the critical point
rhoSatV_Ps lbm/ft3 O Saturated vapor density at current static
pressure
rhoSatV_Pt lbm/ft3 O Saturated vapor density at current total
pressure
rhoSatL_Ps lbm/ft3 O Saturated liquid density at current
static pressure.
rhoSatL_Pt lbm/ft3 O Saturated liquid density at current total
pressure
rhoSatV_Ts lbm/ft3 O Saturated vapor density at current static
temperature
rhoSatV_Tt lbm/ft3 O Saturated vapor density at current total
temperature
rhoSatL_Ts lbm/ft3 O Saturated liquid density at current
static temperature
rhoSatL_Tt lbm/ft3 O Saturated liquid density at current total
temperature
Rs Btu/(lbm*R) O Gas constant based on static conditions
Rt Btu/(lbm*R) O Gas constant based on total conditions
s Btu/(lbm*R) O Entropy
sRef Btu/(lbm*R) O Reference state entropy. Default is 0.0
Btu/(lbm*R). Can be changed using the
flow station setRefState function.
sSatV_Ps Btu/lbm O Saturated vapor entropy at current static
pressure. Applies to single and two-phase
fluids.
sSatV_Pt Btu/lbm O Saturated vapor enthalpy at current total
pressure. Applies to single and two-phase
fluids.
sSatL_Ps Btu/lbm O Saturated liquid enthalpy at current
static pressure. Applies to single and
two-phase fluids.
sSatL_Pt Btu/lbm O Saturated liquid enthalpy at current
total pressure. Applies to single and
two-phase fluids.
sSatV_Ts Btu/lbm O Saturated vapor enthalpy at current
static temperature. Applies to single and
two-phase fluids.
sSatV_Tt Btu/lbm O Saturated vapor enthalpy at current total
temperature. Applies to single and two-
phase fluids.
sSatL_Ts Btu/lbm O Saturated liquid enthalpy at current
static temperature. Applies to single and
two-phase fluids.
sSatL_Tt Btu/lbm O Saturated liquid enthalpy at current
total temperature. Applies to single and
two-phase fluids.
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
21
TminLimit_EOS R O Temperature min limit for the equation of
state calculations
TmaxLimit_EOS R O Temperature max limit for the equation of
state calculations
TminLimit_k R O Temperature min limit for thermal
conductivity calculation
TmaxLimit_k R O Temperature max limit for thermal
conductivity calculation
TminLimit_mu R O Temperature min limit for viscosity
calculation
TmaxLimit_mu R O Temperature max limit for viscosity
calculation
Ts R I/O Static temperature. Can be used to set
static conditions.
Tt R O Total (stagnation) temperature
Tcrit R O Temperature at the critical point
Tref R O Reference state temperature. Default is
518.67 R. Can be changed using the flow
station setRefState function.
TsMelt R O Melting temperature for the current
static pressure
TtMelt R O Melting temperature for the current total
pressure
TsSat R O Saturation temperature for the current
static pressure
TtSat R O Saturation temperature for the current
total pressure
us Btu/lbm O Internal energy based on static
conditions
ut Btu/lbm O Internal energy based on total conditions
V ft/sec I/O Flow velocity. Can be used to set static
conditions.
Vsounds ft/sec O Speed of sound based on static
conditions. Not valid for two-phase
fluid.
Vsoundt ft/sec O Speed of sound based on total conditions.
Not valid for two-phase fluid.
W lbm/sec I Total weight flow
Wc lbm/sec O Corrected weight flow.
W*sqrt(theta)/delta
Wp lbm/sec O Referred weight flow. W*sqrt(T)/P
xs lbm/lbm O Two-phase quality based on static
conditions, mass basis (lbm vapor / lbm
total).
x = 0 indicates saturated liquid,
x = 1 indicates saturated vapor,
0 < x < 1 indicates two-phase fluid,
x < 0 indicates subcooled (compressed)
liquid,
x > 1 indicates superheated vapor,
x = 998 indicates superheated vapor, but
quality not defined (Ts > Tcrit),
x = 999 indicates supercritical state
(Ps > Pcrit and Ts > Tcrit)
xt lbm/lbm O Two-phase quality based on total
conditions, mass basis (lbm vapor / lbm
total).
x = 0 indicates saturated liquid,
x = 1 indicates saturated vapor,
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
22
0 < x < 1 indicates two-phase fluid
x < 0 indicates subcooled (compressed)
liquid,
x > 1 indicates superheated vapor,
x = 998 indicates superheated vapor, but
quality not defined (Tt > Tcrit),
x = 999 indicates supercritical state
(Pt > Pcrit and Tt > Tcrit)
xsMole mole/mole O Same as xs except on a mole basis (moles
vapor / moles total)
xtMole mole/mole O Same as xt except on a mole basis (moles
vapor / moles total)
Table 1-3: List of REFPROPFlowStation Switches
Name Description Default Allowed
Values superOrSub Determines if static
conditions are for subsonic
or supersonic solution
SUBSONIC SUBSONIC,
SUPERSONIC
switchDes Determines if the
FlowStation is in design or
off-design mode
DESIGN DESIGN,
OFFDESIGN
Table 1-4: List of REFPROPFlowStation Functions
Name Return
Type
Arguments Description
add void stationName Add in a secondary flow station of the
same type. Conserve mass and energy but
not momentum. Pressure remains the same
as the primary flow station. Flow
composition is updated (comp,
compFluids, compFileNames, compMassFrac,
compMoleFrac). FlowStation reference
states (Tref, Pref, and hRef) must be
the same.
copyFlow void stationName Copy primary attributes (composition,
weight flow, total condition, and
reference state) from another station in
the same object scope to this one
copyFlowRemote void stationName Copy primary attributes (composition,
weight flow, total condition, and
reference state) from another station
anywhere in the model to this one
copyFlowStatic void stationName Copy primary and static attributes
(composition, weight flow, total and
static conditions, and reference state)
from another station in the same object
scope to this one
getStationType string Returns FlowStation type
("REFPROPFlowStation")
setRefState void Tref, Pref,
hRef, sRef
Sets the fluid's reference state
temperature, pressure, enthalpy, and
entropy (Tref, Pref, hRef, sRef).
Default reference state is 518.67 R,
14.696 psia, 0.0 Btu/lbm, 0.0 Btu/lbm*R.
Use with caution because the "add"
Doc. #: NPSSTM Thermo Guide
REL: 2.4.1
Date: 6/21/12
23
function requires that the two fluids
being added have the same reference
state.
setTotalTP void Tt, Pt Sets fluid total conditions based on
total temperature and total pressure
setTotal_hP void ht, Pt Sets fluid total conditions based on
total enthalpy and total pressure
setTotal_hS void ht, s Sets fluid total conditions based on
total enthalpy and entropy
setTotalSP void s, Pt Sets fluid total conditions based on
entropy and total pressure
setTotalTsPsMN void Ts, Ps, MN Sets fluid total and static conditions
based on static temperature, static
pressure, and Mach number
setTotal_hsPsV void hs, Ps, V Sets fluid total and static conditions
based on static enthalpy, static
pressure, and velocity
setTotalTsPsV void Ts, Ps, V Sets fluid total and static conditions
based on static temperature, static
pressure, and velocity
setTotal_xT void xt, Tt Sets fluid total conditions based on
total condition two-phase quality (mass
basis) and total temperature
setTotal_xP void xt, Pt Sets fluid total conditions based on
total condition two-phase quality (mass
basis) and total pressure
NPSSTM Software © Copyright 2003. The U.S. Government, as Represented by the Administrator of the National
Aeronautics and Space Administration (NASA);
NPSSTM Software © Copyright 2008, 2009, 2010. The Ohio Aerospace Institute, on behalf of the NPSSTM
Consortium. All rights reserved. Includes content licensed from the U.S. Government, National Aeronautics and
Space Administration under United States Copyright Registration Numbers V3503D364 and V3482D344.