## Introduction

The compressibility factor (z-factor) of gases is used to correct the volume of gas estimated from the ideal gas equation to the actual value. It is required in all calculations involving natural gases.

The z-factor is the ratio of the volume occupied by a given amount of a gas to the volume occupied by the same amount of an ideal gas:

$$z = \frac{{V_{\text{actual}} }}{{V_{\text{ideal}} }}$$
(1)

Substituting for $$V_{\text{ideal}}$$ in the ideal gas equation

$$PV_{\text{actual}} = znRT$$
(2)

For generalization, the z-factor is expressed as a function of pseudo-reduced temperature and pressure (Trube 1957; Dranchuk et al. 1971; Abou-kassem and Dranchuk 1975; Sutton 1985; Heidaryan et al. 2010).

Dranchuk et al. (1971) defined pseudo-reduced temperature and pressure as the ratio of temperature and pressure to the pseudo-critical temperature and pressure of natural gas, respectively:

$$T_{pr} = \frac{T}{{T_{pc} }} , \quad P_{pr} = \frac{P}{{P_{pc} }}$$
(3)

The pseudo-critical properties of gas are the molar abundance (mole fraction weighted) mean of the critical properties of the constituents of the natural gas:

$$T_{pc} = \mathop \sum \limits_{i = 1}^{n} y_{i} T_{ci} ,\quad P_{pc} = \mathop \sum \limits_{i = 1}^{n} y_{i} P_{ci}$$
(4)

As a function of specific gravity (air = 1.0), Sutton (1985) provides

$$T_{pc} = 169.2 + 349.5{{\gamma_{g} }} - 74.0\gamma_{g}^{2}$$
(5)
$$P_{pc} = 756.8 - 131.07\gamma_{g} - 3.6\gamma_{g}^{2}$$
(6)

A plot of 5346 data points covering a full range of pseudo-reduced temperatures $$(1.15 \le T_{pr} \le 3)$$ and pseudo-reduced pressures $$(0.2 \le P_{pr} \le 15)$$ is shown in Fig. 1

### Implicit z-factor correlations

The three most popular correlations for calculating the z-factor are implicit. The three correlations, described in the following subsections, are well known for their accuracies, almost unit correlation of regression coefficients and low maximum errors.

#### Hall and Yarborough’s correlation (Trube 1957)

Hall and Yarborough’s correlation is a modification of the hard sphere Carnahan–Starling equation of state, with constants developed through regression, and 1500 data points extracted from Standing and Katz’s original z-factor chart, as shown in Fig. 2.

$$z = \frac{{A_{1} P_{pr} }}{y},$$
(7)

where y is the root of the following equation:

\begin{aligned} & - A_{1} P_{pr} + \frac{{y + y^{2} + y^{3} - y^{4} }}{{(1 - y)^{3} }} - A_{2} y^{2} + A_{3} y^{{A_{4} }} = 0 \\ & A_{1} = 0.06125te^{{ - 1.2(1 - t)^{2} }} ,\quad A_{2} = 14.76t - 9.76t^{2} + 4.58t^{3} , \\ & A_{3} = 90.7t - 242.2t^{2} + 42.4t^{3} ,\quad A_{4} = 2.18 + 2.82t, \quad t = \frac{1}{{T_{pr} }} \\ \end{aligned}

#### Dranchuk and Abou-Kassem’s correlation (Abou-kassem and Dranchuk 1975)

This is an eleven-constant modification of the Benedict–Webb–Rubin equation of state. The constants were calculated using a regression method, with 1500 data points extracted from standing and Katz’s chart.

$$z = \frac{{0.27P_{pr} }}{{yT_{pr} }},$$
(8)

where y is the root of the following equation:

\begin{aligned} & \left[ {R_{5} y^{2} (1 + A_{11} y^{2} )e^{{( - A_{11} y^{2} )}} } \right] + R_{1} y - \frac{{R_{2} }}{y} + R_{3} y^{2} - R_{4} y^{5} + 1 = 0 \\ & R_{1} = A_{1} + \frac{{A_{2} }}{{T_{pr} }} + \frac{{A_{3} }}{{T_{pr}^{3} }} + \frac{{A_{4} }}{{T_{pr}^{4} }} + \frac{{A_{5} }}{{T_{pr}^{5} }}, \quad R_{2} = \frac{{0.27P_{pr} }}{{T_{pr} }} \\ & R_{3} = A_{6} + \frac{{A_{7} }}{{T_{pr} }} + \frac{{A_{8} }}{{T_{pr}^{2} }},\quad R_{4} = A_{9} \left( {\frac{{A_{7} }}{{T_{pr} }} + \frac{{A_{8} }}{{T_{pr}^{2} }}} \right), \quad R_{5} = \frac{{A_{10} }}{{T_{pr}^{3} }} \\ & A_{1} = 0.3265, \quad A_{2} = - 1.0700, \quad A_{3} = - 0.5339, \quad A_{4} = 0.01569, \\ & A_{5} = - 0.05165, \quad A_{6} = 0.5475, \quad A_{7} = 0.7361, \quad A_{8} = 0.1844, \\ & A_{9} = 0.1056, \quad A_{10} = 0.6134, \quad A_{11} = 0.7210 \\ \end{aligned}

