Gomes Filho,1 Dirceu Bampi,2 Cássio Pettan V. de Carvalho3

Copyright 2012, Instituto Brasileiro de Petróleo, Gás e Biocombustíveis - IBP This Technical Work was prepared for presentation at the Rio Oil & Gas Expo and Conference 2012, which is to be held between September 17, 2012 and September 20, 2012 in Rio de Janeiro. This Technical Work was selected for presentation by the event’s Technical Committee, following the author’s (or authors’) submission of the information contained within the complete work. The resulting submitted material does not necessarily reflect the opinions of the Instituto Brasileiro de Petróleo, Gás e Biocombustíveis or the Members and Representatives thereof. The author(s) know(s) of, and approve(s), the publication of this Technical Work in the Annals of the Rio Oil & Gas Expo and Conference 2012.

Defining well location and trajectory is a key step in reservoir engineering. While effective projects can significantly increase the field's profitability, unsuitable well locations and geometries can cause considerable economic losses. Numerical reservoir simulations can assist the engineer in this laborious routine, providing a framework for complete assessments regarding production expectations. However, given the complexity of the reservoir models and the vast number of well-design alternatives, a comprehensive simulation study usually demands a great deal of computational time and expert work hours. To assist field specialists in this recurrent task, this work proposes a methodology for solving the well definition problem. The methodology was implemented with a computer-assisted procedure based on heuristic search. The goal is to optimize simulated oil production through modifications in well-design attributes defined within the reservoir model. The workflow details how the evaluation of different well sizes, geometries, and positions was modeled as an optimization problem. With the aid of an optimization software package, new well configurations are inserted in numerical reservoir models, simulated, and assessed in the search for combinations that maximize field production. While the main process selects optimized blocks at every iteration to host the initial and final well perforations, a second level routine is responsible for determining all intermediate perforations based on block dimensions and saturations. This second-level optimization is another important contribution of this study. The proposed methodology was applied to six new production wells created in the simulation model of a real field. The results proved highly satisfactory, improving in more than 40% of the additional oil achieved by the initial solution, which was, itself, a result of a manual optimization process performed by field specialists. Finally, the methodology succeeded in generating alternatives of locations and geometries, supporting the reservoir team with new and improved possibilities for the well’s project.

1. Introduction
The problem confronted in this study consists of optimizing well location in an oil reservoir in a manner that increases economic gains with the anticipation of, or an increase in, the production of hydrocarbons. Such a problem can better be described through the following question: given a determined oil field and a certain number of wells (producers/injection) to be drilled, what will be the best positioning for these locations, and what will be the best geometry and length, and in which reservoir layer should they be completed, and finally, what is the best schedule for opening these wells? As can be seen, there are actually several sub-problems expressed by each part of the above question, which must be answered in order to define new locations for the reservoir. The first sub-problem consists of finding the best placement for the locations. However, a comprehensive resolution of this sub-problem, checking all possible combinations for the wells to be drilled and the viable positions, would demand a prohibitive amount of simulation time. For this reason, strategic problem-solving alternatives, such as the use of heuristic methods, must be explored.

______________________________ 1 Petroleum Engineer - Petrobras 2 PHD, Petroleum Engineer - Petrobras 3 Reservoir Consultant - Halliburton

