TUBING SYSTEM PERFORMANCE PROFILING OF DRY GAS WELLS USING NEWTON RAPHSON ITERATION METHOD

This paper focusses on the use of Newton Raphson iteration in determining gas compressibility factor (z) while performing tubing system performance for dry gas wells through the development of a computer model (TBG_SPARK). However, tubing performance analysis performed on the case study (Well-A and Well-B) revealed that the production system of Well-B performed better – since its tubing size and wellhead pressure was lower than that of Well-A. Also, investigations made using modified data revealed that, lower tubing sizes and higher wellhead pressures yield higher gas rates. Conversely, reverse was the case when wellhead pressures were not varied.


INTRODUCTION
The production rate of a gas well is mostly reliant on the mechanical configuration of the wellbore, fluid properties, reservoir conditions and a number of other factors. There are several ways to determine gas well's performance. One approach is to employ the use of Tubing Performance Relationship (TPR) curve [1]. This curve is usually used to indicate the performance of natural gas as it flows through the tubing to the surface.
Prior to the determination of the deliverability of a gas production system, it is imperative to first develop an algorithm that will specify the pressure drops at each node of the gas production system. However, the gas compressibility factor, which is a key parameter essential for the specification of the TPR curve requires a numerical iterative method in providing its solution so that it could be utilized in a software. Available methods of obtaining gas deviation factor from standard charts are time consuming and are somewhat less proficient, as errors in calculations are almost inevitable. This has made the task to be somewhat arduous and thus has created a necessity on the development of a simplified operational computer model which will help in the determination of the gas production rate of a well thus graphically demonstrating its performance. Consequently, this paper is aimed at developing a computer model that will utilise Newton Raphson iterative method in determining z while performing tubing performance for dry gas wells, in a bid to facilitate an optimum gas flow rate determination.

Mathematical model theoretical framework
Rawlins and Schellhardt [2] proposed a mathematical affiliation between gas flow rate and pressure after performing sufficient analysis on flow data acquired from a huge number of gas wells. The mathematical relationship is expressed as follows: where Qg represent gas flow rate, Mscf/day; Pr is average reservoir pressure, psi; n are exponent; C are performance coefficient, Mscf/day/psi 2 .
In 2002, Ahmed [3] postulated that the coefficients of back-pressure, C is usually determined from evaluating gas well test data. However, in this paper, the values of C and n were assumed to be known and was therefore not calculated. Equation 1 is therefore used to specify the Inflow Performance Relationship for gas wells. According to Guo et al. [4], there are basically two methods for calculating the pressure drops across the tubing for dry gas wells. They are: 1. Average compressibility and temperature method; 2. Cullender and Smith method.
Average compressibility and temperature method computes an average value for compressibility factor and temperature with the assumption that these conditions are constant throughout the tubing. The computed average values are meant to be put in equations (2) and (3) to determine bottom hole flowing pressures across the tubing. This method is reliable for a single phase flow of compressible fluid without liquid holdups. It is not applicable to two phase flowas it would give inaccurate results. Conversely, Cullender and Smith approach computes gas compressibility factor as a function of temperature and pressure. Moreover, the major drawback of this method as stated by Fadairo and Olalekan [5] is that, it is arduous and time consuming to use. In this paper, Average compressibility and temperature method was selected over Cullender and Smithsince the former offers an easier and faster approach than the later.
In 2015, Gromotka [1] proposed that Inflow Performance Relationship (IPR) curve is a good approach to evaluate the production performance of a gas reservoir. The IPR curve plots the gas flow rate against the bottomhole pressure. However, TPR and IPR curves are usually plotted against bottomhole pressures to obtain optimum production rates and the bottomhole flowing pressure [4]. In 2019, Fan and Sarica [6] described the system that combines TPR (Outflow) and IPR (Inflow) as "nodal analysis". The two curves can be indicated in same chart as shown in Figure 1. The points where the two curves meet show the natural production rates. It is possible for the two curves to intersect twice. Invariably, when this occurs, it indicates that one of the points is certainly unstable [1]. In 2018, Reza et al. [7] identified nodal analysis as a renowned engineering approach which can be used to improve performance of oil and gas production systems. Katz and Lee [9], in their research, proposed that the tubing performance curves can be specified by using the following relationship: where Ptpr represent the pressure specified for the tubing, are average compressibility factor; is density of fluid; θ are inclination angle of tubing; P is pressure; are average temperature; L are conduit length.
However, the following equation as proposed by Guo [10] in 2002, was employed in this paper to determine fanning friction factor for fully turbulent flow in rough pipes: where di are internal diameter of pipe, is roughness of pipe, are fanning friction factor.
In 2007, Guo et al. [4] suggested that since average compressibility factor is a function of pressure itself, a numerical procedure like Newton-Raphson iteration is necessary to solve equation (2) for bottom-hole pressure. This computation can be executed spontaneously using a computer model. Over the years, the Standing-Katz [11] z-factor chart is still widely used as a practical source of natural gas compressibility factors [12]. Consequently, there has been an urgent need for a simple mathematical representation of that chart [3]. Ahmed [3] presented three correlations that may be used to calculate z, namely; Hall-Yarborough, Dranchuk-Abu-Kassem and Dranchuk-Purvis-Robinson. Moreover, Hall and Yarborough [13] Method was used in this paper because of its competence for estimating z at pseudo-reduced temperatures greater than 1.0.
In 1973, Hall and Yarborough [13] offered an equation-of-state that correctly indicates the Standing and Katz zfactor chart. Hall and Yarborough suggested the following mathematical procedure: where Ppr are pseudo-reduced pressure, t is reciprocal of the pseudo-reduced temperature, i.e., Tpc/T, Y are the reduced density that can be obtained as the solution of the following equation: Employing the use of Newton Raphson's algorithm, where initial guess Y k and ( ) are given by equation (12) and equation (13) respectively.

