The NIST Pure Fluids FORTRAN subroutines are contained in a number of files. The following 22 files should be compiled and linked with your own main program:
| core_BWR.for | core_CPP.for | core_DE.for |
| core_ECS.for | core_FEQ.for | core_MLT.for |
| core_PH0.for | core_STN.for | flash2.for |
| flsh_sub.for | idealgas.for | mix_HMX.for |
| prop_sub.for | realgas.for | sat_sub.for |
| setup.for | setup2.for | trnsp.for |
| trns_ECS.for | trns_TCX.for | trns_VIS.for |
| utility.for |
An additional optional file, ftn_pas.for, contains the "interface" subroutines used by the graphical interface and dynamic link libraries (DLLs).
All fluids which are used must be available to your executable program. Note that the extended corresponding states model used for the transport properties of some fluids uses reference fluids. Thus, the fluid files for nitrogen, propane, and R-134a, may also be required. The extension of all the fluid files, found in the fluids directory, is ".fld", e.g., R134a.fld. The file "HMX.bnc" must also be present.
The subroutine SETUP must be called to initialize the pure fluid components. The call to SETUP allows the choice of one of three standard reference states for entropy and enthalpy and automatically loads the "NIST-recommended" models for the components. The subroutine SETMOD allows the specification of other models. To define another reference state, the subroutine SETREF can be used. The SETMOD and SETREF subroutines should be called only if the models or reference state are changed.
The sequence is:
| call | SETMOD (optional) |
| call | SETUP (REQUIRED) |
| call | SETREF (optional) |
The program EXAMPLE.FOR has been included which contains examples of most of the routines available in the FORTRAN code.
All inputs and outputs to the subroutines are in the following units:
| temperature | K |
| pressure, fugacity | kPa |
| density | mol/dm3 |
| quality | mole basis (moles vapor / total moles) |
| enthalpy, internal energy | J/mol |
| Gibbs, Helmholtz free energy | J/mol |
| entropy, heat capacity | J/(mol·K) |
| speed of sound | m/s |
| Joule-Thompson coefficient | K/kPa |
| dp/dr | kPa·L/mol |
| d2p/dr2 | kPa·(L/mol)2 |
| viscosity | µPa·s |
| thermal conductivity | W/(m·K) |
| dipole moment | debye |
| surface tension | N/m |
The variable type of subroutine arguments can generally be inferred from the first letter of the variable name:
| a-g and o-z: | double precision |
| h: | double precision (e.g., enthalpy) or character |
| i-k and m,n: | integer |
| l: | logical (within subroutines only, no logicals in arguments) also used as integer for exponent of FEQ model |
We are striving to make these subroutines as standard and portable as possible, but every compiler has its own sensitive points. Please report any compiler or linker errors or warnings to the contacts listed at the end of this manual.
The fluid data files are read using logical unit 12. Use of this unit in your application program may crash the application program and/or the subroutines and should be avoided.