Rio Oil & Gas Expo and Conference 2012 The complexity increases still further when considering the second and third part of the question posed up above, which considers the sub-problems of choosing the best well geometries and lengths. In other words, the new wells could be horizontal, directional (high-angle), or vertical. Selecting the reservoir layers, in which the well must be completed, also constitutes a sub-problem, as considerations regarding oil-water contact, zones washed by injection wells, trapped oil, static pressure levels, and the density of already-drilled mesh must be analyzed. Finally, defining a schedule for opening new wells also poses a sub-problem, owing to mutual interference amongst the wells, nor is it a trivial task to identify opening sequences that provide greater economic advantages. The drilling schedule, however, is not addressed in this study, which contemplates a fixed-entry sequence for the new wells. All of the sub-problems described in the above paragraphs are intimately related, as, for example, a decision regarding positioning impacts decisions on geometry and length. The high level of complexity inherent to a comprehensive resolution of these sub-problems effectively makes manual optimization approaches unviable as a result of the large number of simulations required to find optimal solutions. Consequently, it is recommended that computational tools be adopted to help reservoir specialists with decision-making. It is noteworthy that even computational solutions are not capable of an exhaustive problem-solving approach, as algorithms that result in comprehensive optimization normally require, for this type of combinatorial problem, a prohibitive amount of computational time. For this reason, heuristic resolution methods are normally used, which frequently provide satisfactory solutions through the continuous improvement of previously-defined locations, although not necessarily at a level of comprehensive optimization. This work is aimed at developing an automated computational search strategy that helps specialists find optimized locations for new producer/injection wells. In this manner, it is intended for the team involved in the definition of new wells to find solutions even more promising that those which were previously analyzed, through a process of continuous improvement and always seeking to increase economic gains by anticipating the production of hydrocarbons, as well as by increasing the field’s recovery factor. Although the adjective “automated” is used to characterize this strategy, this term does not mean that it is selfsufficient. In the methodology, the search for optimized solutions is what is automated. The specialist is still in charge of various interpretative aspects, principally with regard to the geological formation of the field. Moreover, the quality of the results obtained is strongly dependent on the quality and representativeness of the simulation model, which is a simplification of the field’s realities and does not represent its full complexity. The quality of the simulation model tends to increase where additional information is considered during characterization, including new data that is obtained through the drilling of new wells, 4-D seismic data, historical data on production behavior, chemical analysis of fluids, petrophysical analysis, and the ongoing development of simulators and simulation mesh density. As a result, human judgment is always necessary, in light of the reservoir technicians’ geological knowledge of the field, as well as their years of experience. To validate the general method developed in this study, the same was applied to optimize a project for the drilling of new wells at a gigantic field in the Campos Basin. The purpose was to improve solutions previously defined by field geophysicists, engineers, and geologists.

2. Background
This section presents the history of some applications that are pertinent to the problem and which were reported in the literature. Al-Mudhafar et al. (2010) described the use of algorithms based on heuristics to choose the best number and location of new wells at the South Rumaila field (Iraq). In the study, two heuristics were developed, both being used together with the “SimBest II” flow simulator. The first consisted of a manual procedure based on reservoir quality maps. The second heuristic was characterized by the development of an automated application based on a genetic algorithm. The application was developed so that it was coupled with the flow simulator in carrying out the optimization process, with revalidation of the results in each iteration. The methods, both manual and automated, had similar results, although the automated method required less computing time. In both cases, the objective was the maximization of NPV. The optimal scenario required the injection of water (15,000 bbl/d), with the requirement of 19 additional wells within a year. The drilling of this large number of wells, however, was not feasible, mainly because of the economic conditions in Iraq. Thus, a scenario was adopted where only 3 wells were drilled, the impact of which was a decrease in NPV and a need for considerably less injection. Castiñeira et al. (2009) applied an optimization procedure based on the Gradient method, calculated through the Adjoint Simulation technique, in two channelized turbidite reservoirs with complex and distinct geologies. The objective was to identify optimal alternatives for locating a new producer-injection pair, given the operational and well constraints. The results demonstrated that the technique used was successful in finding optimized locations for the wells, presenting a 2

