#### Abstract

Wavy horizontal sections are typically encountered in horizontal gas wells, which will result in gas accumulation on top of the wavy horizontal sections. This gas accumulation can be a problem and may trigger gas kick or blowout accident while tripping and pulling this gas into the vertical section. In this paper, a numerical model for gas accumulation and gas migration in the wavy horizontal sections of the horizontal gas well is developed; meanwhile, the gas accumulation and gas migration process is numerically investigated. The results show that the gas exhausting time in the wavy horizontal section increases with the increase of the wellbore curvature and the critical drilling fluid flow velocity for gas exhausting increases with the increase of the wellbore curvature. When the drilling fluid flow velocity is higher than the critical drilling fluid flow velocity for gas exhausting, no gas accumulation will occur. With all other parameter values set constant, the number of the wavy horizontal sections has a great effect on the gas-liquid flow pattern while it has little effect on the efficiency of the gas exhausting. This work provides drilling engineers with a practical tool for designing the drilling fluid flow velocity to avoid gas kick or blowout accident in horizontal gas well drilling.

#### 1. Introduction

Horizontal wells are widely used in petroleum and natural gas development, and they have many advantages over traditional vertical wells, such as increased drainage area and high production [1–3]. However, since the wellbore trajectory in horizontal drilling is difficult to control, the horizontal section is always not completely horizontal, and sometimes wavy horizontal sections are formed. The gas in the wavy horizontal sections cannot migrate in the direction of flow owing to buoyancy; it results in pockets of gas accumulation (see Figure 1). The gas accumulation can be a problem and may trigger gas kick or blowout accident while tripping and pulling this gas into the vertical section [4–6].

In the past decades, several key studies have been conducted on horizontal well control and gas migration. Vefring et al. established new models for the gas slip and rise velocities in near horizontal wells and various models for different gas removal mechanisms [7]. Chexal et al. proposed a comprehensive drift flux model [8], but the model is complicated for field applications because the fluid distribution is formed by the correlation of multiple empirical curve fitting parameters through the distribution parameters. Hibiki and Ishii proposed a drift velocity equation; it is applied to slug flow [9]. Gao et al. simulated the storage and removal processes of the gas slug by experiments and analyzed the migration of the gas slug [10]. In recent years, the drift speed equation proposed by Woldesemayat and Ghajar considers the influences of surface tension and pipeline diameter on drift speed apart from the influences of pipeline direction and system pressure [11]. Wang et al. analyzed the variation of wellbore pressure along the depth of the well during the time of gas kick in a horizontal well [12]. However, previous studies are primarily for completely horizontal sections, there are few research studies on the gas accumulation and gas migration in the wavy horizontal sections of the horizontal gas well, and few people used numerical simulation to study them. In this paper, a numerical model for gas accumulation and gas migration in the wavy horizontal sections of the horizontal gas well is developed; meanwhile, the gas accumulation and gas migration process is numerically investigated.

#### 2. Physical Model and Governing Equations

##### 2.1. Physical Model

The diameter of the borehole in the wavy horizontal sections of the horizontal gas well is 0.2159 m. Gas is accumulated on the top of the wavy horizontal sections. The schematic diagram of the gas accumulation in the wavy horizontal sections of the horizontal gas well is shown in Figure 2.

Establishing a reasonable two-dimensional physical model of the wavy horizontal sections of the horizontal gas well according to the actual situation is the key to the simulation of gas accumulation and gas migration. In order to reduce the calculation amount and improve the simulation efficiency, only the fluid domain is established. The borehole diameter is 0.2159 m, and the horizontal distance on both sides of the model is 1 m. A horizontal wellbore physical model with different wavy horizontal sections is established, as shown in Figure 2.

ICEM CFD is selected as the meshing software, and quadrilateral meshing is adopted [13, 14]. The ratio of the length and width of the mesh is not greater than 5. According to the characteristics of fluid motion, the wall grid is locally encrypted to ensure accurate simulation of gas-liquid two-phase characteristics, as shown in Figures 3 and 4.

**(a)**

**(b)**

**(c)**

##### 2.2. Governing Equations

