TO TOP

Software for the Reference Equation of State GERG-2008 for Natural Gases and Similar Mixtures

A detailed description of the reference equation of state GERG-2008 is given here. Information about the use of the software under the various Windows operating systems and Excel versions as well as about the integration of the available 32-bit or 64-bit Fortran DLL using Excel Add-Ins and 32-bit .NET DLL are given at the end of this software description.

Detailed information about the current distribution channel by the engineering office Dr.-Ing. N. Kurzeja can be found there as well.

For the reference equation of state GERG-2008 for natural gases and similar mixtures, software is available that allows the calculation of more than 20 thermodynamic properties of binary mixtures, natural gases and other multi-component mixtures. These mixtures can be composed of any of the 21 components listed in the following table. The software enables to calculate thermodynamic properties in the homogeneous gas, liquid and supercritical regions, and allows to perform vapour-liquid equilibrium (VLE) calculations. The VLE calculation options comprise flash, phase envelope, dew point and bubble point calculations for any binary and multi-component mixture defined above.

zww_soft_gerg_p1

Components of natural gases and similar mixtures that were taken into account for the equation of state GERG-2008.

There are two software versions available:

  • A “classical” version, where the pressure p, temperature T and total composition  (mole fractions) are the input quantities.

Note: The symbol x̅ used in the following without an index is the abbreviated notation for the total composition of the mixture instead of specifying all the individual xi of the components i that are contained in the mixture under consideration.

  • An advanced version, where in addition to pressure, temperature and total composition (p,T,x̅ ), the following combinations of input quantities can be used:
  • pressure, total enthalpy and total composition (p,h,x̅ )
  • pressure, total entropy and total composition (p,s,x̅ )
  • temperature, total volume and total composition (T,v, )
  • total internal energy, total volume and total composition (u,v, ).

The routines developed for these additional calculation options are based on special algorithms that use modern numerical procedures. They enable fast and stable property calculations. The input variables (p,h,x̅ ) and (p,s,x̅ ) are of particular interest for compressor and flow calculations, which are thus considerably faster. The input variables (T,v,x̅ ) and (u,v,x̅ ), on the other hand, are particularly suitable for isochoric calculations.

For given values of the input quantities (p,T,x̅ ) in the classical version, or (p,T,x̅ ), (p,h,x̅ ), (p,s,x̅ ), (T,v, ) and (u,v, ) in the advanced version, the following thermodynamic properties of binary and multi-component mixtures can be calculated with the help of the DLL:

 Table 1  Calculable thermodynamic properties.

Symbol

 Thermodynamic properties

ρ

 Density

v

 Volume

Z

 Compression factor

h

 Enthalpy

s

 Entropy

cp

 Isobaric heat capacity

cv

 Isochoric heat capacity

w

 Speed of sound

κ

 Isentropic exponent, κ = (v/p)(p/v)s

μ

 Joule-Thomson coefficient, µ = (T/p)h

δT

 Isothermal throttling coefficient; δT = (h/p)T

u

 Internal energy

g

 Gibbs free energy, g = hTs

a

 Helmholtz free energy a = uTs

(∂p/T)ρ

 Partial derivative of pressure with respect to temperature at constant density

(∂p/ρ)T

 Partial derivative of pressure with respect to density at constant temperature

(∂ρ/T)p

 Partial derivative of density with respect to temperature at constant pressure

(∂p/v)T

 Partial derivative of pressure with respect to volume at constant temperature

(∂v/T)p

 Partial derivative of volume with respect to temperature at constant pressure

(∂s/p)T

 Partial derivative of entropy with respect to pressure at constant temperature

fi

 Fugacity of component i

lnφi

 Logarithm of the fugacity coefficient of component i, φi = fi/(xip)

lnKi

 Logarithm of the K-factor of component i, Ki = yi/xi

β

 Molar vapour fraction, β = nvap/ntot

βm

 Mass vapour fraction, βm = mvap/mtot

βv

 Volume vapour fraction, βv = vvap/vtot

M

 Molar mass

  All these properties can be calculated as molar or specific values.

GERG-2008 DLL and Excel Add-In for the calculation of thermodynamic properties of natural gases and similar mixtures

For the integration of the GERG-2008 reference equation in Windows based standard programs, the GERG-2008 software package contains the dynamic link library (DLL) GERG2008.dll, optimized and built with the Intel Parallel Studio XE 2015 Composer Edition for Fortran (version 15.07.287). The DLL provides about sixty functions and subroutines that allow the calculation of numerous thermodynamic properties in the homogeneous gas, liquid, and supercritical regions, and VLE calculations which include different flash options as well as phase envelope, dew point, and bubble point calculations.

In addition, the GERG-2008 software package contains an Excel Add-In file that allows a simple integration of the DLL into Microsoft Excel. Since the installation of the GERG-2008 Excel Add-In adds all functions and subroutines exported with the GERG-2008 DLL to the standard Microsoft Excel function set, the desired thermodynamic properties can be calculated directly in an Excel spreadsheet by calling the abbreviated name of the corresponding function or subroutine with the required input variables. Thus, the molar or mass-based density ρ depending on given values of temperature T, pressure p, total composition   (mole fractions) and desired phase (IPTYP) and unit (IUNIT) is calculated from the function call DOTPX. All functions and subroutines can be called either by direct input of the formula listed in the manual into an Excel spreadsheet or very conveniently with the help of the function wizard of Microsoft Excel.

zww_soft_gerg_p6

Calling the GERG-2008 function DOTPX using the Excel function wizard

zww_soft_gerg_p7