Rio Oil & Gas Expo and Conference 2012 final recovery factor greater than that which was obtain through manual approaches. Furthermore, the algorithm was efficient when various alternative geological scenarios were analyzed, requiring considerably less computational time than that which was obtained by manual methods. Emerick and De Brito (2007) presented a report with a description of the OCTOPOUS (Otimização Conjunta da Trajetória e Localização de Poços or “Joint Optimization for the Trajectory and Location of Wells”) program, developed by PETROBRAS’s internal research center, CENPES. It dealt with a computational system developed to optimize drainage plans that use the numeral flow simulation for the reservoir. The system provided simultaneous optimization of the location, trajectory, and quantity of producer and injection wells, maximizing the project’s NPV. The program used genetic algorithms to undertake its search for better solutions, using concepts of heredity, mutation, natural selection, and recombination. The tests were conducted by CENPES, in models based on real PETROBRAS cases, and they presented quite encouraging results in terms of the performance of the program. Guerra et al. (2006) studied the use of a heuristic technique based on productivity potential maps (MPP) to help engineers define optimal locations for the reservoir development plan. In the study, a sandstone reservoir, which was complex because of a high variation in permeability, was used as a model. Eleven locations were selected with the help of an MPP. The results were compared with those obtained through another technique, Stock Tank Oil Initially in Place (STOIIP), with the same number of wells. The comparison showed that the MPP technique had the best performance, as well as having less variance and results that were more in line with the field’s geological model. The techniques both showed location results that were quite different. Norrena et al. (2002) presented a technique that was developed to select optimal well locations through an algorithm based on the Simulated Anneling meta-heuristic, as coupled with flow simulation. Modeling the problem was done through a multi-objective global function in which each component represented a problem constraint or a desired condition. The optimal condition was defined as the best balance between these components, which were weighted, as an objective function, by their relative importance. The technique proved itself to be flexible enough to incorporate aspects of geostatistical uncertainty models in 3-D, as well as multiple constraints. The proposal of the method was the iterative refinement of the solutions previously given for well location and trajectory until the global objective could be maximized. An application was presented to determine the optimal position of locations in a reservoir that used steam injection as a secondary recovery method, with the results being satisfactory. Zandvliet et al. (2008) conducted a study with two objectives: first, to determine the effect of production constraints on optimal well location and, second, to determine optimal well location using a model based on the Gradient method. This model used the concept of pseudo-wells, which are fictitious wells that surround, in each iteration, the wells that are being optimized. These pseudo-wells possess a flow rate that is an order of magnitude lower than the wells actually in the study, and, therefore, its consideration does not affect the simulated results. The use of fictitious wells is aimed at indicating the direction of the gradient, which is computed by using an Adjoint Method. Thus, in each iteration, the technique indicates the direction that must be followed to shift the well that provides the greatest increase in NPV. According to the author, the main advantage of using this technique, in comparison with other methods, such as finite differences and those based on stochastic perturbations, is that, at each iteration, it is only necessary to have one forward (next iteration) simulation and one backward (adjoint) simulation for the shifting of all the wells in the direction that most increases NPV. The process is repeated until there is no further improvement in the objective function. Regarding the results, note that the production constraints strongly impacted determination of optimal well location, with it being the case that, for certain sets of constraints, the results may have been quite far from optimal. The method used proved itself to be efficient in determining the direction to attain an increase in objective function.

3. Resolution Method
The heuristic resolution method was implemented with the help of a commercial optimization software, which controlled the simulations performed on a numerical, as well as a commercial, flow simulator. The following sections present the heuristic optimization design. 3.1. Resolution Method for the Sub-Problems The method for resolving the sub-problems involved the following steps for each well in the drilling portfolio: 1) Spatial variation of the well that is being optimized A position change is only permitted for the well that is being optimized. The other wells (five remaining for the project and the other field wells) remained fixed and with identical positioning to that which was defined by the base solution. 2) Definition of well extremities The internal mechanism of the optimizer chooses two cells, Ci and Cf, which respectively represent the initial and final cells for completion of the well that is being optimized. If it is the first iteration for the well, it starts from the 3