The gas-liquid flow process in the wavy horizontal sections of a horizontal gas well is unstable. Even if the boundary conditions remain the same, the physical quantity of the fluid during the flow still has strong pulsation, so the simulation model should be run in a turbulent state [15–18]. By numerical analysis method and simulating it, the results can be compared with the actual situation. Considering the gravity factor, VOF model and RNG k- turbulence model are selected to simulate the flow changes under different working conditions. The governing equation is established as follows:(1)Continuity equation:(2)Momentum equation:(3)Turbulence equation: Turbulent energy equation *k* is(4) Dissipation rate equation is

In the expression, is the fluid velocity, m/s; is gravitational acceleration, m/s^{2}; are the spatial coordinates; is the fluid density, kg/m^{3}; is static pressure, Pa; is the fluid viscosity, Pa·s; is volume force, N; is the effective fluid viscosity, Pa·s; is time, *s*; is turbulent kinetic energy, *J*; is the turbulent energy dissipation; are constants.

##### 2.3. Physical Parameter

Gas-liquid density and dynamic viscosity are shown in Table 1.

##### 2.4. Equation Discretization and Solving Method

An unsteady, implicit separation, and solving algorithm is used. The governing equations to be solved are continuity equations that satisfy mass conservation, momentum conservation, energy conservation, momentum equations, energy equations, and turbulence equations that take turbulence properties into account [19]. The finite volume method is used to discretize the governing equations, and a suitable discretization format is selected. The pressure interpolation format selects the physical strength weighting format; the interpolation formats of density, momentum, turbulence energy, turbulence dissipation rate, and energy select the first-order upwind style, high stability, and fast calculation speed, and volume fraction interpolation format selects the geometric reconstruction format; pressure-speed coupling algorithm selects PISO algorithm [20–22].

##### 2.5. Setting of Definite Conditions

Definite solution conditions consist of a combination of boundary conditions and initial conditions.(1)Inlet conditions: velocity inlet is used, and the inlet speed is set to 1.2 m/s, 1.6 m/s, and 2 m/s. The inlet boundary is set to a gas inlet volume fraction of 0. The turbulence definition method selects the hydraulic diameter and turbulence intensity.(2)Outlet conditions: the pressure outlet and turbulence definition method are used to select the hydraulic diameter and turbulence intensity.(3)Initial conditions: considering the influence of gravity, set *Y* = −22129.81 m/s^{2} under the fluent environment panel. In the initialization panel, select inlet initialization and then perform partial repair on the initial volume fraction of the gas in the Patch panel to achieve the setting of the initial concentration of gas in the model. It is set to record a gas-liquid composition cloud chart every 100 time steps. After the simulation is completed, an animation can be formed to observe the flow pattern.

##### 2.6. Convergence Conditions

Fluent software uses residuals to reflect the convergence of the calculations and judges whether the iterative process converges through the final iterative residual output of each equation for each iteration step [23]. The calculation process ends when the residuals of each equation reach the set convergence criteria. In this model, all residuals are set to 1.0 × 10^{−4}, the time step is set to 0.01 s, and the maximum iteration step is set to 20 steps [24–28]. The total time steps are specifically set according to the actual flow of gas-liquid two-phase tube flow.

#### 3. Simulation Results and Analysis

There are various combinations of gas accumulation simulations in the wavy horizontal sections of horizontal gas wells. Here, simulation studies of gas accumulation in single wavy horizontal section and complex wavy horizontal sections are performed.

##### 3.1. Simulation Analysis of Single Wavy Horizontal Section

###### 3.1.1. Influence of Curvature

According to the actual working conditions, wavy horizontal sections with different curvatures are selected, and models of gas accumulation of wavy horizontal sections with different curvatures are established to simulate gas-liquid two-phase flow. The diameter of the wavy horizontal section is 0.2159 m, the total horizontal length is 5 m, the drilling fluid flow velocity is 1.6 m/s, the initial gas accumulation at the top is 0.3 m^{3}, and the curvature of the wavy horizontal section is 0.2, 0.3, 0.4, and 0.5. As displayed, red is drilling fluid and blue is gas.