#### Dranchuk, Purvis and Robinson’s Correlation (Dranchuk et al. 1971)

This is a further modification of the earlier obtained DAK correlation. The DPR has eight constants and requires less computational workload to obtain the z-factor.

$$z = \frac{{0.27P_{pr} }}{{yT_{pr} }},$$
(9)

where y is the root of the following equation:

\begin{aligned} & \left[ {T_{4} y^{2} (1 + A_{8} y^{2} )e^{{( - A_{8} y^{2} )}} } \right] + 1 + T_{1} y + T_{2} y^{2} + T_{3} y^{5} + \frac{{T_{5} }}{y} = 0 \\ & T_{1} = A_{1} + \frac{{A_{2} }}{{T_{pr} }} + \frac{{A_{3} }}{{T_{pr}^{3} }},\quad T_{2} = A_{4} + \frac{{A_{5} }}{{T_{pr} }}, \quad T_{3} = \frac{{A_{5} A_{6} }}{{T_{pr} }}, \quad T_{4} = \frac{{A_{7} }}{{T_{pr}^{3} }}, \quad T_{5} = \frac{{0.27P_{pr} }}{{T_{pr} }} \\ & A_{1} = 0.31506237, \quad A_{2} = - 1.04670990, \quad A_{3} = - 0.57832720, \quad A_{4} = 0.53530771, \\ & A_{5} = - 0.61232032, \quad A_{6} = - 0.10488813, \quad A_{7} = 0.68157001, \quad A_{8} = 0.68446549 \\ \end{aligned}

These correlations are effective; however, they do not converge (or converge on wrong pseudo-reduced density values) when the temperature of the systems is close to the critical temperature. In addition, they are computationally expensive. It is these limitations that necessitated the development of the current explicit correlations.

### Explicit correlations

Explicit correlations do not require an iterative procedure. Therefore, they do not have the problem of convergence as opposed to implicit correlations. One of the best explicit correlations for evaluation of the z-factor was given by Beggs and Brills (1973). More recent ones are Heidaryan et al. (2010), Azizi et al. (2010) and Sanjari and Lay (2012) correlations. A short description of some of the explicit correlations is presented in the following subsections.

#### Brill and Beggs’ compressibility factor (1973)

$$z = A + \frac{1 - A}{{e^{B} }} + Cp_{pr}^{D} ,$$

where

\begin{aligned} A & = 1.39(T_{pr} - 0.92)^{0.5} - 0.36T_{pr} - 0.10, \\ B & = (0.62 - 0.23T_{pr} )p_{pr} + \left( {\frac{0.066}{{T_{pr} - 0.86}} - 0.037} \right)p_{pr}^{2} + \frac{{0.32p_{pr}^{2} }}{{10^{E} }} \\ C & = 0.132 - 0.32\log (T_{pr} ), \;D = 10^{F} , \\ E & = 9(T_{pr} - 1)\;{\text{and}}\; F = 0.3106 - 0.49T_{pr} + 0.1824T_{pr}^{2} \\ \end{aligned}

#### Heidaryan, Moghdasi and Rahimi’s Correlation

Heidaryan et al. (2010) developed a new explicit piecewise correlation using regression analysis of the z-factor experimental value for reduced pseudo-pressure of fewer and >3 (Table 1). The correlation has a total of 22 constants, with a discontinuity at $$P_{pr} = 3$$ (Fig. 2) and correlation regression coefficient of 0.99,963.

$$z = \ln \left( {\frac{{A_{1} + A_{3} \ln (P_{pr} ) + \frac{{A_{5} }}{{T_{pr} }} + A_{7} \left( {\ln (P_{pr} )} \right)^{2} + \frac{{A_{9} }}{{T_{pr}^{2} }} + \frac{{A_{11} }}{{T_{pr} }}\ln (P_{pr} )}}{{1 + A_{2} \ln (P_{pr} ) + \frac{{A_{4} }}{{T_{pr} }} + A_{6} \left( {\ln (P_{pr} )} \right)^{2} + \frac{{A_{8} }}{{T_{pr}^{2} }} + \frac{{A_{10} }}{{T_{pr} }}\ln (P_{pr} )}}} \right)$$
(11)

