CBM drilling technical parameter optimization methodology and software development: a case study of LUAN mining area.

Based on the leakage of the coalbed methane (CBM) drilling engineering practice of Luan mining area in China, the author determines the safe drilling fluid density range for the stable borehole wall based on borehole wall collapse and fracture pressure. Such parameters as the drilling fluid hydraulic parameters (including pump pressure, pump power and displacement, nozzle diameter, bit pressure drop, bit hydraulic horsepower, circulation pressure drop, impact force and jet velocity) and drilling parameters (including weight-on-bit, drilling rotary speed, bit tooth wear) in each borehole section are optimized. Taking the lowest drilling cost as the controlling target, the drilling parameter optimization model is designed and solved by the genetic algorithm. Furthermore, a software named "CBM borehole wall stability parameter design and optimization" characterized by visualization and applicable for drilling formation condition, which can be used to design and optimize the borehole drilling technological parameters, is developed. This program includes such modules as drilling fluid density prediction, drilling technology design, database management, user management and help. The developed software is proven to solve the drilling leakage effectively in the No.67 borehole practice, which can help drilling engineers to optimize CBM drilling technological parameters safely and quickly.


INTRODUCTION
There are still many difficult problems to be solved in the coal and coalbed methane development. For example, drilling fluid leakage, roof damage and water inrush and coal and gas outburst (Baltoiu et al. 2008, Ezeakacha & Salehi 2018, Balavi & Boluk 2018, Zeng et al. 2017, Jia et al. 2017, Geng et al. 2017, Wang et al. 2018. Drilling leakage, a common and frequent accident in CBM drilling practice of Luan mining area, China, seriously restricts the normal CBM drilling progress. The leakage exists in all boreholes, some boreholes have 14 leakage sections from top to bottom that are leaking while drilling, thereby reducing the quality and efficiency of CBM drilling greatly. Therefore, the analysis of the factors affecting drilling leakage, the optimization of the CBM drilling parameters and hydraulic parameters, and the development of drilling technological parameter optimization software can improve the CBM drilling speed, save the drilling costs effectively. The mechanisms of borehole wall instability were studied from the perspective of mechanics and physical chemistry (Yan et al. 2013, Santarelli et al. 1992. Moreover, the reasons for borehole wall instability were expounded from geological and engineering factors (Haimson & Kovacich 2003, Karatela et al. 2016, Meier et al. 2015. To improve drilling efficiency and reduce costs, the scholars have designed and optimized the drilling parameters, bit and hydraulic parameters, and drilling fluid performance parameters using field tests and laboratory tests as well as multiple liner regression, artificial neural network and mathematical modeling (Deng et al. 2016, Hashemi et al. 2014, Zheng et al. 2016, Aadnoy & Ong 2003, Shokouhi et al. 2010, Kurt et al. 2009, Judzis et al. 2009, Kilickap et al. 2011, Krishnamoorthy et al. 2012, Haq et al. 2008). However, due to lack of the integrating of formation condition and drilling technological parameters, there is no mature method to design and calculate borehole drilling technology currently. Therefore, the optimization of drilling technological parameters is still in the initial stage.
Based on the CBM drilling leakage features of Luan mining area boreholes and mechanical analysis of borehole stability, an optimization model is established and calculated from the perspective of hydraulic and drilling parameters. Furthermore, a computer program named as "CBM borehole wall stability parameter design and optimization" is developed, and its validation is performed on the spot.

Regional geology characteristics of LUAN mine
Geological structure of LUAN mine LUAN Mining area is located in the southeastern part of Shanxi Province and the middle part of the east wing of Qinshui coalfield. The eastern boundary is the fold and fault zone of Neocathaysian orogeny and the western part is the Changzhi basin controlled by Neocathaysian orogeny. The northern part is Xichuan fault, Wenwangshan South fault and North fault, Ergangshan fault in the south, Anchang fault and China fault in the middle, which makes the mining area suffer a great degree of cutting damage and constitutes part of the natural boundary of the mine. The internal stratum of LUAN Mine is nearly north-south, tending to the west.
There are 131 faults in the well, 79 of which are revealed in the well lane and drilling engineering, and 9 faults with a fault distance greater than 20 m, and 52 faults are revealed by three-dimensional seismic. The normal fault of the mining area has a large dip angle, the strike is near east-west and extends longer. There are fewer reverse faults in the mining area, and the strike is near north-south with a dip angle of about 45° and a short extension. Most of the eastern part of the mining area is a monoclinic stratum inclined to the west, and develops a sub-axial axially east-west fold. The dip angle of the stratum is between 3° and 7°. In the west, there are mainly parallel anticlines and synclines in the north-south direction.

Features and reasons of drilling leakage in LUAN mining area
The widespread and a large amount of drilling leakage occurs in the drilling engineering in Luan mining area, with multiple leakage sections ranging from 5 or 6 to 14 or 15 in each borehole. The drilling leakage sections are located in such strata as sandstone, sandy mudstone, limestone and mudstone of the Shihezi formation, the Shanxi formation or the Taiyuan formation. Some multiple leakage sections are located at the contact surface between Tertiary or Quaternary and Triassic. Additionally, the Quaternary, a 0-150m thick modern alluvium constructed of sands, gravels and soils, is a full leakage stratum. The formation information of drilling fluid lost stratum is shown in Table I. The leakage of CBM borehole wall instability in Luan mining area is attributed to the following three aspects.
(1) Geological structure and formation condition Faults and joints are well developed in theformations because of early strong tectonic movement. Furthermore, solution cracks are developed in high permeable formations, such as sandstone, limestone and dolomite. The cracks in sandstone formation have various geometric sizes, shapes, and origins. Meanwhile, the karst caves in limestone and dolomite formations are of different sizes and extremely inhomogeneous.
(2) Drilling technological factors Improper drilling parameters and drilling fluid hydraulic parameters, such as excessive drilling speed and weight-on-bit (bit pressure), are used in drilling technology in leaky formations.
(3) Drilling fluid technology factors The performance and technology of drilling fluids are mismatched with the formation. For example, the drilling fluids with excessive density will cause excessive drilling fluid column pressure, while the drilling fluids with too low viscosity and poor wall building property will induce excessive scouring effect of dynamic water pressure on the borehole wall.

DISCUSSION
Design methodology drilling fluid density range

Stress analysis of vertical borehole wall
The borehole wall rocks can be recognized as an elastic body with infinitesimal deformation. Thus, Table I. Drilling fluid lost stratum information.

Stratum
Lithological characteristics

Quaternary
Consists of red, yellow-green, khaki clay, sub-clay and sand and gravel, thickness 0-150m.

Tertiary
Consists of grayish yellow, grayish green, brown red clay and sandy clay, the bottom is gravel and the thickness is 0-268m.

Triassic
Composed of light flesh red, grey yellow, grey green, grey purple sandstone and grey green, grey purple and purple mudstone with a thickness of 1426-2357m.

Lower Shihezi formation
The Lower Permian Strata consist of yellow-brown, gray-green sandstone mudstones with a thickness of 35-80 m.

Shanxi formation
The Lower Permian Strata consist of gray, gray-white sandstone, gray-black argillaceous rock and coal seam with a thickness of 34-72m.

Taiyuan formation
The Upper Carboniferous Stratum is a set of coal-bearing sedimentary rocks consisting of sandstone, mudstone, limestone and coal seam with a thickness of 76-142m.
the effects of stress components on the borehole wall rocks can be studied and then superposed to calculate the total stress on the borehole wall based on the superposition principle. Borehole wall stresses caused by drilling fluid column pressure P i , maximum horizontal ground stress σ H , minimum horizontal ground stress σ h and vertical overburden pressure σ V , respectively. Some drilling fluid can penetrate the borehole wall into the surrounding formations via incremental drilling fluid column pressure or poor wall building properties. The surrounding formations of borehole as porous media and the assumption of the flow of drilling fluid obey the Darcy's law. According to the combined effects of drilling fluid column pressure, overburden pressure, horizontal stress, and drilling fluid seepage, the effective stress of radial stress σ r , circumferential stress σ θ , and vertical stress σ Z on the surface of borehole wall when r=R are expressed in Formula (1).

Mechanical analysis of borehole wall collapse
From the perspective of mechanics, borehole wall collapse is mostly caused by the shear strength of borehole wall rocks being less than shear stress of rocks surrounding borehole for insufficient drilling fluid column pressure induced by an excessively small drilling fluid density. In the case of a brittle formation, the borehole diameter can be enlarged by the collapsing and breaking of the borehole wall. However, because of plastic formation, the borehole can be reduced by the plastic deformation of the borehole wall. The shear failure of borehole wall rocks can be analyzed using multiple strength failure criteria, among which the Mohr-Coulomb criterion and the Drucker-Prager criterion are commonly used.
(1) Mohr-Coulomb criterion on the shear failure of borehole wall The shear failure of borehole wall rocks is affected by the maximum principal stress σ 1 and minimum principal stress σ 3 , which are actually the circumferential stress σ θe and the radial stress σ re , respectively. Furthermore, the difference between σ θe and σ re , i.e., the critical factor causing the shear failure of borehole wall rock, is positively related to the shear failure probability, which reaches the maximum when θ=90° or 270°. Namely, the borehole wall can collapse when θ=90° or 270°, and the direction of borehole wall collapse is consistent with that of the minimum horizontal ground stress. Subsequently, cos2θ=-1 is substituted into Formula (1), as displayed in Formula (2).
Next, a formula of the collapse pressure equivalent to drilling fluid density for a stable borehole wall, as shown in Formula (3).
(2) Drucker-Prager criterion on the shear failure of borehole wall Overcoming the limitation of not considering the effects of intermediate principal stress on borehole wall rocks in the Mohr-Coulomb criterion, the Drucker-Prager criterion is employed to investigate the failure of borehole wall rocks under three principal stresses in rock mechanics and engineering practice. Another collapse pressure there corresponds equivalent drilling fluid density for a stable borehole wall are obtained, as shown in Formula (4).
where a f and K f are test constants related to cohesion strength C 0 and internal friction angle φ

Mechanical analysis of CBM borehole wall fracture
In terms of borehole drilling, excessive drilling fluid column pressure can promote the expansion of original cracks and the production of new cracks, resulting in the formation fracture, and finally cause an accident of drilling leakage. From the perspective of mechanical analysis, tensile stress can be produced on the borehole wall under excessive drilling fluid density, inducing tensile failure for the tensile stress greater than the tensile strength, as displayed in Formula (5).
where S t is the tensile strength of rocks, MPa. According to Formula (1), the increase of drilling fluid column pressure P i can induce the reduction of the effective circumferential stress σ θ . When P i increases to a critical value, formation fracture pressure P f , σ θ will become negative and greater than the tensile strength of rocks, leading to formation fracture and drilling leakage. Based on the maximum tensile stress theory, the formation will produce tensile failure once the minimum principal stress of any point on the borehole wall rocks is greater than the tensile strength. Accordingly, the formation fracture will occur when θ=0° or 180°, with σ θe expressed in Formula (6).
Next, Formula (5) is substituted into Formula (6) to obtain the formation fracture pressure P f at the moment of tensile failure of rocks, as shown in Formula (7).

Design of safe drilling fluid density range
Based on the analysis of the congruence effect of such parameters as drilling fluid column pressure, overburden pressure, pore water pressure, maximum horizontal principal stress and minimum horizontal principal stress, according to the Mohr-Coulomb criterion, the Drucker-Prager criterion, and the tensile failure criterion, the upper limit fluid column pressure corresponding to upper limit of drilling fluid density is recognized as the stratum fracture pressure P f , and the lower limit is considered the larger value between the formation collapsed pressure P b and the formation pressure P p . Therefore, the range of safe drilling fluid column pressure P i is given by Formula (8).

Optimization methodology of drilling technological parameters
Drilling technology design and optimization can be accomplished through developing and solving the hydraulic parameters model and drilling parameters model. And, the genetic algorithm is used to solute the drilling parameter optimization model.

Optimization of drilling fluid hydraulic parameters
Drilling pump parameters (pump pressure, pump power and capacity) as well as bit and jet hydraulic parameters (jet velocity, bit hydraulic horsepower and jet impact force) are chosen as the hydraulic parameters. The pump capacity and nozzle diameter are taken as the optimization target. Initially, the minimum pump capacity volume of each borehole section is calculated based on the division of borehole into several sections, and the design borehole depth is recognized as the bottom depth. Subsequently, the first and second critical depths are determined based on an evaluating indicator of the maximum bit hydraulic horsepower. The optimal pump capacity and nozzle diameter of each section are obtained according to the relationship between the design borehole depth and the critical depth. Finally, the jet hydraulic parameters and bit hydraulic parameters of each borehole section are calculated.

Optimization of drilling parameters
The weight-on-bit, rotary speed and drill tooth wear are chosen as the optimization target. A model with the objective function of unit drilling footage cost C pm is developed based on rotary speed equation and bit wear equation, as given by Formula (9).
where C pm -unit drilling footage cost, RMB yuan/m; W -weight-on-bit, kN; W M -threshold weight-onbit, kN; C 2 -tooth wear coefficient decided by rock property and bit tooth structure; h f -tooth wear with the value of 0 and 1 after no and all wear, respectively; K -formation drillability coefficient; A f -formation abrasiveness coefficient; D 1 , D 2weight-on-bit influence coefficient; Q 1 , Q 2 -rotary speed influence coefficient; λ -rotary speed index decided by lithology with the value less than 1; n-rotary speed, r/min; C 1 -tooth wear reduction coefficient; t e -conversion time of bit working, tripping and making a connection; C H -hydraulic purification coefficient; and C P -differential pressure influence coefficient, that means the ratio of actual rotary speed to rotary speed with no pressure difference. An optimization model of drilling parameters with the constraints of tooth wear h f and bearing wear B f is established in Formula (10).
where C pmi -unit drilling footage cost of a borehole section, RMB yuan/m "CBM borehole wall stability parameter design and optimization" software

Module and form design
The language C# is chosen as the development language in the Access database system. The designed optimization software of the drilling parameters includes 5 modules. The main form is the main interface of the program. The menu "Drilling Technological Parameter Optimization" of the menu bar in the main form contains two submenus: "Hydraulic Parameter Optimization" and "Drilling Parameter Optimization".
(1) Drilling fluid density range forecast Mohr-Coulomb and Drucker-Prager criterion are provided to calculate collapse pressure in this module. Moreover, the stratum pore pressure curve and fracture pressure curve can be drawn according to stratum pore pressure and tensile failure criterion. The larger values between the stratum pore pressure curve and the collapse pressure curve are recognized as the lower limit of drilling fluid column pressure, and the values of the fracture pressure curve are the upper limit of drilling fluid column pressure. Thus, the CBM vertical well drilling fluid density form is designed to calculate such related data to drilling fluid density as stratum depth, tensile strength of rock and overburden pressure.
(2) Optimization of hydraulic parameters First, such parameters as formation information, drilling fluid pump parameters, drilling tool combination and ground manifold combination are input into the software. Immediately, based on the division of borehole depth into several sections according to the bit service condition, such parameters of each borehole section as rheological parameters, minimum annular return velocity and minimum drilling fluid capacity of drilling fluid, and a friction resistance coefficient unrelated to borehole depth are calculated. Finally, the first and second critical depth are determined according to the maximum bit hydraulic horsepower. The relationship of bottom depth and critical depth in each borehole section are analyzed. Then, such parameters as optimal variable as nozzle diameter, optimal pump capacity, pump power, circulation pressure loss, bit pressure loss, bit hydraulic horsepower, bit impact and injection speed of each borehole section are calculated.
The optimization form of hydraulic parameters is constructed by five sub forms: "Basic Drilling Parameters Inputting", "Rheological Parameter Calculating", "Minimum Annular Return Velocity and Minimum Displacement Calculating", "Maximum Bit Hydraulic Horsepower Model" and "Hydraulic Parameter Optimization Results".
(3) Optimization of drilling parameters Such drilling parameters as bit pressure, drilling speed, and bit wear are optimized target. Furthermore, the unit drilling footage cost and drilling efficiency are calculated in this module.
The optimization form of the drilling parameters is designed to calculate and to display the optimization results of drilling parameters of a certain stratum, which consists of the input and output parameters. The input parameters include the following: stratum drillability coefficient, stratum abrasiveness coefficient, tooth wear coefficient, weight-on-bit influence coefficient, rotary speed influence coefficient, bit cost, time of trips in and out drilling pipe, bit bearing load coefficient, borehole diameter, rotary speed index, rig operation costs and threshold bit pressure. The output parameters include the following: optimal rotary speed, optimal drilling pressure and optimal wear, unit drilling footage cost, footage, drilling time and drilling speed.
( 4 ) U s e r M a n a g e m e n t , d a t a b a s e management and system help Such operations as add, deletion and password change are accomplished in user management. Data management and backups in the relational database Access through the communication of Access with C#.net in database management. System help file is created in WinChm for users to apply the software conveniently.

Application of the development optimization Software on the No.67 well
(1) Forecast of the safe drilling fluid density range The safe drilling density range of the No.67 well is forecasted using the developed software, as shown in Figure 1. The results are saved after clicking the "Save" button in a designed table "Predicted results table of drilling fluid density".
The drilling fluid density equivalent to stratum collapse pressure calculated using the Mohr-Coulomb criterion and the Drucker-Prager criterion are 0.88-1.23 g/cm 3 and 0.9-1.25 g/cm 3 , respectively, both of which increase slightly with the increase of depth. Moreover, the drilling fluid density equivalent to stratum fracture pressure gradient calculated using the tensile failure criterion is 1.75-2.52 g/cm 3 . The stable drilling of the No.67 borehole without leakage with the actual drilling fluid density of 1.03-1.28 g/cm 3 indicates that the predicted results are reasonable.
(2) Optimization of hydraulic parameters Input form of basic drilling parameters The surrounding drilling information, pump parameters and ground manifold information are input into the form of basic drilling parameters, as shown in Figure 2. The surrounding information, pump parameters, and ground manifold information are saved in the corresponding tables after clicking the "Save" button. The form "Rheological Parameter Calculating" loads after clicking the "Hydraulic Parameters Optimization" button.
Calculating form of rheological parameters Such hydraulic models as the Bingham model, the Power-law model, the Carson model, and the Herschel-Bulkley model are selected from the combo box to input the corresponding values of Fann viscometer 3, Fann viscometer 6, Fann viscometer 100, Fann viscometer 200, Fann viscometer 300 and Fann viscometer 600. The rheological parameters can be calculated after clicking the "Calculate" button, as shown in Figure 3.
Calculating form of the minimum annular velocity and the minimum drilling fluid capacity The No.67 borehole is first divided into 6 sections. Subsequently, such parameters as detritus size and density, borehole diameter, outer diameter of drill pipe, drilling fluid density, and rheological parameters as well as the consistency coefficient of each section, are input into the form according to the theoretical formula. Additionally, drilling fluid density, borehole diameter and out diameter of the drill pipe of each section are input into the form according to the empirical formula. Finally, the effective viscosity and the minimum detritus annular velocity of drilling fluid, as well as the minimum pump capacity for carrying cuttings are obtained after clicking the "Calculate" button, as shown in Figure 4.
Form of the maximum bit hydraulic horsepower model Such parameters as drilling tool combination, length, inner and outer diameter of drill pipe and collar of each section are initially input into the datasheet. The inside and outside pressure loss of drill pipe and collar, the coefficient of ground manifold pressure loss, the coefficient of the inside and outside pressure loss of drill pipe, and the coefficient of inside and outside pressure loss of drill collar are then obtained after clicking the "Calculate" button. To optimize the hydraulic parameters, the first and second critical depth are calculated using the criterion of the maximum bit hydraulic horsepower, as shown in Figure 5.
Form of the hydraulic parameters optimization Based on the above 4 steps, such parameters as borehole depth, drilling fluid density, optimal  nozzle diameter, optimal displacement, pump power, circulating pressure loss, bit pressure drop, impact force and drilling rotary speed of each section are displayed in a data table after clicking the "Calculate" button, as shown in Figure 6. These data are saved in a table named as "Hydraulic parameters optimization results" in the Access database after clicking the "Save" button.
The optimization form of the drilling parameters is accessed after clicking the submenu "Drilling Parameter Optimization" under the menu "Drilling Technological Parameter Optimization" in the main form. The related parameters of this borehole section are then input into the form. The optimal drilling rotary speed, optimal weight-on-bit and optimal wear are calculated using the genetic algorithm after clicking the "Calculate" button. Furthermore, the unit drilling footage cost, drilling footage, drilling time and speed can be obtained, as shown in Figure 7. The optimization results of drilling parameters are saved in a table named "Drilling parameters calculation results" after clicking the "Save" button.
The optimal rotary speed of this section of 150-200 r/min; the weight-on-bit of nearly 55 kN proves that the actual borehole has no borehole leakage and wall is stable, that means the optimization program and predicted software are reasonable.

CONCLUSIONS
To reduce the loss of CBM drilling, the drilling fluid density, hydraulic parameters and drilling parameters were optimized. Furthermore, the software named "CBM borehole wall stability parameter design and optimization", which can be used to design and optimize the borehole drilling technology parameters effectively, is developed. The conclusions drawn are as follows.
(1) Aiming at reducing the borehole leakage and keeping borehole stability, the liquid pressure corresponding to the upper and lower limit of safe drilling fluid density are the minimum value of fracture pressure and the larger value of the collapse pressure versus the formation pore pressure, respectively.
(2) The drilling technology parameters are designed and optimized through the following two ways. First, the drilling pump parameters and the bit and hydraulic parameters in each borehole section are optimized. Second, taking the lowest drilling cost as the controlling target, the design and optimization of drilling parameters are achieved through the solution of the drilling parameter optimization model by the genetic algorithm.
(3) The development of the software named "CBM borehole wall stability parameter design and optimization". It can be operated to achieve the prediction of drilling fluid density range as well as the design and optimization of drilling fluid hydraulic parameters and drilling parameters becauuse of various drilling depth and the formation. Moreover, the interactive view and modification of database can be accomplished.
(4) The No.67 borehole is taken as an example of application and verification. The borehole leakage have been eliminated effectively in such easy leakage formation as sandstone and limestone through using the calculation results of drilling technological parameters by the developed software, and the borehole wall keep stable.