It can be seen from Figure 5 that, at a speed of 1.6 m/s and different curvatures of 0.2, 0.3, 0.4, and 0.5, the gas in the wavy horizontal section of the horizontal gas well is exhausted, and there are no phenomenon of gas accumulation and inability of exhaust. The gas pocket formed by the accumulated gas is carried forward by the drilling fluid. When the gas pocket enters the downward section, the gas pocket cannot be exhausted directly. The front end of the gas pocket is broken into small bubbles by the shear force, and wavy horizontal section of the horizontal gas well is exhausted in the form of small bubbles. With time, the gas pocket is gradually becoming smaller and the drilling fluid pushes the bladder out of the wavy horizontal section of the horizontal gas well. As the curvature increases, the time it takes to exhaust the gas increases. Therefore, the lower the curvature of the horizontal wellbore, the less likely the gas accumulation will occur.

**(a)**

**(b)**

**(c)**

**(d)**

###### 3.1.2. Influence of Flow Rate

The borehole diameter is 0.2159 m, the total horizontal length is 5 m, the initial gas accumulation at the top is 0.3 m^{3}, the curvature is 0.3, and the drilling fluid flow velocity is 1.2 m/s, 1.6 m/s, and 2 m/s, as shown in Figure 5.

Observing Figure 6, it can be seen that when the drilling fluid flow velocity is 2 m/s, the drilling fluid directly carries the entire bladder to discharge the wavy horizontal section without shear fracture. When the drilling fluid flow velocity is 1.6 m/s, the gas formed by the accumulated gas is carried by the drilling fluid. Forward, when the gas pocket enters the downward section, the gas pocket cannot be exhausted directly, the front end of the gas pocket is broken into small bubbles by the shear force, the gas is exhausted in the form of small bubbles, and the drilling fluid is carried out by the remaining gas pocket. When the drilling fluid flow velocity is 1.2 m/s, the drilling fluid pushes the gas pocket to the downward section, the gas pocket is stationary, and the front section of the gas pocket is broken into small bubbles by the shear force to discharge the gas from the wavy horizontal section. Over time, part of the gas cannot be broken into small bubbles and stays in the wavy horizontal section, causing gas accumulation phenomenon.

**(a)**

**(b)**

**(c)**

From the above phenomenon, it can be seen that there is a critical flow rate to make the gas just exit the wavy horizontal section of the horizontal gas well. When the drilling fluid flow velocity is higher than the critical velocity, gas accumulation will not occur; when the drilling fluid flow velocity is lower than the critical velocity, gas retention will cause gas accumulation. At this time, the gas can only be exhausted by dissolving in the drilling fluid and increasing the speed of the drill pipe. In order to prevent the accumulation of gas in the wavy horizontal section, the critical flow rate needs to be determined. Therefore, this paper performed a series of gas-liquid simulation of the wavy horizontal section of the horizontal gas well with different curvatures. The simulation results are shown in Table 2.

As known from Table 2, when the curvature is 0.2, the critical drilling fluid flow velocity is 0.8 m/s; when the curvature is 0.3, the critical drilling fluid flow velocity is 1.0 m/s; when the curvature is 0.4, the critical drilling fluid flow velocity is 1.2 m/s; when the curvature is 0.5, the critical drilling fluid flow velocity is 1.3 m/s. The critical drilling fluid flow velocity increases with the curvature.

###### 3.1.3. Experimental Comparison and Verification

Gao et al. [10] analyzed the gas migration process in the undulating section of a horizontal well through experiments. In order to verify the correctness of the simulation results, the simulation results were compared with their experimental results. The gas traps in the elbows mainly bear the frictional resistance of the pipe wall in the initial state. When the bubbles enter the downdip sections, it is difficult for gas to discharge because of the buoyancy, i.e., the flow resistance. The front ends of the bubbles are crushed and separated under the liquid phase flow disturbance conditions, but only few bubbles are separated and migrate mostly in large bubble form through mainly surface tension and liquid phase friction.

The simulation results are exactly the same as the experimental results, verifying the accuracy of the simulation results.

##### 3.2. Simulation Analysis of Complex Wavy Horizontal Sections

