Study on Distribution of Wellbore Temperature in Gas Drilling with Gradient Equations

Precise calculation of gas temperature profile is the key to gas drilling design. It is traditionally assumed that the gas temperature distribution in the wellbore is equal to the formation temperature, without considering the influence of fluid flow and Joule-Thomson cooling effect. This paper puts forward a gradient equation method for gas temperature distribution in wellbore considering gas flow and Joule-Thomson local cooling of the bit. The method applies pressure, temperature, density, and velocity equations to gas flow in drillstrings and annulus. The solution of the gradient equation is in the form of the fourth-order Runge-Kutta equation. Bottom wellbore temperatures measured at depths of 700 to 2000m in an actual well are consistent with those predicted by the gradient method. Due to the Joule-Thomson cooling effect at the bit nozzle, the temperature drops by about 30C. The sensitivity analysis is carried out by gradient method, and the results show that the temperature drop range of different nozzle sizes can reach 60C due to the Joule-Thomson cooling effect. Stable temperature curves can be established within a few minutes of the gas cycle. Due to the influence of gas flow and Joule-Thomson cooling, the gas temperature in the wellbore deviates significantly from the geothermal temperature in the formation under the flow condition. The temperature of the gas in drillstrings increases as the drill depth increases and then decreases rapidly near the bottom of the hole. As the gas flows upward along the annulus, the gas temperature rises first, surpasses the formation temperature, and then decreases gradually along the geothermal gradient trend.


Introduction
Gas drilling (drilling with air, nitrogen, etc.) has usually been used for increasing rate of penetration (ROP) in hard rock formations, reducing lost circulation in fractured or low-pressure formation, avoiding reservoir damage in water-sensitive formation, or finding the unconventional tight-sand reservoir [1][2][3][4]. However, gas drilling has some disadvantages such as highly inconsistent in many areas for rock failure or toxic characteristics in high sulfur-containing formations [5,6].
Gas drilling and mud drilling have different fluid characteristics in the wellbore. Mud is generally incompressible, but gas is compressible. The mud's speed or kinetic energy barely changes, while friction increases the temperature.
The velocity or kinetic energy of the gas increases along the direction of flow as the pressure drop increases, and the temperature of the gas may also increase or decrease. Due to the Joule-Thomson cooling effect, the temperature drops sharply as the gas passes through the bit nozzle. Conventional gas temperature distribution in the wellbore is assumed to be equal to the formation temperature, and the influence of gas flow and Joule-Thomson cooling effect is not considered. Therefore, the precise calculation of gas temperature profile is very important for the design of gas drilling operations.
Many scholars have described the heat transfer process in drilling fluid circulation from the perspective of conservation of mass and energy. A transient heat transfer model based on energy conservation theory is established [7]. Raymond first proposed a method for calculating wellbore temperature under transient and quasi-steady-state conditions based on the law of conservation of energy [8]. Based on Raymond's model [9,10], a transient heat transfer method from drill pipe to annulus is proposed. The temperature distribution in the wellbore and undisturbed formation temperatures under different operating conditions is given. The wellbore heat transfer model is further applied to the flow field calculation in foam drilling process [11]. According to the structure characteristics of multilayer casing and cement ring, the heat transfer process during drilling is simulated by numerical calculation method [12]. Wooley analyzed the wellbore temperature distributions at different drilling stages, including circulating, static, and open pump [13]. Lee estimated formation temperature and thermal properties based on heat loss generated by drilling [14]. In the process of simulating gas fog drilling in geothermal well, the cuttings model of gas fog drilling is established, and the gas velocity [15] is solved skillfully by using the numerical technique of an unknown quadratic equation. The computer model and numerical calculation method for determining wellbore temperature field are given [16,17]. However, the heat transfer process between the wellbore and the formation is not described in detail. Ramey's theoretical model is applied to steam thermal recovery well to calculate the wellbore temperature distribution [18]. The empirical formula of multiphase heat transfer is derived from the wellbore temperature distribution model [19,20]. Based on Raymond's theoretical model and wellbore structure characteristics, a one-dimensional transient heat transfer model of wellbore and a two-dimensional transient heat transfer model of formation are established. Beirute proposed a circulating shut-in temperature profile simulator [21] based on wellbore numerical calculations. Thermal stress occurs in the wellbore as temperature changes [22]. Computer programs for the different hot zones and shut-in phases of the wellbore and formation were used [23]. Romero studied a method for predicting deepwater well temperature [24]. Estimation of total transient temperature during mud drilling is given [25][26][27]. The relationship between erosion wear of drill pipe and gas flow rate is established through numerical and experimental study of erosion wear of drill pipe in gas drilling [28].
The researchers mostly simulate mud drilling temperature distribution, but rarely gas drilling temperature distribution. Pressure, density, and velocity profiles are not given simultaneously. In the implementation of gas drilling, gas injection volume and gas injection pressure are important parameters for equipment selection. At the same time, wellbore temperature distribution is conducive to understanding the thermal stress state of wellbore rock, so it is very important to calculate the relevant pressure, temperature, and flow rate [29,30]. Based on the pressure, velocity, density, and temperature equations of gas flow in drillstrings and annulus, the gradient equation method for predicting the gas distribution in wellbore is presented. The steadystate heat transfer between gas flow in wellbore and formation and the unsteady-state heat diffusion transfer coefficient in formation are assumed. The gradient equation is solved by the fourth-order Runge-Kutta equation.

