#### Abstract

Cuttings transport problem has long been recognized as one of the key difficulties in drilling horizontal wells, and the models in cuttings transport research are usually formulated with highly nonlinear equations set. When using Newton methods to solve real engineering problems with nonlinear equations set, the problems of result dependence on initial values, Jacobian matrix singularity, and variable outflow of its definition domain in iterations are three of the often-encountered difficulties. In this paper, the ant colony algorithm is applied to solve the two-layer cuttings transport model with highly nonlinear equations set. The solution-searching process of solving nonlinear equations set is transformed into an optimization process of searching the minimum value of an objective function by applying ant colony algorithm. Analyzing the results of the example, it can be concluded that ant colony algorithm can be used to solve the highly nonlinear cuttings transport model with good solution accuracy; transforming the solution-searching process of solving nonlinear equations set into an optimization process of searching the minimum value of the objective function is necessary; the real engineering problem should be simplified as much as possible to decrease the number of unknown variables and facilitate the use of ant colony algorithm.

#### 1. Introduction

Cuttings transport problem has long been recognized as one of the key difficulties in drilling horizontal wells. Over the past 30 years, considerable effort has been expended on solving cuttings transport problem in drilling horizontal wells. Many researchers developed various models [1–10] to investigate this problem, among which the two-layer model is one of the analytical research models and is formulated with highly nonlinear equations set.

Nevertheless, solving the complicated highly nonlinear model to get a reasonable and stable solution has long been a challenge to researchers. Usually, the Newton methods, including the Newton iteration method, Discrete Newton method, and Newton Downhill method, are used in solving nonlinear equations set. However, the result solved by using the Newton methods is highly dependent on the initial values, and finding proper initial values for nonlinear equations set is not an easy job. Meanwhile, since the gradient or the Jacobian matrix has to be calculated and updated in the iteration, singularity problem of Jacobian matrix often occurs in the computation, and this problem will probably make the iteration prematurely terminated. In addition, when these Newton methods are applied to solve real engineering problems in which the variables usually have to fall within their specific definition domain, the solution-searching process often causes the variable outflow of its definition domain, which often leads to failure of getting reasonable results. Obviously, the result dependence on initial values, Jacobian matrix singularity, and variable outflow of its definition domain in iterations are three of the often-encountered difficulties when using Newton methods to solve real engineering problems.

Recently, some researchers [11–19] used artificial intelligence algorithms, such as Genetic Algorithm, Simulated Annealing Algorithm, and Artificial Fish-Swarm Algorithm, to solve nonlinear equations set and obtained satisfactory results. The artificial intelligence algorithms search solutions in the whole definition domain and the result does not depend on the initial values. Moreover, the artificial intelligence algorithm does not need to calculate the Jacobian matrix and the variable definition domain can be artificially preset according to real problems requirements. Therefore, the initial values sensitivity problem, the singularity problem in calculating Jacobian matrix, and the variable outflow of its definition domain problem can be effectively avoided when using artificial intelligence algorithms to solve problems with nonlinear equations set. Ant colony algorithm is one of the artificial intelligence algorithms and has been widely used in optimizing engineering problems. Since solving real engineering problems needs much more work on model formulation, model simplification, variable definition domain determination, model solution, and so on, it is much more complicated than solving pure mathematical nonlinear equations set. Some researchers [18, 19] tried to solve pure mathematical nonlinear equations set with ant colony algorithm, but few applications of ant colony algorithm in solving real engineering problems with nonlinear equations set have been reported.

The objective of this paper is to apply the ant colony algorithm to solve the cuttings transport problem with highly nonlinear equations set so as to simplify the process of solving cutting transport model and provide a new way to solve nonlinear engineering problems.

#### 2. Formulation of Cuttings Transport Problem

##### 2.1. Model Formulation

In order to formulate the model of cuttings transport problem, material and momentum balance analysis are needed. In the formulation of material and momentum balance equations, , , , , and refer to area, cuttings concentration, velocity, wetted perimeter, and shear stress, respectively. The subscripts, , , , and , refer to suspension layer, cuttings bed, suspension-bed interface, and total quantity, respectively.

Under steady flow conditions, assuming no slip between the liquid and solid phases, the material balances can be expressed as follows.

