Mathematical modeling and prediction of drill string stability region

Knowledge of the allowed stability region of drill pipes and collars is the first step to having an optimal design of drill string in specified conditions of wellbore. With lack of sufficient knowledge of drill string stability region may be used pipes with more resistance for more safety. Hence drilling cost will increase. This paper describes software designed to predict the drill string stability region across the entire length of the drill string. All mathematical equations have coded by using MATLAB software. Drilling depths have classified to n-elements in this MATLAB code. Calculations perform for the elements from surface to a certain depth or from a certain point to the next desired depth. Then the number of n-functions of axial stress and compression force create versus depth. Then the software substitutes the desired depths and gives to the user graphical and digital form of outputs. Data statistical analysis method has been used for programming this software to remove unwanted members. The user will be able to observe string stability region as point-to-point. So the users will have more accurate in choosing the appropriate size and type of pipes and collars. Also the field studies have done for several wells of southwestern Iranian fields. We have shown that in drilling some of them could be used proper lighter pipes to decrease drilling costs.

Abstract Knowledge of the allowed stability region of drill pipes and collars is the first step to having an optimal design of drill string in specified conditions of wellbore. With lack of sufficient knowledge of drill string stability region may be used pipes with more resistance for more safety. Hence drilling cost will increase. This paper describes software designed to predict the drill string stability region across the entire length of the drill string. All mathematical equations have coded by using MATLAB software. Drilling depths have classified to n-elements in this MATLAB code. Calculations perform for the elements from surface to a certain depth or from a certain point to the next desired depth. Then the number of n-functions of axial stress and compression force create versus depth. Then the software substitutes the desired depths and gives to the user graphical and digital form of outputs. Data statistical analysis method has been used for programming this software to remove unwanted members. The user will be able to observe string stability region as point-to-point. So the users will have more accurate in choosing the appropriate size and type of pipes and collars. Also the field studies have done for several wells of southwestern Iranian fields. We have shown that in drilling some of them could be used proper lighter pipes to decrease drilling costs.

Introduction
Knowledge of the allowed stability region of drill pipes and collars is the first step to having an optimal design of drill string in specified conditions of wellbore. In the absence of sufficient knowledge of the drill string stability region may use pipes with resistance more than required for more safety.
Hence drilling cost will increase. The term 'simulation' can be defined as a process of creating a model of an existing or proposed system in order to identify and understand those factors which control the system and predict the future behavior of the system (Dosunmu and Ogbodo 2012). Bert and Storaune (2009) studied a case study of drill string failure analysis in deep wells. A deep-well drill string failure study was conducted, which included a review of drill string-inspection reports, daily drilling reports, digital data, technical literature, and engineering analysis for the two wells. They considered a cumulative fatigue analysis (CFA) modeling technique taking into account specific well conditions. Their model indicated that drill string failures would occur across shallow doglegs mainly because of high hang-down loads combined with slow ROP. The results of the study led to the development of new deep-well design criteria and implementation of new drilling guidelines. The new guidelines included the use of look-ahead CFA modeling when approaching drill string endurance limits to minimize drill pipe-fatigue failures. Look-ahead CFA modeling and the new drilling guidelines were used on two subsequent deep wells in the area, leading to successful drilling to total depth (TD) of 18,000 ft TVD without failure. One of the wells had a 1.4°/ 100-ft DLS (calculated based on 100-ft survey spacing) at 1,500 ft, and drill pipe shuffling was required to prevent drill string failure in the deep-hole section. The drill stringfatigue failure prevention guidelines apply to deep wells drilled worldwide (Bert and Storaune 2009).
Menand, Sellami, and Bouguecha (2009) considered axial force transfer as an issue in deviated wells where friction and buckling phenomenon take place. The general perception of the industry is that once the drill pipe exceeds conventional buckling criteria, axial force cannot be transferred down-hole anymore. Their study showed that, even though buckling criteria are exceeded, axial force transfer could be still good if drill pipe is in rotation. They showed and explained how axial force is transferred downhole in many simulated field conditions: sliding, rotating, with or without dog legs (Stephan et al. 2009). Dunayevsky and Abbassian (1993) considered the theory and the underlying formulation behind the development of a drill string dynamics simulator that predicts rapidly growing lateral vibrations triggered by axially induced bit excitations. The analyses center on calculations of stable rotary speed was ranged for a given set of drill string parameters and presented in vibration ''severity'' versus rotary speed plots. In their studies, the critical rotary speeds, which correspond to the rapidly growing lateral vibrations, were pinpointed by spikes on the severity plots. In addition, some applications of the drill string dynamics simulator were presented in their paper (Dunayevsky 1993). Dawson and Rapier (1982) studied drill pipe buckling in inclined holes. They mentioned that in highangle wells, the force of gravity pulls the drill string against the low side of the hole. This stabilizes the string and allows the drill pipe to carry high axial loads without buckling. In addition to this idea, they mentioned that the small size of typical wellbores limits the deflection of buckled pipe to values that are often acceptable. These two effects made it practical to run the drill pipe in compression in certain situations (Dawson and Rapier 1982).
The following section discusses issues related to the stability region of drill string, mathematically (Adam et al. 1986).