For some petroleum engineering applications, it is often necessary to compute the derivative of z-factor with respect to pressure or temperature. A function that is discontinuous at a certain point is not differentiable at that point (O’Neil 2012). Therefore, the explicit correlation developed by Heidaryan et al. (2010) cannot be used to evaluate the derivative of the z-factor with respect to the pseudo-reduced pressure at $$P_{pr} = 3$$ (Fig. 3).

#### Azizi, Behbahani and Isazadeh’s Correlation

Azizi et al. (2010) presented an explicit correlation with 20 constants for a reduced temperature range of $$1.1 \le T_{pr} \le 2$$ and reduced pressure range of $$0.2 \le P_{pr} \le 11$$. The correlation used 3038 data points within the given ranges.

$$z = A + \frac{B + C}{D + E},$$
(12)

where

\begin{aligned} A & = a T_{pr}^{2.16} + b P_{pr}^{1.028} + c P_{pr}^{1.58} T_{pr}^{ - 2.1} + d\ln \left( {T_{pr}^{ - 0.5} } \right) \\ B & = e + f T_{pr}^{2.4} + g P_{pr}^{1.56} + h P_{pr}^{0.124} T_{pr}^{3.033} \\ C & = i\ln \left( {T_{pr}^{ - 1.28} } \right) + j\ln \left( {T_{pr}^{1.37} } \right) + k\ln \left( {P_{pr} } \right) + l\ln \left( {P_{pr}^{2} } \right) + m\ln (P_{pr} )\ln (T_{pr} ) \\ D & = 1 + n T_{pr}^{5.55} + o P_{pr}^{0.68} T_{pr}^{0.33} \\ E & = p\ln \left( {T_{pr}^{1.18} } \right) + q\ln \left( {T_{pr}^{2.1} } \right) + r\ln (P_{pr} ) + s\ln \left( {P_{pr}^{2} } \right) + t\ln (P_{pr} )\ln (T_{pr} ) \\ \end{aligned}
\begin{aligned} a = 0.0373142485385592; \quad b = - 0.0140807151485369; \quad c = 0.0163263245387186; \quad d = - 0.0307776478819813; \quad e = 13843575480.943800; \quad f = - 16799138540.763700; \quad g = 1624178942.6497600; \quad h = 13702270281.086900; \quad i = - 41645509.896474600; \quad j = 237249967625.01300; \quad k = - 24449114791.1531;\quad l = 19357955749.3274; \quad m = - 126354717916.607;\quad n = 623705678.385784;\quad o = 17997651104.3330; \quad p = 151211393445.064;\quad q = 139474437997.172;\quad r = - 24233012984.0950; \quad s = 18938047327.5205;\quad t = - 141401620722.689; \end{aligned}

#### Sanjari and Nemati’s Correlation

Using 5844 data points, Sanjari and Lay (2012) developed an explicit correlation for the z-factor. This correlation, as with Heidaryan et al. (2010) correlation, has different constants for the values of $$P_{pr}$$ below and above 3, but a total of 16 constants (Table 2). The procedure for calculating the z-factor is as follows:

$$z = 1 + A_{1} P_{pr} + A_{2} P_{pr}^{2} + \frac{{A_{3} P_{pr}^{{A_{4} }} }}{{T_{pr}^{{A_{5} }} }} + \frac{{A_{6} P_{pr}^{{(A_{4} + 1)}} }}{{T_{pr}^{{A_{7} }} }} + \frac{{A_{8} P_{pr}^{{(A_{4} + 2)}} }}{{T_{pr}^{{(A_{7} + 1)}} }}$$
(13)

This correlation, however, is less efficient when compared with that of Heidaryan et al. (2010). Its regression correlation coefficient is 0.8757 and its error rate at a certain point can be as high as 90 per cent. For instance, the actual value of z from the experiment for a $$P_{pr}$$ of 15 and a $$T_{pr}$$ of 1.05 is 1.753, but this correlation gives a value of 3.3024. Therefore, the actual maximum error for this correlation is 104.3206 %.

To resolve the limitations in the application of the existing explicit correlations, a single correlation that is continuous over the entire range of pseudo-reduced pressure is required.

## New explicit z-factor correlation

