Introduction

Joule–Thomson (JT) phenomenon explains the increase or decrease in gas mixture temperature when freely expand through a restriction such as perforations when no heat is supposed to be exchanged with the surrounding media and no external mechanical work is done (Perry and Green 1984; Reif 1965). The JT value is important and virtually dependent on the properties of gas mixture and gas flow rate rather than the exchange of heat with the surrounding which concludes the positive and negative values due to high and low gas pressure, respectively (Jeffry 2009; Pinto et al. 2013; Steffensen and Smith 1973; Ziabakhsh-Ganji and Kooi 2014; Tarom and Hossain 2017). In production engineering, the JT effect may become of interest due to its significant influence while analyzing the temperature logs especially for gas injection/production wells, evaluation of wellbore temperature profile, determination of fluid flow from multiple production layers and identification of the locations of water and gas entry point. However, the evaluation of reliable JT coefficient for gas mixtures is still a challenge for the production engineers due to the complexity involved in production and injection wells. This study aims to develop a new and reliable practical method for the evaluation of JT coefficient which can be applied for both production and injection scenarios to accurately evaluate the flowing temperature profile for injection or production wells.

The accurate prediction of JT coefficient, the accurate determination of gas compressibility factor (Z) of desired gas mixture and the variation of Z factor with temperatures at a constant pressure play a crucial role. In the light of available field and laboratory data plus whether the gas mixture compositions are known or unknown, different approaches such as equation of states (EOSs), empirical Z factor correlations can be used for the determination of gas compressibility factor (Z) and its variations due to change in temperature and pressure conditions which are required for the determination of JT coefficient. For instance, when the gas mixture compositions are known, any of the equation of states (EOSs) such as van der Waals (vdW), Soave–Redlich–Kwong (SRK), Peng–Robinson (PR) can be used for the determination of Z factor and its variations. When the compositions of gas mixture are unknown, the empirical Z factor correlations such as Beggs and Brill (1973), Bahadori et al. (2007) correlation, Heidaryan et al. (2010) correlation, Hall and Yarborough (1973) correlation and Dranchuk and Abou-Kassem (1975) are widely used as routine industry practice for the determination of Z factor.

Recently, a simplified mathematical model was developed for the prediction of JT coefficient which can be applied for the evaluation of flowing temperature profile along a gas-producing well when gas compositions of a gas mixture are unknown (Tarom and Hossain 2015). In this model, the correction factor was expressed as a function of gas gravity for a given constant pressure and temperature. Since the JT effect also depends on pressure and temperate, the previous correlation lacks effectiveness of the model to deal with the change in pressure and temperatures. In this study, a new correction factor is developed as a function of gas gravity, temperature and pressure of producing gas. The proposed correction factor named as Nathan–Mofazzal correction factor, C NM, and tested rigorously for 20 different gas mixtures and applied to evaluate the JT coefficient for gas mixtures when gas mixture compositions are unknown.

Mathematical model of the JT coefficient

The combination of hydrocarbon and non-hydrocarbon components, with methane as a main constituent, normally forms natural gases within gas reservoirs. N-alkanes (e.g. methane, ethane and propane) are mainly hydrocarbon components, and N2, CO2 and H2S are examples of the non-hydrocarbon components of natural gases. In single-phase gas cases plus referring to the concept of real gas law, PV = ZnRT, the JT coefficient for 1 mol (i.e. n = 1) of a desired gas mixture is generally expressed as (Cengel and Boles 2008):

$$ \mu_{\text{JT}} = \frac{1}{{C_{\text{p}} }}\left[ {\frac{T}{Z\rho }\left( {\frac{\partial Z}{\partial T}} \right)_{\text{p}} } \right] $$
(1)

where µ JT, C p, T, Z, ρ and P explains the JT coefficient, heat capacity, temperature, gas compressibility factor, density of gas and pressure, respectively. Also, in this equation, C p is BTU/(lb-mole °F) and ρ is lbm/ft3, whereas one BTU is equal to 5.40395 ((lbf/in2) ft3).

The estimation of the isobaric heat capacity (C p) of ideal and natural gas has been extensively studied by numerous researchers (Kareem et al. 2014); Jarrahian and Heidaryan 2014; Abou-Kassem and Dranchuk 1982). Kareem et al. (2014) presented correlation given by Eq. 1a in field unit to estimate isobaric specific heat capacity for natural gas as a function of temperature, and gas gravity based upon their generated 200 samples of natural gas mixture with methane component ranging from 0.74 to 0.9985 using normally distributed experimental design. The correlation is recommended for natural gas gravity ranging from 0.55 to 1.00 and temperature ranging from − 280 to 2240 °F.

