2.8.7. Creating Real Gas Property Tables

You can create your own Real Gas Property (RGP) file. For information about the RGP file contents and the file format, refer to the following sections:

Real Gas Property (RGP) files that have been used in Ansys CFX can also be used in Ansys Forte.


Note:  Using RGP files in Forte is discussed in Chemistry


You can create RGP table files from the NIST REFPROP material properties using the RGP Generator command line tool. The RGP Generator produces RGP files for the liquid and vapor states of a pure substance. The liquid and vapor phases can be saved either individually in separate files or in two separate RGP data sections in the same single file. The generate tables include:

  • Liquid superheat table

    The superheat table points are spaced adaptively within the specified error tolerance. The liquid properties as a function of temperature and pressure will be available in your simulation once you read the liquid superheat tables into your session.

  • Metastable gas states (incorporated in the superheat table section by default)

    The metastable states are extrapolated as far as possible. Beyond that, the liquid tables are filled with the vapor data, and vice versa.

    Generation of the metastable gas states can be turned off.

  • Saturation table information (within the specified error tolerance)

    Two saturation table sections are included: one is discretized based on the liquid saturation data and the other based on the vapor saturation data. Typically, the two discretization data are not the same.

The commands can be executed in the System Coupling command console (Python), which is launched by running the following command:

  • Windows:

    %AWP_ROOT211%\SystemCoupling\bin\systemcoupling.bat

  • Linux:

    $AWP_ROOT211/SystemCoupling/bin/systemcoupling

Below is a typical example of commands for generating an RGP file:

import pyExt.RefProp as arp
fluidsPath = arp.getFluidsPath()
mat = arp.RefPropLib()

fluidList = ['fluids/water.fld']
mat.setup(fluidsPath, fluidList)

interpError = 1.0e-3
Tmin = 300.0
Tmax = 700.0
Pmin = 100000.0
Pmax = 25000000.0

# Generate both the liquid and vapor components, independent settings possible
h2ollow = arp.RGPLiquid("H2OL", Tmin, Tmax, Pmin, Pmax, interpError)
h2ovlow = arp.RGPVapor("H2OV", Tmin, Tmax, Pmin, Pmax, interpError)
arp.generateRGPfile("H2O-low.rgp", h2ollow, h2ovlow)

# Generate both the liquid and vapor components in the RGP file in one go
h2omed = arp.RGPSettings("H2O", Tmin, Tmax, Pmin, Pmax, 1.0e-4, arp.ADAPT_AUTO_TP)
arp.generateRGPfile("H2O-med.rgp", h2omed)

# Generate just the vapor component in the RGP file, for entire range
h2ovapor = arp.RGPVapor("H2OV", interpError)
arp.generateRGPfile("H2O-vapor.rgp", h2ovapor)