CORRECTION IMPROVES Z-FACTOR VALUES FOR HIGH GAS DENSITY

March 4, 1991
Pedro Roncada Borges PetrobrAs Rio de Janeiro A simple modification is suggested to improve the zfactor values obtained from the subroutines developed from the Dranchuk, et al.,1 and Abou-Kassem 2 equations of state. These correlations are commonly included in some software available for general use in the petroleum industry. The original subroutines, proposed by these authors, return inaccurate values for high gas density within the application range stated by the authors.
Pedro Roncada Borges
PetrobrAs
Rio de Janeiro

A simple modification is suggested to improve the zfactor values obtained from the subroutines developed from the Dranchuk, et al.,1 and Abou-Kassem 2 equations of state.

These correlations are commonly included in some software available for general use in the petroleum industry.

The original subroutines, proposed by these authors, return inaccurate values for high gas density within the application range stated by the authors.

DETECTION

During recent work, several generalized equations of state were analyzed for developing correlations and software to calculate thermodynamic properties of natural gas. Derivative and integral functions of the compressibility factor were involved.

The generalized equations of state investigated were:

  • Lee and Kesler 3

  • Hall and Yarborough 4 5

  • Dranchuk, et al.

  • Dranchuk and Abou-Kassem

All equations except the Lee and Kesler were solved by the subroutines proposed by their authors. A special subroutine was developed for the Lee and Kesler equation. It was noticed that the thermodynamic properties calculated in the region of high gas densities, at low reduced temperatures (1.0 < Tr 1.35), and high reduced pressures (12 < Pr - 30) were different, beyond reasonable limits, between the first two and last two equations.

CAUSE

Initially, to seek the cause of this problem, the compressibility factor was plotted against the reduced pressure, at several isotherms. At the problematic region, appreciable differences occurred in the compressibility factor calculated by the first two and last two equations.

Because the original subroutines were translated from Fortran to Pascal, the next logical step was to check their code to seek any errors introduced in the translation process. But everything was correct.

Remembering Hall and Yarborough's advice to scrutinize data on a density basis to check its validity when analyzing the PVT behavior of gases 4 and considering that the equations are solved for the reduced density, the next logical step was to plot this property against reduced pressure at several isotherms.

At the problematic region, the reduced density calculated with the last two equations grew uniformly until a value of 2.2. Then it became constant, creating a sharp discontinuity in the trend of growth. This is a very unexpected and physically impossible behavior. With this fact in mind, the original subroutines were analyzed. The fault was found in the following sections of Fortran.

Reference 1:

5 IF (DR1-2.2) 7,7, 6

6DR1-DR + 0.9 x (2.2-DR)

Reference 2:

12 IF (DR1 - 2.2) 14,14,13

13 DR1 = DR + 0.9 x (2.2 - DR)

SOLUTION

The 2.2 maximum value allowed for the reduced density is only sufficient to cover the range of reduced pressures (Pr-15) and temperatures (Tr-1.05) of the Standing and Katz6 graphical correlation used to supply the values to fit the coefficients of the equations. This value is insufficient to cover the extended range of reduced pressures and temperatures proposed by the authors and forces the subroutine to converge to a wrong value. After some testing, the problem was solved by changing the value of 2.2 to 3.0 in the four program lines shown in the preceding.

COMPARISON

Figs. 1 and 2 illustrate the problem and solution at the isotherm Tr - 1.05 and high reduced pressures. Fig. 1 shows the compressibility factor calculated with the original and corrected subroutine of Reference 2 and with the Hall and Yarborough equation. Fig. 2 does the same for the reduced density using the Lee and Kesler equation for comparison.

After correcting the subroutines, the differences in the thermodynamic properties calculated by the four generalized equations of state were within reasonable limits,

FINAL COMMENT

This correction does not lessen the brilliance and the merit of the extensive work of Dranchuk and coworkers but emphasizes the ghost that haunts all correlation and software developers.

Honest, extensive, and hard testing aren't enough. There is always one dormant bug waiting to pop up, even several years after its creation.

REFERENCES

  1. Dranchuk, P.M., Purvis, R.A. and Robinson, D.B., "Computer Calculation of Natural Gas Compressibility Factors Using the Standing and Katz Correlation," Institute of Petroleum Technical Series, No. IP 74-008, 1974, pp. 1-13.

  2. Dranchuk, P.M., and Abou-Kassem, J.H., "Calculation of Z Factors for Natural Gases Using Equations of State," Journal of Canadian Petroleum Technology, July-September 1975, pp. 34-36.

  3. Lee, B.I., and Kesler, M.G., "A Generalized Thermodynamic Correlation Based on Three-Parameter Corresponding States," AlChE Journal, Vol. 21, May 1975, pp. 510-527.

  4. Hall, K.R., and Yarborough, L., "A new equation of state for z-factor calculations," OGJ, June 18, 1973 pp. 82-92.

  5. Yarborough, L., and Hall, K.R., "How to solve equation of state for z-factors," OGJ, February 18, 1974, pp. 86-88.

  6. Standing, M.B., and Katz D.L., "Density of Natural Gases," Transactions AIME, Vol. 146, 1942, p. 140.

Copyright 1991 Oil & Gas Journal. All Rights Reserved.