Determination of axial tension in the pipe
Determination of the hydrostatic pressure F 1 ¼ 0:0153 ð ÞÂMW Â L dp Â W dc À W dp À Á ð3Þ Determination of the primary function of the axial tension versus depth When 0\D 1 \L dp tot F Ã T dp ¼ W dp Â L dp À D 1 When L dp tot \D 2 \L dp tot þ L dc tot Determination of the maximum weight on the bit Determination of the final function of the axial tension versus depth Determination of the function of axial stress versus depth Determination of the stability force F S dp ¼ 0:785 ð Þ ID 2 dp Â P hyds 1 À OD 2 dp Â P hyds 2 h i Designed software is able to consider both axial tension and stress simultaneously in entire length of drill string, and identifies the allowed drill string stability region in very small n-elements of drill string length. All used mathematical equations in this software are coded using MATLAB software in a way that all dependent and independent parameters compute simultaneously in the npoint. So the user will be able to observe the all parameters changing as point by point so that be recognized if there is a problem through the drilled depths in the drill string length in order to take the necessary treatments for removing the problem. In fact mathematical consideration of issues related to stability region determination of drill string that contains the pipes and collars in a way that drilled depths are divided into very small n-element causes increasing in precision of the proper pipes selections. When the user receives the predicted allowed stability region by software as digital and graphical outputs, he will be able to choose pipes and collars with more accuracy, because in many drilling cases around the world, particularly in Iran, it has been observed that the drilling costs have increased due to improper selection of pipes or collars. These costs are due to various factors. One of these is poor design of drill strings with selection of pipes with too much resistance that are more expensive (Jahromi 1986). While drilling the same wells could be perform with respect to different conditions by selection of the pipes with less weight and cost. So one of the best advantages of having a predicted drill string stability region is more appropriate drill string designs and also can significantly reduce the costs of the drilling.

Methodology and computational algorithm
The computational algorithm used for designing the software can be summarized as (Fig. 1): 1. First, the program will ask for input data. These data include the mud weight and physical properties of drill string in each depth. 2. Select the number of elements (n) by the user. At this stage, drilled depth will split to very small n-elements using ''linspace'' function that could produce linearly spaced vectors. 3. Cross-section area determination for given n-elements with respect to given physical properties in the first stage. 4. Hydrostatic pressures' calculations for all these nelements of drilled depth then downward and upward forces determination for all defined elements. 5. Present the tension force as a function of depth for the n-elements. At this stage, n-tension force functions versus depth are achieved. In fact n-equations, n-unknowns are obtained. Drill depths are unknown at this stage that the software will replace and perform calculations. 6. Calculate the mean value for obtained scalar data by using ''mean'' functions (Gilat 2004). 7. Determination of the standard deviation of the scalar data by using ''std'' function (Gilat 2004) [''Appendix'']. 8. Elimination of the ''outliers'' data from computed scalar data (Wilson and Turcotte 2003) that enter the program as follows: nr; nc ½ ¼size function ð Þ ; Outliers ¼ abs function À mean nr; 1 ð Þ; : ð Þ Þ [ std ones nr; 1 ð Þ; : ð Þ ; Function any ð outliers 0 ð Þ ; :Þ ¼ ½; 9. At this stage the software inters the calculated n-cross section area of stage 3 for all obtained n-function to be n-function for the axial stress and n-unknowns at this step are n-drilled depths that are defined by the user with the ''linspace'' in the second stage. 10. Report in both graphical and digital forms of calculations obtained from last stages and appearing the allowed stability region of drill string.

Field studies
Stability region simulations on several wells located in Iran's Azadegan oil field have been running by using designed software to apply in field studies. Number of selected elements was chosen n = 20 for this simulation. The Azadegan field is located approximately 80 km of Ahvaz city. It is situated in the northwest of the Yadavaran field (Kushk & Hossaniyeh) and in the west of Jufeyr field. In this paper for prediction of drill string stability region of well N139W-H1 have presented in Figs. 2, 3, 4, 5 and 6. A summary of the characteristics of this well is presented in Table 1 and Fig. 7.
In the continuation we have investigated drill string allowed stability region for two vertical wells, A and B, that are located in Iran's southwestern field and produces from Asmari reservoir. Allowed stability region of drill string is predicted by using designed software with respect to available data of sizes and kinds of pipes and collars. The results are given in Figs. 8 and 9.
As can be seen from these graphs, diagrams of maximum axial tension and stability force have not intersected each other. This proves that used drill pipes have resistance more than required resistances, and the cost will increase correspondingly. While could be used pipes with the less resistance without problems during drilling of these wells. Then it would also reduce drilling costs.

Results
1. Designed software can present the user a primary draw of the allowed drill string stability region to obtain a more desirable drill string design. 2. Use data statistical analysis techniques to designing the software causes eliminating of unreasonable results due to mistakes arising from placement of data or computational errors and provides a more uniform output. 3. Method of used calculation to prediction of allowed drill string stability region is fast and reliable also the required input data are only physical properties of wellbore and drill string.
4. By considering the stability region and respect to designing principles can be reduced a significant part of the drilling costs.
X i B = any(A) tests whether any of the elements along various dimensions of an array is a nonzero number or is logical 1 (true). any ignores entries that are NaN (not a number).If A is a matrix, any(A) treats the columns of A as vectors, returning a row vector of logical 1's and 0's. B = any(A, dim) tests along the dimension of A specified by scalar dim.