Horizontal gas wells may have multiple wavy horizontal sections, so the total horizontal length is 20 m, the borehole diameter is 0.2159 m, the curvature is 0.2, the initial top gas accumulation is 0.98 m^{3}, and the critical drilling fluid flow velocity is 1 m/s, 1.2 m/s, 1.6 m/s, 2 m/s, and 1.5 times wavy horizontal sections and 2 times wavy horizontal sections are simulated. The simulation results are shown in Figures 6 and 7.

**(a)**

**(b)**

**(c)**

**(d)**

Observing Figure 7, it can be seen that when the drilling fluid flow velocity is 2 m/s, the drilling fluid carries gas into the downward section, and the front end of the gas pocket is sheared and broken. The remaining part is still carried by the drilling fluid to the second upward section in the form of a large gas pocket and then exhausted; when the drilling fluid flow velocity is 1 m/s, 1.2 m/s, and 1.6 m/s, the drilling fluid carries gas into the downward section, and the front end of the gas pocket shears and breaks. When the gas pocket reaches the bottom of the wavy horizontal section, it will stay and can only be exhausted by breaking into small bubbles, and, as the speed decreases, the longer the crushing time, the smaller the broken bubbles.

Observing Figure 8 shows that when the drilling fluid flow velocity is 2 m/s, the gas pocket is carried by the drilling fluid to the bottom of the wavy horizontal section, and then it stays, and then it is sheared and broken into large bubbles and migrates to the second wavy horizontal section. There is no gas accumulation at the top and it is directly exhausted; when the drilling fluid flow velocity is 1 m/s, 1.2 m/s, and 1.6 m/s, the gas pocket is carried by the drilling fluid into the downward section, the front end of the gas pocket is sheared and broken, and the gas pocket is brought by the drilling fluid to the wavy horizontal sections. At the bottom of the section, it stays and breaks into medium and small bubbles and enters the second wavy section. At the top of the second wavy section, it begins to gather into an gas pocket, and then the front end of the gas pocket is sheared and exhausted.

**(a)**

**(b)**

**(c)**

**(d)**

Observing Figures 9 and 10, we can see that when the flow velocity is the same, the curvature and the total length of wavy horizontal sections are the same, and the same waveform; the exhaust time of 1.5 wavy horizontal sections is the same as that of two wavy horizontal sections, and the curve is almost the same; therefore, the number of wavy horizontal sections has little effect on the efficiency of the exhaust.

#### 4. Conclusions

(1)In the case of the same length and the same flow velocity, the gas exhaust time increases with the increase of the curvature. Therefore, the lower the curvature of the wavy horizontal sections, the less likely it is to generate gas.(2)When the drilling fluid flow velocity is extremely large, the drilling fluid directly carries the entire gas pocket out of the wavy horizontal section without shear fracture; as the inlet flow velocity decreases, the gas pocket formed by the accumulated gas is carried forward by the drilling fluid. When the gas pocket enters the downward section, the front end of the gas pocket is broken into small bubbles by the shear force. The gas is exhausted in the form of small bubbles. When the drilling fluid flow velocity is reduced to a certain speed, the drilling fluid pushes the gas pocket downward section. Then, the gas pocket is stationary, and the front section of the gas pocket is broken into small bubbles by the shear force. Over time, some of the gas cannot be broken into small bubbles and stays in the wavy horizontal section, causing gas accumulation.(3)There is a critical flow velocity so that the gas is just completely exhausted from the wavy horizontal section. When the drilling fluid flow velocity is higher than the critical velocity, gas accumulation will not occur; when the drilling fluid flow velocity is lower than the critical velocity, gas retention will cause gas accumulation. And the critical drilling fluid flow velocity increases with the curvature.(4)When the total length and curvature of the wavy horizontal sections are the same, the number of wavy horizontal sections has a great effect on the gas-liquid flow pattern but has little effect on the efficiency of the exhaust.

#### Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

The authors gratefully acknowledge the financial support by “Thirteenth Five-Year Plan” China National Offshore Oil Corporation (CNOOC-KJ135ZDXM24LTDZJ01) and the National Science and Technology Major Project (2017ZX05009-003).