Description of computer model (TBG_SPARK)
The computer model (TBG_SPARK) developed in this paper is a production engineering toolkit that is used to demonstrate the tubing performance of dry gas wells. The computer model uses the average compressibility and temperature method in specifying the Tubing Performance Relationship (TPR) curves of gas wells. In the determination of the average compressibility factor, , the computer model (TBG_SPARK) employs Hall Yarborough Methodwhich requires the use of an iteration method due to its complexity. Also, TBG_SPARK model can be used to provide a chart of TPR and IPR which indicates the operating pressure and operating flowrate of the production system for gas wells. More so, with the roughness of the tubing known, the model automatically calculates the Darcy Wiesbach friction factor thus facilitating the pressure points calculations for TPR. The software was developed using Microsoft Visual Studio. The splash screen of TBG_SPARK software is as shown in Figure 2.

Mathematical models used for computer model development
In the course of demonstrating the tubing performance, a curve is required (TPR curve). Yet, it is not ideal to specify this curve alone while describing tubing performance of gas wells. It is either TPR is considered with choke performance at the surface or better still, it is considered with the inflow performance of the reservoir (IPR). Hence, two main mathematical models were employed in this paper: Tubing Performance Relationship model (TPR) and Inflow Performance Relationship (IPR) Model. They are respectively expressed in equation (2) and equation (1).

Assumptions made
In the course of specifying mathematical models to describe the tubing performance of natural gas wells, the following assumptions were made: 1. The natural gas well concerned is a non-associated one i.e. the model is only applicable to a Non-Associated Gas (NAG) well; 2. A single phase gas flow occurs in the tubing string (dry gas well); 3. Reservoir pressure conditions for the natural gas well system is not high enough as to cause a two-phase flow in the tubing string during production; 4. The flow regime of gas is in the tubing is turbulent.

Computer Model for performing tubing performance
Due to the series of complex correlations and equations required in specifying the tubing performance of a nonassociated gas well, it is often necessary to develop an efficient algorithm that will facilitate the determination of pressure variables, show the pressure profile of the tubing in a chart and most importantly, suggest upon comparisons, the best tubing size that would yield optimum performance. In 2020, Nwanwe et al. [14] used MATLAB to develop a model that predicts optimum tubing size for vertical oil wells. However, this paper uses C# programming language to profile Tubing System Performance for dry gas wells. The flowchart for the TBG_SPARK software is as shown in Figure 3 a and b.  Fig. 3.a. Function flowchart for TBG_SPARK computer model. Fig. 3.b. Tubing performance flowchart for TBG_SPARK computer model. However, Elsevier published data were employed in the validation of the computer model developed in this paper. These data are represented in Table 1. Also, in order to evaluate the effect of tubing size as well as wellhead pressure on the tubing performance, several modified data were used. The modified data points are shown in Table  2. A number of runs were made on the developed computer model (TBG_SPARK) while results obtained are presented in the next section of this paper.