Rio Oil & Gas Expo and Conference 2012 initial solution, which forces the optimizer to choose Ci and Cf cells that are identical to the base solution. In subsequent iterations, therefore, Ci and Cf are chosen by the software’s internal meta-heuristics. 3) Determination routine for well completions A completion routine is used for intermediary cells, Ci and Cf. Consequently, a routine is created that chooses, for completion, those cells that best approximate the line segment that links the centers of Ci and Cf. Only cells with oil saturation greater than 30% are considered for completion, with the rest remaining closed to the flow. 4) Definition of well orientation The completion sequences take into account the relative position between Ci and Cf as to dimensions, and, thus, the greater cell from amongst these two, in terms of dimensions, is the first to be completed, with the lesser being the last, thereby defining the sense of the well within the reservoir. 5) Triggering the flow simulation Having set the candidate configuration for the well to be optimized, the optimizer triggers the flow simulator, with a simulation horizon of up to 2,050, so that the objective function (increase of oil for the field, at present value) may be calculated. 6) Calculation of the objective function The objective function, which results in the volume of oil accumulated and updated for the field, is calculated on the basis of the results of the simulation. 7) Choosing the next candidate configuration On the basis of the objective function results and the information derived from the latest iterations, the routine chooses a new Ci and Cf candidate pair, returning to step 2. 8) End of the optimization The stoppage criterion used was 300 iterations, which resulted in approximately 4 days of optimization per well. 3.2. Resolution Method for the Final Combined Stage After solving the sub-problems individually, we move to the second resolution stage, checking the best combination of solutions obtained so far. The need for this verification arises from the fact that the best solution found for each individual well does not necessarily guarantee that the global solution is the best, as there is mutual interference amongst the wells. In this final resolution stage, 4 locations were chosen for each well, as obtained in the prior resolution stage. For this selection, quality and solution variability criteria were used in the following manner: • For each well, the first location chosen was the one that presented the best result in the resolution stage for its sub-problem. • The second, third, and fourth locations for each well were those that, altogether, were deemed to show good variability in geometry and positioning in the field, allowing the resolution algorithm to choose quite different solutions. These locations were chosen from the 10 that resulted in the best objective function value. Resolution in this stage consisted of simulating combinations of solutions from the previous stage. As the number of combination is quite high, it was decided to once again use the optimization software to choose solutions. In this context, the stoppage criterion was 300 iterations. The general diagram of the resolution heuristic is presented in Figure 1, which shows the internal assignment of tasks to the optimizer, as well as its relationship with the flow simulator.


Rio Oil & Gas Expo and Conference 2012

Figure 1. Flowchart of the Heuristic Optimization Process

4. Results
The proposed methodology was applied to optimize six new producing wells at a gigantic field in the Campos Basin. Figure 2 shows a layout of the wells studied in this work, with the positioning and geometries initially suggested by the field specialists.

Figure 2. Initial Layout of the Wells for Application of the Methodology 4.1. First Stage In the first resolution stage, the algorithm was effective in obtaining better solutions for all applications than those which were provided by the base case. Figures 3 through 8 show the evolution of the objective function over time. The starting point for all the graphs corresponds to the base case solution for each well. The y-axis shows the gain in m³ of oil, updated in relation to the base solution.


Rio Oil & Gas Expo and Conference 2012

Evolution of the Objective Function - W2


200,000 0 -200,000 -400,000 -600,000 -800,000 -1,000,000 -1,200,000 1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106 111 116 121 126 132 137 142 147 152


Figure 3. Evolution of the O.F. – Well W2, Stage 1

The individual optimization for location W2 presented a gain of oil accumulated and updated for the field (NP, Updated) of 271,977 m³, in relation to the base case.

Evolution of the Objective Function - W3


600,000 400,000 200,000 0 -200,000 -400,000 -600,000 1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101 105 109 113 117 121 125 129 133 137 141 145 149 153 157


Figure 4. Evolution of the O.F. – Well W3, Stage 1

The gain at location W3 was 739,163 m³ of oil accumulated and updated for the field.

Evolution of the Objective Function - W4


600,000 400,000 200,000 0 -200,000 -400,000 -600,000 -800,000 1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101 105 109 113 117 121 125 129 133 137


Figure 5. Evolution of the O.F. – Well W4, Stage 1

Optimization of location W4 resulted in a gain of oil accumulated and updated for the field of 567,244 m³. 6

Rio Oil & Gas Expo and Conference 2012

Evolution of the Objective Function - W6


500,000 0 -500,000 -1,000,000 -1,500,000 -2,000,000 1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101 105 109 113 117 121 125 129 133 137 141 145 149 153 157


Figure 6. Evolution of the O.F. – Well W6, Stage 1

Optimization of location W6 resulted in a gain of 432,2490 m³ of oil accumulated and updated for the field.

Evolution of the Objective Function - W1


500,000 0 -500,000 -1,000,000 -1,500,000 -2,000,000 -2,500,000 103 109 115 121 127 133 139 145