$$ C_{\text{p}} = \left( {8.0211\gamma_{\text{g}} + 3.3359} \right) + \left( {2.0744 \times 10^{ - 2} \gamma_{\text{g}} - 4.2441 \times 10^{ - 3} } \right)T + \left( { - 8.1528 \times 10^{ - 6} \gamma_{\text{g}} + 4.8536 \times 10^{ - 9} } \right)T^{2} + \left( {1.2887 \times 10^{ - 9} \gamma_{g} - 1.1626 \times 10^{ - 9} } \right)T^{3} $$
(1a)

Determination of the JT coefficient

For prediction of the JT coefficient in Eq. 1, term \( \left( {\frac{\partial Z}{\partial T}} \right)_{\text{p}} \) needs to be evaluated. In order to achieve the goal, in this article, terms \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} \) and \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{uc}} }} \) will replace term \( \left( {\frac{\partial Z}{\partial T}} \right)_{\text{p}} \) in Eq. 1. Terms \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} \) and \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{uc}} }} \) explain the gas mixture compositions of producing gas when gas compositions are known and unknown, respectively.

For determination of term \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} \) in Eq. 1 when compositions of a desired gas mixture are known, Peng–Robinson equation of state (PR-EOS) is found to be the most reliable and appropriate method for evaluation of phase behaviour and volumetric properties of both mixture and pure fluids. Applying PR-EOS, term \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} \) can be explained as follows:

$$ \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} = \frac{{\left( {\frac{\partial A}{\partial T}} \right)_{\text{p}} \left( {B - Z} \right) + \left( {\frac{\partial B}{\partial T}} \right)_{\text{p}} \left( {6BZ + 2Z - 3B^{2} - 2B + A - Z^{2} } \right)}}{{3Z^{2} + 2\left( {B - 1} \right)Z + \left( {A - 2B - 3B^{2} } \right)}} $$
(2)

where A and B are:

$$ A = {\raise0.7ex\hbox{${aP}$} \!\mathord{\left/ {\vphantom {{aP} {\left( {\text{RT}} \right)^{2} }}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\left( {\text{RT}} \right)^{2} }$}} $$
(2a)
$$ B = {\raise0.7ex\hbox{${bP}$} \!\mathord{\left/ {\vphantom {{bP} {\text{RT}}}}\right.\kern-0pt} \!\lower0.7ex\hbox{${\text{RT}}$}} $$
(2b)

where a and b are PR-EOS mixture parameters. Details of derivation of Eq. 2 are shown in ‘Appendix 1’.

When gas mixture compositions are not available, the term \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{uc}} }} \) can be expressed by Eq. 3 (Tarom and Hossain 2015):

$$ \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{uc}} }} = \left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} \left( {\frac{{\partial T_{pr} }}{\partial T}} \right)_{{{\text{p}}_{\text{uc}} }} = \frac{1}{{T_{\text{pc}} }}\left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} $$
(3)

In Eq. 3, the Katz–Standing chart (Ahmed 1946) can be a reliable method for evaluation of term \( \left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} \). To accomplish the task of evaluation of term \( \left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} \) in Eq. 3, a correlation published by Bahrami (2012), which is a simplified mathematical form of the Katz–Standing chart, has been applied in this study. The details of mathematical derivations to evaluate term \( \left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} \) are presented in Tarom and Hossain (2015) and ‘Appendix 2’.

Correction factor, C NM

Considering Eqs. 2 and 3, it can be inferred that:

$$ \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{uc}} }} = \frac{1}{{T_{\text{pc}} }}\left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} = \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} $$
(4)

A computer program called wellbore flowing temperature profile (WTP) was developed to study the application of Eqs. 2 and 3 considering various gas mixture samples as presented in Table 1 to investigate Eq. 4 at various pressure/temperature conditions. The terms \( \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} \) and \( \left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} \) in Eqs. 2 and 3 are separately evaluated using the developed program for the considered gas mixtures (Table 1) at different pressure/temperature conditions. Considerable anomalies are observed when correction factor is considered as independent of pressure and temperature. Therefore, Eq. 4 is redefined as:

$$ \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{uc}} }} = \frac{{C_{\text{NM}} }}{{T_{\text{pc}} }}\left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} = \left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} $$
(5)

