Well Placement has to do with the positioning of wells in the reservoir so as to produce from it. Optimality comes in when the wells so placed are positioned in the best locations in the reservoir and operated with the most effective controls to maximize production from it and minimize or postpone problems associated with hydrocarbon production  .
Well placement is one of the most crucial decisions to be made during field development as it directly affects production from the reservoir and hence the economics of the project at hand  . More fluid will be produced from the reservoir if wells are placed in regions with higher Net Present Value (NPV) of investment or alternatively, Cumulative Production (of oil and/or gas) from the reservoir  .
Optimizing well placement involves the determination of the optimum number of wells, the rate at which to produce these wells, the location to place the wells and the trajectory of the wells in order to maximize hydrocarbon recovery, postpone water production, and extend well life  .
Recently, the Petroleum industry has focused more attention on well placement due to: increased demand for hydrocarbon, the rising cost of producing from newly discovered or mature oil and gas fields and rising need to produce maximum recovery from reservoirs with minimal cost  .
As reservoir and fluid behavior vary with time, coupled with the complex nature of some reservoirs, it is eminent not to rely on engineering judgment alone, thus the need for the optimization algorithm used in this study to aid improve engineering judgment  .
In this study, only the Well location was optimized using the already existing ABC algorithm and the derived modified ABC algorithm (MABC) and their performances compared. Other criteria such as number of wells, trajectory and control of the wells were not considered.
Algorithms are step-by-step procedures for solving optimization problems. These algorithms help to automate the otherwise cumbersome process of manual Well placement by performing direct or stochastic searches to optimize Well placement  .
Numerous optimization algorithms have been developed to solve Well placement problems. Amongst them are: Particle Swarm Optimization (PSO), Genetic Algorithm (GA), and Simulated Annealing (SA). These algorithms are either used in their pure form or modified/hybridized in a way to improve its accuracy and/or speed. Minton  gave a comprehensive review of the most common optimization tools used to optimize Well placement in the Petroleum industry.
2.2. ABC Algorithm
Artificial Bee Colony (ABC) algorithm is a new optimization algorithm that mimics the foraging behavior of honey bees in their hives. It is essentially composed of three types of bees namely; employed, onlooker, and scout bees performing distinct functions  .
The employed bees (foragers) are associated with specific food sources: Food sources are defined as potential solutions to the problem under consideration. Their responsibility is to exploit a particular food source, store information; position and nectar quality (fitness), about the food source and communicate same to other bees in the hive. Additional to this responsibility is the perturbation (generation of a trial solution around the neighborhood) of the current food source and the evaluation of the new (perturbed) food source’s fitness value. If the fitness of the perturbed solution is better than that from which it was formed, then the new solution replaces the old one in the memory of the forager else the new food source is perturbed until the specified “limit” is reached after which it is abandoned and a new solution generated. This is a greedy-selection scheme  .
The onlooker bees calculate the probability of choosing a food source based on the food source’s fitness quality. The probability values Pi for the solutions xi are calculated and normalized into [0, 1] by means of their fitness values using Equation (1)
where fiti is the fitness value of solution xi.
Fitness values of solutions are calculated using Equation (2).
Here, fi is the value of the objective function for solution xi.
Upon choosing the best food source, this food source is memorized and a new trial solution is generated using Equation (3) by the onlooker bee around the neighborhood of this best solution.
Here, and where (k ≠ i) are randomly generated indices and rand [−1, 1] is a random number in the range [−1, 1], which works as a scaling factor. SN is the population or colony size and D is the dimension of the of the optimization problem.
Finally, these bees carry out the greedy selection as described under employed bees.
The scout bees are tasked with the responsibility of generating a new food source to replace a food source which could not be improve after a pre-determined number of trials called “limit”. In practice, the limit is estimated via the following expression:
where ne is the number of unemployed bees; c is a constant coefficient with a recommended value of 0.5 or 1  . The new solution is generated within the entire search space.
With such combination of responsibility, it is impossible for ABC to get stuck in local optima like other optimization methods as the particular task of the scout bee guards against this. This makes the ABC algorithm very promising.
The intelligence of the swarm lies in the networks of interactions among these simple agents, and between agents and the environment. The initial solutions in ABC are usually randomly generated and improved upon in the course of the optimization. Equation (4) is used to generate the initial solutions.
where r ~ (0, 1) is a random number between 0 and 1.
In the procedures above, it is presumed that an onlooker bee whose food source has sufficiently depleted, or cannot be improved after reaching the specified limit becomes a scout bee. Also, the number of employed and onlooker bees equals the colony size.
The general procedure for the operation of ABC is summarized by Bolaji et al  while the pseudo code for the implementation of ABC is outlined in the ABC official website.
So far, the great potential of the ABC algorithm has only been exploited by two researchers in the Petroleum industry namely; Nozohour-leilabady and Fazelabdolabadi  , who used it to optimize well placement, and Irani and Nasimi  , who used it to train neural network for bottom hole prediction in underbalanced drilling.
2.3. Modification of ABC (MABC) Algorithm
The following modifications were made on the ABC algorithm to improve its performance.
Dealing with Out-of-Boundary-Point
Due to the stochastic nature of the ABC algorithm, it, at some point generates new solutions that are outside the search space (i.e. the defined boundaries of the problem). The default way of dealing with this problem is to place such points (solutions) at the boundary (upper or lower as the case may be) of the search space. This method is not very effective for the following reasons:
1) It leads to the repetition of points that may have been visited already. Thus increasing the time, it would take the algorithm to locate the optimum solution. In extreme cases, this repetition inhibits the algorithm from finding the global maximum solution  . A mathematical method was therefore developed to inhibit this undesired behavior.
2) It may result in the duplication of a location of an already existing Well. This situation mimics production from a dual Well (in the case where two producing Wells are placed at the same point) or a case of simultaneous fluid injection and hydrocarbon production (SWAG or WAG) from a single Well where a producer and an injector Well are placed at the same point. These are not situations we want to mimic. To solve this problem, a database consisting of the Well location and its performance (i.e. the NPV of the Well at that location) is generated for each location suggested by the algorithm and updated with each call by the algorithm to the simulator. It is ensured that no location is visited more than once. This is accomplished by comparing the randomly generated locations with the points existing in the database. This method is similar to the kriging proxy employed by some researchers    . The exception is that, the database of points (proxy) in our case is not used to replace the simulator when estimating for un-simulated points as is done with the kriging proxy. Also, in kriging proxy, the proxy is not used to restrict the algorithm from visiting already scrutinized points  .
3) The minimum Well spacing imposed on the algorithm may not be honoured resulting in inefficient exploitation of the reservoir. To deal with this problem, a minimum spacing of 3-cells in-between wells was imposed on the algorithm. This ensures that the Wells are at least 3-cells (i.e. 900ft apart as our reservoir model is 300 × 300 ft in dimension). The choice of the minimum spacing in-between Wells was arbitrary. This restriction also ensures that no two Wells are placed on the same cell, thus averting the situations described above under out-of-boundary-points.
4) In the course of the improvement of a solution, ABC generates trial solutions which sometimes exceed the bounds of the search space. The default way of dealing with this problem is by placing such points at the boundary of the search space. There are other better ways of dealing with this problem. The methods as stated by Nozohour-leilabady and Fazelabdolabadi  included the Periodic Boundary Condition (PBC) and Reflective Boundary Condition (RBC).
PBC is made to simulate a continuous infinite system and cannot be used to obtain the topology of a sphere with a regular lattice of arbitrary size whereas RBC is best suited for boundaries where the system to be simulated also has a well-defined boundary  . As a result of the foregoing and coupled with the fact that RBC consistently lead to faster convergence than PBC, RBC was applied to handle out-of-boundary points in this study.
2.4. Reservoir Description―A Hypothetical Case Study
The model used in this study was made up of 30 × 30 × 10 grid cells 300 × 300 × 20 ft. in dimension. The phases present were oil, water, gas and dissolved gas. Porosity values were 0.087, 0.097, 0.111, 0.16, 0.13, 0.17, 0.17, 0.08, 0.14, and 0.13 for the ten layers respectively. The reservoir top layer was at 5000 ft with the gas-oil contact (GOC) at 4500 ft, water-oil contact (WOC) at 5500 ft, while the datum depth was at 5040 ft. The initial pressure of the reservoir was 4000 psi, rock compressibility was 4E−6, Oil density = 49.94 lbf/cuft, water density = 62.43 lbf/cuft and gas density = 0.061 lbf/cuft. The permeability was randomly generated as described in the “Test Case” section. The X-permeability was equal to the Y-Permeability with the Z-Permeability roughly 1/100th of the X-Permeability. Eight producing wells all perforated from the 2 - 4th layer and two injector wells perforated from the 8-10th layer are to be placed in the field. Water was to be injected at the rate of 5000 bbls/day through the injector wells while oil was produced at the rate of 1500 bbls/day from each producing well. A minimum oil rate of 100 bbl/day and a maximum water cut of 95% were specified for the model. The simulation was run for 3600 days (10 years)  . The petrophysical properties of the model were shown in Figure 1(a) and Figure 1(b) and Figure 2.
Figure 1. (a) Permeability distribution in the reservoir for Case 1; (b) Permeability distribution in the reservoir for Case 2.
Figure 2. Porosity distribution in both reservoirs.
2.4.1. Test Cases
Two scenarios were tested. The first, herein referred to as “Case 1” was a model in which the permeability was generated from uniform random numbers using the “unifrnd” keyword in the MATLAB software  .
The second case used normally distributed random numbers (MATLAB keyword is “normrnd”) to generate permeability for the model. This case was herein referred to as “Case 2”.
The cases used herein were similar to that described in Example 1 of the publication by Nozohour-leilabady and Fazelabdolabadi  .
2.4.2. Objective Function Development
The objective function optimized was the Net Present Value (NPV). Nozohour-leilabady and Fazelabdolabadi  . It was defined mathematically as can be seen in Equation (5). The data used for the NPV calculation is given in Table 1.
The case 1 presents a great challenge for any optimization algorithm as the permeability values so generated vary greatly for each cell thus making the overall petrophysical property of the reservoir complex and the determination of the optimum well location cumbersome. This can be seen from the NPV surface plot as shown in Figure 3.
The assumption made in this paper was that the reservoir properties were completely known, thus, there was no need to study the effect of the variation of these properties on the performance of the algorithm. Our ABC code was written and implemented in MATLAB a proven sophisticated statistical tool well known in the researchers.
Figure 3. NPV of solutions as a function of the number of optimization runs for ABC (blue curves) and MABC (red curves). Thin lines correspond to individual runs, while thick lines represent averages over the three runs.
Table 1. Data for NPV calculation  .
3. Results of Optimization Runs
The Starting point dependency, effect of swarm size, and number of optimization cycles were investigated. For the starting point dependency, the optimization runs were attempted from several random staring points. Effect of swarm size and optimization cycles are as shown in Figure 1(a) and Figure 1(b). The results so shown were those obtained for placing ten vertical Wells in the reservoir.
To enhance accuracy, each specific case was ran for 3 times, and the average of the three results obtained at a given swarm size/maximum optimization cycles was recorded as shown in Figure 3.
The results obtained in Figure 4(a) and Figure 4(b) showed that both algorithms were not affected by starting point dependency. However, the modified ABC (MABC) had consistently out-performed the ABC algorithm even when it began with very low points as can be seen in Figure 4(a) and Figure 4(b).
For each of the cases tested, optimization of the x and y-coordinates only were considered with the assumption that the layers to be perforated are already known. The entire NPV surface can therefore be constructed by placing a single well in the model and performing 30 × 30 reservoir simulations. Figure 5(a) and Figure 5(b) shows the result so obtained.
Figure 4. (a) Algorithm performance for case 1; (b) Algorithm performance for case 2.
Figure 5. (a) NPV surface plot for case 1; (b) NPV surface plot for case 2.
If the reservoir is to be optimally exploited and maximum profit derived there from, wells need not to be haphazardly placed but targeted for the most productive zones of the reservoir. The problem in doing this is how to determine the most productive zone in the field, so as to place the wells.
In the work thus presented, it can be concluded that the modified ABC algorithm is a better optimizer than the ABC algorithm based on the results obtained.
The modified ABC algorithm holds a better promise due to its faster convergence as it does not repeat points which otherwise would extend the time needed to locate the Global maximum solution.
Precise well placement improves the long term and short term performance of the Wells.