RESULTS AND DISCUSSION
This section presents and discusses the results obtained from using the TBG_SPARK software in determining tubing performance of dry gas wells.
The calculated variables for Well-A are indicated in Figure 4 and Figure 5. However, from Figure 4 it can be observed that the average gas compressibility factor ( ) was estimated to be 0.8382 after eight iterations. This calculation was performed with the use of the developed computer model in this paper (TBG_SPARK). The average compressibility factor of the natural gas is a very paramount parameter required in the specification of the Tubing Performance Relationship (TPR) curve. Also, the Absolute Openhole Flow (AOF) and fanning friction factor were calculated as 1912.7 Mscf/day and 0.017397 respectively. Subsequently, these estimated parameters were employed by the computer model in the calculation of flowrates and bottomhole flowing pressure variables for TPR and IPR respectively. These variables are adequately illustrated in Figure 5. Tubing performance relationship curve specified by the computer model (TBG_SPARK) is illustrated in Figure 6. The curve is slightly sloped and not entirely curved thus, indicating that there is a single phase flow in the tubing. Also, since the curve produced is not a J-curve, it implies that the frictional force between the natural gas and the tubing is lowthus, there is no liquid holdup. Matching the IPR and TPR curves as shown in Figure 6 gave bottomhole flowing pressure and flowrate of 1090 psi and 1475 Mscf/day respectively.   Pressure traverse variables were also calculated by the use of the computer model. Tubing pressure profile as shown in Figure 7 describes the pressure gradient along the tubing for the natural gas production system. The curve however started at 800 psi (which is the tubing head pressure) at depth zero and terminated at a pressure of 1090 psi (which is the operating pressure of the natural gas production system in the wellbore) at depth 10,000 ft. Similarly, for Well-B the operating pressure and flowrate were determined as 1198 psi and 1495 Mscf/day respectively. Average compressibility was estimated to be 0.8268 after 10 iterations (see Figure 8). A match of TPR and IPR curves performed on Well-B is shown in Figure 9. Pressure traverse chart is indicated by Figure 10. Nonetheless, it was observed however that Well-B yielded a higher gas flowrate rate than that of well-A. This is perhaps attributed to the fact that the tubing size of Well-B (which is 1.995 in) is lower than that of Well-A (2.559 in). Also, since the tubing head pressure of Well-B (i.e. 750 psi) is lower than that of Well-A (i.e. 800 psi), production rate of Well-B is favourable.   The tubing performance plot for Mod-1, Mod-2, Mod-3 and Mod-4 are provided by TBG_SPARK computer model as shown in Figure 12. Moreover, a slight modification was performed on Well-A data by varying its tubing size (2" and 3.5"). Tubing performance plot upon varying tubing size is illustrated in Figure 11. Gas production rates were observed to have increased with increasing tubing size while using the same tubing head pressures for each scenario. This was not the case for the tubing performance plot illustrated in Figure 12. Instead, it was observed that the least tubing size yielded the highest gas production rates. Nonetheless, this behaviour as shown in Figure  12 is attributed to the fact that, the tubing head pressure for the lowest tubing size is also the least. Thus, the tubing head pressure has a paramount effect on the tubing performance of a natural gas production system. Results obtained by running a tubing performance analysis using TBG_SPARK are illustrated in Table 3 and explicitly explained using a bar chart as shown in Figure 13. Hence, as visualized in Figure 13, it can be deduced 3.5"

5.5"
that an increase in the bottom hole flowing pressure results in a corresponding decrease in the gas flow rate and vice versa. Conventionally, a decrease in the bottomhole flowing pressure will increase the drawdown (i.e. Pr -Pwf) thus causing a corresponding increase in the productivity index. This hypothesis is justified in the chart shown in Figure 13.  13. Comparative analysis chart on tubing sizes and gas flowrate.

Error Analysis on results obtained by TBG_SPARK
Error analysis for Well A is shown in Figure 14. This analysis was performed by TBG_SPARK upon each iteration step by computing the difference between old and new values of compressibility factors (using Hall Yarborough Method) and expressing it as a ratio to new values. As seen in Figure 14, it took eight iterations for Well A to converge (i.e. reach a minimum percentage error less than 0.0001 %) with a compressibility factor of 0.8382. Similarly, for Well B, it took ten iterations steps to reach convergence with a compressibility factor of 0.8268 ( Figure 15). The estimated compressibility factors were plugged into equations 2 and 3 to specify TPR for each wells.

CONCLUSIONS
The computer model, TBG_SPARK: a production engineering toolkit, has beyond reasonable doubt proved its competence in demonstrating the tubing performance of natural gas wells. The model utilized the Darcy Weisbach correlation in the determination of the fanning friction factor of the tubing string. Hall-Yarborough model was incorporated into the computer model thus enabling it to compute the average gas compressibility factor and subsequently specifying the Tubing Performance Relationship (TPR) curve for gas wells. Also, in a bid to determine the operating conditions for pressure and gas flowrates of natural gas wells, Inflow Performance Relationship (IPR) curve was also specified by the developed computer model -TBG_SPARK. A match of IPR and TPR curves (Nodal analysis) were performed by the computer model (TBG_SPARK) so as to obtain the bottomhole flowing pressure (Pwf) and optimum gas flow rate. Two wells were considered in this paper: Well-A and Well-B. Tubing performance analysis performed on these wells revealed that the production system of Well-B performed bettersince its tubing size as well as its tubing head pressure is lower than that of Well-A. Pressure traverse curves were generated for each well conditions by TBG_SPARK to illustrate the pressure behaviour in tubing throughout the length of the tubing string. Modified data were used to evaluate the performance of gas wells with respect to tubing size as well as tubing head pressure. Nonetheless, these parameters have proved to influence gas flow rates of natural dry gas wells either positively or negatively.
To sum up, this paper has shown that average gas compressibility factor can be determined in the tubing of natural gas wells by using non-linear equations proposed by Hall-Yarborough. Thus, just by the input of some known PVT parameters, average compressibility factor is calculated without the use of charts. Also, tubing size of natural gas wells can affect the gas flow rate. Lower tubing size results in a corresponding increase in the production rates of gas wells. Nonetheless, reverse is the case when the tubing head pressure is kept constant while varying the tubing size. Thus, wellhead pressure as well as tubing size can affect the production rates of natural gas wells either positively or negatively as the case maybe.