where C NM is a correction factor named as Nathan–Mofazzal correction factor which is defined as:

$$ C_{\text{NM}} = \frac{{T_{\text{pc}} *\left( {\frac{\partial Z}{\partial T}} \right)_{{{\text{p}}_{\text{kc}} }} }}{{\left( {\frac{\partial Z}{{\partial T_{\text{pr}} }}} \right)_{{{\text{p}}_{\text{uc}} }} }} $$
(6)

where C NM is the function of gas gravity (for unknown compositions), pressure and temperature.

Table 1 Gas component data

Evaluation of correction factor, C NM

Twenty random gas samples with different compositions as presented in Table 1 are considered in this study for the evaluation of proposed correction factor, C NM. The predicted correction factor, C NM, spans a large range of pressure (1000 to 5000 psi) and temperature (100–300 °F) conditions. The evaluated data are plotted in Figs. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11. The results demonstrate that the correction factor, C NM, depends on specific gravity, temperature and pressure for given gas mixtures (Table 1). This part of the study focuses on the analysis of the outcomes of ‘isotherm’ and ‘isobar’ plots to demonstrate the applied method for the evaluation of correction factor, C NM.

Fig. 1
figure 1

Calculation of C NM at 100 °F and different pressures

Fig. 2
figure 2

Calculation of C NM at 120 °F and different pressures

Fig. 3
figure 3

Calculation of C NM at 140 °F and different pressures

Fig. 4
figure 4

Calculation of C NM at 160 °F and different pressures

Fig. 5
figure 5

Calculation of C NM at 180 °F and different pressures

Fig. 6
figure 6

Calculation of C NM at 200 °F and different pressures

Fig. 7
figure 7

Calculation of C NM at 220 °F and different pressures

Fig. 8
figure 8

Calculation of C NM at 240 °F and different pressures

Fig. 9
figure 9

Calculation of C NM at 260 °F and different pressures

Fig. 10
figure 10

Calculation of C NM at 280 °F and different pressures

Fig. 11
figure 11

Calculation of C NM at 300 °F and different pressures

The correction factor, C NM plotted in Figs. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 as a function of gas specific gravity at different pressure and isothermal conditions are termed as ‘isotherm plots’ in this study. Each of the isotherm plots provides four sets of data, which are shown in blue, red, green and purple colours explaining the predicted data for pressure at 1000, 2000, 2500 and 3000 psi, respectively. A linear trend of C NM, with a negative slope from low to high specific gravity, is observed in Figs. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 for all pressures and temperatures. However, the slopes of each condition (i.e. pressure and temperature) are different. It is observed from Figs. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 that the value of C NM decreases with increase in the pressure at a given temperature and increases with increase in temperature at a given pressure for all gas mixtures considered in this study.

Therefore, the analysis of the data presented in Figs. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 demonstrates that the correction factor, C NM, not only depends on gas specific gravity (Tarom and Hossain 2015), but also depends on pressure and temperature, which can be expressed as:

$$ C_{\text{NM}} = f\left( {\gamma_{\text{g}} , P, T} \right) $$
(7)

where C NM is named as Nathan–Mofazzal correction factor and γ g, P and T indicate specific gravity, pressure and temperature of a gas mixture, respectively. The gas specific gravity, γ g, in Eq. 7 also depends on the compositions of mixture, which can be determined either using appropriate EOS for known gas compositions or empirical correlation for a particular gas mixture, when the composition of gas mixture is unknown.

Equation 7 may be derived empirically through laboratory experiment or numerically through regression analysis. The current study is based on numerical regression analysis using MATLAB. The predicted value of C NM for considered gas mixtures (Table 1) is plotted in three-dimensional Cartesian coordinate system as a function of gas gravity and temperature for constant pressure (i.e. isobar condition) and presented in Figs. 12, 13, 14 and 15. Each of the surfaces in Figs. 12, 13, 14 and 15 represents the relation of C NM with gas gravity and temperature for a constant pressure and is termed as isobar plots.

Fig. 12
figure 12

Isobar plots for natural gases in Table 1 at 1000 and 2000 psi

Fig. 13
figure 13

Isobar plots for natural gases in Table 1 at 1000, 2000, 2500 and 3000 psi

Fig. 14
figure 14

Isobar plot for natural gases in Table 1 at 5000 psi

Fig. 15
figure 15

Isobar plot for natural gases in Table 1 at different pressure conditions