A new explicit z-factor is developed as a multi-stage correlation based on Hall and Yarborough’s implicit correlation. The implicit correlation was rearranged to return a value of y using an approximate value of z. The y-values on the right side of the expression were replaced by $$\left( {A_{1} P_{pr} /z} \right)$$. Non-linear regression was performed using the derived model. The resulting correlation for reduced density is given in Eq. 15, while Eq. 14 provides an extra iteration to bring the results closer to those obtained by Hall and Yarborough. The constants for these two equations are shown in

Table 3. The z-factor chart shown in Fig. 4 was generated from this new correlation:

$$z = \frac{{ DP_{pr} (1 + y + y^{2} - y^{3} )}}{{(DP_{pr} + Ey^{2} - Fy^{G} )(1 - y)^{3} }}$$
(14)
$$y = \frac{{ DP_{pr} }}{{\left( {\frac{{1 + A^{2} }}{C} - \frac{{A^{2} B}}{{C^{3} }}} \right)}},$$
(15)

where

\begin{aligned} t & = \frac{1}{{T_{pr} }}, \\ A & = a_{1} te^{{a_{2} (1 - t)^{2} }} P_{pr} , \quad B = a_{3} t + a_{4} t^{2} + a_{5} t^{6} P_{pr}^{6} , \\ C & = a_{9} + a_{8} tP_{pr} + a_{7} t^{2} P_{pr}^{2} + a_{6} t^{3} P_{pr}^{3} \\ D & = a_{10} te^{{a_{11} (1 - t)^{2} }} , \quad E = a_{12} t + a_{13} t^{2} + a_{14} t^{3} , \\ F & = a_{15} t + a_{16} t^{2} + a_{17} t^{3} ,\quad G = a_{18} + a_{19} t \\ \end{aligned}

### Linearized z-factor isotherms

Given that the reduced temperature and pressure fall within $$1.15 \le T_{pr} \le 3$$ and $$6 \le P_{pr} \le 15$$, the first nine constants can be used to predict z with a correlation regression coefficient of 0.99899. For this range of pseudo-reduced properties, the simplified single-stage correlation of the z-factor is given by

$$z = \frac{{1 + A^{2} }}{C} - \frac{{A^{2} B}}{{C^{3} }}$$
(16)

A plot of Eq. 16 is shown in Fig. 5.

A careful analysis of Eq. 16 shows that it can be rewritten in the following form:

$$zC = 1 + MP_{pr}^{2} \left( {1 - \frac{B}{{C^{2} }}} \right)$$
(17)

The values of M are chosen to be a function of reduced temperature and a regression analysis performed to extend the applicability of Eq. 17 to cover the ranges $$1.15 \le T_{pr} \le 3$$ and $$0.2 \le P_{pr} \le 15$$. For this range of values of reduced temperature and pressure, M is given by

\begin{aligned} & M = m_{1} t^{2} e^{{m_{2} (1 - t)^{2} }} , \\ & m_{1} = 0.1009332,\quad m_{2} = 0.7773702 \\ \end{aligned}

It should be noted that B and C maintain the same definition as in Eq. 16. Hence, a graph of $$zC$$ against $$P_{pr}^{2} \left( {1 - \frac{B}{{C^{2} }}} \right)$$ gives straight lines passing through the point $$\left( {P_{pr}^{2} \left( {1 - \frac{B}{{C^{2} }}} \right) = 0, zC = 1} \right)$$ with slopes M. A plot of the straight line form of the z-factor is shown in Fig. 6.

## Results and discussion

Figure 7 shows the cross plot of the z-factor from the new correlation against the measured values. The cross plots show that the plotted points fall on the unit slope line through the origin, which implies that the new correlation reproduces the measured values to a considerable degree of accuracy.

Table 4 shows the statistical detail of the constants of the new correlation. The narrowness of the 95 per cent confidence interval is in agreement with the near-zero P-values. This implies that the probability that these values could have been developed by chance is negligible, which signifies that the new correlation is reliable (Wolberg 2006).

As shown in Table 5, within the range of pseudo-reduced temperatures $$(1.15 \le T_{pr} \le 3)$$ and pseudo-reduced pressures $$(0.2 \le P_{pr} \le 15)$$, Eq. 14 outperforms Heidaryan et al.’s (2010) correlation in terms of correlation regression coefficient, average percentage error and root mean square of error, with the exception of maximum percentage error. Most importantly, the new correlation is continuous over the entire pseudo-pressure range. Therefore, it would allow for computation of the derivatives of the z-factor over the whole range $$(0.2 \le P_{pr} \le 15)$$, which is not possible with other explicit correlations.