Figure 7. Evolution of the O.F. – Well W1, Stage 1 The optimization of location W1 resulted in a gain of 523,633 m³ of oil accumulated and updated for the field in relation to the base case.

Evolution of the Objective Function - W5


0 -500,000 -1,000,000 -1,500,000 -2,000,000 -2,500,000 101 106 111 116 121 136 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 1 6


Figure 8. Evolution of the O.F – Well W5, Stage 1

The gain of updated oil, in the case of the optimization of well W5, was 590,477 m³ for the field.




















Rio Oil & Gas Expo and Conference 2012 4.2. Final Stage The objective function’s evolution in the final stage (which expresses the volume of oil accumulated and updated for the field) is depicted in Figure 9’s graph.

Evolution of the Objective Function - Combined Solutions
3,000,000 2,900,000 2,800,000 2,700,000 2,600,000 2,500,000 2,400,000 2,300,000 2,200,000 2,100,000 2,000,000 1 9 17 25 33 41 49 57 65 73 81 89 97 105 113 121 129 137 145 153 161 169 177 185 193 201 209 217 225 233 241 249 257 265 273 281 289



Figure 9. Evolution of the O.F. in the Case Study – Final Combined Problem In this optimization phase, an attempt was made to find better solutions, through combining results obtained from the prior stage. The initial round was built with a combination of the best results obtained during stage 1 (individual optimization). It may be verified, by referring to the above graph, that this does not represent the best general solution for the problem, which was obtained in the second round and was not surpassed until the end of processing. The result from the second iteration presented a gain in oil volume accumulated and updated for the field (at a rate of 7.5%, a.a.) of 2,832,246 m³, this being, therefore, the overall solution obtained for the case study. Interestingly, notice that the final solution contains better partial results for wells W3, W4, W6, W1, and W5, with only well W2 having, in the combined resolution, completion that differs from the partial result found in stage 1. This occurred because of the mutual interactions between the wells and supports the need to carry out the proposed optimization for the second stage. Many solutions presented good results that were close to the determined optimal solution, especially iterations 67, 95, and 99, with respective oil gains of 2,828,162, 2,825,816, and 2.824.989 m³. With a risk analysis, which is not addressed by this study, these solutions might be deemed as good alternatives to be verified. The graph in Figure 10 shows the incremental gain with the optimized solution’s total oil flow for the field.

Figure 10. Incremental Gain in Oil Flow – Optimized Case, in Relation to the Base Case The graph in Figure 11 shows differences, between the optimized and base cases in the total volumes of water and oil produced during the time of production. 8

Rio Oil & Gas Expo and Conference 2012

Figure 11. Differences in the Accumulated Oil and Water Flows for the Field – (Optimized Case - Base Case) Review of the graph shows that optimization resulted in an initial increase in the incremental volume of accumulated oil, showing, once again, anticipation of hydrocarbon production. Also, note that, at the end of the simulation, the recovered volume of optimized oil is greater than that of the base case (approximately an additional 2.85 million m³), indicating an increase in the field’s recovery factor. Besides the gain in accumulated oil, another important advantage is that the optimized solution presented a lower accumulated production of water in comparison to that obtained with the base case (approximately 12.2 million m³ less at the end of the simulation). For visualization purposes, Figure 12 displays the initial and optimized settings (geometry, location, etc.) for the W2 well. Note that the optimized solution, in blue, defines a new direction for the well.

Figure 12. Results for Well W2: Initial Condition (Red) and Optimized Condition (Blue) – Perspective and Top Views

5. Interpretation of the Data
Analysis of the data obtained, with the distributions of the wells proposed in the Base Case and in the Optimized Case, indicate more favorable economic and oil production results with the distribution proposed by this work. The final presented result showed a gain of updated oil, at a rate of 7.5%, of 2,832,246 m³, a quite significant amount. The final combinatorial stage of the algorithm shows that the combined solution of the best partial solutions was not the most ideal for the case study, evidencing the need for optimization during the second resolution stage. Regarding the general solution obtained for the problem, only well W2’s completion differed from that which presented by its partial solution, as obtained during the first resolution stage. Application of the algorithm resulted, for the optimized solution, in a horizontal geometry for all the wells. This specific fact needs to be analyzed with caution since, for some regions of the reservoir at issue with significant shale intercalations, a vertical geometry presents less risk for the project. The risk arises from the possibility that these potential intercalations are not being correctly represented in the flow model owing to a lack 9