Mathematical Model
2.1. Heat Transfer Model of Wellbore. The circulation of the gas drilling system is shown in Figure 1. Gas flows down in drillstrings and up in annulus. Cuttings are carried to the surface by gas flow. The gas drilling cycle is divided into three sections. First, the gas flows in drillstrings from the injection device down to drill bit. The gas then flows out of drillstrings through the nozzles of drill bit and into annulus at the bottom of the wellbore. Finally, the gas and cuttings move up the annulus and leave the annulus at the ground surface.
T p and T a are the gas temperature in drillstrings and annulus,°C; T pi and T po are the surface temperature inside and outside drillstrings,°C; T w is the temperature of wellbore wall,°C; T f is the temperature of formation,°C.
In gas drilling, the gas temperature distribution in the wellbore is different from that in the formation. It transfers heat to the gas through conduction, convection, and other different heat transfer. The transfer of heat can go through four stages. First, heat is transferred from formation at infinity to wellbore walls, cement, or casing. Second, in annulus, thermal convection transfers from wellbore wall to flowing gas and the outer wall of drillstrings. Heat is then transferred to the inner wall of drillstrings. Finally, heat convection is transferred from the inner wall of drillstrings to the gas flowing inside drillstrings. The heat exchange system is shown in Figure 2.
λ p and λ f are the conductivity of drillstrings and the formation, respectively. h pi , h po , and h w are the convective heat transfer coefficients between gas and the inner wall of drillstrings, the outer wall of drillstrings, and the well wall, respectively.

Gradient
Equations. The governing equations are transformed into gradient equations of pressure, temperature, velocity, and density [31]. The temperature of the gas at each stage depends on a different heat transfer process. Due to heat convection and conduction, heat is exchanged in various areas of the drilling system and gas temperature varies along the flow path.
Assuming the following: where ρ p is the density of gas inside drillstrings, kg/m 3 ; V p is the velocity of gas inside drillstrings, m/s; and z is depth, m.
According to the mass conservation equation, the velocity gradient equation can be obtained as follows: (2) The Pressure Gradient Equation.
Momentum conservation equation: where p p is the pressure of gas inside drillstrings, MPa; d p is the equivalent diameter of drillstrings, m; g is the gravitational acceleration, m/s 2 ; θ is the hole deviation angle,°; and f p is the friction coefficient of gas flow in drillstrings.
The pressure gradient equation can be obtained by substituting the velocity gradient equation (2) into the momentum conservation equation (3).
Energy conservation equation: where Q pa is the heat transfer quality of gas in drillstrings, J/kg; _ m p is the mass flow rate of gas in drillstrings, kg/s; h p is the specific enthalpy of gas in drillstrings, W/(m 2 .°C); C p is the specific heat capacity of gas, J/(kg·°C); and α JT is the Joule-Thomson coefficient.
The Joule-Thomson coefficient is small and can be ignored when gas flows in drillstrings, because the cross section of the flow channel does not change sharply when gas flows in wellbore. And α JT ≈ 0. Equation (5) becomes The heat transfer from drillstrings to annulus is as follows: where r po is the outer radius of drillstrings, m; U pa is the heat transfer coefficient inside and outside drillstrings, W/(m 2 ·°C).

Gas
Strings Annulus Formation

