Transient Thermo-Poroelastoplasticity Finite Element Analysis of Inclined Wellbore Stability

Wellbore instability is a crucial concern problem in highly inclined well drilling, extended reach well drilling and horizontal well drilling, particularly in high temperature and high pressure (HPHT) formations. However, few studies have concentrated on the three-dimensional inclined wellbore instability analysis considering the influence of thermo-poroelastoplasticity and filter cake. In the present study, a three-dimensional inclined wellbore stability model fully coupling thermo-poroelastoplasticity and considering filter cake is created and analyzed using finite element analysis. This model can be used for the wells with any deviation angle and azimuth angles simply by changing the far field stresses and boundary conditions. The distribution of pore pressure and wellbore stress under various deviation angles, consolidation time and temperature gradients are investigated. The research results show that, the wellbore instability problem is generally severe in the inclined wells comparing to the vertical wells. The wellbore becomes unstable as the consolidation time increases, and it is more unstable under positive temperature gradient than under negative; the filter cake can reduce the pore pressure and stress around the wellbore, it prevents the wellbore from shear failure in vertical well (deviation 0o), and prevents the wellbore from tensile failure in inclined well especially in the horizontal well (deviation 90o). The results obtained in this paper can benefit a deeper understanding of the instability mechanism of inclined wellbore.