For solid phase [1],

For liquid phase,where is the annular area. In Figure 1, is the hole diameter and is the drill pipe diameter. SI units are adopted if units are not specially indicated.

**(a)**

**(b)**

Under steady flow conditions, the forces acting on the cuttings bed and suspension layer must equal zero. Therefore, the momentum balances can be written as follows.

For cuttings bed,

For suspension layer,where is the pressure loss, is the length for one particular section, and are the gravitational forces on the cuttings bed and the suspension layer in the flow direction, respectively, and is the frictional force on the cuttings bed at the wellbore-bed interface.

The cuttings concentration in the suspension layer is assumed to submit to the diffusion law, which can be expressed as follows:where is the hindered cutting falling velocity due to cuttings collision in the suspension layer, is the well inclination angle, is the cuttings bed height, and is the diffusion coefficient of cuttings in the suspension layer.

In (1)–(5), , , , , and are the unknown variables. Once these unknowns are determined, all the other variables can be calculated. The detailed derivations of the model equations are documented in [1].

##### 2.2. Model Simplification

From Figure 1, it can be seen that the values of , , , , and are all dependent on the cuttings bed (see reference [20]). For the other variables, the shear stresses , , and are functions of variables or . The gravitational forces and are functions of and , respectively, and hence they are functions of . Cuttings hindered falling velocity and diffusion coefficient are functions of .

The analysis above shows that (1)–(5) are highly nonlinear. The main challenge in solving this cuttings transport problem is to solve this set of highly nonlinear equations and obtain a stable and reliable solution. In solving nonlinear equations set, it is much better to simplify the equations set and reduce the number of unknown variables. Therefore, this set of nonlinear equations in cuttings transport problem will be analyzed to reduce the number of equations in order to decrease the solution difficulty.

When solving the cuttings transport problem in horizontal section (i.e., = 90°), the cuttings bed does not move at the lower side of the wellbore and thus . Equation (3) can be eliminated for it is meaningless to analyze the force balance on a static cuttings bed.

Adding (1) and (2) giveswhich is where is the flow rate, which is a known variable.

Comparing (6) with the simplified (1), we can getin which is the cuttings supply concentration, which can be determined by the rate of penetration.

The pressure loss per unit length is only shown in (4), so it can be obtained using the value of other variables after the other equations are solved. Therefore, the nonlinear equations’ set to be solved only consists of (7) and (5).

Through the analysis above, it can be seen that solving the five nonlinear equations set can be simplified into two steps.

First, solve the equations set of (7) and (5) to get the value of and , and then substitute the values of and to (4) to get the value of .

##### 2.3. Formulation of the Objective Function

In order to apply the ant colony algorithm to the cuttings transport problem, an objective function has to be formulated before the calculation. Transforming (7) and (5), define the objective function asIf reaches its minimum value (i.e., close to zero), the values of and can be recognized as the solution of (7) and (5).

#### 3. Two-Dimensional Continuous-Domains Ant Colony Algorithm

##### 3.1. Ant Colony Algorithm Mechanism

Ant colony algorithm (ACA) is a heuristic algorithm initially proposed by Marco Dorigo in 1992 and has been widely used in many areas [21–32], such as fuzzy predictive control, behavior learning and reproduction by robots, and mobile ad hoc network optimization. The general idea of ACA is to mimic the process of ants seeking an optimum path between their colony and a source of food. The ants will leave pheromones on the path when they are searching food. There are the most pheromones accumulated on the shortest path. The ants exchange information through the pheromones on the path and finally all the ants seek food along the shortest path. This is a path optimization process.

The initial design of ant colony algorithm is only applicable to discrete domains, such as in TSP problems. When the algorithm is applied in continuous domains, it should be modified. For example, the selection probability is calculated by the fitness value which is related to the objective function value rather than the distance between two discrete cities in the TSP problem.

In this paper, is set as the optimization objective, and is used as the pheromone accumulation value (i.e., fitness value), and the selection probability of one ant for one particular path in one generation is defined asThe pheromone update rule is calculated aswhere is the largest value of pheromone accumulation among all ants in the generation, is the value of pheromone accumulation for the ant in the generation, is the value of pheromone accumulation for the ant in the generation, is the pheromone evaporation coefficient, and is the newly added pheromone value, that is, the function value for the ant in the generation.