Rio Oil & Gas Expo and Conference 2012 of information. As a result, it is necessary to undertake further risk analysis. In this sense, consideration could be given to alternative, good-quality geometries, with results closer to the discovered optimal solution. As for water production, which is a quite restrictive factor for primary oil processing, the optimized solution had lower production of water than that observed in the base solution, with large advantages for primary oil processing and for the treatment of produced water. Individual observation of the wells shows that there were gains in accumulated oil, as updated for all the project’s wells.

6. Conclusions
The algorithm developed in this study proved effective in optimizing locations previously defined by specialists, resulting in a gain in the volume of oil accumulated and updated for the field (at a rate of 7.5%) of 2,832,246 m³, as well as a considerable decrease in the production of water relative to the base solution. Regarding aspects to be improved, it was found that during resolution, there were difficulties with convergence of the optimization software, in all cases of application, which entailed quite random search behavior. This difficulty, arising from the complexity of the search topology, caused a negative impact in terms of efficiency, requiring a large number of iterations. These difficulties may not be fully overcome. Nevertheless, an effort to make improvements during convergence, however small, could result in a material increase in efficiency. As a proposal for future work, it is therefore suggested that a specialized application be developed that is focused on the optimization of locations to enhance search convergence for this specific type of problem. As, in this study, the simulations were obtained on the basis of a deterministic model, another suggestion for future work is that a risk analysis be incorporated into the algorithm, with such being necessary mainly because of imprecisions and uncertainties contained in the numerical flow model. Such an approach could be conducted through the simulation of scenarios, as associated with the probability that such scenarios actually occur. The results obtained in this study, however, are sufficiently plausible to be with a reality and to be implemented, after validation by field specialists, with a resultant gain of oil.

7. Acknowledgments
The authors would like to thank God, without whom no task may be undertaken, and the Holy Virgin for her constant support. To our colleagues for their help and for quickly making available the information needed for this study. To Halliburton’s Sergio Sousa for his help with editing certain figures and reviewing part of the text. To PETROBRAS for the opportunity to carry out this study.

8. References
AL-MUDHAFAR, W.J. et al. 2010. Using Optimization Techniques for Determining Optimal Additional Locations of Oil Wells in the South Rumaila Oil Field. Paper SPE 130054 presented at the International Oil and Gas Conference and Exhibition in China, Beijing, China, 8–10 June. CASTIÑEIRA, D. et al. 2009. Automatic Well Placement Optimization in a Channelized Turbidite Reservoir Using Adjoint Based Sensitivities. Paper SPE 119156 presented at the SPE Reservoir Simulation Symposium, The Woodlands, Texas, 2–4 February. EMERICK, A.A.; DE BRITO, D.U. OCTOPUS – “Otimização de Locação de Poços” (“Optimization of Well Locations”), Rio de Janeiro: CENPES, 2008. GUERRA, N.Y. et al. 2006. Well Location Selection from Multiple Realizations of a Geomodel, Using Productivity Potential Maps – A Heuristic Technique. Paper SPE 102903 presented at the First International Oil Conference and Exhibition in Mexico, Cancun, Mexico, 31 August–2 September. MOREIRA, M.I.; FREITAS, J. “Algoritmos Genéticos e aplicações” (“Genetic Algorithms and Applications”), Slides, PUC R.S., 2005, 33p. NORRENA, K.P. et al. 2002. Automatic Determination of Well Placement Subject to Geostatistical and Economic Constraints. Paper SPE 78996 presented at the SPE International Thermal Operations and Heavy Oil Symposium and International Horizontal Well Technology Conference, Calgary, Alberta, Canada, 4–7 November. ZANDVLIET, M.J. et al. 2007. Adjoint-Based Well-Placement Optimization under Production Constraints. Paper SPE 105797 presented at the SPE Reservoir Simulation Symposium, Houston, Texas, U.S.A., 26–28 February. 10