An application of the new correlation shown in Eq. 17 produces a good correlation of regression of 0.9999 between $$z_{\exp } C$$ and $$1 + MP_{pr}^{2} \left( {1 - \frac{B}{{C^{2} }}} \right)$$. The maximum relative error is the same as that in Eq. 14. This maximum error is shown in Fig. 8 to occur at $$P_{pr} = 2$$ and $$T_{pr} = 1.15$$.

Plots of the z-factors generated using the three most recent explicit correlations (Sanjari and Lay 2012; Heidaryan et al. 2010; Azizi et al. 2010) were compared with those generated using Eqs. 14 and 16 (Fig. 9). While Sanjari and Lay (2012) and Azizi et al. (2010) show marked deviations from the unit line, Heidaryan et al. (2010) and Eqs. 14 and 16 fall on the unit line. This shows that the correlations of Heidaryan et al. (2010) and Eqs. 14 and 16 (and by extension Eq. 17) are better at predicting the values of the z-factor than those of Sanjari and Lay (2012) and Azizi et al. (2010). Since these functions have no point of discontinuity, they can be used in applications where the derivative of the z-factor with respect to its independent variables is required.

### Example calculations

With Figs. 1 and 5, evaluate and compare the compressibility factor of a 0.7 gravity gas at 2000 psig and 150 °F.

From Sutton’s (1985) correlation,

$$T_{pc} = 169.2 + 349.5(0.7) - 74.0(0.7)^{2} = 377.59R$$
$$P_{pc} = 756.8 - 131.07(0.7) - 3.6(0.7)^{2} = 663.29{\text{psig}}$$

#### Solution 1

$$T_{pr} = \frac{150 + 460}{377.59} = 1.6155, \quad P_{pr} = \frac{2000}{663.29} = 3.0153$$

From Fig. 10, $$z = 0.83$$

#### Solution 2

$$t = \frac{1}{{T_{pr} }} = 0.619, \quad B = a_{3} t + a_{4} t^{2} + a_{5} t^{6} P_{pr}^{6} = 0.6670$$
$$C = a_{9} + a_{8} tP_{pr} + a_{7} t^{2} P_{pr}^{2} + a_{6} t^{3} P_{pr}^{3} = 1.5829, \quad P_{pr}^{2} \left( {1 - \frac{B}{{C^{2} }}} \right) = 6.6713$$

From Fig. 11,

$$zC\left( {T_{pr} = 1.6155, P_{pr}^{2} \left( {1 - \frac{B}{{C^{2} }}} \right) = 6.6713} \right) = 1.32 \to z = \frac{1.32}{1.5829} = 0.8339$$

The problem can also be solved using Eq. 14 directly:

$$z = \frac{{ DP_{pr} (1 + y + y^{2} - y^{3} )}}{{\left( {DP_{pr} + Ey^{2} - Fy^{G} } \right)(1 - y)^{3} }}$$
(18)
$$y = \frac{{ DP_{pr} }}{{\left( {\frac{{1 + A^{2} }}{C} - \frac{{A^{2} B}}{{C^{3} }}} \right)}} ,$$
(19)

where

\begin{aligned} & A = a_{1} te^{{a_{2} (1 - t)^{2} }} P_{pr} = 0.62708, \quad D = a_{10} te^{{a_{11} (1 - t)^{2} }} = 0.02934 \\ & E = a_{12} t + a_{13} t^{2} + a_{14} t^{3} = 6.56232,\quad F = a_{15} t + a_{16} t^{2} + a_{17} t^{3} = - 17.08860 \\ & G = a_{18} + a_{19} t = 3.80547, \quad y = \frac{{ DP_{pr} }}{{\left( {\frac{{1 + A^{2} }}{C} - \frac{{A^{2} B}}{{C^{3} }}} \right)}} = 0.10869 \\ \end{aligned}

Therefore,

$$z = \frac{{ DP_{pr} \left( {1 + y + y^{2} - y^{3} } \right)}}{{\left( {DP_{pr} + Ey^{2} - Fy^{G} } \right)\left( {1 - y} \right)^{3} }} = 0.8242$$

## Conclusions

A simple accurate correlation for evaluating the z-factor that can be linearized has been developed. This correlation performs excellently in the ranges $$1.15 \le T_{pr} \le 3$$ and $$0.2 \le P_{pr} \le 15$$. It is simple and single-valued. A noteworthy advancement is that the new correlation is continuous over the full range of pseudo-reduced pressures $$(0.2 \le P_{pr} \le 15)$$. This will widen its applicability to include cases such as the evaluation of natural gas compressibility, in which the derivative of the compressibility factor with respect to the pseudo-reduced pressure is required. For the range outside the coverage of this correlation, implicit correlations can be applied; however, this new explicit correlation can be used to provide an initial guess to speed up the iteration process.