For the formulation of the fitness value of each ant, choose arbitrary values within their definition domain (e.g., 1.53 m/s, 0.059 m) and then calculate the value of (e.g., 0.0171). The fitness value can be set as in order to get a higher value as the objective function goes lower. The fitness value represents the pheromone accumulation, and all the ants are designed to move towards the position where the accumulated pheromone is the largest. The ants will select moving paths according to the selection probability calculated based on the fitness value. After sufficient generations, all the ants will gather at the position where the pheromone accumulation (i.e., fitness value) is the largest.

##### 3.2. Problem Description

Objective function:

Fitness value: .

Variables: .

Definition domain: .

##### 3.3. Solution-Searching Procedure

The solution-searching procedure with ant colony algorithm is shown in Figure 2. The ant colony algorithm is solved by Matlab programming and the detailed process of solving the problem is as follows.

() Set the numbers of ants and iteration generations.

In the ant colony algorithm, the ants will search solutions within the preset generations. If the ants could not find solution with the preset generations, probably, more ants and generations are necessary. The quantity of ants and iteration generations can be adjusted by doing tests for different problems. Generally, 6–10 ants and 300–700 generations are sufficient for a common optimization.

() Set the scopes of optimization parameters, which are the cuttings bed height and the suspension layer velocity.

When using the ant colony algorithm to solve the cuttings transport model, it only needs setting the scopes of optimization parameters, which are the cuttings bed height and the suspension layer velocity, rather than providing accuracy-sensitive initial values. The two parameters will change within the preset scope, and the ant will find solution within their preset scope. This successfully avoids the difficulty of providing the result-sensitive initial value selection problem. The scopes of optimization parameters can be set according to common drilling experiences.

() Conduct the optimization and obtain the optimum cuttings bed height and suspension layer velocity.

The detailed solution-searching process with ant colony algorithm is as follows.

First, the ant colony algorithm randomly assigns positions (i.e., cuttings bed height and suspension layer velocity) within the two preset optimization scopes for each ant to initiate the ant positions. After doing this, each ant has an initial position with two parameters (i.e., cuttings bed height and suspension layer velocity). Then, these chosen parameters for each ant are sent to evaluate the objective function (i.e., (12)) and the fitness value (i.e., the pheromone accumulation in (11)). In the whole optimization process, the ants tend to find the position with the largest fitness value, which mathematically means the smallest error for solving the nonlinear equations set (i.e., the smallest objective function value in (12)). Next, use the fitness value to calculate the selection probability by (10). The selection probability represents the distance between each ant position and the optimum ant position (i.e., ant position with the largest fitness value). The ants with higher selection probability, which means they are comparatively farer from the ant with the largest fitness value, are designed to move faster towards the ant with the largest fitness value. According to the value of selection probability for each ant, all the ants will be accordingly assigned a temporary position at each generation. If the fitness value at the temporary position is higher than the fitness value at the previous position, those ants will take the temporary positions as their new positions. The ant positons (i.e., cuttings bed height and suspension layer velocity), at which their fitness values do not increase, are sent to reset their values randomly. At each generation, all the ants tend to move towards the position where the fitness value is the largest, and the fitness values (i.e., pheromones) are updated by (11). Therefore, it can be expected that after certain generations, all the ants will gather at the position with the largest fitness value, and the optimum ant position (i.e., the optimum cuttings bed height and suspension layer velocity) is obtained.

#### 4. Example

##### 4.1. Example Data

The parameters used in the cuttings transport model are shown in Table 1.

The ant population size, maximum generations, and the pheromones evaporation coefficient are taken as 10, 700, and 0.8, respectively.

##### 4.2. Result and Discussion

Figures 3–5 demonstrate the process of how the ants find the solution at flow rate 0.014 m^{3}/s. First, the ants dispersed randomly in the scopes of suspension layer velocity and cuttings bed height as shown in Figure 3. After 55 generations shown in Figure 4, it can be apparently seen that the ants tend to gather towards the positions where the fitness value is higher. When the 550 generations pass, shown in Figure 5, all the ants stay at around (1.3303 m/s, 0.0070 m), where the fitness value is the highest (i.e., 1.9999). The highest fitness value means that objective function value reaches the lowest, very close to zero (i.e., 0.000063), which mathematically corresponds to the solution of the nonlinear equations set. Therefore, the value (1.3303 m/s, 0.0070 m) can be taken as the solution for and .