Introduction
Wellbore instability may cause severe engineering problems in drilling operation, such as low rate of penetration (ROP), pipe-sticking, poor log quality and inadequate cement around well casing (Garrouch et al., 2001;Mclellan and Hawkes, 2001;Ewy, 1993). According to the statistics, the annual expenditure to control the wellbore instability is as high as six billion dollars in the global petroleum industry. Besides, wellbore instability delays the drilling process and time wasted accounts for over 40% of all non-productive time Liu, 2013, 2014;Yousefian et al., 2018). Wellbore instability problem is generally more server in inclined wells due to the unfavorable stress distribution, especially in HPHT formations. Therefore, it is essential to investigate the instability mechanism and its influence factors of the inclined wellbore to ensure the safety and efficiency of oil & gas drilling.
In oil & gas exploitation, the temperature gradient between the drilling mud and formation has a great influence on the stress and pore pressure distribution of the wellbore. Many researches have performed numerous studies about the wellbore stability under the effect of coupled thermo-poroelastic. The research of Biot (1941) proposed a theory coupling thermal, hydraulic and mechanical processes in a fluid saturated porous media and it had attractred the attention of many researchers. Among them, Rice and Cleary (1976), Detournay and Cheng (1988), Cui et al. (1997Cui et al. ( , 1999, Cui et al. (1998), and Santarelli et al. (1986). The constitutive equation of the thermo-poroelastic theory was firstly proposed by Palciauskas and Domenico (1982) for the nonisothermal case. Aadnoy and Chenevert (1987) studied the general behavior of inclined boreholes based on the linear elastic and isotropic theory. Wang and Dusseault (2003) analyzed the wellbore stability in hot and cold water injection wells by using the theory of conductive-convective thermo-poroelastic. The calculation model poroelastic, chemical and thermal effects was established by Chen et al. (2003), and the pore pressure and critical mud density are analyzed. Chen (2004) researched the thermoporoelastic effect on wellbore stresses in permeable rocks, the fully coupled temperature and pore pressure were decoupled in diffusivity equations for a high-permeability rock and the analytical solutions for temperature and induced stresses were proposed. Chen and Ewy (2005) presented the consistency of thermal effects between two available models for inclined borehole and studied the thermal effects of permeable and impermeable boundaries. Farahani et al. (2006) explained the effect of convective heat transfer through the developed model of thermo-poroelastic and researched the influences of temperature and pressure on wellbore stability. Zhang (2006) studied the wellbore stability in shale formations, considering the influence of the 3-D earth stress around the wellbore, chemical and thermal. The wellbore strengthening effects appear while an impermeable mud cake is formed on the permeable wellbore wall (Abousleiman et al., 2007). Wang et al. (2007) researched the pore pressure distribution nearby the wellbore based on the established porous elastic model coupling the temperature and pore pressure. Sheng et al. (2008Sheng et al. ( , 2009) presented a coupled thermo-poroelastic model for a saturated linear thermoelastic medium and researched the change of pore pressure and stress. Muller et al. (2009) focused on the evaluation of the three-dimensional borehole response, especially the plastic zone, considering the spatial variability of hydraulic and mechanical properties. Zhai et al. (2009) established a new numerical model taking both the thermal and the hydraulic diffusion into account and revealed the influences of poro-elasticity and thermo-elasticity on wellbore stability. Zhang et al. (2010) studied the effect of in-situ stresses on highly inclined wellbore stability by using the modified lade criterion. The pore thermoelastic effect on wellbore failure and its influence on borehole stability were studied by Tao and Ahmad (2010), and besides, the maximum horizontal stress and rock strength were estimated by using wellbore failure data. Tran et al. (2011) derived the analytical solutions which incorporate the influence of mud cake formation and properties on wellbore wall stress, the variation of the formation pore pressure with time and the safe drilling mud weight window. Jia et al. (2012) studied the coupled process of wellbore and discussed its influence on pore pressure, temperature and stress. Diek et al. (2012) developed a finite element model which considers the effects of thermo-poroelastic deformation, hydraulic conductivity, thermal permeability, heat transfer, pressure thermal effect and the interconvertibility of mechanical and thermal energy. Gelet et al. (2012) proposed a fully coupled finite element method which can be used to analyze the wellbore stability problem under non-isothermal conditions of thermo-elastic porous double porous media. Gaede et al. (2012) verified the analytical Amadei solution for the stress concentration around a random orientated wellbore in the anisotropic elastic medium. Goshtasbi (2013) researched the mechanical stability of three kinds of wells in seven different stress regimes and diverse orientations using FLAC3-D software, including vertical, directional and horizontal wellbores. Wang et al. (2014) studied the variety of the temperature and pore pressure nearby the wellbore in the radial direction and calculated the tangential stress of wellbore while underbalanced drilling. Manshad  The objective of the present paper is investigating the three-dimensional inclined wellbore instability considering the influence of thermo-poroelastoplasticity and filter cake. Three-dimensional fully coupled thermo-poroelastoplasticity inclined wellbore model incorporating the filter cake is carried out using finite element method. This model can be utilized for the wells with any deviation and azimuth angles just by changing the far field stresses and boundary conditions. The distribution of pore pressure and wellbore stress under various deviation angles, consolidation time and temperature gradients are investigated. The research results show that the wellbore instability problem is generally severe in the inclined wells comparing to the vertical wells. The wellbore becomes unstable as the consolidation time increases, and it is more unstable under positive temperature gradient than under negative; the filter cake can reduce the pore pressure and stress around the wellbore, it prevents the wellbore from shear failure in vertical well (deviation 0º ), and prevents the wellbore from tensile failure in inclined well especially in the horizontal well (deviation 90º ). Figure 1 presents the coordinate transformation of an inclined well, the Cartesian coordinates x', y' and z' are parallel to the maximum horizontal principal stress, minimum horizontal principal stress and overburden pressure, respectively. The corresponding coordinate transformation should be made to form the coordinates x, y, z when analyzing the stress distribution of inclined wellbore, and thus the z-axis is parallel to the wellbore axes, y-axis is parallel to the cross-section of the wellbore and x-axis is parallel to the radial direction of the borehole. The stresses around the wellbore are described using the coordinates x, y, z. The coordinates x1, y1, z1 are the projection of coordinates x, y, z on the horizontal plane.

Coordinate Transformation of the Inclined Well
The stress transformation formula of the inclined wellbore is given as Eq. (1) The formula for transforming the in-situ stress tensor is as follow：   cos cos cos sin sin sin cos 0 sin cos sin sin cos The stress components of the inclined wellbore can be obtained by substituting Eq. (2) where  is the deviation angle of the borehole, which is the angle between the borehole axis and vertical direction;  is the azimuth angle and it is the anti-clockwise angle between the projection of the wellbore axis on the horizontal plane and the direction of the maximum horizontal in-situ stress.

Thermo-Poroelastic Theory
Temperature gradient is obvious between the drilling mud and formation during drilling. In deeper formation, the temperature of drilling mud is much lower than the formation, and therefore, the wellbore rock matrix and pore medium will shrink due to the cooling effect of drilling mud. In contrast, the temperature of drilling mud is much higher in the upper formation when it is flowing back to the ground. The rock matrix and porous medium will expand because of the heating effect of drilling mud. With time increases, the influenced zone expands outwards. The schematic of the heat transfer and seepage process between drilling fluid and formation in inclined well is depicted in Fig.2. The governing equation takes into account the theory of thermo-poroelasticity which includes the constitutive transport laws. The constitutive equations are as follows: The coupled energy conservation equation and mass conservation equation are shown below: where p is the pore pressure and T is temperature. The constant α represents Biot coefficient. Km represents the drained bulk modulus of poroelastic matrix. Kf represents the bulk modulus pore fluid. ks is the mean rock thermal conductivity coefficient. km is the thermal conductivity coefficient of rock skeleton. kf is the thermal conductivity coefficient of pore fluid. βm is the thermal expansivity of rock skeleton. βf is the thermal expansivity of pore fluid. β is the Biot's modulus. βs is the undrained thermal expansivity of saturated rock. k is the rock intrinsic permeability, k=Kμ/γw. μ is the fluid viscosity. cf and cm are the fluid and rock specific heat capacity. ρm and ρf mean rock skeleton and pore fluid density. f is the body forces, and the indices i,j stand for x and y coordinate. The coefficients λ and G are elastic moduli, known as Lame's parameters, v is darcy velocity, n is porosity.
The relevant parameters in Eq.(2) can be calculated with the following equations:

Finite Element Model
It is well accepted that the spatial position of borehole can be determined by deviation and azimuth angle. However, for isotropy formation, the behavior of wellbore rock is governed by the deviation angle instead of azimuth angle if the maximum horizontal principal stress (σxx) equals to the minimum (σyy). Figure 3 sketches a borehole in an arbitrary orientation in cross formation (with an arbitrary deviation angle  ) with respect to the orthogonal coordinate frame (x', y', z'), and it also defines a cross-section orthogonal to the wellbore axis (z) and shows the far field stresses with respect to the local frame of reference (x, y, z). The borehole deviation causes a shear component stress zx  , and thus, the wellbore rock is in a three-dimensional stress state under the action of principle stresses and shear stresses. A three-dimensional finite element model of the inclined well, which takes into account of the influence of thermo-poroelastoplasticity and filter cake, is presented in this paper. It is consisted of 626 three-dimensional fully coupled temperature-pore pressure elements. This model has a specified thickness in the z-direction in which a single layer of 3D element is used to accommodate the shear components. The thickness of the model is chosen as unit length for normalization, just as shown in Fig.4. The wellbore instability problem becomes more complex when coupling the effects of pore pressure, in-situ stresses, mud pressure and temperature gradient. According to the theory of elastic-plastic mechanics, the width of the model is 10 times larger than the borehole diameter. In the simulation, the temperature and pore pressure at wellbore wall are equal to the temperature and pressure of the drilling mud, respectively. The wellbore instability is simulated using a standard finite element code, ABAQUS/Standard, and table 1 lists the parameters of the wellbore rock.
The numerical simulation process consists of three steps: In step 1, the initial geostatic stress is balanced before the borehole is generated and the well bore rock is only under the in-situ stresses and the pore pressure. In step 2, the borehole is generated and then the fully coupled thermo-poroelastoplasticity analysis is carried out using the birth-death element method. The wellbore will suffer from the mud pressure, and the temperature and pore pressure boundaries of the wellbore wall will be changed. In the last step, the fully coupled thermo-poroelastoplasticity analysis is carried out again after a filter cake formed. The pore pressure boundary will change again, transforming into weak permeable from the permeable.

Verification of Finite Element Model
According to the theory of linear porosity elasticity, the effective stress distribution around the borehole for a pore-elastic model can be calculated by using the Eq. (10) to Eq. (13) where r  ,   , z  are the radial stress, tangential stress and z-axis stress, respectively;  is Biot coefficient;  is a coefficient related to the permeable and equal to 1 when the wellbore wall is permeable, otherwise it is equal to 0; p(r) is pore pressure; pi is drilling mud pressure. In order to verify the numerical simulation method, a comparison has been made between the numerical and the analytical results. Pore-elastic model is used in numerical and analytical solutions, without considering the effect of temperature and plasticity. The deviation angle  is a constant of 30 degree in the comparison. The results are plotted in Fig.5 and Fig.6, the numerical results of radial stress and tangential stress are in good agreement with the analytical results, so as to the shear components. It demonstrates the reliability of the numerical simulation method, which is adopted in this study.

Without Filter Cake
Wellbore wall rock will be soaked in the drilling mud after the borehole generated, and seepage will take place between drilling mud and pore fluid which is strongly governed by the magnitude of pressure gradient. The drilling fluid will invade into the wellbore matrix if the drilling mud pressure in the borehole is larger than the pore pressure. In contrast, the pore fluid will seep out into the drilling mud if the pore pressure is larger. These two mechanisms will cause the redistribution of the pore pressure around the wellbore. Besides, during the drilling process, temperature gradient also exists between the drilling mud and the formation. If the temperature of drilling mud is smaller than the formation, the wellbore rock matrix and pore medium will shrink due to the cooling effect. On the contrary, the rock matrix and porous medium will expand due to the heating effect of the drilling mud with a higher temperature. In this section, it is assumed that the initial temperature of the formation is 120 ºC , the temperature gradient are +50º C and -50º C, borehole radius is 108 mm, and the drilling mud pressure is 30 MPa. Stresses along the two red paths indicated in Fig. 7 are plotted in the subsequent analyses.  Figure 8 presents the pore pressures around the wellbore in vertical well under various consolidation times (1h, 10h and 50h) and temperature gradients (+50º C, -50º C). For cases with positive temperature gradient, a significant increase of pressure is observed near the wellbore at early stage in x-axis direction. With time increases, the peak of the pore pressure is reduced and moved away from the wellbore. For cases with negative temperature gradient, the negative peak of the pore pressure is found in x-axis direction. The peak of the pore pressure decreases with time increases. The influence of temperature gradient on pore pressure decreases gradually with respect to the distance from borehole center (DFBC), and thus the pore pressure at the region far away from the wellbore is equal to the initial formation pore pressure. The influenced zone of the wellbore is strongly governed by the consolidation time. In a summary, temperature gradient has a positive relationship with respect to the pore pressure, and the peak of the pore pressure reduces with respect to consolidation time. angle on the pore pressure. A significant pore pressure decrease is observed near the wellbore when the deviation angle is larger than 0, and the peak of pore pressure increases with the deviation angle increases in the x-axis direction. On the contrary, an increased pore pressure is observed in the y-axis direction, and the peak of the pore pressure also increases with the deviation angle increases. The stresses around the borehole with different deviation angles are plotted in Fig.11-Fig.14. Figure 11 shows that 8 Transient Thermo-Poroelastoplasticity Finite Element Analysis of Inclined Wellbore Stability the radial stress of wellbore decreases with the DFBC increases, and becomes a constant eventually. The radial stress also decreases with the deviation angle increases. In this paper, the negative stress represents compressive stress and the positive stress represents tensile stress. As shown in Figure 12, the radial stress decreases significantly near the wellbore in the y-axis direction, and the peak radial stress decreases with the deviation angle increases. As illustrated in Figure 13, the tangential stress near the wellbore in x-axis direction increases with the DFBC increases when the deviation angle is less than 60. The tangential stress at wellbore wall is changed from negative to positive when the deviation angle is 90º, meaning that the tangential stress transformed from compression to tension. Tension failure occurs when the tensile stress exceeds the tensile strength of the wellbore rock. In Figure 14, the tangential stress near the wellbore decreases with the deviation angle increases in y-axis direction, and increases with respect to the increase of the DFBC.
It is very difficult to establish the rock model by using finite element method due to its complex nature, such as the brittleness, anisotropy, abrasion resistance and shear elongation. There are many models for rock yield criteria, and most of them are complex because they require input of many parameters and these parameters need to be measured under ideal experimental conditions. The Drucker-Prager yield criterion requires input of less parameter, and thus it is used in this paper. In addition, the non-associated flow rule is adopted. The D-P model can be used for the rock-like materials with compressive strength greater than tensile strength (Liu et al., 2018, 2019).
In which I1 and J2 represents the first stress invariant and the second deviatoric stress invariant, respectively. The expressions are as follows:

16)
where φ represents the internal frictional angle, c is the cohesion stress, and rr  ,   , zz  are the principal stresses in the cylindrical coordinate system. Figure 15 presents the plastic deformation of the wellbore with various deviation angles. The wellbore is stable in vertical well and unstable in inclined wells, it indicates the wellbore instability is generally more severe in inclined wells. With the deviation angle increases, shear failure in x-axis direction is relieved, however, tensile failure is likely to happen; meanwhile, shear failure in y-axis direction is aggravated. Five cases of wellbore instability simulations with different deviation angles (0º , 30º , 45º , 60º , 90º ) are conducted to investigate the effect of consolidation time on wellbore failure. The results show that the wellbore is more unstable with the consolidation time increases. Two of the five cases (deviation angle 45º and 90º) are presented in Fig.16 and Fig.17, respectively. 1h 10h 50h The effect of temperature gradient on wellbore stability is carried out in this section. The results show that the wellbore is more unstable under the positive temperature gradient than the negative temperature gradient. The reason for this phenomenon is that the wellbore will be expanded, resulting the decrease of the radius of the borehole, and the compressive stress will increase and thus aggravate the wellbore instability. The simulated results with deviation angle 30º and 45º are given in Fig.18 and Fig.19, respectively.
cooling (-50ºC ) heating (+50ºC ) Figure 18. The effect of the temperature gradient on the wallbore stability with deviation angle is 30º Cooling (-50ºC ) heating (+50ºC ) Figure 19. The effect of the temperature gradient on the wallbore stability with deviation angle is 45º

With a Filter Cake
Drilling mud will intrude into the formation if the mud pressure (35 MPa is assumed in this section) is larger than the pore pressure, and thus a filter cake with much lower permeability and higher shear strength will be generated. It plays an important role in preventing the drilling fluid from intruding into formation continuously and protecting the oil and gas reservoir from being polluted. It also improves the wellbore stability. The schematic of the effect of the filter cake on the pore pressure is depicted in Fig.20, the black line represents the situation without considering temperature gradient, the red line represents the situation of positive gradient and the blue line represents the situation of negative gradient. Table 2 lists the physical parameters of filter cake.   Figure 21 and Figure 22 present the effect of the filter cake on the pore pressure with negative temperature gradient and positive temperature gradient, respectively. The pore pressure at wellbore wall is equal to the mud pressure and it decreases drastically near the wellbore before the filter cake forms. After the filter cake forms, the boundary condition at wellbore wall is changed from permeable to weak permeable, leading to the pore pressure at wellbore wall decreases significantly, yet increases slightly with consolidation time increases. The filter cake will be generated when the drilling fluid intrudes into the formation. The influence of the filter cake on tangential and radial stresses are presented in Fig.23-Fig.26, in which the solid line represents the simulated results before the generation of the filter cake and the dotted line represents the results after the generation of the filter cake. As shown in the two figures, the tangential stress and radial stress are both reduced after the generation of the filter cake which prevents the wellbore from tensile failure.
The plastic deformation of the wellbore in various inclined wells are given in Fig.27 and Fig.28. Figure 27 presents the situation without the filter cake and Fig.28 presents the situation with the filter cake. From the figures, we know that the filter cake can prevent the wellbore from shear failure in vertical well (deviation 0º ), however, it plays a different role in inclined wells, e.g. preventing the wellbore from tensile failure especially in the horizontal well (deviation 90º ).

Conclusions
In the present paper, a three-dimensional fully coupled thermo-poroelastoplasticity model of inclined wellbore with the filter cake is conducted to investigate the distribution of the pore pressure and the wellbore stress under the various deviation angles, consolidation time and temperature gradients. The following conclusions can be drawn: 1. Positive temperature gradient leads to a significant increase of the pore pressure whereas negative temperature gradient causes a sharp decrease of the pore pressure near the wellbore at early stage. The peak pore pressure will reduce with the consolidation time increases. The influence of temperature gradient will vanish gradually with the DFBC increases, and thus, the pore pressure at the region far away from the wellbore is equal to its initial value. 2. A significant pore pressure decrease is observed near the wellbore in inclined well, and the peak pore pressure increases with the deviation angle increases in x-axis direction. On the contrary, an increased pore pressure is noted in the y-axis direction, and the peak pore pressure also increases with the deviation angle increases.
3. The wellbore instability problem is generally more severe in inclined wells. With the deviation angle increases, the shear failure in x-axis direction is relieved, however, the tensile failure tends to take place; meanwhile, the shear failure in y-axis direction is aggravated. 4. The wellbore becomes unstable with the consolidation time increases, and the wellbore is more unstable under the positive temperature gradient than the negative temperature gradient. 5. The filter cake can reduce the pore pressure and stresses around the wellbore, and prevent the wellbore from shear failure in the vertical well (deviation 0º), besides, it prevents the wellbore from tensile failure in inclined well especially in the horizontal well (deviation 90º).