Geofluids
The convective heat transfer on the inner surface of drillstrings is as follows: where Q pi is the convective heat transfer on the inner surface of drillstrings, J/kg. The conductive heat transfer in the wall of drillstrings is as follows: where Q pw is the conductive heat transfer in the wall of drillstrings, J/kg; r pi is the inner radius of drillstrings, m. The convective heat transfer on the outer surface of drillstrings is as follows: where Q po is the convective heat transfer on the outer surface of drillstrings, J/kg. According to the assumed conditions, the heat transfer in the wellbore is stable heat transfer. The heat transfer is the same in equations (8)- (10). The heat transfer coefficient expression is as follows: The temperature gradient equation can be obtained by substituting the heat transfer formula (8) into energy conservation equation (7). where (4) The Density Gradient Equation.
Gas state equation: where ρ is the density of gas, kg/m 3 ; M is gas molecular weight, kg/mol; R is gas constant, 8.314 J/(mol·K); Z g is gas compressibility factor; p is pressure of gas, MPa; and T is temperature of gas,°C.
Take the differential form of the coordinate z for the gas equation of state.
Substituting the temperature gradient equation (13) and pressure gradient equation into equation (4), the density gradient equation (15) can be obtained as follows:

Gradient Equations in Annulus
(1) The Velocity Gradient Equation. Mass conservation equation: where ρ a is the density of gas inside the annulus, kg/m 3 ; V a is the velocity of gas in annulus, m/s.
According to the mass conservation equation, the velocity gradient equation can be obtained as follows: (2) The Pressure Gradient Equation.
Momentum conservation equation: where p a is the pressure of gas in annulus, MPa; d a is the equivalent diameter of the annulus, m; and f a is the friction coefficient of gas flow in annulus.
The pressure gradient equation can be obtained by substituting the velocity gradient equation (18) into the momentum conservation equation (19).

(3) The Temperature Gradient Equation.
Energy conservation equation where Q af is the heat transfer quality from annulus to formation, J/kg; _ m a is the mass flow rate of gas in annulus, kg/s; and h a is the specific enthalpy of gas in annulus, W/(m 2 ·°C).
The Joule-Thomson coefficient is small and can be ignored when gas flows in annulus, because the cross section of the flow channel does not change sharply when gas flows in the wellbore. And α JT ≈ 0. Equation (21) becomes The heat transfer from annulus to wall of the wellbore is as follows: where Q aw is heat transfer from annulus to wellbore wall, J/kg; r w is the radius of wellbore, m.
The heat transfer in formation around the wellbore is unstable heat transfer, and the unstable heat transfer quantity is as follows: where f ðt D Þ is dimensionless temperature function of borehole wall. According to equations (24) and (25), the heat transfer formula in unit time can be obtained as follows: The temperature gradient equation can be obtained by substituting the heat transfer formula (26) into energy conservation equation (23). where ð27Þ (4) The Density Gradient Equation.
Substituting the temperature gradient equation (27) and pressure gradient equation into equation (20), the density gradient equation (14) can be obtained as follows: The function value for y i ðz 0 Þ on the outlet and the inlet of z 0 is denoted as y i 0 . The node z i = z i−1 + Δz solution is expressed by fourth-order Runge-Kutta equation as follows: θ 4 i = Y i z 0 +Δz, y 0 1 +Δzθ 3 1 , y 0 2 +Δzθ 3 2 , y 0 3 +Δzθ 3 3 , y 0 4 +Δzθ 3 2.4. Initial and Boundary Conditions. At the initial moment, it is assumed that the gas in drillstrings and annulus are in a 5 Geofluids thermal equilibrium condition, and the temperature of the gas is equal to the formation at the same depth. The following equations are the initial conditions.
where T s is the surface ground temperature,°C; α is the geothermal gradient,°C/m. The inlet gas temperature and outlet pressure are the boundary conditions, respectively.
where T 0 is the inlet of drillstring temperature,°C; p 0 is the outlet of annulus pressure, MPa.
The gas temperature at the bit nozzles drops suddenly due to the Joule-Thomson cooling effect. Assuming the cooling process is an isentropic process, the temperature drop is calculated by the following equation [32].
where k is the gas specific heat ratio and for air k = 1:4; H is the wellbore depth, m.

Calculation
Steps. Calculation steps are as follows: (1) The surface pressure is the atmospheric pressure and the surface temperature is assumed to be a known value. The calculated values of the node are used as the initial values for the next node. The gas temperature and pressure in the annulus are calculated from surface to bottom of the wellbore. The gas temperature and pressure in drillstrings are calculated from bottom to surface of the wellbore. The calculating process does not stop until the inlet of drillstrings is reached (2) The calculated inlet temperature is compared with the inlet temperature that is the injection pressure

Model Validation. The well SWC602 in Southwest
China Oilfield is drilled with gas. The temperature of the well was measured during the process of gas drilling from depth of 800 m to 2000 m. It is reasonable to use the measured temperature to verify the model. The basic parameters of well SWC602 are listed in Table 1, such as geometric parameters, gas physical parameters, formation parameters, and operation parameters.
The calculated and measured temperature values along the well depth of 800 m-2000 m are shown in Figure 3. The temperature values calculated by the model are basically in agreement with the measured ones. Therefore, the accuracy and reliability of the model are feasible.