The relationship between the average objective function value and iteration generations is shown in Figure 6. It can be seen from Figure 6 that the objective function value decreases quickly as the generation increases. At generation 550, the objective function value is very close to zero (0.000063), and the values of and (1.3303 m/s, 0.0070 m) in Figure 5 can be used as the solution of the nonlinear equations set.

The cuttings transport problem is also solved with Discrete Newton method. When using Discrete Newton method, one should be very careful with dealing with the singularity problem of the Jacobian matrix and try to keep the variation of variables in the reasonable scope in the iteration. If the values of variables go beyond the reasonable scope, it can lead to obtain unreasonable results or possibly failure to converge. However, when using ant colony algorithm, there is no need to calculate the gradient and Jacobian matrix, so the singularity problem of the Jacobian matrix is avoided. Moreover, the scope of variable variation can be artificially set within the reasonable scope. For instance, the cuttings bed height should vary within the limit of hole diameter, so the variation range of cuttings bed height can be artificially set within the scope (0, 0.127 m), so the variable outflow of its definition domain problem is avoided. Meanwhile, since the ant colony algorithm initiates values of variables randomly in the optimization domain, the optimization result has no dependence on the initial values. Therefore, using ant colony algorithm can avoid the result dependence on initial values problem, Jacobian matrix singularity problem, and variable outflow of its definition domain problem. The solution result comparison between the Discrete Newton method and ant colony algorithm is presented in Table 2. As can be seen from Table 2, the error between these two methods is below 1%, which proves the effectiveness of using ant colony algorithm to solve the cuttings transport problem.

The values of pressure loss per unit length can be calculated after the values of and are obtained. One group of values for 5 unknown variables in the cuttings transport model is presented in Table 3.

##### 4.3. Advances of Using the New Method

The cuttings transport model is formulated with nonlinear equations set, and traditionally it is solved by the Newton methods. When the Newton methods are used to solve the nonlinear equations set, the result dependence on initial values, Jacobian matrix singularity, and variable outflow of its definition domain are three of the often-encountered difficulties. These problems will lead to the failure of getting reasonable results when Newton methods are used to solve real engineering problems.

Compared to the Newton methods, the ant colony algorithm method does not need the selection of result-sensitive initial values but only needs a comparatively large solution-included scope, which greatly decreases the difficulty of providing result-sensitive initial values. Since there is no Jacobian matrix in the ant colony algorithm, the new method avoids the Jacobian matrix singularity problem which often occurs when using Newton methods. The ant colony algorithm searches solution in the preset scope, so there is no problem such as variable outflow of its definition domain. Therefore, compared to Newton methods, using ant colony algorithm makes solving the nonlinear cuttings transport model easier and more stable and provides a new way of solving cuttings transport problem.

The present study mainly focuses on proposing a new method of using ant colony algorithm to solve the cuttings transport model. The new method effectively avoids the initial values selection, the singularity problem of Jacobian matrix, and the variable outflow of its definition domain problem in solving the model and meanwhile does not decrease the accuracy, which greatly simplifies the process of solving the nonlinear equations model. The application of using the ant colony algorithm to solve the cuttings transport problem in the field will be further explored in the future research.

#### 5. Conclusions

(1)The ant colony algorithm can be used to solve cuttings transport model with highly nonlinear equations set, and the solutions solved by ant colony algorithm and Discrete Newton method show good agreement with each other.(2)Transforming the solution-searching process of solving nonlinear equations set into an optimization process of searching the minimum value of the objective function is necessary in applying the ant colony algorithm to real nonlinear engineering problems.(3)The real engineering problem should be simplified according to its physical characteristics as much as possible in order to decrease the number of unknown variables and facilitate the use of ant colony algorithm.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This work is supported by the Qingdao Independent Innovation Project (no. 16-5-1-23-jch); the Fundamental Research Funds for the Central Universities (no. 16CX02025A); Program for Changjiang Scholars and Innovative Research Team in University of Ministry of Education of China (no. IRT_14R58).