Figure 12 describes the changes in C NM at low-pressure conditions (≤ 2000 psi) following a smooth trend. However, such trend becomes diverging as the gas mixture pressure increases (Fig. 13). Moreover, for the gas mixture pressure up to 3000 psi, Figs. 12 and 13 demonstrate that the value of C NM is appeared to be highest at low gas specific gravities and high gas temperature conditions. In contrast, at high gas specific gravities and low gas temperature conditions, the value of C NM appears to be the minimum. Such behaviour may describes the fact that the gas mixtures with high gas specific gravity and low temperature are likely to be in the form of liquid phase for which the JT coefficient may become negative due to the cooling effect (Jeffry 2009; Pinto et al. 2013; Steffensen and Smith 1973).

The values of C NM for different gas specific gravities and temperature conditions at 5000 psi are also plotted in Fig. 14. Figure 14 demonstrates that the trend of the changes in C NM at high-pressure conditions (≫ P pc) is fluctuating, which may involve inaccuracy of PR-EOS for gas mixture conditions near and above critical points (Pinto et al. 2013; Tarom et al. 2006; Baled et al. 2012; Danesh 1998; Chueh and Prausnitz 1967). Figure 15 also compares results for different pressure conditions of 1000, 2000, 2500, 3000 and 5000 psi.

In summary, the slope of each surfaces and the change in C NM values are observed to be different as shown in Figs. 12, 13, 14 and 15 and consequently it makes very difficult to define a unique polynomial equation as a function of gas gravity, pressure and temperature. However, it is observed from this study that C NM can be best represented in the form of surface polynomials, as presented in Eqs. 812 for considered gas mixture as presented in Table 1. In this study, it is shown in Eqs. 812 that the correction factor C NM depends on specific gravities of gas mixture to the power of three as well as temperature to the power of two for any individual pressure condition.

$$ \begin{aligned} C_{{{\text{NM }}@ 1000{\text{psi}}}} & = 1.188 - 4.703\gamma_{\text{g}} + 0.0009404T + 6.821\gamma_{\text{g}}^{2} - 0.002842\gamma_{\text{g}} T \\ & \quad + 2.301e^{ - 06} T^{2} - 3.185\gamma_{\text{g}}^{3} + 0.001578T\gamma_{\text{g}}^{2} - 1.725e^{ - 06} \gamma_{\text{g}} T^{2} \\ \end{aligned} $$
(8)
$$ \begin{aligned} C_{{{\text{NM}}@ 2000{\text{psi}}}} & = - 0.8281 + 4.225\gamma_{\text{g}} - 0.0002417T - 6.281\gamma_{\text{g}}^{2} - 0.0002337\gamma_{\text{g}} T \\ & \quad + 2.733e^{ - 06} T^{2} + 3.036\gamma_{\text{g}}^{3} + 0.0006345T\gamma_{\text{g}}^{2} - 3.138e^{ - 06} \gamma_{\text{g}} T^{2} \\ \end{aligned} $$
(9)
$$ \begin{aligned} C_{{{\text{NM}}@ 2500{\text{psi}}}} & = - 3.752 + 16.96\gamma_{\text{g}} - 0.001103T - 24.11\gamma_{\text{g}}^{2} - 0.001583\gamma_{\text{g}} T \\ & \quad + 8.574e^{ - 06} T^{2} + 10.74\gamma_{\text{g}}^{3} + 0.005694T\gamma_{\text{g}}^{2} - 1.34e^{ - 05} \gamma_{\text{g}} T^{2} \\ \end{aligned} $$
(10)
$$ \begin{aligned} C_{{{\text{NM}}@ 3000{\text{psi}}}} & = - 5.349 + 24.10\gamma_{\text{g}} - 0.001244T - 34.72\gamma_{\text{g}}^{2} + 0.0004097\gamma_{\text{g}} T \\ & \quad + 5.751e^{ - 06} T^{2} + 15.75\gamma_{\text{g}}^{3} + 0.004646T\gamma_{\text{g}}^{2} - 1.11e^{ - 05} \gamma_{\text{g}} T^{2} \\ \end{aligned} $$
(11)
$$ \begin{aligned} C_{{{\text{NM}}@ 5000{\text{psi}}}} & = - 42.08 + 174.6\gamma_{\text{g}} - 0.02104T - 196.2\gamma_{\text{g}}^{2} - 0.2556\gamma_{\text{g}} T \\ & \quad + 5.238e^{ - 04} T^{2} + 54.79\gamma_{\text{g}}^{3} + 0.3631T\gamma_{\text{g}}^{2} - 6.918e^{ - 04} \gamma_{\text{g}} T^{2} \\ \end{aligned} $$
(12)