Analysis of Simulation
Results. After the model validation, SWC602 was selected as a reference for simulation. The temperature inside the drillstrings and annulus is complex compared to static formation temperatures, as shown in Figure 4. The gas temperature in the drillstrings increases as the depth of the well increases and then decreases rapidly towards the bottom of the well. As the gas flows through the annulus, the gas temperature rises first, then exceeds the formation temperature, and then decreases gradually along the thermal gradient. Temperatures near the wellhead are slightly lower than surface temperatures. Due to the Joule-Thomson cooling effect, the bit nozzle temperature dropped by about 3°C.

Sensitivity Analysis
3.3.1. Drilling Depth. As can be seen from Figure 5, the gas temperature in the annulus increases with drilling depth.
When the wellbore depth is shallow, the outlet gas temperature is lower than the surface temperature. However, with the increase of drilling depth and bottom hole formation temperature, the heat source temperature and heating period of heating annular air body will increase, and the flow temperature of outlet gas is close to or higher than the surface temperature. Table 1, the simulated drilling depth is 3000 m, and the equivalent diameters of the nozzles are 57 mm, 47 mm, 37 mm, and 27 mm, respectively. The simulation results are shown in Figure 6. With the decrease of nozzle equivalent diameter, the temperature of annular air decreases sharply, which is mainly affected by the Joule-Thomson cooling effect at the nozzle. The temperature drop due to the Joule-Thomson cooling effect can be as high as 50°C, depending on the size of the nozzle. As the gas flows upward in the annulus, it is gradually heated by the formation. At a certain depth, the gas temperature in the annulus is almost no longer related to the temperature drop at the bit. At the same time, the temperature inside the drillstrings changes only slightly toward the bottom of the hole, less impact on the upper drillstrings. Table 1, the simulated drilling depth was 3000 m, and the gas circulation time was 1 min, 1 h, 10 h, 100 h, and 1000 h, respectively. The simulation results are shown in Figure 7. With the exception of outlet gas temperature, the temperature in the annulus and drillstrings varies little as the cycle time increases. This indicates that the radial heat transfer of gas in the wellbore is only significant in areas with large   [1][2][3], the wellbore temperature distribution pattern near the bottom of the wellbore is very close to the trend, which can further verify the validity of the model in this paper. Temperature drop in gas due to the Joule-Thomson cooling effect is sensitive to the pressure drop that is mainly affected by the diameter of the bit nozzle, which is just illustrated as Figure 6.

Circulating Time. According to the parameters in
If the bit nozzle diameter is sufficiently large that the equivalent cross-sectional area is equivalent to the crosssectional area inside drillstrings, there will be little temperature drop at the nozzle. However, in general, it is desirable to reduce the bottom borehole temperature as much as possible, because the lower bottom borehole temperature is conducive to the stability of the borehole wall. Furthermore, the bottom borehole rock will change from plastic to brittle, which is beneficial to rock breaking and improving drilling efficiency.

Conclusion
The gradient equations of density, pressure, temperature, and velocity for calculating gas temperature distribution in gas drilling are presented. The temperature was compared with that measured by actual gas drilling. The proposed method is effective. The conclusions are as follows.
(1) The actual bottom wellbore temperature in the depth range of 700 m~2000 m is basically consistent with that predicted by gradient method. Due to the Joule-Thomson cooling effect, the bit nozzle temperature dropped by approximately 30°C (2) There is a deviation between the gas temperature in the wellbore and the temperature in the formation under flow conditions. The temperature of the gas in drillstrings increases with the depth of the well and then decreases rapidly as it approaches the bottom of the well. Gas flows through the bit nozzle into the annulus and the temperature increases. As the gas flows upward through the annulus, the gas temperature first exceeds the formation temperature and then gradually decreases along the geothermal gradient (3) With the increase of drilling depth and formation temperature in the bottom hole, the heat source temperature and heating period of heating annular air body increase, and the flow temperature of outlet gas is close to or higher than the surface temperature (4) The gradient method was used for sensitivity analysis. The results show that the temperature of nozzles of different sizes can be reduced by 50°C due to the Joule-Thomson cooling effect. A stable temperature curve can be established within a few minutes of gas circulation

Suggestion
Therefore, as long as the gas drilling equipment capacity is sufficient and the rock carrying conditions can be met, the nozzle diameter can be reduced as much as possible, and the temperature difference between the bottom hole airflow and the formation can be increased.