Entering the arguments for the function call DOTPX

Examples for different application possibilities of the GERG-2008 software are given in the supplied reference spreadsheets SNGLPROP.xlsm, PHASEENV.xlsm and FLASHOPT.xlsm. Screenshots of some examples are listed in the appendix Example calculations made with the GERG-2008 software at the end of this software description. This Excel reference spreadsheets contain all the function calls provided by the GERG-2008 software package and can therefore be used as a quick and simple fluid properties calculator for natural gases and similar mixtures. Of course, a user specific Excel spreadsheet with the desired GERG-2008 functions can be designed as well, or any desired GERG-2008 function can be called within Excel via a user specific VBA script.

Furthermore, the GERG-2008 software package contains an import library file (GERG2008.lib) that allows to integrate the GERG2008.dll into user specific Fortran and unmanaged Visual C++ applications.

All property functions and subroutines of the GERG-2008 software package are described in detail in the MANUAL GERG-2008_x86/x64.PDF that is part of the software.

The 32-bit Version of GERG-2008 can be used on the 32-bit versions of Microsoft Excel (2003 ─ 2021/Microsoft 365) using the supplied Excel Add-In GERG-2008.xla (for Excel 2003) or GERG-2008.xlam (for Excel 2007 ─ 2021/Microsoft 365) on the various Windows operating systems [Windows 2000 or XP (32-bit), Windows Vista, Windows 7, 8 and 10 (32-bit/64-bit)].

The GERG-2008 software is also available with a 64-bit DLL that can be integrated into the 64-bit versions of Excel 2010 ─ Excel 2021/Microsoft 365 on the 64-bit operating systems from Windows XP to Windows 11 using the supplied 64-bit Excel Add-In GERG-2008.xlam. Worksheets developed in a 32-bit version of Excel with GERG-2008 function calls can thus continue to be used in a 64-bit version of Excel without any changes.

In addition, a 32-bit .NET DLL of the GERG-2008 software is also available, which can be integrated into the .NET programming languages (Visual C#, Visual C++ or Visual Basic) of Microsoft Visual Studio.

The software GERG-2008 is not free of charge and is distributed by the Engineering office Dr.-Ing. N. Kurzeja.

 

Please note that an equivalent software package is also available for the reference equation of state IAPWS-IF97 and for more than 95 pure substances by the software FluidCal. Further information on the entire software range can be found at https://www.thermo.ruhr-uni-bochum.de/thermo/wagner.html.en.

Contact:

Engineering office Dr.-Ing. N. Kurzeja
feos-software
Hevener Mark 26
D-58455 Witten
Germany
phone: +49 (0)2302 279849
mobile: +49 (0)175 224 8598

Norbert.Kurzeja@ruhr-uni-bochum.de

The engineering office works in the field of development and distribution of thermodynamic software as well as in research on calorimetric measurements of gross calorific values and on the behavior of pure fluids in the so-called critical area. Examples are the publications

Kurzeja, N., Span, R. Accurate measurements of the gross calorific value of methane by the renewed GERG calorimeter. Published within the Featured Collection of J. Phys. Chem. Ref. Data 48, 043103 (2019). https://doi.org/10.1063/1.5110054

Wagner, W., Kurzeja, N. Letter to the editor. Int. J. Thermophys. 32 (2011), 549-552. https://doi.org/10.1007/s10765-011-0945-7

Kurzeja, N., Tielkes, Th., Wagner, W. The nearly classical behavior of a pure fluid on the critical isochore very near the critical point under influence of gravity. Int. J. Thermophysics 20 (1999), 531-561. https://doi.org/10.1023/A:1022657121329

Wagner, W., Kurzeja, N., Pieperbeck, B. The thermal behavior of fluid substances in the critical region - experiences from recent pρT measurements on SF6 with a multi-cell apparatus. Fluid Phase Equilibria 79 (1992), 151-174. https://doi.org/10.1016/0378-3812(92)85127-T

 

Example calculations made with the GERG-2008 software

The following screenshots show examples of calculations carried out with the software for the GERG-2008 reference equation of state for natural gases and similar mixtures. The calculation of various thermodynamic properties for a 14-component natural gas mixture for typical pipeline and VLE conditions is shown in Figures 1 and 2, respectively. Figure 3 shows the calculation of selected thermodynamic properties in the liquid phase for an eight component LNG-like mixture. Figure 4 displays the phase envelope calculation for a 14-component natural gas mixture. Of course, a user specific Excel spreadsheet with the desired GERG-2008 function calls can be designed as well or any desired GERG-2008 function or subroutine can be called within Excel via a user specific VBA script.

zww_soft_gerg_p2

Figure 1  Example screenshot of the calculation of several thermodynamic properties for a 14 component natural gas mixture for typical pipeline conditions using the exported functions of the dynamic link library GERG2008.dll from within a Microsoft Excel spreadsheet.

 

zww_soft_gerg_p3

Figure 2  Example screenshot of the calculation of several thermodynamic properties for a 14 component natural gas mixtures for VLE conditions using the VBA function TPFLASH from within a Microsoft Excel spreadsheet.

 

zww_soft_gerg_p4

Figure 3  Example screenshot of the calculation of several thermodynamic properties for an eight component LNG-like mixture in the homogeneous liquid phase using the VBA function TPFLASH from within a Microsoft Excel spreadsheet.

 

zww_soft_gerg_p5

Figure 4  Example screenshot of the phase envelope calculation for a 14 component natural gas mixture using the VBA function PHASENV from within a Microsoft Excel spreadsheet.