Linear regression techniques in MATLAB have been used to fit the curves presenting polynomial Eqs. 812. Table 2 shows ‘R-square’, ‘adjusted R-square’ and ‘RMSE’ information for these polynomials which provide the accuracy of statistical measurements of the response values to fit the curves. Although the correlations proposed in Eqs. 8, 9 are based upon the gas gravity of the natural gas systems presented in Table 1, it can be noticed that the range of gas gravity of considered systems (Table 1) covers a range of gases typically seen in petroleum reservoir. Consequently, it is believed that the proposed correlations are applicable for any natural gas systems typically found in petroleum reservoir when only gas gravity of the gas system is known.

Table 2 Curve fitting and statistical measurements information

Validation of proposed model

The gas compressibility factor (Z) and term \( \left( {\frac{\partial Z}{\partial T}} \right)_{\text{p}} \) play essentially important roles for the accurate evaluation of JT coefficient and the proposed correction factor, C NM. To address this issue, a set of different gas mixtures (Table 1) are considered, and Z factor of each set of gas mixture is calculated to investigate the accuracy of proposed model. The predicted compressibility factors (Z) presented in Table 3 are compared with the Z factors calculated by reliably industrial standardised software, HYSYS, and PR-EOS including calculation of mean absolute percentage error (MAPE) as expressed in Eq. 13:

$$ {\text{MAPE}} = \frac{1}{n}\mathop \sum \limits_{1}^{n} \left| {\frac{{Z_{\text{HYSYS}} - Z_{\text{Predicted}} }}{{Z_{\text{HYSYS}} }}} \right|*100 $$
(13)
Table 3 Estimation and comparison of compressibility factors (Z) for gas mixtures in Table 1

Similarly, the predicted value of the term \( \left( {\frac{\partial Z}{\partial T}} \right)_{\text{p}} \) using proposed method and PR-EOS is shown in Table 4.

Table 4 Comparison of the predicted value of term (∂Z/∂T)p for the given gas mixture in Table 1

It can be observed in Tables 3 and 4 that the mean absolute percentage of error (MAPE) is 1.84 and 5.59%, respectively, for Z factor and the term, \( \left( {\frac{\partial Z}{\partial T}} \right)_{\text{p}} \), which warrants that proposed method can provide similar results with high level of accuracy. It is also observed that the proposed method is far simpler as compared to existing method and can be used as a simplified important tool for routine industry application.

To support the validation of this work, a range of attempts have also been made on the study to evaluate Z factors and JT coefficients and compare with different scientific sources. For instance, Z factors have been evaluated for first ten components in Table 1 at different pressure and temperature conditions. The estimated Z factors have been compared with the results from HYSYS (Table 5). Very good agreement between the calculated Z factor using this work and HYSYS is observed. Also, Z factors and JT coefficients have been evaluated for different methane–n-butane systems in the gaseous and liquid regions and compared with the works published by Sage et al. (1940) and Budenholzer et al. (1940) (Table 6) in which good agreement between results can be seen as well.

Table 5 Evaluation of Z factor at different pressure and temperature conditions
Table 6 Evaluation of Z factors and JT coefficients for different methane–n-butane systems in the gaseous and liquid regions

Conclusion

A new and simple method is developed in this study for the evaluation of JT coefficient for natural gas mixtures including reservoir conditions. A new correction factor named as Nathan–Mofazzal correction factor, C NM, is developed, which can be effectively used for the estimation of JT coefficient for gas mixtures, when the gas mixture compositions are unknown. The study demonstrates that C NM depends on gas specific gravity as well as pressure and temperature condition of the gas mixtures. Throughout of this study, ‘isotherm’ and ‘isobar’ plots have been plotted using excel spread sheet and MATLAB for the evaluation of proposed correction factor, C NM. The study demonstrates that for an isobar condition, C NM appears to be higher at lower gas specific gravity and higher temperature conditions. In contrast, for the same pressure condition, at higher gas specific gravity and lower temperature conditions, the C NM is lower. The comparison of results obtained from proposed method and that from commercial simulator, HYSYS, warrants that the proposed method can be reliably used as an important tool for routine industry environment. The scope of this proposed method can be broadened including other reliable correlations for Z factor to cover a wider range of pressure and temperature conditions.