WATERFLOOD OPTIMIZATION USING STREAMLINES AND RESERVOIR MANAGEMENT RISK ANALYSIS WITH MARKET UNCERTAINTY A DISSERTATION SUBMITTED TO THE INSTITUTE FOR COMPUTATIONAL AND MATHEMATICAL ENGINEERING AND THE COMMITTEE ON GRADUATE STUDIES OF STANFORD UNIVERSITY IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY Tailai Wen March 2014 c Copyright by Tailai Wen 2014 All Rights Reserved ii I certify that I have read this dissertation and that, in my opinion, it is fully adequate in scope and quality as a dissertation for the degree of Doctor of Philosophy. (Yinyu Ye) Principal Adviser I certify that I have read this dissertation and that, in my opinion, it is fully adequate in scope and quality as a dissertation for the degree of Doctor of Philosophy. (Khalid Aziz) I certify that I have read this dissertation and that, in my opinion, it is fully adequate in scope and quality as a dissertation for the degree of Doctor of Philosophy. (Marco Thiele) Approved for the University Committee on Graduate Studies iii Abstract Waterflooding is a common oil recovery method in which water is injected into an oil reservoir using strategically placed injectors to maintain pressure and sweep oil to production wells. Waterflood performance of mature fields can be improved significantly by modifying injection and production rates at individual wells. Compared to improving production through infill wells, rate changes are economical and readily implemented. In most traditional optimization methods, the number of evaluations of the objective function at each optimization step is of the same order as the number of control variables. As a result, applying traditional optimization methods to the exploitation of mature waterfloods generally involves elevated computational costs. In the first half of this dissertation, we propose a new optimization method based on flux patterns in which the number of simulations per optimization step is independent of the number of control variables. At each optimization step, our method approximates the complicated objective function of well rates by means of a local linear sensitivity analysis based on the flux patterns generated by streamline simulation or a finite-volume flow diagnostic technique. The generation of the flux patterns requires only a single simulation. This sensitivity analysis allows the oil/water production rates to be estimated as linear functions of well rates, and hence it locally linearizes the objective function. Using the linearized objective function within this optimization step does not require additional simulation until the determination of next optimization step, which reduces the computational cost dramatically compared to traditional optimization approaches. This core idea is also generalized for longterm optimization problems in two ways: one using an analytical decline model and the other using flow fraction information between wells. iv We demonstrate the method using several waterflooding scenarios. We find solutions that yield good operational strategies at significantly reduced computational cost. The efficiency of the method makes the approach powerful and applicable to mature waterfloods currently operated around the world. While the application of formal optimization techniques in reservoir management has lately received significant attention in the oil industry, the realization of long-term optimum production strategies is still challenging, partially because of the uncertainty associated with the future oil price. In the second half of this dissertation, we propose a risk measure of a given production strategy with respect to the market uncertainty. This measure is interpreted as the value of the knowledge of oil price associated with the assumed stochastic distribution of the uncertain market variables. However, with the computational cost increasing with the number of market scenarios, the computation of this risk measure with reservoir simulation directly is numerically infeasible when the market model is complex. We present a numerical approach to estimate the upper and lower bounds of this risk measure efficiently, where computational cost does not increase with the number of possible oil price scenarios. The tightness of the bounds can be controlled according to the user’s computational capability. We also generalize the risk measure and its corresponding estimation approach to the case where the stochastic distribution of market variables is not fully known (i.e. the case with distributional uncertainty). Comparing the risk measured with a base market model to the risk measured with an upgraded market model with additional stochastic information, the difference between these two values of the risk measure implies the monetary value of the additional information in the upgraded market model. This value might be used to decide if it is worthwhile to invest capital that aims at improving the oil price forecast or reducing market uncertainty. Our approach is validated on several fields undergoing waterflooding. In each case we consider a large number of market scenarios to analyze their impact on performing waterflooding optimization, and we estimate the monetary value associated with different degrees of uncertainty in market forecasts . v Acknowledgements I would like to express my sincere gratitude to my advisors, Professor Yinyu Ye, Professor Khalid Aziz, and Professor Marco Thiele. I have worked with Professor Ye since 2009. It was he who led me to the research on optimization. During my five years in Stanford, Professor Ye offered me many opportunities to apply my optimization skills to various areas. It was a fantastic experience for me to work in such a diverse research environment. Professor Aziz was the one who guided me to the Smart Fields Consortium and initiated my research in petroleum engineering. In my three-year period working in Smart Fields Consortium, he has continuously advised, encouraged and supported me. What I learned from him was not only knowledge but also the attitude to research. I clearly remember he emphasizes on the importance of passion in research when I met with him for the first time. I am very grateful to Professor Aziz for his strict requirement to me that kept me pushing myself in research. Professor Thiele was my first teacher in reservoir engineering. Most of my fundamental knowledge in this area was learned from him. He advised me closely in my research, and offered me many valuable suggestions in the past few years. I specially appreciate that he not only gave me high-level comments but also helped me with tuning up software. Having these three professors as my advisors is one of the greatest fortunes I had in my life. I would also like to express my appreciation to Professor Lou Durlofsky and Professor Michael Saunders for serving on my oral examination committee and providing valuable suggestions and feedbacks on my dissertation. I am very fortunate to have had the chance to closely collaborate with Dr. David vi Echeverrı́a Ciaurri in IBM Research on both topics covered in this dissertation. Although we could not meet in person frequently, David always gave valuable comments on my research progress via Email. His comments contributed a lot to my research. Dr. Pallav Sarma and Dr. Bradley Mallison of Chevron ETC were my mentors when I interned in Chevron in summer 2012. It was a great experience to work with them on the research of long-term reservoir optimization. The collaboration with them led to my work on long-term sensitivity analysis introduced in this dissertation. My work in risk analysis with uncertain market was mainly inspired by the work of Professor Erick Delage in HEC Montréal and Dr. Sharon Arroyo in Boeing Company. I appreciate that they shared their unpublished paper with me on this topic. I also especially thank Dr. Arroyo for her advice to me when I worked in Boeing & Stanford Research Team from 2009 to 2011. Dr. Oleg Volkov in Stanford University spent quite a long time to help me build a simulation model for the comparison between my algorithm with adjoint-based methods. It also took him a lot time to develop a version of AD-GPRS satisfying all my research requirements. I would also like to thank my colleagues in Smart Fields Consortium and the Boeing & Stanford Research Team, my fellow Ph.D. students in ICME and my office mates in MS&E. It was a great pleasure for me to work and study with them in the past years. The friendships of Jessica Yihua Hu, Yihuan Zhang, Gang Li and Yuao Hu have been invaluable. I relied on them for both serious advices and fun. Special thanks to Eden Li in heaven. Last but not the least, I would like to express my deepest gratitude to my family. My parents, Ku Wen and Xiaoqi Wang, have been supporting my life and study unconditionally. My grandparents, Zhizhong Wen and Zhaolan Shen, who were great scientists themselves, offered me exceptional education since my childhood. My wife, Mengxuan Liu, is always the first one who gives me immediate and selfless support. This dissertation would not have been possible without any of them. This dissertation is dedicated to them all. vii Contents Abstract iv Acknowledgements vi 1 Introduction 1 2 Efficient Waterflood Optimization Using Streamlines 5 2.1 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Short-Term Waterflood Optimization . . . . . . . . . . . . . . . . . . 7 2.3 Optimization Based on Streamline Simulation . . . . . . . . . . . . . 10 2.3.1 Streamline Simulation . . . . . . . . . . . . . . . . . . . . . . 10 2.3.2 Streamline-Based Model Linearization . . . . . . . . . . . . . 13 2.3.3 Trust Region . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3.4 Acceptance/Rejection of New Trial Solutions . . . . . . . . . . 17 2.3.5 Overall Workflow . . . . . . . . . . . . . . . . . . . . . . . . . 19 Generate Flux Patterns with Finite-Volume Simulation . . . . . . . . 20 2.4.1 Postprocessing by Tracing Streamlines . . . . . . . . . . . . . 21 2.4.2 Postprocessing by Finite-Volume Flow Diagnostics . . . . . . . 22 2.5 Case Study - Short-Term Optimization . . . . . . . . . . . . . . . . . 26 2.6 Long-Term Waterflood Optimization . . . . . . . . . . . . . . . . . . 31 2.6.1 Two-Stage Optimization Based on Decline Models . . . . . . . 35 2.6.2 Long-Term Sensitivity Analysis . . . . . . . . . . . . . . . . . 42 Case Study - Long-Term Optimization . . . . . . . . . . . . . . . . . 50 2.7.1 50 2.4 2.7 Two-Stage Optimization Based on Decline Models . . . . . . . viii 2.7.2 Mature Field Optimization without Long-Term Sensitivity Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Green Field Optimization with Long-Term Sensitivity Analysis 82 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 2.8.1 Compressibility . . . . . . . . . . . . . . . . . . . . . . . . . . 91 2.8.2 Nonlinear Constraints . . . . . . . . . . . . . . . . . . . . . . 92 2.8.3 Global Optimality . . . . . . . . . . . . . . . . . . . . . . . . 92 2.8.4 Decline Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 2.8.5 Long-Term Sensitivity Analysis . . . . . . . . . . . . . . . . . 93 2.8.6 Aquifers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 2.8.7 Efficient Wells and Inefficient Wells . . . . . . . . . . . . . . . 95 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 2.10 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 3 Risk Analysis in Reservoir Management with Market Uncertainty 99 2.7.3 2.8 2.9 3.1 Stochastic Formulation of Reservoir Management . . . . . . . . . . . 101 3.2 Value of Knowledge of Oil Price . . . . . . . . . . . . . . . . . . . . . 106 3.3 3.4 3.2.1 Lower Bound of VKO . . . . . . . . . . . . . . . . . . . . . . 110 3.2.2 Upper Bound of VKO . . . . . . . . . . . . . . . . . . . . . . 112 Risk Analysis with Distributional Uncertainty . . . . . . . . . . . . . 117 3.3.1 Distributional Robustness of DCP . . . . . . . . . . . . . . . . 118 3.3.2 Value of Distributional Information . . . . . . . . . . . . . . . 121 Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 3.4.1 An Analytical Toy Field Model . . . . . . . . . . . . . . . . . 124 3.4.2 A Two-Dimensional Field Model 3.4.3 A Three-Dimensional Field Model . . . . . . . . . . . . . . . . 130 . . . . . . . . . . . . . . . . 128 3.5 Discussion and Future Work . . . . . . . . . . . . . . . . . . . . . . . 132 3.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 ix List of Tables 2.1 Field 2: long-term problem results. (CI: constant injection, SS: ‘simple strategy’, TS: two-stage streamline-based approach) . . . . . . . . . . 3.1 59 Case 1: the numerical results of the toy model case without distributional uncertainty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 3.2 Case 2: the numerical results of the toy model case with distributional uncertainty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 x List of Figures 2.1 A two-dimensional example of a streamline map. . . . . . . . . . . . 2.2 A two-dimensional example of a streamline map (left), the corresponding flux pattern, and the coefficients associated with injector 4 (right). 2.3 23 A comparison of streamlines and the flow diagnostic technique in identifying the drainage region of an injector-producer pair. . . . . . . . . 2.6 21 The workflow of the optimization approach using finite-volume simulation and streamline tracing postprocessing. . . . . . . . . . . . . . . 2.5 12 The original workflow of the proposed optimization approach using streamline simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 11 24 The workflow of the optimization approach using finite-volume simulation and flow diagnostic postprocessing. . . . . . . . . . . . . . . . . 26 2.7 The permeability maps of Field 1 (left) and Field 2 (right). 27 2.8 Comparison of short-term oil production optimization (top) and the . . . . . number of reservoir simulations required (bottom) for Field 1. . . . . 2.9 29 Comparison of short-term oil production optimization (top) and the number of reservoir simulations required (bottom) for Field 2. Notice that in the bottom graph the scaling for the y-axis is not linear for a clear view. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.10 Connection between the master problem (top) and subproblems (bottom) for an example with 17 wells that is described later, for two consecutive iteration of the two-stage optimization algorithm. The red lines represent the field injection target constraints, while the color bars represent the well control settings. . . . . . . . . . . . . . . . . . xi 36 2.11 Validation of the decline model. . . . . . . . . . . . . . . . . . . . . . 38 2.12 Field 1: Cumulative oil production obtained with uniformly assignment of field injection target (blue) and its regression curve with decline model (magenta), cumulative oil production with updated field target estimated by decline model (green) and that obtained after the solution of the sequence of short-term problem (red). . . . . . . . . . . . . . . 41 2.13 Flow chart of the two-stage optimization approach for long-term waterflood optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.14 An example of flow fraction versus DRT along a streamline (red for oil, blue for water). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.15 Long-term sensitivity analysis. . . . . . . . . . . . . . . . . . . . . . . 48 2.16 Field 1 and 2: crude oil price from January 1999 to January 2012, and constant extension until July 2019. . . . . . . . . . . . . . . . . . . . 51 2.17 Field 1: field injection targets considered for Case 1: constant injection (CI; blue), ‘simple strategy’ (SS; green), and field injection strategy optimized by two-stage method (TS; red). In this case ‘simple strategy’ is the same as constant injection, so the blue line is superimposed by the green line. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 2.18 Field 1: NPV obtained for Case 1: default control setting with no optimization (NO; black), constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and two-stage streamline-based approach (TS; red). The horizontal dashed lines mark the maximal NPV that those strategies can reach; The vertical dashed lines mark the best shut-down time for those strategies. . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.19 Field 1: flow rates of 6 producers (top two rows) and 6 injectors (bottom two rows) for Case 1 with optimized field injection strategy. . . . xii 53 2.20 Field 1: Case 2 (top; 5% discount factor) and Case 3 (bottom; 10% discount factor): the left column displays constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and the field injection strategy optimized by the two-stage streamline-based method (TS; red); the right column displays the corresponding NPV which is additionally compared with default control settings without optimization(NO; black). 55 2.21 Field 1: Case 4 (top; 0% discount factor), Case 5 (middle; 5% discount factor) and Case 6 (bottom; 10% discount factor): the left column displays constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and the field injection strategy optimized by the two-stage streamline-based method (TS; red); the right column displays the corresponding NPV which is additionally compared with default control settings without optimization (NO; black). . . . . . . . . . . . . . . . 56 2.22 Field 1: Case 7 (top; 0% discount factor), Case 8 (middle; 5% discount factor) and Case 9 (bottom; 10% discount factor): the left column displays constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and the field injection strategy optimized by the two-stage streamlinebased method (TS; red); the right column displays the corresponding NPV which is additionally compared with default control settings with no optimization (NO; black). . . . . . . . . . . . . . . . . . . . . . . . 58 2.23 Field 3: the permeability map of with wells and bubble maps (left), streamlines (middle), and derived flux pattern (right). . . . . . . . . . 60 2.24 Field 3: flux pattern at the time instant before starting the waterflood optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 2.25 Field 3: field injection and production rates for the ‘do-nothing’ case (using default control settings). The dashed line marks the time instant when the waterflood optimization will be considered. . . . . . . . . . 62 2.26 Field 3: ten thousand realizations of oil price using the Wiener process (left) and 20 representative realizations selected from the 10,000 by means of K-means clustering (right). . . . . . . . . . . . . . . . . . . xiii 64 2.27 Field 3: ten thousand realizations of oil price using the OrnsteinUhlenbeck process (left) and 20 representative realizations selected by means of K-means clustering (right). . . . . . . . . . . . . . . . . . . 65 2.28 Field 3: comparison of NPV obtained with default control settings (red), NPV with simple price-based strategy (green), and NPV with the controls optimized using the streamline-based approach (blue). . 66 2.29 Field 3: oil prices in Case 16, 20 and 25. . . . . . . . . . . . . . . . . 67 2.30 Field 3: Comparison of field flow rates (left) and cumulative profit (right) in Case 16 (top), 20 (middle) and 25 (bottom). The NPV represents the highest cumulative profit over the 90-month time frame. 68 2.31 Field 3: well rates over time in the optimized control settings in price scenario 16 (top left), price scenario 20 (top right) and price scenario 25 (bottom). Wells numbered from 1 to 10 are producers, and wells numbered from 11 to 17 are injectors. The color scale for the well rates is expressed in m3 /d. . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 2.32 Field 3: flux pattern for the optimized waterflood that corresponding to Case 20, and at the time instant when cumulative profit reaches the maximum value (December 2016). . . . . . . . . . . . . . . . . . . . . 70 2.33 Field 4: water saturation map with well locations (left), map of streamlines (middle), and flux pattern (right) at the beginning of the waterflood optimization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 2.34 Field 4: field injection and production rates. The vertical black dashed line marks the time instant when the waterflood optimization is considered (June 1993). The dotted lines represent the historical data; the solid lines represent simulation results in which well rates are constant after June 1993. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 2.35 Field 4: Oil price used for the waterflood optimization of Field 4. . . 73 2.36 Field 4: non-optimized NPV (‘do-nothing’ case, top left), NPV computed via historical data (top right), and optimal NPV (bottom) of Field 4 in all 121 cases. The color scale for NPV is expressed in MM USD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv 75 2.37 Field 4: field water injection rate (top left), field oil production rate (top right), field water production rate (bottom left) and cumulative profit (bottom right). The triangular markers in the bottom right plot represent the highest values of cumulative profit (i.e. optimized NPV) and the dates at which these values are reached. The numbers marked at the end of the curves refer to the unit costs (cent/bbl). . . . . . . . 76 2.38 Field 4: comparison of field flow rates (left) and cumulative profit (right) in the case where both unit costs are equal to 40 cent/bbl. . . 77 2.39 Field 5: the permeability map (left) and the initial saturation map (right) of its top layer. . . . . . . . . . . . . . . . . . . . . . . . . . . 78 2.40 Field 5: the optimal well control strategies. Solid lines are streamlinebased solution, dashed lines are adjoint-based solution. Red lines are oil rates, blue lines are water rates, and green lines are total fluid rates. 80 2.41 Field 5: streamline maps over the saturation maps at the end of the third period and at the end of the 18 period. . . . . . . . . . . . . . . 81 2.42 Field 5: field rates (top left), cumulative field volumes (top right), profits (bottom left) and cumulative profits (bottom right) corresponding to the streamline-based method (solid lines) and adjoint-based solution (dashed lines). In the two top plots, red lines represent oil production, blue lines represent water production, and green lines represent water injection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 2.43 Field 6: well location map. . . . . . . . . . . . . . . . . . . . . . . . . 85 2.44 Field 6: short-term based injection strategy. . . . . . . . . . . . . . . 86 2.45 Field 6: oil saturation maps corresponding to the short-term based injection strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 2.46 Field 6: long-term based injection strategy. . . . . . . . . . . . . . . . 88 2.47 Field 6: oil saturation maps corresponding to the long-term based injection strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 2.48 Field 6: difference of oil saturation maps between the short-term and long-term based injection strategies. . . . . . . . . . . . . . . . . . . . xv 90 3.1 An example for the division of the space of possible p (n = 2, K = 4). 111 3.2 An example of the upper bound of VKO(x) (n = 1, m = 2). . . . . . . 113 3.3 A standard one-norm ball (left) and a rotated one-norm ellipsoid (right) covering 3,000 oil price samples from a two-dimensional correlated Gaussian distribution. . . . . . . . . . . . . . . . . . . . . . . . . . . 115 3.4 An example of the improvement of the upper bound for VKO(x) with an additional interior point. . . . . . . . . . . . . . . . . . . . . . . . 117 3.5 Four examples from D(Ω, µl , µu ), where Ω =[50 USD/bbl, 150 USD/bbl], µl =80 USD/bbl and µu =110 USD/bbl. . . . . . . . . . . . . . . . . 119 3.6 Case 1: expected oil price (top left), samples of oil price from Distribution 1 (top right), 2 (bottome left) and 3 (bottom right). . . . . . . 125 3.7 The permeability map and well location of the 2D field model . . . . 128 3.8 Case 3: the 10,000 samples of oil price curve. . . . . . . . . . . . . . . 129 xvi Chapter 1 Introduction Waterflooding is a common oil recovery method in which water is injected into an oil reservoir using strategically placed injectors to maintain pressure and sweep oil to production wells. Performance of a waterflood depends on a number of factors, such as fluid properties, the spatial distribution of rock properties, as well as the injection/production rates imposed at the wells. In mature waterfloods, oil is usually co-produced with large volumes of water (water cut larger than 75%). However, a significant amount of unswept oil remains in the reservoir as floods are operated at sub-optimal conditions over many years, particularly as the oil production gradually declines over time and the incentive for investments wanes. Oil production may be enhanced significantly with minimal infrastructure investment simply by changing the injection/production rates to redirect the water to previously unswept or poorly swept regions of the reservoir. Although additional interventions such as re-completions, side-tracks and new infill wells can increase recovery further, these interventions tend to be more capital intensive and are not considered here. With advances in reservoir simulation techniques and access to increased computational resources, waterflood management and optimization has received much attention in recent years (see for example [10, 58, 56, 1]). A simulation-based waterflood optimization problem aims to maximize/minimize an objective function (e.g. cumulative oil production, net present value, total water production) under a set of physical constraints (e.g. available water supply, individual well production/injection 1 CHAPTER 1. INTRODUCTION 2 capabilities) and economic constraints (e.g. oil price, tax regimes). The most immediate control variables are the total fluid rates of injectors and producers as these represent how floods are actually managed in the field. Therefore in this dissertation, we refer to total fluid rates at individual wells as control variables. Depending on the forecasted economic constraints, it may be more profitable to shut down the field before the end of the planed long-term time horizon (5-15 years). For this reason, an optimal strategy of a long-term optimization problem also contains a time point when no more positive benefit can be obtained assuming an expected oil price and oil production. The main challenge in solving real-world optimization problems comes from the nonlinearity inherent in the process. Waterflooding is no exception: the simulationbased objective function may be nonlinear and non-smooth. The high number of dimensions of the optimization problems due to the large number of wells usually implies high computational cost, as the amount of simulations required by many optimization approaches is proportional to the total number of optimization variables. In this dissertation, we propose a new waterflood optimization approach based on the flux patterns generated by streamline simulation or a finite-volume flow diagnostic technique. At each optimization step, flux patterns are generated with one single simulation. We analyze the sensitivity of the oil/water production rates with respect to the control variables based on the flux patterns. As the sensitivity analysis locally linearizes the objective function, the linearized objective function is used within current optimization iteration to determine the next optimization step. No additional simulation is required before the determination of the new step, and therefore the computational cost is independent of the number of control variables. Compared with traditional optimization methods (without adjoint-based information) which generally require a number of simulations on the same order of the number of control variables at each optimization step, the proposed approach reduces the number of simulation at each optimization step to one. It significantly accelerates the optimization process, especially when the number of control variables is large. In Chapter 2, we introduce this new waterflood optimization method in detail. CHAPTER 1. INTRODUCTION 3 In particular, in Section 2.1, we review the widely used methods for waterflood optimization. In Section 2.2, we formally define the waterflood optimization problem considered in this dissertation. In Section 2.3, we review the technique of streamline simulation, and introduce the original form of our optimization method based on streamline-derived flux patterns. In Section 2.4, we introduce a workflow where flux patterns are generated by postprocessing finite-volume simulation which incorporates the proposed optimization method with finite-volume simulation. In Section 2.5, the performance of this method in short-term optimization problems is demonstrated in two real field cases. In Section 2.6, the proposed method is generalized in two ways to solve long-term waterflood optimization problems. The corresponding case studies are shown in Section 2.7. In Section 2.8, several miscellaneous topics are discussed. In Section 2.9, we recommend a few related research topic that can be studied in future. We end this Chapter with some conclusions. An important topic related to waterflood optimization and even more general reservoir management problems is uncertainty quantification. Two types of uncertainties are usually involved in reservoir management: geological uncertainty and economic uncertainty. While geological uncertainty is widely studied in petroleum engineering, economic uncertainty is usually discussed by non-engineers and is seldom studied combined with formal reservoir simulation and production forecasting. It is common to do reservoir optimization based on a given market scenario, without analyzing the impact of the market uncertainty on the optimization result. We are aware of the risk associated with the negligence of the market uncertainty in reservoir management. In the second half of this dissertation, we address how to model the reservoir management problem with market uncertainty. Based on that, we propose a risk measure of a given production strategy with respect to uncertainty in the oil price. This measure is interpreted as the value of the knowledge of oil price associated with the assumed stochastic distribution of the uncertain market variables. We present a numerical approach to estimate this risk measure efficiently, where the computational cost does not increase with the number of possible market scenarios. We also generalize the risk measure and its corresponding estimation approach to the case where the stochastic distribution of oil price is not fully defined. This value CHAPTER 1. INTRODUCTION 4 might be used by the reservoir manager to decide if it is worthwhile to invest capital that aim at improving the oil price forecast or reducing market uncertainty. This part of work is shown in Chapter 3. Chapter 3.1 introduces our stochastic modeling of the reservoir management problem with market uncertainty. In Section 3.2, we define the risk measure and propose how to estimate its upper and lower bounds in a computationally efficient way. In Section 3.3, we generalize the risk measure and its corresponding estimation method to the case with distributional uncertainty. In Section 3.4, we analyze several field models and market scenarios with the proposed method. We end this chapter with some discussion and conclusions. Chapter 2 Efficient Waterflood Optimization Using Streamlines 2.1 Literature Review Simulation-based waterflood optimization has received significant attention in the oil industry in the last decades because of the sizable potential increment in profit/revenue associated to optimized strategies, and also due to the increased prediction reliability of new reservoir simulation techniques. Various formal optimization methods as well as approaches designed for specific oil recovery scenarios are applied to reservoir optimization problems. In this section, we review the commonly used waterflood optimization methods. As mentioned in Chapter 1, the main challenge in formulating the production optimization problem is to account for the nonlinearity inherent in the recovery process. Nonlinear optimization methods can be roughly divided into two main categories. The first family of methods refers to those procedures that use derivative information determined from the objective function and/or constraints. In general, gradient-based techniques [45, 39] converge to local optima. Usually in problems with high nonlinearity, local optima returned by these methods may not be acceptable in terms of the objective value, because the local optimal objective value returned by these methods may be far from the global optimal objective value. The most straightforward 5 CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 6 approach for computing derivatives is by means of finite-difference approximations. In this case, the estimation of the gradients requires a number of objective function evaluations on the order of the number of control variables. Since the evaluation of the objective function usually involves complex and time-demanding simulations, approximating derivatives numerically is expensive. Additionally, a common issue in finite-difference approximations is finding the proper perturbation size used for computing numerical gradients. Large perturbation sizes may yield inaccurate derivatives, and small perturbation sizes may cause numerical issues due to the resolution of the simulator. In some cases gradient information can be extracted from the simulator in an efficient manner. Adjoint-based methods [48, 10] are a very well-known technique for rapid computation of derivatives. However, these methods require access to the source code of the simulator to implement the adjoint-based computation, and that can be a limitation in practice. The second family of optimization techniques comprises procedures that do not require gradient information. Derivative-free algorithms ([34, 15, 35, 20]) can be subdivided into local optimization methods and global search schemes. The first type of methods have computational cost similar to gradient-based methods with numerical derivatives, but are somewhat more robust from a theoretical perspective (for example, the issue of the perturbation size for the finite differences is solved in many derivative-free algorithms). Although most local derivative-free methods guarantee convergence only to local optima, many of these techniques incorporate some amount of global exploration that may avoid being trapped in solutions that are not satisfactory from the viewpoint of objective value. Examples of derivativefree optimization methods that rely on local search include generalized pattern search (GPS; [3]), mesh adaptive direct search (MADS; [4]), Hooke-Jeeves direct search (HJDS; [29]) and ensemble-based optimization (EnOpt; [12]). The second type of methods use global search schemes where the optimization space is analyzed much more thoroughly than in local methods, but at the expense of large computational cost. It is important to note that in the majority of practical optimization problems the global optimum cannot be obtained. The curse of dimensionality makes this enterprise infeasible as soon as the number of optimization variables is larger than CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 7 a few tens, something that happens very often in real-life situations. Many global search algorithms resort to stochastic heuristics to prevent the whole process from terminating prematurely at a solution with a objective value that is unacceptable. These heuristics are rarely supported by formal optimization theory, and this leads to algorithmic parameters that are difficult to tune (as is the case of the population size in genetic algorithms). As a consequence, the use of global search methods requires a significant amount of experience, and in some cases the performance of these methods can be rather unpredictable. Examples of global search procedures include genetic algorithms (GAs; [25]), particle swarm optimization (PSO; [32]), and differential evolution (DE; [52]). We note that derivative-free optimization methods can be easily implemented in a distributed manner, and therefore be fairly efficient in terms of elapsed clock time if a parallel computing environment is available. In addition to the optimization categories mentioned above, there are also techniques designed specifically for improving flood performance using physical insight. For example, maximizing sweep by an advancing water front [1] or improving waterflood strategies by identifying oil production efficiency between well pairs [56]. These methods are not supported by traditional optimization theory, but the heuristics in these methods are tailored for the problems they are designed for, and hence performance can be satisfactory in practice. 2.2 Short-Term Waterflood Optimization In this section, we formally define short-term waterflood optimization. In this dissertation, a short-term refers to a period of time less than 6 month. When we consider a short-term waterflood optimization problem, we are interested in finding optimal well control settings so as to maximize the profit obtained in this period assuming fluctuations and discounting in the oil price to be negligible. Before we define the mathematical formulation of the short-term waterflood optimization problem, we introduce the notation used in this chapter. The number of days in the short-term period is denoted by ∆t (day). The average oil price during this short-term period is denoted by p (USD/bbl). We assume two types of operational CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 8 costs: the unit cost for water injection is represented by ci (USD/bbl), and the unit cost for water production (separation and disposal) is represented by cp (USD/bbl). The net profit is then equal to the revenue from oil production subtracted by the costs for water injection and water production. We use qiwi (bbl/D) to denote the water injection rate at the ith injector. Similarly, qjf p (bbl/D) represents the total fluid production rate at the j th producer, where the superscript ‘f ’ can also be ‘o’ for oil or ‘w’ for water when representing the flow rates of a specific phase. We emphasize that the control variables used in this dissertation are the total fluid rates of individual wells. Specifically, this implies the water injection rate for injectors, and the total fluid rate, i.e. water plus oil, for producers. Suppose we have NI injectors and NP producers, then there are NI + NP control variables in the short-term optimization problem. In practice, the control settings must satisfy some operational constraints. For example, each well has its own limit on flow rate or there may be a surface constraint in terms of total liquid handling capacity for a group of wells. Here, we only set an upper bound (Uii for injector i and Ujp for producer j) and a lower bound (Lii for injector i or Lpj for producer j) of flow rate for each individual well. We also constrain the problem to a fixed voidage replacement ratio C (i.e. the ratio between the amount of field injection to the amount of field production is always equal to C). It is important to note that our methodology is not impacted if some of these constraints are removed, modified, or additional linear constraints are included. For example, reservoir managers may like to have upper or lower bounds on field rates or on a group of wells in addition to the limits on individual wells. The optimization approach proposed in this dissertation can easily accommodate these situations. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 9 We define the short-term optimization problem as follows: max qwi ,qf p s.t. p NP X qjop −c p NP X j=1 qjwp j=1 −c i NI X ! qiwi ∆t, (2.1) i=1 Lii ≤ qiwi ≤ Uii , ∀i = 1, 2, · · · , NI , (2.2) Lpj ≤ qjf p ≤ Ujp , ∀j = 1, 2, · · · , NP , (2.3) NI X i=1 qiwi = C NP X qjf p , (2.4) j=1 where qwi and qf p denote the vectors of all control variables qiwi and qjf p , i = 1, 2, . . . , NI , j = 1, 2, . . . , NP . The difficulty in solving this problem is that the oil production rates qjop and water production rates qjwp in the objective function (2.1) are complicated functions of the control variables and their evaluation requires expensive reservoir simulations. Most traditional optimization methods require a number of objective function evaluations on the same order as the number of control variables in each optimization iteration. That means the number of simulations needed at each optimization step is proportional to the number of control variables, which can be highly time-consuming. In this dissertation, we solve the optimization problem (2.1)-(2.4) using a derivativefree approach. Since the computational cost associated with each evaluation of the objective function dominates all other calculations, the algorithm must make economic use of the objective function. In this section, we propose to exploit streamline simulation to reduce the number of evaluations of the objective function in the optimization process. As will be shown later, the local behavior of the objective function will be approximated using the flux pattern generated by a single streamline simulation. This is a significant computational reduction with respect to the approximation performed via gradients based on finite differences or via derivative-free methods, where the number of objective function evaluations is on the order of NI + NP . CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 2.3 10 Optimization Based on Streamline Simulation In this section, we introduce the original form of our optimization method which makes use of streamline simulation to generate the flux patterns. Before we introduce the optimization method in detail, we give a general description of streamline simulation at first. 2.3.1 Streamline Simulation Streamline simulation is an alternative reservoir simulation approach to the more widely used finite-difference/finite-volume approaches [5]. Streamlines have been in the petroleum literature since the 1930s [43]. Modern streamline simulation, emerged in the early 90s, distinguished by six key ideas [16, 57]: (1) tracing 3D streamlines using the concept of time-of-flight (TOF) rather than arc length; (2) expressing the mass conservation equations in terms of TOF; (3) periodic updating of the streamlines in time; (4) solving the transport problems numerically along the streamlines rather than analytically; (5) accounting for gravity effects; and (6) extension to compressible flow. Streamline simulation is particularly attractive in cases where the oil production is principally driven by fluid injection with the goal of replacing the in situ oil with water as well as sweeping the oil towards producers using the injected fluid. Floods that are dominated by the relative location and strength of injectors and producers, and by the connectivity inherent in the underlying geological model are well suited for streamline simulation. Many mature floods fall under this category. A key difference between streamline simulation and other simulation approaches is that the two/threedimensional transport calculations are decomposed into a series of one-dimensional problems along streamlines, and this generally leads to significant speedups (which can be advantageous in the context of an optimization approach). The efficiency of streamline simulation has led to its use for reservoir management [37, 56, 6] and history matching [59, 41, 11, 61]. Figure 2.1 displays an instantaneous streamline map for a two-dimensional case with three injectors and five producers. In this dissertation, however, we are more interested in exploiting the ability CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 11 Figure 2.1: A two-dimensional example of a streamline map. of streamline simulation to provide engineering data that allows a more physicsbased optimization approach [56, 60]. We focus on the connectivity information between wells supplied by the streamlines to help build a locally linearized model approximating the objective function to drive the optimization approach. Specifically, we make use of flux patterns which provide graphical views of the injector/producer pairs determined by the streamlines (Figure 2.2). The flux patterns summarize the connectivity between injectors and producers at a particular instant in time, with each connection quantifying the sum of the volume fluxes of all the streamlines associated with that injector-producer pair. For each connection in a flux pattern, there are four parameters that quantify the connectivity information between this injector-producer pair, i Rij qijwi = wi , qi p Rij = qijf p qjf p , Eij = qijop qijf p , Cij = qijwi qijf p , where qijwi is the rate of injection going to producer j from injector i in this short-term period, and qijf p and qijop are, respectively, the rates of total fluid and oil at producer CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 12 j due to injector i in this period. Figure 2.2: A two-dimensional example of a streamline map (left), the corresponding flux pattern, and the coefficients associated with injector 4 (right). p i of the fluids injected/produced between the injectorThe rate ratios Rij and Rij producer pair with respect to the total injected/produced fluids at the wells are equivalent to the well-known well allocation factors, except that now they are determined using streamlines [56, 6]. The oil production efficiency of an injector-producer pair Eij is equivalent to the average oil cut of the streamlines connecting injector i and producer j at this instant of time. It is noteworthy that the oil cut of an injectorproducer pair Eij is generally not available from standard simulation approaches and is one of the components of streamline simulation that allows us to build a localized linear model. Finally, Cij is the rate ratio of total fluids (in and out) associated with an injector-producer pair, and it is equal to the voidage replacement ratio between this well pair. Again, having this information for each injector-producer pair is unusual in standard simulations. P P i PNI p We note that in general N j=1 Rij < 1 (and i=1 Rij < 1), since it is not necessary that all the water injected at injector i is associated with producers (and all the fluid produced at producer j does not have to be associated with injectors). A part of CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 13 injection/production volumes may flow to/from aquifers associated with the reservoir and/or may be responsible for increasing/decreasing the pressure of the system. The flux pattern generated by streamlines also provide connectivity information between wells and aquifers, and wells and the far field. In this dissertation, we assume that wells are either connected to other wells or to an aquifer, and assume the connection to the far field to be negligible. For mature waterfloods these are reasonable assumptions. We define i =1− Ri0 NP X i , Rij p R0j =1− j=1 NI X p Rij i=1 to represent the rate ratios of the fluids injected/produced to/from aquifers with respect to the total injected/produced fluids at the wells. Similarly, E0j is defined as the oil production efficiency of the connection from aquifers to producer j in this short-term period. For any reservoir, these parameters describe uniquely a flux pattern at an instant in time and the connectivity among injectors and producers in the field. Figure 2.2 (left) shows the streamlines associated with a four injector/five producer configuration for a two-dimensional discretization of a heterogeneous reservoir. The field voidage replacement ratio is set to be exactly one. The associated flux pattern is shown superimposed on the streamlines. The right plot displays the parameters associated with injector 4. The values of parameters C4j in the plot are not exactly one due to numerical rounding error in the streamline simulator. 2.3.2 Streamline-Based Model Linearization Suppose we are given a control setting for all the wells, which is the values of the control variables in the optimization problem (2.1)-(2.4), qiwi , qjf p , i = 1, 2, · · · , NI , j = 1, 2, · · · , NP , and that the recovery in the field at this short-term period has been simulated for these control settings using a streamline simulator. Therefore, the flux pattern and all associated coefficients p i Rij , Rij , Eij , Cij , i = 0, 1, · · · , NI , j = 0, 1, · · · , NP , CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 14 are available. Notice that the flux pattern is assumed constant over the short-term period being considered, although it is defined at an instant of time. In practice, we can make use of the flux pattern generated at any point in time over this period (e.g. at the beginning of the period). By means of the coefficients of the flux pattern, the oil and water production rates of the producer-injector pair j, i in this period (qijop and qijwp ) can be written using the parameters of the flux pattern in two different ways. The first representation is based on the control variables at injector i i × Cij × Eij , qijop = qiwi × Rij (2.5) i qijwp = qiwi × Rij × Cij × (1 − Eij ), (2.6) while the other representation is based on control variables at producer j p qijop = qjf p × Rij × Eij , (2.7) p qijwp = qjf p × Rij × (1 − Eij ). (2.8) Although the flux patterns along the time line depend on particular well controls, we assume that they do not change significantly in a modestly small neighborhood around a given setting of well rates. Under the assumption that the the flux pattern is a good approximation for well connectivity within a neighborhood of the current control setting qiwi and qjf p , both (2.5)-(2.6) and (2.7)-(2.8) can be used to estimate the oil and water production rates for new controls in the mentioned neighborhood. These two approximations are not necessarily identical but usually close to each other. Physically both linearized forms are reasonable, since the principal assumption is that oil and water are being produced by a displacement process rather than by expansion and that the flood is operating an a local voidage replacement ratio close to one. In other words, pushing total fluid injection (2.5)-(2.6) or pulling total fluid production (2.7)-(2.8) are equivalent. Mathematically both linearizations provide (partial) local CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 15 information around the current control setting. We opt to use an average of the two 1 wi p i × Eij , × Cij + qjf p × Rij qi × Rij 2 1 wi p i × (1 − Eij ), = qi × Rij × Cij + qjf p × Rij 2 qijopl = qijwpl (2.9) (2.10) where qijopl and qijwpl are the linearized oil and water production rates at producer j due to injector i. Alternatively, we can also alternate between these two linear models at successive optimization steps. It is a widely accepted approach to deal with this kind of situation [9, 28]; the idea is to alternate in the use of the local information to search for the next trial step. When aquifers are present in the model, a similar linearization can be applied. In this case, we are only interested in the connections between aquifers and producers, since the connections between injectors and aquifers do not influence oil/water production rate. So we only have one set of linearized representations of the production rates, which has the same form as (2.7)-(2.8) with i = 0, opl p q0j = qjf p × R0j × E0j , (2.11) wpl p q0j = qjf p × R0j × (1 − E0j ). (2.12) From (2.9)-(2.10) and (2.11)-(2.12) we obtain a linear estimation of oil and water production rates at each producer in this period by simply considering all connections between a producer j and associated injectors/aquifers: qjopl = NI X i=0 qijopl , qjwpl = NI X qijwpl , ∀j = 1, 2, · · · , NP . (2.13) i=0 We use this linearized model in the optimization process to approximate the oil and water production rates within a neighborhood around the current trial solution fp (qwi 0 , q0 ). Within this neighborhood where we assume the linear approximation of the objective function is valid, we optimize the control variable based on the linearized CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 16 objective function as follows: max fp qwi ,qf p ∈U (qwi 0 ,q0 ) s.t. p NP X qjopl −c p j=1 NP X qjwpl j=1 −c i NI X ! qiwi ∆t, (2.14) i=1 Lii ≤ qiwi ≤ Uii , ∀i = 1, 2, · · · , NI , (2.15) Lpj ≤ qjf p ≤ Ujp , ∀j = 1, 2, · · · , NP , (2.16) NI X i=1 qiwi = C NP X qjf p . (2.17) j=1 The solution of this local problem is regarded as the next trial solution. Notice that there are two differences between this local problem (2.14)-(2.17) to the original problem (2.1)-(2.4). Firstly, the objective function in this problem is linear and free of simulation, therefore to solve this problem and to determine the next optimization step requires no additional simulation. Secondly, this problem is constrained within fp a neighborhood around current trial solution U(qwi 0 , q0 ), so it is only a local problem for this optimization step and we need multiple optimization iterations to find the solution to the original problem like all other optimization approaches based on local search. 2.3.3 Trust Region There is one remaining question in this optimization process, that is how to determine fp the neighborhood U(qwi 0 , q0 ). Since the role of that neighborhood, in which the local linearized model is assumed to be valid and the linearized local optimization problem can be solved, is comparable to the trust region in trust-region methods for general nonlinear optimization problems [14, 45], in this dissertation we refer to it as the trust region. We consider the trust region as a multi-dimensional ball or interval fp centered at the current trial solution (qwi 0 , q0 ) with the radius represented by δ in this dissertation. During the optimization process, the size of the trust region is modified to guarantee an acceptable approximation of the objective function. The performance of the linear approximation is quantified, and the size of trust region is adjusted accordingly CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 17 for the next trial solution. For measuring the quality of the approximation, we use θ= fp fp wi L(qwi 1 , q1 ) − L(q0 , q0 ) fp fp wi J (qwi 1 , q1 ) − J (q0 , q0 ) , (2.18) fp fp wi where qwi 0 and q0 represent the current solution, and q1 and q1 is the new trial solution obtained from the local optimization problem, i.e. the solution of problem (2.14)-(2.17). In Equation (2.18), J and L represent the original and linearized objective function, (2.1) and (2.14), respectively. When θ is close to one, which in practice means θ ∈ (1 − ε, 1 + ε) where ε is a predetermined threshold, then L is deemed a satisfactory approximation of J , and the size of the trust region is increased (multiplied by a predetermined factor FTR ). Otherwise the approximation is considered as unsatisfactory and the size of the trust region is decreased (divided by FTR ). In this dissertation, we fix a maximum size for the trust region δmax that is not allowed to be exceeded when θ is close to one. Similarly, we also set a minimum trust-region size δmin . When the distance between two solutions is less than δmin , we consider their difference as negligible. The optimization terminates when the size of trust region is smaller than δmin . 2.3.4 Acceptance/Rejection of New Trial Solutions As addressed above, the solution of local problem (2.14)-(2.17) is considered as the new trial solution. Since this new trial solution is solved with the linearized objective function within the trust region, it does not necessarily return a better value of the original objective function. To accept the trial solution in every optimization step is usually not recommended in derivative-free optimization method [14], because an improper trust region may result in an unsatisfactory trial solution that impacts the convergence to satisfactory local optima. For this reason, we need to set a rule of acceptance/rejection such that an unsatisfactory trial solution can be rejected and another new trial solution will be computed with a new trust region modified according to θ. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 18 fp The determination of acceptance/rejection of a new trial solution (qwi 1 , q1 ) should fp depends on the comparison between its objective value J1 = J (qwi 1 , q1 ) and the fp objective value of the current trial solution J0 = J (qwi 0 , q0 ). A simple accepfp tance/rejection rule is to accept the new trial solution (qwi 1 , q1 ) if and only if it returns a better objective value than the current trial solution, i.e. J1 > J0 . However, such a local search process is unlikely to converge to a local optimum far from the current trial solution, especially in the case where the objective function is nonsmooth like in our problem. In a two-dimensional case, this can be explained as that we cannot reach a higher peak from a lower peak by crossing a valley if downward steps are not allowed. We have mentioned in Chapter 1 that the objective function in a simulation-based reservoir management problem is usually non-smooth and has a number of local optima. An acceptance/rejection rule that does not encouraging global exploration is not appropriate to this case, since the local optimum closest to the initial trial solution may be unsatisfactory in terms of objective value. Therefore, in this dissertation, a stochastic rule of acceptance/rejection is applied, where a non-trivial probability of acceptance is provided even when the new trial solution is temporarily worse than the current one in terms of the objective function. This mechanism is usually known as simulated annealing, which is one of the most popular and effective approaches used for a global exploration of the solution space hybridized with local search [33]. It is basically a trade-off between random sampling (always accept new trial solutions) and greedy local search (only accept new trial solutions with better objective values). This may allow the local search process to jump out of the neighborhood of a local optimum. In this dissertation, we define the probability of acceptance/rejection as follows. If J1 > J0 , which means that the new trial solution is better than the current one in terms of the objective function value, then we accept it. If J1 ≤ J0 , then we accept the new trial solution qwi and qf p with a probability Pacc that depends on the relative difference between J0 and J1 . A new trial solution with an objective value J1 that is only slightly smaller than J0 should have a higher probability of acceptance than a new solution where J1 is considerably smaller than J0 . In most variants of simulated annealing, the relation between Pacc and the relative difference between J0 and J1 is CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 19 exponential. Additionally, it is required that Pacc = 1 if J1 = J0 and that Pacc tends to zero as the difference J0 − J1 increases. We also force Pacc to decrease with respect to Nb , where Nb is the number of iterations since the local search yielded improvement in objective function value. This may prevent the local search from leaving regions of the solution space that are potentially attractive (many points in that region may have objective function values similar to the current best solution in the optimization process). All these considerations yield the following expression for Pacc , Pacc J0 − J1 = exp −βNb J0 , ∀J0 ≥ J1 (2.19) where β is a predetermined tuning parameter. For example, if right after obtaining an improvement in the local search (i.e. Nb = 1) we want to ensure that a new trial solution that is 2% worse than the previous solution will be accepted with a probability of 50%, then we set β = − log(0.50)/0.02. 2.3.5 Overall Workflow To summarize, the optimization workflow follows the scheme below. fp 1. Initialize the workflow with a feasible solution (qwi 0 , q0 ) and a trust-region size δ; preset the maximal trust-region size δmax , the minimal trust-region size δmin , the trust-region increase/decrease factor FTR , the trust-region control parameter ε, and the β parameter in simulated annealing. fp 2. Run streamline simulation with control setting qwi 0 and q0 ; compute the obfp jective value J0 = J (qwi 0 , q0 ); set Nb = 0. fp 3. If J0 is the highest objective value up to now, set Jbest = J0 and (qwi best , qbest ) = fp (qwi 0 , q0 ). 4. Obtain flux patterns from short-term period 1 to period NT from the streamline fp simulator for the control settings (qwi 0 , q0 ); construct local linearized model with these flux patterns using (2.9)-(2.10), (2.11)-(2.12) and (2.13). CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 20 fp 5. Solve local optimization problem (2.14)-(2.17) within trust region U(qwi 0 , q0 ) fp of size δ to obtain the new trial solution (qwi 1 , q1 ). fp 6. Run streamline simulation with control settings (qwi 1 , q1 ); compute the objecfp tive value J1 = J (qwi 1 , q1 ); increment value of Nb by one. 7. Compute θ using (2.18); if θ ∈ (1−ε, 1+ε), set δ = min{FTR δ, δmax }; otherwise, set δ = δ/FTR . fp fp wi 8. If J1 > J0 , update (qwi 0 , q0 ) and J0 with (q1 , q1 ) and J1 respectively, and fp set Nb = 0; if J1 ≤ J0 , compute Pacc using (2.19), and update (qwi 0 , q0 ) and fp J0 with (qwi 1 , q1 ) and J1 , respectively, with probability Pacc . 9. If δ is smaller than δmin , terminate optimization; otherwise go to Step 3. 2.4 Generate Flux Patterns with Finite-Volume Simulation In the previous section, we have already introduced the original form of our optimization method based on flux patterns generated by streamline simulation. The workflow is summarized in Figure 2.3. It takes advantage of the linearized model obtained from the flux patterns generated by streamline simulation to approximate the objective function and determine local search steps, avoiding the large computational cost that is incurred in derivative-free local optimization methods. However a limitation of this workflow is that a streamline simulator must be used to simulate the oil recovery process. Streamline simulation has its own drawbacks. For example, it is not mass conservative, which may cause issue of robustness in some cases. And streamline simulation may confront difficulties when applied to special model types, e.g. unstructured grid, dual-permeability, etc. In such situations, finite-volume simulation methods are more compatible and the majority of simulators used in commercial applications are based on them. If the user requires finite-volume simulation, the original workflow of our CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 21 Figure 2.3: The original workflow of the proposed optimization approach using streamline simulation. optimization method described in Figure 2.3 is not applicable. In this section, we introduce two types of postprocessing approaches applied to the simulation results from finite-volume simulation, which generate similar flux patterns as the proposed method. These flux patterns can be used in the same way as we addressed above to analyze the sensitivity of the objective function in order to reduce the number of simulations required and accelerate the optimization process. 2.4.1 Postprocessing by Tracing Streamlines The first way to generalize the proposed optimization method to make it compatible with finite-volume simulation is to use the velocity field computed by the finitevolume simulation to trace streamlines and produce the corresponding flux pattern in the same way as with streamline simulation. Standard streamline simulation mainly contains three numerical steps in each time step: solve pressure distribution and hence velocity field globally at first, then use the velocity field to trace streamlines, and finally solve the saturation distribution along each streamline. Flux patterns are generated in the second step, where streamlines are traces based on the velocity field and reveal well connectivity information. The second step is independent to how the CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 22 pressure field and velocity field are computed. In other words, it is not necessary that the velocity field where streamlines are traced is generated by a streamline simulator. For this reason, we can use finite-volume simulators which may be preferred to streamline simulators to simulate some types of oil recovery process, including computing the pressure and velocity fields. In fact, most commercial simulators based on finite-volume methods can generate velocity fields as output. We input the velocity field into the streamline software, and require the streamline software to generate flux patterns just as described in Section 2.3. At the same time, finite-volume simulator can also solve the saturation globally and update the saturation map for the next time step. This process is illustrated in Figure 2.4. The advantage of this new workflow is that it removes the limitation of the simulator in the optimization process. The user can use simulators applicable for their problems, e.g. simulators based on finite-volume methods, as long as the simulator used can output velocity fields. The computational efficiency of our optimization approach is basically not impacted, since only one simulation is required at each optimization step, although the real time needed will be generally longer due to the fact that finite-volume simulation usually takes longer time than streamline simulation. 2.4.2 Postprocessing by Finite-Volume Flow Diagnostics The streamline tracing postprocessing described above makes the optimization workflow compatible with finite-volume simulators. However, tracing streamlines is still difficult in certain situations sometimes. For example, most commercial streamline softwares are based on structured grids, and thus optimization problems based on unstructured models may not be suitable to the workflow described above. In this section, we will introduce a finite-volume flow diagnostic technique, which will serves as an alternative to streamlines in our optimization workflow. This method also postprocesses the velocity field like the postprocessing based on streamline tracing described above. This flow diagnostic technique was proposed in [50] and [44]. It assumes that a CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 23 Figure 2.4: The workflow of the optimization approach using finite-volume simulation and streamline tracing postprocessing. tracer is injected into the waterflood via each well in the steady state based on the current velocity field (with reverse velocity if assuming tracer injected via producers). The concentration of the tracer (denoted by c) evolves in the velocity field according to φ ∂ c + ~v · ∇c = 0, ∂t (2.20) where φ is the porosity and ~v is the velocity field. Notice that ~v is the negation of the real velocity vector when we consider the tracer reversely injected into a producer. As time goes to infinity, the concentration distribution of the tracer can be solved by ~v · ∇c = 0. (2.21) Although this steady-state condition cannot be achieved in fields, the steady-state tracer concentration identifies the flux pattern. We analyze the flux pattern of the two-dimensional single-phase example shown in Figure 2.1 with this flow diagnostic technique, and Figure 2.5 highlights the region assigned to an injector-producer pair I4-P2 using streamlines and the flow diagnostic technique respectively. In the left CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 24 plot, the region is simply represented by the streamlines from the injector to the producer; in the right plot, the brightness of each cell represents the percentage of pore volume at that cell that is assigned to this injector-producer pair, which is equal to the concentration of the tracer injected via the injector times the concentration of the tracer (reversely) injected via the producer. It is shown in Figure 2.5 that these two regions are very similar, which indicates that the flow diagnostic technique provides us similar reservoir screening information as streamlines in this single-phase example. Figure 2.5: A comparison of streamlines and the flow diagnostic technique in identifying the drainage region of an injector-producer pair. Equation (2.21) can be solved by a upstream weighting approach in a computationally efficient manner. Details about the numerical solution of tracer equation (2.21) is proposed in [50], so we do not introduce the details in this dissertation. To implement our proposed optimization method, we need to identify the coefficients p i Rij , Rij , Eij , Cij , i = 0, 1, · · · , NI , j = 0, 1, · · · , NP i from the flux patterns generated by the flow diagnostic technique. Recall that Rij is defined as the ratio of the fluids flowing from injector i to producer j to the total fluids injected via injector i. So naturally we can use the concentration of the tracer CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 25 p injected via injector i at producer j to represent this coefficient. Similarly, Rij is represented by the concentration of the tracer reversely injected via producer j at injector i. Eij is originally defined as the average oil cut of the streamlines between injector i and producer j. Here we define it as the average oil fraction in the fluids flowing directly into producer j that assigned to the injector-producer pair i-j. For example, suppose that producer j has two neighboring cells, and the percentage of pore volume assigned to the injector-producer pair i-j at these two cells are 30% and 60% respectively. And suppose that the oil and water rates from the first neighboring cell to producer j are 300 bbl/D and 200 bbl/D respectively, and that the oil and water rates from the second neighboring cell to producer j are 100 bbl/D and 400 bbl/D respectively. Then the average oil fraction in the fluids flowing directly into producer j that assigned to this injector-producer pair i-j is equal to Eij = 300 × 30% + 100 × 60% = 0.33. (300 + 200) × 30% + (100 + 400) × 60% Finally, Cij is the rate ratio of total fluids (in and out) associated with the injectorproducer pair i − j. The rate of the fluids flowing into the injector-producer pair is equal to the injection rate qiwi times the concentration of the tracer injected via producer j at injector i. Similarly, the rate of the fluids flowing out of the injectorproducer pair is equal to the production rate qjf p times the concentration of the tracer injected via injector i at producer j. Their ratio is equal to Cij . As soon as we identify these coefficients, we can replace the streamline tracing with the flow diagnostics technique in the postprocessing stage. This workflow is compatible with finite-volume simulators as well as general models to which streamlines are not always suitable (e.g. unstructured grid). We emphasize that the basic properties of our proposed optimization method, especially the computational efficiency, remains, since no other aspect in the workflow is modified. This workflow is illustrated in Figure 2.6. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 26 Figure 2.6: The workflow of the optimization approach using finite-volume simulation and flow diagnostic postprocessing. 2.5 Case Study - Short-Term Optimization In this section, we test our method on two field models. The method used in this section is the original form of the streamline-based method, without finite-volume simulation or postprocessing stage. Both models are modified versions of real fields. In Field 1, we make the assumption of fluid incompressibility, i.e. C = 1. There are 10 producers, 7 injectors and an aquifer in the field. In Field 2, we allow slight fluid compressibility (C ≈ 1.02). There are 71 producers and 64 injectors. Both fields are mature fields with declining oil rate and high water cuts. The permeability maps of these two fields are shown in Figure 2.7 (left plot for Field 1 and right plot for Field 2, and the permeability distribution is shown where red and blue corresponds to high and low permeability values respectively). We choose the direct search method [34] as a comparison to our method. Direct search is a derivative-free optimization method which converges to locally optimal solution. It has been used in simulation-based oil reservoir optimization recently [19]. It is a method designed for problems where gradients of the objective function are not CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 27 Figure 2.7: The permeability maps of Field 1 (left) and Field 2 (right). available and the code of simulator is not accessible (hence no adjoint information is available), which is same as our proposed method. The direct search method is supported by solid convergence theory and therefore we use it as a benchmark method in this section. A disadvantage of direct search is that the computational cost is high due to the large number of function evaluations usually required, while the computational efficiency is the key advantage of the streamline-based method proposed in this dissertation. Here we implement the direct search method by using the patternsearch function in MATLAB. To compare our approach to the direct search methods, we generate 60 independent short-term cases for each field. The difference between the 60 cases for each field is the starting reservoir state for each short-term problem. Instead of generating 60 random initial states, we first ran a reservoir simulation with a given initial condition and fixed control setting for 30 periods. This generated 30 different reservoir states corresponding to the reservoir states at the end of these 30 periods respectively. We then changed the control settings and re-generated another 30 reservoir states, also starting from the same initial state. We then optimized each of the 60 short-term problems with both our method and direct search. In every case, a short-term period is 90 days. We define a field injection target CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 28 constraint which restricts the sum of the well rates at all injectors. For Field 1, the field injection target in every period is 1.35 × 106 m3 (= 15000 m3 /d × 90 days). For Field 2, the field injection target is 3.01 × 106 m3 (= 33476 m3 /d × 90 days). The oil price used here is a constant 107 USD/bbl. The cost to inject water and the cost to separate and dispose water produced are both 5 USD/bbl. Notice that for this example we use an incompressible field model (field injection rate is equal to field production rate), and an injection target is introduced as an equality constraint (total injection cost is fixed), therefore maximizing profit is equivalent to maximizing oil production volume. For the 60 short-term problems corresponding to Field 1, we compare in Figure 2.8 the optimized objective function values (field oil production volumes) and the number of objective function evaluations (simulations) required. In general objective values obtained with both methods are similar. The objective values returned by the streamline-based method is comparable with those by the direct search. As expected, the streamline-based method requires much fewer function evaluations (81% less on average). For the 60 short-term problems corresponding to Field 2, we again compare in Figure 2.9 the objective function values (field oil production volumes) and the number of objective function evaluations (simulations) required. As for Field 1, the oil production obtained from both methods are comparable. Again, the streamline method requires significantly fewer function evaluations (97% less on average). The computational efficiency of the streamline-based method is even more evident for Field 2 because the associated optimization problem has many more variables compared to Field 1. The ratio of CPU time used by the direct search method and streamline-based method is on the same order as the number of wells NI + NP . This is consistent with the fact that streamline-based method reduces the number of simulations required in each step from NI + NP to one. It is worthwhile mentioning that, in both fields, the oil production obtained from the streamline-based method is comparable with those from the direct search method. The difference is within 5% in most cases, and neither method outperforms the other consistently. This can be explained by the fact that both methods aim at locally CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 29 Figure 2.8: Comparison of short-term oil production optimization (top) and the number of reservoir simulations required (bottom) for Field 1. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 30 Figure 2.9: Comparison of short-term oil production optimization (top) and the number of reservoir simulations required (bottom) for Field 2. Notice that in the bottom graph the scaling for the y-axis is not linear for a clear view. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 31 optimal solutions, and as a consequence can be attracted to different optimal regions of the search space. Generally speaking, the streamline-based method performs as well as the direct search method in terms of objective value. For all the optimization, the trust-region increase/decrease factor FTR is equal to 1.2, the trust-region threshold ε is equal to 5.0, and the tuning parameter for simulated annealing β is equal to − log(0.50)/0.02. The algorithm is implemented in C++ on a single computing processor of a 2.26 GHz quad-core Nehalem (5520) CPU with 24 GB of RAM. The streamline simulator used is 3DSL v4.10 [53], and the linear programming solver used is MOSEK v6.0 [42]. Without particular note, this computational setting will be used in the rest of this dissertation. 2.6 Long-Term Waterflood Optimization In a long-term (5 to 15 years) optimization problem, we seek an optimal sequence of control settings that improves sweep and maximizes the net present value (NPV) of the field. The long-term timeline is divided into a number of short-term periods, over which the well controls can change. Within a short-term period, all controls are kept constant. This discretization is motivated by how oil fields are operated. Well rates are not changed continuously, instead rate changes are usually implemented every 3 to 6 months at best. Here we assume that new rates for all the wells are implemented at the same time at discrete intervals. We denote the number of short-term periods NT . In this dissertation, the NPV of a field associated with a certain control strategy is defined as the highest cumulative (discounted) profit that can be obtained by this control strategy, NPV = max 0≤K≤NT (K X k=1 pk NP X j=1 op qj,k − cpk NP X j=1 wp qj,k − cik NI X ! wi qi,k ) ∆tk (1 + d)−k , (2.22) i=1 where d is the discount rate for every short-term period. All the other variables are defined in the same way as the short-term objective function (2.1), except now they CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 32 are defined in each short-term period along the timeline and the subscript ‘k’ indicates the variable is corresponding to the k th short-term period. The maximization in (2.22) essentially means that the production time frame (indicated by K) is defined in such manner that unnecessary profit losses are avoided by terminating production if NPV is not expected to increase in future periods. The rates associated with the last NT −K ∗ production periods (where K ∗ is the optimal value found for K in the maximization in (2.22)) are not considered in the computation of the objective function. However, small perturbation of these rates may influence the maximization in (2.22) and yields a different value of K ∗ . Intuitively, it is easy to see that one may want to produce more oil when the oil price is high and less oil when the oil price is low. The predicted oil price curve plays an important role in the long-term optimization process. In real word, the oil price should be regarded as a random variable. In this chapter, however, we regard it as a deterministic variable representing the expected oil price curve. The risk associated with the market uncertainty will be studied in Chapter 3. In practice, the rate controls are not expected to vary significantly from one period to the next. Production strategies with a marked volatile behavior often are not the most attractive ones to implement. For that reason, we introduce an additional set of (linear) constraints into the long-term optimization problem. They constrain the rate change over two consecutive periods not to exceed a certain fraction α × 100%. We write the complete optimization problem as follows, max qwi ,qf p s.t. max 0≤K≤NT (K X pk k=1 NP X j=1 NP X p op qj,k − ck wp qj,k − cik j=1 NI X ! wi qi,k ) ∆tk (1 + d)−k , (2.23) i=1 wi Lii ≤ qi,k ≤ Uii , ∀i = 1, 2, · · · , NI , k = 1, 2, · · · , NT , (2.24) fp Lpj ≤ qj,k ≤ Ujp , ∀j = 1, 2, · · · , NP , k = 1, 2, · · · , NT , (2.25) wi wi wi ≤ (1 + α)qi,k−1 , ∀i = 1, 2, · · · , NI , k = 1, 2, · · · , NT , (1 − α)qi,k−1 ≤ qi,k (2.26) fp fp fp ≤ qj,k ≤ (1 + α)qj,k−1 , ∀j = 1, 2, · · · , NP , k = 1, 2, · · · , NT , (2.27) (1 − α)qj,k−1 NI X i=1 wi qi,k =C NP X j=1 fp qj,k , ∀k = 1, 2, · · · , NT , (2.28) CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 33 fp wi , i = where qwi and qf p denote the vectors of all control variables qi,k and qj,k 1, 2, . . . , NI , j = 1, 2, . . . , NP , k = 1, 2, . . . , NT . The objective function (2.23) is the same as (2.22). The constraints on the rate change over time mentioned above are included by (2.26) and (2.27). We emphasize that the optimization variables in the objective function (2.23), the NPV of the field, are the total fluid rate at each well in each short-term period. Therefore the main computational difficulty in evaluating the objective function is still that op wp the oil production rates qj,k and water production rates qj,k are complicated functions of the control variables and their evaluation requires expensive reservoir simulations. In this section, we continue using the model linearization based on flux patterns, which is described in Section 2.3, to approximate the objective function linearly and accelerate the optimization process. The linearized approximation of the oil/water opl wpl rates, qj,k and qj,k in Equation (2.13), is still used for long-term problems, except that this approximation now is applied in each short-term period. Correspondingly, it is straightforward to formulate the long-term local subproblem around the current trial solution (qwi , qf p ) in a similar way as short-term local problem (2.14)-(2.17) as follows: max fp (qwi ,qf p )∈U (qwi 0 ,q0 ) s.t. NP NP NI K X X X X opl wpl wi pk qj,k − cpk qj,k − cik max qi,k ∆tk (1 + d)−k , 0≤K≤NT k=1 Lii ≤ wi qi,k j=1 j=1 (2.29) i=1 ≤ Uii , ∀i = 1, 2, · · · , NI , k = 1, 2, · · · , NT , (2.30) fp ≤ Ujp , ∀j = 1, 2, · · · , NP , k = 1, 2, · · · , NT , Lpj ≤ qj,k (2.31) wi wi wi , ∀i = 1, 2, · · · , NI , k = 1, 2, · · · , NT , ≤ (1 + α)qi,k−1 (1 − α)qi,k−1 ≤ qi,k (2.32) fp fp fp (1 − α)qj,k−1 ≤ qj,k ≤ (1 + α)qj,k−1 , ∀j = 1, 2, · · · , NP , k = 1, 2, · · · , NT , (2.33) NI X i=1 wi qi,k =C NP X fp qj,k , ∀k = 1, 2, · · · , NT , j=1 Sometimes the solution of this local subproblem is not unique. It is specially likely when the solution (qwi , qf p ) yields an early termination of reservoir life, i.e. the value of K ∗ is smaller than NT . In this situation, the values of control variables corresponding to the periods later than period K ∗ do not impact the optimality of the solution of the local problem, since the profits in these periods are not taken into account in (2.34) CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 34 the objective function. However, as mentioned above, a perturbation of well rates may influence the maximization in the objective function and yields a different value of K ∗ . Among all the solutions with the same optimal objective value, a solution returning not only higher profit before period K ∗ but also lower loss afterwards is preferred, since local search is more likely to find a better solution around that point. In order to choose the most desirable solution (in terms of profit losses after period K ∗ ) among multiple optimal solutions of (2.29)-(2.34), we solve the a secondary optimization problem after (2.29)-(2.34). The following secondary optimization problem, (2.35)-(2.40), minimizes the loss after period K ∗ over all possible values of the control variables in these later periods, while the values of the control variables before period K ∗ are fixed. max fp wi f p (qwi s ,qs )∈U (q0 ,q0 ) s.t. NP NP NI NT X X X X wpl opl wi pk ∆tk (1 + d)−k , qj,k − cpk qj,k − cik qi,k ∗ (2.35) wi ≤ Uii , ∀i = 1, 2, · · · , NI , k = 1, 2, · · · , NT , Lii ≤ qi,k (2.36) j=1 k=K Lpj ≤ fp qj,k ≤ Ujp , j=1 i=1 ∀j = 1, 2, · · · , NP , k = 1, 2, · · · , NT , wi wi wi , ∀i = 1, 2, · · · , NI , k = 1, 2, · · · , NT , ≤ (1 + α)qi,k−1 ≤ qi,k (1 − α)qi,k−1 (2.37) (2.38) fp fp fp (1 − α)qj,k−1 ≤ qj,k ≤ (1 + α)qj,k−1 , ∀j = 1, 2, · · · , NP , k = 1, 2, · · · , NT , (2.39) NI X i=1 wi =C qi,k NP X fp , ∀k = 1, 2, · · · , NT , qj,k j=1 ∗ fp where qwi s and qs represent the vector of control variables in periods later than K , fp and the corresponding neighborhood is represented by Us (qwi s0 , qs0 ). Note that unlike in problem (2.29)-(2.34), the optimization variables here are only those from period K ∗ + 1 on, and the objective is to minimize the cumulative loss in those periods. Combining the solution of (2.29)-(2.34) with that of (2.35)-(2.40) yields the next trial solution in this optimization iteration. A potential problem in the generalization of the proposed optimization method to long-term cases is that a flux pattern only represents the reservoir behavior in that time point. In short-term problems, the reservoir condition does not change significantly over the period, therefore the optimization step taken based on the linearized approximation is expected to improve the objective value effectively. In long-term (2.40) CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 35 cases, however, a perturbation in well rate at an early period may influence the oil recovery in later periods, and hence the profit in those periods. The current sensitivity analysis does not include the information about the sensitivity of later production with respect to an earlier control variable. Therefore the objective function is not fully approximated with the flux patterns. In the rest of this section, we will introduce two ways to modify our method for long-term optimization problem. 2.6.1 Two-Stage Optimization Based on Decline Models In this subsection, we propose to approximate the solution of the long-term optimization problem by decomposing it into a sequence of NT short-term problems that are linked using a master problem based on an analytical decline model which guides the field production/injection rates. Each of the subproblems are solved under the field rate target constraint, using the linearized model based on streamlines introduced previously. The long-term nonlinearity in the model is captured by iteratively calibrating the decline model with the simulation results from the subproblems and updating the field rate strategy that constrains the subproblems over time. Although optimizing a sequence of short-term problem is in general not equivalent to optimizing the long-term problem, by means of the long-term master problem using a decline model, we are able to guide the sequence of short-term optimizations. The master problem allows us to predict and guide each short-term optimization, so that when combined, they aim at optimizing the entire waterflood time frame. It is important to note that the approximation model described next allows calibration. We exploit this feature after each sequence of short-term optimization problems to improve the long-term model and iteratively repeat this two-stage optimization procedure until convergence. This two-stage optimization procedure is illustrated in Figure 2.10 for the first two iterations. We start assuming that the total field rate is constant over all time, and then each subproblem is solved under this field target. The model is re-calibrated using the simulation results obtained from the subproblems, to the master problem leads a better field target based on the re-calibrated model and the long-term oil price curve. The process is repeated until convergence (i.e. no further CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 36 Figure 2.10: Connection between the master problem (top) and subproblems (bottom) for an example with 17 wells that is described later, for two consecutive iteration of the two-stage optimization algorithm. The red lines represent the field injection target constraints, while the color bars represent the well control settings. increase in NPV). Modified Exponential Decline Model The key point in the whole process is to approximate how the field oil rate changes with a given sequence of field injection targets. We assume that the decline in the field oil rate is principally a function of field injection target sequence. We then introduce a decline model for the field oil rate which depends only on the field injection target, with two calibration parameters to relate the field oil rate with the control settings at individual wells. For mature fields that are responsive to waterflooding, this is an acceptable model. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 37 The starting point is the well-known exponential decline model [2, 36]: N (t) = N0 e−λt , (2.41) where N (t) represents the recoverable oil reserve at time t, N0 is the recoverable oil reserve at time t = 0 (when the long-term optimization starts), and λ is the decline factor related to the reservoir state and operation. The cumulative field oil production associated with (2.41) is N0 (1 − e−λt ), and the field oil production rate is λN0 e−λt . In Figure 2.11 we illustrate the validity of the decline model for a mature reservoir operated with production settings that do not change over time, showing that the relation between field oil production rate and recoverable oil in place is approximately linear. In the top figure, we operate a reservoir with constant control settings and obtain a relation between field oil production rate and recoverable oil in place that is approximately linear. The decline model above describes reservoir behavior under constant control settings. We would like to modify this model such that it can be used in scenarios where controls change over time. First, we observe that the oil production rate associated to the original exponential decline model is proportional to both the current recoverable oil reserve N (t) and to the decline factor λ. Indeed, it can be derived by taking derivative over Equation (2.41), i.e. −dN/dt = λN (t). A reasonable generalization of this model can be made by considering a time-dependent decline factor λ(t) proportional to the current field water injection u(t) and to N (t). The validity of this generalization is also illustrated in Figure 2.11. In the bottom figure, we operate the same reservoir with constant control until the 1810th day. At this point we increase the fluid rates in all wells by the a same percentage. The figure shows that, at the time point where the rate is changed, the relative increase of oil rate is of the same percentage as the relative increase of field injection rate. Then the original exponential decline model can be generalized to N (t) = N0 e−c Rt 0 u(s)ds , (2.42) where c > 0 is a calibration constant. The cumulative field oil production associated CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES Figure 2.11: Validation of the decline model. 38 CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 39 Rt to (2.42) is equal to N0 1 − e− 0 cu(s)ds , and the corresponding oil production rate is cN0 u(t)e− Rt 0 cu(s)ds . If the field water injection u(t) is given as a piecewise constant function with associated sequence of rates in NT periods {u1 , . . . , uNT }, then the field oil production rate at the end of period k is γuk N0 e−γ Pk m=1 um , where γ > 0 is counterpart of c in the discretized form. It is worthwhile mentioning that two production strategies with identical sequence of field water injection rate may in general present different injection and production rates for each well and therefore do not necessarily yield the same field oil production profile. As a consequence, the values of N0 and γ in both situations are not expected to coincide. In fact, total recoverable oil N0 also depends on the particular production profile considered. Hence, and it could be beneficial regarding the accuracy of the solutions obtained to iteratively calibrate the modified decline model. In this dissertation, the calibration is formulated as a least-squares minimization problem where the objective function refers to discrepancy in field oil produced with respect to simulation, and the optimization variables are the parameters N0 and γ. The optimization problem is solved using MATLAB Global Optimization Toolbox (multistart optimization function GlobalSearch with gradient-based local optima solver fmincon). It should be noted that, since the calibration process is applied to a previously performed streamline simulation, the computational cost of this regression process (a relatively simple optimization problem where the objective function is not expensive and only two variables are to be optimized) is negligible when compared to the other procedures in the complete two-stage optimization algorithm. Long-Term Master Problem Once the decline model is calibrated (i.e. parameters N0 and γ are fitted), we can write a master problem where the field rate target is solved to guide subproblems. The P P P op −γ km=1 um decline model gives field oil production rate as N , and j=1 qj,k = γuk N0 e the field water produced can be determined by subtracting the field oil produced from uk /C (recall that C is the given voidage replacement ratio assumed constant). With CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 40 these considerations we can rewrite the long-term optimization problem (2.23)-(2.28) in the form of master problem as follows: max max (K X u 0≤K≤NT s.t. PNI wi i=1 qi,k pk k=1 = uk , NP X j=1 wp qj,k − cik j=1 op j=1 qj,k = γN0 ut e− NI X ! wi qi,k PNP Lpj ≤ uk /C ≤ Uii , PNP m=1 γum , ∆tk (1 + d)−k , (2.43) k = 1, . . . , NT , (2.44) (2.45) i=1 j=1 ) i=1 PNT PNI Lii ≤ uk ≤ j=1 op qj,k − ck PNP PNI i=1 NP X p Ujp , (1 − α)uk−1 ≤ uk ≤ (1 + α)uk−1 , k = 1, . . . , NT , PNP f p k = 1, . . . , NT . j=1 qj,k = uk /C, (2.46) (2.47) (2.48) This master problem optimizes field rate target sequence based on the current decline model. The objective function (2.43) is in the same form as that of the original long-term optimization problem (2.23). But it is “analyticalized” by the decline model (2.44), therefore computationally expensive simulations are not involved in this problem. Constraints (2.45)-(2.48) are corresponding to the constraints in the original long-term problem (2.24)-(2.28). The solution of the master problem is a sequence of field rates optimized using the current decline model. The field rate target in each period is used to guide the subproblem of that period in the form of a constraint. In particular, it yields equality constraints in the subproblems restricting the sum of production rates at all producers and the sum of injection rates at all injectors. Given a field injection strategy represented by u = {u1 , u2 , . . . , uNT }, for period k we can write the conP I wi PNP f p straint as uk = N i=1 qi,k = C j=1 qj,k , where C is the voidage replacement ratio. These constraints are added to short-term problems in the same form of (2.1)-(2.4). The subproblems are then solved by the means introduced in Section 2.3. The new simulation results obtained when solving the subproblems are used to re-calibrate the decline model. The decline model as well as the master problem are updated, and the corresponding subproblems are solved again. Iterative calibration helps to improve the accuracy of the solution and is the key step that allows the decomposition of the CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 41 Figure 2.12: Field 1: Cumulative oil production obtained with uniformly assignment of field injection target (blue) and its regression curve with decline model (magenta), cumulative oil production with updated field target estimated by decline model (green) and that obtained after the solution of the sequence of short-term problem (red). long-term optimization into two stages. In Figure 2.12 we illustrate the approximation quality of the modified decline model for Field 1 that will be studied in Section 2.7. First, we can see that when the field injection profile is uniform (uk = u), the cumulative field oil production over the 7.5-year timeline determined by streamline simulation (blue symbols) is almost identical to the forecast computed by the calibrated decline model (magenta symbols). If this same decline model (without further recalibration) is used for a different and non-uniform field injection strategy (in this case, the profile corresponds to the solution of the master problem) the difference between streamline simulation (red symbols) and the decline model (green symbols) is larger but still relatively small. We can expect that the error will be reduced with additional calibration. This iterative recalibration process will be terminated when the error is reduced to a predetermined threshold. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 42 Overall Two-Stage Workflow We now have all the components in the two-stage reservoir management optimization algorithm. The overall procedure is as follows (see flow chart in Figure 2.13): 1. Set the initial sequence of field water rates (e.g. a uniform strategy, i.e. uk = u for the NT periods) with given well control settings. This initial sequence of field rates may also be determined, for example, by considering some operational constraints due to facilities. 2. Solve the collection of short-term problems (2.1)-(2.4) subject to the sequence of field water rates obtained in step 1 (or 4) to determine control settings for each well. 3. Based on the streamline simulation performed in the previous step for the optimized configuration, fit by regression the parameters γ and N0 in the modified decline model. 4. Solve long-term master problem (2.43)-(2.48) to obtain an optimized sequence of field injection rates (field production rate is also obtained because of given fixed voidage ratio C). 5. If the norm of the difference between the new and the old sequences of field water rates is smaller than some predetermined tolerance, then terminate the two-stage optimization process, and return the optimized configuration for all the wells. Otherwise, update field water rate target and go to step 2. 2.6.2 Long-Term Sensitivity Analysis The proposed two-stage optimization process is guided by a decline model that predicts the oil recovery trend roughly. However, in some cases, the decline model is an oversimplification and cannot represent the nonlinearity of the dynamic behavior in oil recovery. For this reason, we also consider another way to generalize the proposed short-term method to long-term problems which does not use any additional simplified model other than the flux patterns. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 43 Figure 2.13: Flow chart of the two-stage optimization approach for long-term waterflood optimization. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 44 The limitation of the proposed short-term approximation using flux patterns in long-term optimization is essentially due to the fact that we use the instantaneous information extracted from flux patterns. For example, the oil production efficiency of an injector-producer pair may be temporarily high but drop rapidly soon, which makes this injector-producer pair unfavorable from long-term point of view, while the short-term analysis considers this injector-producer pair profitable. We find that this kind of situation is rare in mature fields whose oil cut is usually relative low and declining at a relatively slow speed. Therefore in mature fields, to optimize the well rates based on merely the short-term sensitivity analysis works well in general. This will be demonstrated with real field examples in Section 2.7.2. On the other hand, in green fields, the oil cut at producers may drop rapidly and long-term sensitivity analysis is more important. In this section, we address a modified linearized model which extracts more information from the flux patterns. In particular, we make use of the information between wells besides the information at the wells. Spatially, the flow in the region between wells is taken into account when we analyze the sensitivity of the objective function. Temporally, the flow information between wells helps us to estimate the production in future. To predict the future production with the current flux pattern, the distribution of flow fraction versus time-of-flight (TOF) plays an important role in our approach. As introduced in Section 2.3, TOF is the time required to reach a distance along a streamline based on the velocity field along the streamline [16, 57]. Usually TOF defined at a certain location is the time required for a neutral particle to reach there from the injector associated to this streamline. The time required for a neutral particle to reach a producer from a given location is called drainage time (DRT). The sum of TOF and DRT along a streamline is constant, which is equal to the time a neutral particle travels from the injector to the producer. Thus computing DRT is equivalent to computing TOF in this dissertation. Along each streamline, the oil/water flow fraction is known as well as the distribution of TOF (or DRT). We show an example of the distribution of oil flow fraction versus DRT along a streamline in Figure 2.14. This figure is obtained from the flux pattern at that time instant and predicts the evolution of oil cut in future assuming CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 45 Figure 2.14: An example of flow fraction versus DRT along a streamline (red for oil, blue for water). the steady-state condition. Although steady-state condition is generally not true in field, it has utility in understanding the oil recovery trend. It is particularly effective to identify the case where oil cut may drop rapidly in the future, which is mentioned in the example in the previous paragraph. At any time point, there are a large number of streamlines between a certain injector-producer pair. We combine them together by tracking the oil/water flow rate along the DRT axis over all the streamlines in parallel. At any point on the DRT axis, the corresponding oil/water flow rates over all the streamlines are summed up. This combination returns the distribution of flow fraction versus DRT along the connection between this injector-producer pair, which implies the production in the future that is supported by this injector-producer pair. When we analyze the sensitivity of the objective function with respect to the fluid rate of a certain well at a period, we need to analyze its influence on field oil/water production rate at this period as well as later periods. In our previously proposed approach, the well allocation factor and oil production efficiency of each injector-producer pair are assumed constant over a short-term period. The shortterm influence of a perturbation of a control variable is predicted with the constant flux pattern by means of model linearization, and the long-term influence is neglected. In this section, we modify the local approximation in two aspects using the additional CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 46 information extracted from the flux patterns. Firstly, within the short-term where a control variable is perturbed, the corresponding change of the oil/water production rate is predicted by the distribution of flow fraction versus DRT (i.e. the approximated evolution of oil cut versus time) instead of a single number of oil production efficiency. In a one-dimensional case of perfect oil replacement, the effect on the oil/water production volume caused by the increasing of the flow rate between the injector and the producer by a certain percentage is equal to the effect caused by increasing the length of the production period by the same percentage. By analogy, when we perturb the well rate by a certain percentage, we assume its effect is the same as perturbing the length of the short-term period by the same percentage. The later effect can be quantified with the distribution of flow fraction versus DRT in steady-state condition. The top plot in Figure 2.15 illustrates the short-term sensitivity analysis with respect to an injector. Here we assume that the injection rate is positively perturbed by 20%. Based on the description above, we consider it equivalent to increasing the length of this period, which is originally 30 days, by 20% to 36 days. The effect on the oil/water production volume over this period is that oil production is increased by 500 bbl and water production is increased by 100 bbl. The corresponding change of the profit over this period can be calculated according to the oil price and unit cost easily. It is worthwhile to note that in the case where the length of the short-term period is small, the difference between this new approach and the former one in Section 2.3 is minor, since the flow fraction over the period is almost constant and equal to the oil cut at the beginning of the period. Secondly, when the control setting of a well is perturbed at a certain period, its influence on the production in later periods is also estimated with the temporal information. We continue to use the one-dimensional example illustrated in Figure 2.15 where the flow rate between the injector-producer pair is increased by 20% at the first period and no perturbation is applied to the second period. As described in the previous paragraph, the time window of the first period is equivalently extended by 6 days (i.e. 20% of the period length) to estimate the production profile in the first period corresponding to this perturbation. Naturally the effect of this perturbation CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 47 on the production at the second period can be regarded equivalent to the effect of shifting the time window of the second period by a certain amount. In the particular case where the flow rate at the second period is identical to that at the first period, the two TOF axes have the same scale from the injector to the producer, and the shift of the second time window should be of the same length as the extension of the first time window. In general, the two axes have different scale, and their ratio is equal to the ratio of the flow rates (equal to 2 in Figure 2.15). Therefore the ratio between the length of the extension of the first time window and that of the shift of the second time window is also equal to that (the second time window is shifted by 3 days in Figure 2.15). The shifted time window estimates the production profile at the second period corresponding to the perturbation in the first period (500 bbl less oil and 500 bbl more water in Figure 2.15). Similar shifts should be applied to all later periods, which estimate the influence of an earlier control perturbation on production over the entire remaining timeline, and the corresponding change of the profit over the timeline is calculated accordingly. This modification helps to identify efficient/inefficient injector-producer pairs from the viewpoint of long-term optimization. In Figure 2.15, the perturbation at the first period yields more oil production at that period, and hence appears more profitable in short-term view. However it actually causes earlier water breakthrough, and the loss at the second period caused by the perturbation is even greater than the gain at the first period if the oil price does not decrease. This long-term analysis is not taken in the original form of our proposed method in Section 2.3. Numerical experiments in Section 2.7.3 will show that it is especially critical in the long-term management of relatively green field. In practice, we need a linear mathematical model in a similar form of Equation (2.9)-(2.10), (2.11)-(2.12) and (2.13) to estimate the oil/water production corresponding to a perturbation of the control variables quantitatively. If the current trial solufp wi tion is (qf0 p , qwi 0 ), and the perturbation at control variables qi,k and qj,k are denoted fp wi as ∆qi,k and ∆qj,k (i = 1, 2, . . . , NI , j = 1, 2, . . . , NP , k = 1, 2, . . . , NT ), then the oil/water production rate at each producer in each period is linearly estimated as CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES Figure 2.15: Long-term sensitivity analysis. 48 CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 49 follows: ! NT NI NP op op X X X ∂ ∂ J,K J,K opl op fp wi )+ qJ,K = qJ,K (qf0 p , qwi (∆qi,k (∆qj,k ) , 0 )+ wi fp ∂ ∂ i,k j,k i=1 j=1 k=1 ! N N NP wp wp T I X X ∂J,K X ∂J,K wpl wp fp fp wi wi qJ,K = qJ,K (q0 , q0 ) + (∆qi,k ) + (∆qj,k ) . wi fp ∂i,k j=1 ∂j,k i=1 k=1 (2.49) (2.50) wp fp op wi The first terms qJ,K (qf0 p , qwi 0 ) and qJ,K (q0 , q0 ) are the real oil/water production rate corresponding to the current trial solution (qf0 p , qwi 0 ), while the second terms add up the influence from the perturbation of each control variables to the production rate of producer J at the K th period. Operators op ∂J,K wi ∂i,k , op ∂J,K fp ∂j,k , wp ∂J,K wi ∂i,k and wp ∂J,K fp ∂j,k return the changes of oil/water production rate at producer J in period K corresponding to the perturbation of the well rate at injector i or producer j in period k. We regard them as linear operators, and the linear coefficients are obtained by the long-term sensitivity analysis. For each control variable, we perturb its value by ∆q, and the long-term sensitivity as Figure 2.15 returns the corresponding changes on oil/water production rate at producer J in period K, op ∂J,K wi ∂i,k (∆q), op ∂J,K fp ∂j,k (∆q), wp ∂J,K wi ∂i,k (∆q) and wp ∂J,K fp ∂j,k (∆q). In the linear local model (2.49)-(2.50), the linear operators are equal to op op wi ∂J,K ∂J,K ∆qi,k wi (∆q (∆q) × , ) = i,k wi wi ∂i,k ∂i,k ∆q (2.51) fp ∆qj,k (∆q) × , ∆q (2.52) wp wi ∂J,K ∆qi,k (∆q) × , wi ∂i,k ∆q (2.53) fp ∆qj,k (∆q) × , ∆q (2.54) op ∂J,K fp (∆qj,k )= fp ∂j,k wp ∂J,K wi )= (∆qi,k wi ∂i,k wp ∂J,K fp (∆qj,k )= fp ∂j,k op ∂J,K fp ∂j,k wp ∂J,K fp ∂j,k which formulates the estimation of oil/water production rate at producer J in period K as a linear function of control variables. This estimation depends on not only the controls in period K but also those before period K, and it provides better guide to long-term optimization in green fields where earlier controls influence later production CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 50 significantly. In practice, the choice of ∆q should depend on the radius of the current trust region δ. In particular, we use two-norm distance to define the radius of trust regions in this dissertation, and therefore ∆q is equal to the average perturbation on p each control variable is equal to δ/ (NI + NP )NT . 2.7 2.7.1 Case Study - Long-Term Optimization Two-Stage Optimization Based on Decline Models To test our two-stage approach for long-term optimization, we use the same field models as in Section 2.5 (i.e. Field 1 and Field 2). We also account for oil price by considering three noticeably distinct expected oil price curves. The first one is constant at 107 USD/bbl. The other two are two 7.5-year segments selected from the historical crude oil monthly prices (see Figure 2.16). The first segment (Oil Price Curve 2) is from August 1999 to January 2007 when the main tendency for the oil price was to increase. The second segment (Oil Price Curve 3) is from August 2004 to January 2012 when the oil price fluctuated significantly. We test three discount factors, 0%, 5% and 10% per year, on each field and each expected price curve. This gives a total 18 cases: 2 fields × 3 price curves × 3 discount factors. In Field 1, there is an upper bound for field injection rate of 3 × 104 m3 /d and a lower bound of 5 × 103 m3 /d. In Field 2, the upper bound and the lower bound for the field injection rate are 1.152 × 104 m3 /d and 6.695 × 103 m3 /d, respectively. Additionally, for both fields, the field injection rate can be increased/decreased by up to 20% between consecutive periods. As in the short-term problem, the cost to inject water and the cost to separate and dispose water produced are both 5 USD/bbl. In Case 1, the problem is based on Field 1 and Oil Price Curve 1 with a discount factor 0%. We already illustrated in Figure 2.12 the first iteration of the process. The exponential decline model is fitted with respect to cumulative oil production, and the recoverable oil reserve is estimated at N0 = 3.28 × 107 m3 with a coefficient γ = 3.09 × 10−8 m−3 . With these two values, we solve the simplified master problem (2.43)-(2.48). The new sequence of field injection target is plotted in Figure 2.17. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 51 Figure 2.16: Field 1 and 2: crude oil price from January 1999 to January 2012, and constant extension until July 2019. Figure 2.17: Field 1: field injection targets considered for Case 1: constant injection (CI; blue), ‘simple strategy’ (SS; green), and field injection strategy optimized by two-stage method (TS; red). In this case ‘simple strategy’ is the same as constant injection, so the blue line is superimposed by the green line. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 52 Figure 2.18: Field 1: NPV obtained for Case 1: default control setting with no optimization (NO; black), constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and two-stage streamline-based approach (TS; red). The horizontal dashed lines mark the maximal NPV that those strategies can reach; The vertical dashed lines mark the best shut-down time for those strategies. In this case, since the expected oil price is constant and there is no discount, the two-stage method returns a strategy that quickly reaches the highest field injection rate possible. Thereafter we estimate the cumulative oil production and cumulative NPV with the decline model under the new sequence of field injection targets, and simultaneously solve the collection of subproblems under this new sequence of field injection targets (see again Figure 2.12). The two-stage process converges to a final solution in three outer iterations. The cumulative path of NPV associated to the final solution is shown in Figure 2.18. This final optimized NPV is 9.3 billion USD, and this is 74% higher than the result that corresponds to keeping a constant field injection targets (i.e. default control setting). Figure 2.19 displays the change of the flow rates in time of six injectors and six producers in Field 1. We also compare the solution with a so-called ‘simple strategy’. The ‘simple strategy’ uses only the information from the oil price to determine the field target sequence. It starts from a field injection strategy ū which is proportional to oil price curve and with the average injection rate equal to default control settings on which CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 53 Figure 2.19: Field 1: flow rates of 6 producers (top two rows) and 6 injectors (bottom two rows) for Case 1 with optimized field injection strategy. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 54 the field was operated before the optimization. Since in general ū does not necessarily satisfy the constraint (2.47), we determine the closest strategy to ū using the 2-norm such that this constraint is satisfied. In our experiments, we have observed that this strategy is better than a strategy with constant rates. In Case 1, this strategy coincides with a constant injection strategy since the oil price in this case is constant and the NPV does not include discount. In Case 2 and 3, the scenario is as in Case 1, except that the discount factor (per year) is equal to 5% and 10% respectively. The resulting cumulative oil production and cumulative NPV are shown in Figure 2.20. The discount reduces the impact of later periods in the total NPV. In Case 2, the strategy obtained by the two-stage streamline-based approach terminates after the 28th period; in Case 3 the optimized strategy stops production after the 23th period. In other words, in both cases the field is shut-in before the end of full optimization period. Cases 4 to 6 are based on Oil Price Curve 2 (oil price increasing in time) with discount factors equal 0%, 5% and 10% respectively. With these oil price curves, the optimal strategy consists in not injecting much water at the beginning, so as to allow for extra production when the oil price is high. Figure 2.21 shows that the optimized field injection strategy has a similar trend as the oil price (and ‘simple strategy’) curve, but they yield significantly different NPVs. When the discount factor is 0% or 5% per year, the two-stage approach returns strategies that do not terminate before the last period allowed (suggesting that additional profit could be realized in the future), while a constant strategy and ‘simple strategy’ shut the field down earlier since the ‘overproduction’ in previous periods prevents the field from producing profitable oil when eventually the oil price is high. For a discount factor of 10%, all strategies terminate before the 8th period. Note that both the two-stage streamline-based approach and the ‘simple strategy’ fail to obtain a better solution than the constant field injection rate in Case 6. Here the discounted oil price is much lower than in the other cases due to a relatively low oil price and a large discount factor. As a result, the field appears to be almost uneconomic. Additionally, the accuracy of the decline model is questionable in this case. If the decline model is fitted using production data before the shut-down time, CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 55 Figure 2.20: Field 1: Case 2 (top; 5% discount factor) and Case 3 (bottom; 10% discount factor): the left column displays constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and the field injection strategy optimized by the two-stage streamline-based method (TS; red); the right column displays the corresponding NPV which is additionally compared with default control settings without optimization(NO; black). CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 56 Figure 2.21: Field 1: Case 4 (top; 0% discount factor), Case 5 (middle; 5% discount factor) and Case 6 (bottom; 10% discount factor): the left column displays constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and the field injection strategy optimized by the two-stage streamline-based method (TS; red); the right column displays the corresponding NPV which is additionally compared with default control settings without optimization (NO; black). CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 57 then the information used for the regression lasts only five initial periods, and there may not be sufficient data points to get a good calibration. If, on the other hand, the decline model is fitted using the production data over the entire time horizon, the regression process will minimize the total discrepancy of the decline model that correspond to the production data over all periods, and this will result in relatively large error in the initial periods, which are more relevant in this case. Cases 7 to 9 are based on Oil Price Curve 3 which fluctuates over time. The curve contains two peaks, one higher but short peak around the 15th period and the other slightly lower but longer peak around the 25th period. Figure 2.22 displays the field injection rate and corresponding cumulative NPV obtained by the two-stage approach as well as by a constant strategy and the ‘simple strategy’. In Case 7 where the discount factor is 0%, the two-stage streamline-based strategy evolves similarly to the oil price curve. Although the oil price in later periods is not as high as the first peak price, it stays at a high level for longer time. In a field where control settings are required to change gradually, a stable price peak can be more favorable than a short peak with higher value. In Case 8, the discount factor is 5% per year, and the solution presents a lower injection targets in later periods since the discounted oil price in these periods is lower. In Case 9, the discount factor is 10% per year and the second peak in the oil price curve is almost ignored in the net present value. Therefore, the solution obtained by the two-stage streamline-based approach terminates after the first oil price peak. Cases 10 to 18 are based on Field 2 with the same settings of oil price and discount factor as Cases 1 to 9. The corresponding results are shown in Table 2.1. Since Field 2 contains a large number of control variables, the problems corresponding to these cases are more challenging. We include the results of Field 2 here to demonstrate that our approach is efficient for very large and challenging problems. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 58 Figure 2.22: Field 1: Case 7 (top; 0% discount factor), Case 8 (middle; 5% discount factor) and Case 9 (bottom; 10% discount factor): the left column displays constant injection targets (CI; blue), ‘simple strategy’ (SS; green) and the field injection strategy optimized by the two-stage streamline-based method (TS; red); the right column displays the corresponding NPV which is additionally compared with default control settings with no optimization (NO; black). CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES Case Field Oil Price Curve Discount Factor (% per year) NPV (billion USD) - CI NPV (billion USD) - SS NPV (billion USD) - TS Relative Improvement (%) - TS vs. Relative Improvement (%) - TS vs. Case Field Oil Price Curve Discount Factor (% per year) NPV (billion USD) - CI NPV (billion USD) - SS NPV (billion USD) - TS Relative Improvement (%) - TS vs. Relative Improvement (%) - TS vs. Case Field Oil Price Curve Discount Factor (% per year) NPV (billion USD) - CI NPV (billion USD) - SS NPV (billion USD) - TS Relative Improvement (%) - TS vs. Relative Improvement (%) - TS vs. CI SS CI SS CI SS 1 1 1 0 5.36 5.36 9.31 73.80 73.80 7 1 3 0 2.72 2.77 3.42 25.78 23.66 13 2 2 0 0.41 0.44 0.86 109.70 95.19 2 1 1 5 4.38 5.26 7.47 70.66 42.02 8 1 3 5 1.99 1.99 2.37 19.33 19.53 14 2 2 5 0.37 0.37 0.40 7.81 7.86 3 1 1 10 3.59 5.14 6.17 71.85 20.23 9 1 3 10 1.49 1.52 1.63 9.60 7.07 15 2 2 10 0.34 0.32 0.36 5.45 12.87 4 1 2 0 0.21 0.26 0.89 313.92 240.17 10 2 1 0 7.83 7.62 7.81 -0.33 2.45 16 2 3 0 3.02 3.35 4.19 38.83 25.10 5 1 2 5 0.18 0.12 0.52 185.61 318.77 11 2 1 5 6.65 6.66 7.11 6.96 6.69 17 2 3 5 2.52 2.75 3.13 24.19 13.98 59 6 1 2 10 0.16 0.11 0.07 -53.52 -31.61 12 2 1 10 5.88 6.23 6.52 10.92 4.62 18 2 3 10 2.10 2.13 2.52 19.94 18.34 Table 2.1: Field 2: long-term problem results. (CI: constant injection, SS: ‘simple strategy’, TS: two-stage streamline-based approach) CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 2.7.2 60 Mature Field Optimization without Long-Term Sensitivity Analysis In mature fields, oil/water cut at producers and the flux pattern in field is relatively stable. As mentioned in Section 2.6.2, short-term sensitivity analysis provides sufficient information to the optimizer even when the optimization is long-term based. In this section, we apply the proposed method without long-term sensitivity analysis to three mature fields (Field 3, Field 4 and Field 5) to optimize their NPV. All these three fields have been operated for years and have a low and declining oil cut. Field 3 Field 3 is another modified version of the real field that Field 1 is generated from. Same as Field 1, Field 3 has 10 producers (indicated in red), 7 injectors (indicated in blue) and an aquifer on the East (indicated in green). The fluids in this oil-water system are assumed incompressible at reservoir conditions. Figure 2.23 shows the permeability distribution of the field with well locations, associated streamlines, and a derived flux pattern. The difference between Field 1 and Field 3 is in the initial reservoir state and fluid properties. Figure 2.23: Field 3: the permeability map of with wells and bubble maps (left), streamlines (middle), and derived flux pattern (right). The model reference scenario (before optimization) presents a declining oil rate and increasing water production, with the water cut at around 70% before the start CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 61 of the optimization. Figure 2.24 shows the flux pattern before the beginning the optimization. In the left plot, the thickness of each injector-producer connection (and the number over it) represents the flow rate (m3 /d) associated with this injectorproducer pair. The bubbles represent the ratio between oil production (red) and water production (blue). In the right plot, the thickness of each injector-producer connection (and the percentage over it) represents the oil production efficiency of this connection. The connections with oil production efficiency lower than 10% are not shown. Figure 2.24: Field 3: flux pattern at the time instant before starting the waterflood optimization. Our optimization goal for Field 3 is to maximize the NPV of the field over a 90month period by controlling the total fluid rates at all individual wells. We allow well rates to be modified every three months within a range of ±20% of their previous values. Hence there are 510 (= the number of wells × the number of three-month periods = 17 × 30) control variables. The maximum flow rate at each individual well is set to 10,000 m3 /d. The ‘do-nothing’ case (i.e. leaving the current well rates unchanged for future production), where the field continues on its current decline, is shown in Figure 2.25. In order to compute the NPV for the objective function, we need a forecast for the CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 62 Figure 2.25: Field 3: field injection and production rates for the ‘do-nothing’ case (using default control settings). The dashed line marks the time instant when the waterflood optimization will be considered. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 63 oil price. Here we generate the future economic scenarios according to the market price of crude oil from March 2003 to February 2013 using two stochastic processes: (1) the Wiener process [22] that assumes that the change of oil price between successive short-term periods follows a Gaussian distribution, and (2) the Ornstein-Uhlenbeck process [22], which is a variant of the Wiener process with mean-reversion. In the Wiener process, the oil price in the (k + 1)th period pk+1 depends on the oil price in the previous period pk according to pk+1 = pk + Zt , . (2.55) where Zt is an independent Gaussian random variable. We fit the Gaussian distribution of Zt by a maximum-likelihood estimation [27] using the oil price during the past 10 years (the corresponding mean and standard deviation are equal to 1.98 USD/bbl and 12.52 USD/bbl, respectively), and the initial oil price p0 is taken as 108 USD/bbl. Additionally, a lower bound of 10 USD/bbl is applied to the oil price generated since we assume that the oil price during the next seven and a half years will be higher than that bound. The left plot of Figure 2.26 illustrates 10,000 realizations of the oil price forecast obtained using the Wiener process, and the right plot of the same figure shows 20 representative realizations obtained by means of K-means clustering [40]. These 20 price curves are used to optimize Field 3. In all these 20 cases we assume the unit cost for water injection and production to be constant and equal to 5 USD/bbl. A popular variant of Wiener process is the Ornstein-Uhlenbeck process in which the price forecast is not only a stochastic function of the previous price but also of an expected long-term mean. One characteristic of the Ornstein-Uhlenbeck process is that persistent increasing/declining trends are less likely than volatile ones. In the Ornstein-Uhlenbeck process, if the expected long-term mean of oil price is given by µ, then the oil price in the (k + 1)th period pk+1 depends on both the oil price in the previous period pk and on the expected long-term mean µ according to pk+1 = ηµ + (1 − η)pk + Zt , (2.56) CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 64 Figure 2.26: Field 3: ten thousand realizations of oil price using the Wiener process (left) and 20 representative realizations selected from the 10,000 by means of K-means clustering (right). where η is a parameter between 0 and 1, and Zt is an independent Gaussian random variable which is fitted as in the Wiener process above. The mean-reverting effect is represented by η: a value of η closer to zero indicates weak mean-reverting effect, while a value of η closer to one indicates strong mean-reverting effect. A number of literatures (e.g. [47], [51], [23] and [7]) show that mean-reverting is an important stochastic property in commodity price trends, including crude oil price, and that the Ornstein-Uhlenbeck process captures major stochastic properties in the trend of crude oil price. In this case, η is equal to 0.2 and the expected long-term mean µ is taken as 108 USD/bbl. The left plot of Figure 2.27 shows 10,000 realizations of the oil price forecast obtained using the Ornstein-Uhlenbeck process, and the right plot of the same figure shows 20 representative realizations extracted by K-means clustering. The 20 representative realizations selected for both the Wiener and Ornstein-Uhlenbeck processes are used in the optimization of Field 3 (making a total 40 oil price forecasts). In all the 40 cases (i.e. one different optimization problem for each oil price forecast), we assume the unit cost for water injection and the unit cost for water production are both constant and equal to 5 USD/bbl. Each of the 40 waterflood optimization problems is solved in about 3 hours. Recall that the number of control variables is equal to 510, and that the streamline-based CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 65 Figure 2.27: Field 3: ten thousand realizations of oil price using the OrnsteinUhlenbeck process (left) and 20 representative realizations selected by means of Kmeans clustering (right). approach requires one single simulation at each local search step as opposed to most derivative-free optimization methods that require a number of simulations of the same order as the problem dimension. Thus these methods would require approximately 510 times more CPU time than the method presented in this dissertation, meaning around 64 days. In other words, the problem would practically be unsolvable without a powerful, preferably parallel computing environment. In Figure 2.28, we compare the NPV’s of Field 3 associated with the streamlinebased optimization, default control settings (‘do-nothing’ scenario), and the simple price-based control strategy. As Field 1 and Field 2, the simple price-based control strategy maintains the ratio of flow rates between wells the same as the default control settings, but the field total fluid rate is proportional to the oil price forecast along the time line. In other words, when the oil price increase all wells are increased by the same percentage. The 40 cases correspond to the 40 different price curves. As one would expect, in all cases the optimized solution is more profitable than the default (do-nothing) setting as well as the simple price-based strategy. Here we analyze the three cases 16, 20, and 25, which correspond respectively to the largest, smallest and medium values of NPV of all the 40 cases (see Figure 2.28). Figure 2.29 shows the oil price forecasts for these three cases, which are respectively CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 66 Figure 2.28: Field 3: comparison of NPV obtained with default control settings (red), NPV with simple price-based strategy (green), and NPV with the controls optimized using the streamline-based approach (blue). increasing, decreasing, and modestly volatile. Figure 2.30 illustrates the field injection/production responses (left) as well as the cumulative profit (right) associated with these three optimal field waterflood strategies. In Case 16, the oil price continuously increases over time and the optimization solution suggests increasing production as much as possible within the constraints of each individual well. This is a plausible and intuitive solution, since injection and production unit costs are constant but the oil price increases continuously. In Figure 2.31 (top left), we illustrate each individual well rate over time for the solution determined with the streamline-based approach. All operational constraints are satisfied during the entire 90-month production time frame. As expected, most wells are increased up to the maximum allowable rate of 10,000 m3 /d. In general, each well reaches the maximum at a different time since the initial rate is not the same for all the wells and the rate increase cannot be larger than 20% between time periods. However, some wells (injector 16, producers 1, 4, 8 and 9) inject/produce below the maximum rate. The four producers that do not reach the maximum allowable rate present the lowest oil cut at the start of the optimization (see Figure 2.24). The rate CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 67 Figure 2.29: Field 3: oil prices in Case 16, 20 and 25. of injector 16 is decreased by the end of the production time frame possibly due to the strong connectivity between this injector and the inefficient producers 1 and 4. Case 20 is the opposite of Case 16: the oil price is steadily declining. In his case, the optimal strategy is to produce as much as possible early on and then stopping operations when the oil price drops below about 50 USD/bbl (as shown in Figure 2.30). In this case the cumulative profit begins to decline (for both the optimized and non-optimized case) around 2017, and the recommendation would be to shut down the flood at that point. It is noteworthy to observe how the most efficient wells are clearly highlighted by the algorithm in Figure 2.31: producers 2 and 5, and injectors 14 and 15. Producers 2 and 5 are the producers with highest oil production efficiency at the start of the waterflood optimization (see Figure 2.24). Injectors 14 and 15 appear moderately efficient at the beginning of the optimization (see Figure 2.24), but the optimization approach finds a strategy such that these two injectors eventually become highly efficient. In Figure 2.32, we illustrate the flux pattern for Field 3 for the optimized waterflood that corresponds to Case 20 at the time instant when cumulative profit reaches the maximum value (December 2016). Similar to Figure 2.24, in the left plot, the thickness of each well-pair connection (and the number over it) represents the flow rates (m3 /d) associated with this injector-producer pair. The CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 68 Figure 2.30: Field 3: Comparison of field flow rates (left) and cumulative profit (right) in Case 16 (top), 20 (middle) and 25 (bottom). The NPV represents the highest cumulative profit over the 90-month time frame. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 69 Figure 2.31: Field 3: well rates over time in the optimized control settings in price scenario 16 (top left), price scenario 20 (top right) and price scenario 25 (bottom). Wells numbered from 1 to 10 are producers, and wells numbered from 11 to 17 are injectors. The color scale for the well rates is expressed in m3 /d. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 70 bubbles represent the ratio between oil production (red) and water production (blue). In the right plot, the thickness of each well-pair connection (and the percentage over it) represents the oil production efficiency of this connection (connections with oil production efficiency lower than 10% are not shown). Compared with Figure 2.24, we can clearly see in the figure that injectors 14 and 15 participate more efficiently in the waterflood. Injector 14 now looses less water to the aquifer and gets stronger connection to producers, The connection from injector 15 to the highly inefficient producer 9 is much weakened after we gradually shut producer 9 down, so that the efficiency of injector 5 also increases. Figure 2.32: Field 3: flux pattern for the optimized waterflood that corresponding to Case 20, and at the time instant when cumulative profit reaches the maximum value (December 2016). Case 25 is an intermediate case in which the oil price does not fluctuate much through time. The wells identified as inefficient in price scenario 16 and the wells that performed efficiently in Case 20 are also inefficient and efficient respectively in this case. However, in this case, the flow rates at most other wells are increased and then decreased along the time line. This is what one may expect since in scenarios where the oil price does not fluctuate significantly, the efficiency of a given well might be related more to the particular evolution of the whole flux pattern than to changes CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 71 in the oil price. In other words, in these scenarios, the cumulative profit is in general driven by the entire network of wells rather by just a few significant wells. Thus, obtaining the optimal water flood requires the joint consideration of most wells in the field, and this task, even for a field with a relatively small number of wells as Field 3, might be extremely difficult to accomplish by simple visual inspection of the flux patterns. This emphasizes the usefulness of determining waterflood strategies through formal optimization approaches as the one proposed in this dissertation. Field 4 Field 4 represents a real field in China with 72 producers and 102 injectors at the start of the waterflood optimization. Well locations, streamlines, and FPmap at the start of the optimization are shown in Figure 2.33. Historical production data for the field is available until October 1998. We start the optimization in June 1993, and compare the results obtained with the streamline-based approach to what was historically done in the field. Figure 2.34 shows the historical data (dotted lines) and the ‘do-nothing’ forecast (solid lines) starting in June 1993. The field is an example of a mature field with a very high water cut (94% at the beginning of the optimization) and with a significant amount of water being lost to the far field and aquifers. The voidage replacement ratio is approximately 2. Figure 2.33: Field 4: water saturation map with well locations (left), map of streamlines (middle), and flux pattern (right) at the beginning of the waterflood optimization. We consider again a 90-month optimization period discretized into 30 three-month intervals, yielding a total of 174×30 = 5, 220 control variables. Although the historical production data we have stops in 1998, we formulate our optimization using a longer CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 72 Figure 2.34: Field 4: field injection and production rates. The vertical black dashed line marks the time instant when the waterflood optimization is considered (June 1993). The dotted lines represent the historical data; the solid lines represent simulation results in which well rates are constant after June 1993. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 73 time frame since we expect that with our approach we can extend the ‘life’ of the reservoir and make it more profitable. We use the historical oil price from June 1993 to December 2000 in this case (Figure 2.35). As we have no information about the unit cost for water injection and that of water production at that time in China, we consider 11 possible scenarios for each of these costs (0 cent/bbl, 5 cent/bbl, 10 cent/bbl, · · · , 50 cent/bbl) for a total of 121 market scenarios. In other words, in contrast to Field 3, here we aim at analyzing the sensitivity of the optimization with respect to injection/production costs but using a single oil price forecast. Figure 2.35: Field 4: Oil price used for the waterflood optimization of Field 4. The average CPU time that the streamline-based approach requires for the optimization of each market scenario in Field 4 is about 15 hours. Since the streamlinebased approach needs one single simulation at each local search step, while many derivative-free optimization methods demand a number of simulations of the same order as the number of control variables (5,220 in this case), the computational cost of these methods for optimizing a market scenario in Field 4 can be expected to be around 3-4 orders of magnitude higher. This means, in the absence of parallelization, computing time of a several years. The bottom plot of Figure 2.36 shows the optimal NPV determined by the streamlinebased approach for all 121 market scenarios. The horizontal/vertical axes in this figure CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 74 refer to the water production/injection costs. For comparison purpose, we also include the non-optimized NPV (‘do-nothing’ case) and the NPV computed from the historical data in the top left and top right plot respectively. The optimized NPV is systematically higher than the non-optimized NPV and the NPV computed via historical data. Lower unit costs (lower-left side of each plot) result in higher optimal values of NPV as expected. The trend in the NPV visible in the plot is noteworthy because it suggests that the streamline-based algorithm is consistent and stable despite the large number of control variables involved in each optimization. Given the high voidage replacement ratio, it seems reasonable that the impact of the water injection cost on the NPV is more than the impact of the water production cost. This is indeed the case in Figure 2.36, in which the optimal value of NPV varies more rapidly along the vertical direction than along the horizontal direction. In Figure 2.37 we illustrate the field flow rates as well as the cumulative profit over time for the 11 cases obtained when the water injection unit cost is equal to the water production unit cost. It is evident in the figure that field rates and cumulative profit decrease as the unit cost increases. We are encouraged by the smooth behavior of the solutions as this again validates the stability of the optimization algorithm implemented. The optimized NPV is marked with a triangle for each case in Figure 2.37 (bottom right). Although the two lowest NPVs are negative, the streamline-based method succeeds in finding strategies returning as little loss as possible. In the case with the third lowest optimized NPV (where both unit costs are equal to 40 cent/bbl), the highest cumulative profit is reached around September 1997, and as a consequence the recommendation would be to shut down the flood at that point in time. All other cases present a positive optimized NPV that is achieved at the end of the production time frame. Finally, in Figure 2.38 we compare the optimized control settings in the specific case where both unit costs are equal to 40 cent/bbl with the default control settings (‘do-nothing’) and the real operational history. Instead of producing more oil than the default strategy here the optimal strategy is to inject and to produce less water than the default strategy while keeping a similar oil production rate. To achieve this CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 75 Figure 2.36: Field 4: non-optimized NPV (‘do-nothing’ case, top left), NPV computed via historical data (top right), and optimal NPV (bottom) of Field 4 in all 121 cases. The color scale for NPV is expressed in MM USD. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 76 Figure 2.37: Field 4: field water injection rate (top left), field oil production rate (top right), field water production rate (bottom left) and cumulative profit (bottom right). The triangular markers in the bottom right plot represent the highest values of cumulative profit (i.e. optimized NPV) and the dates at which these values are reached. The numbers marked at the end of the curves refer to the unit costs (cent/bbl). CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 77 goal, a strategic combination of well control settings is of great importance, especially in a field with such large number of wells. The streamline-based optimization method captures the connectivity between wells and efficiently provides information about potentially better control settings. In fields with a large number of wells, proper rate management becomes intractable without a formal framework such as the one described in this dissertation. Indeed, it may be argued that even though a global maximum remains elusive due to some of the simplifications and linearizations introduced, the solutions found can be expected to be far superior to the ones obtained purely based on heuristics and human judgment. Formal optimizations using derivative-free methods combined with full-physics simulators are extraordinarily expensive. Figure 2.38: Field 4: comparison of field flow rates (left) and cumulative profit (right) in the case where both unit costs are equal to 40 cent/bbl. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 78 Field 5 Field 5 is a three-dimensional field model including 8 injectors and 4 producers. Figure 2.39 shows the permeability map of its top layer (red for high permeability and blue for low permeability) in the left plot and the saturation map (red for oil and blue for water) at the start time of the optimization in the right plot. 7 out of the 8 injectors are located along the boundary of the field, while the other one is located in the center. The 4 producers are located around the injector at the center. We start the optimization timeline from a time point at which the field water cut is about 70%. The optimization time frame is 90 days × 20 periods. Figure 2.39: Field 5: the permeability map (left) and the initial saturation map (right) of its top layer. In this case, we try to compare the streamline-based method with an adjointbased optimization method. We use the Automatic Differentiation General Purpose Research Simulator (AD-GPRS; [55]) developed by SUPRI-B at Stanford University as the simulator for adjoint-based optimization. AD-GPRS is a finite-volume simulator and is capable to compute adjoint-based gradient with respect to well flow rates. For the streamline-based method, we use 3DSL as in previous cases. For the fairness of the comparison, we require the simulation model used for AD-GPRS and CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 79 that for 3DSL to be equivalent in the sense that both simulation models return similar oil/water rates and saturation maps when we apply the same control setting to them. Due to the difference of the two simulation methods, it is not an easy task. To achieve the model equivalence, we had to modify the field model by losing the freedom of control at one injector and setting the bottom hole pressure (BHP) there as constant. This injector will not be controllable in the optimization and is excluded from the control variables. This injector is indicated in Figure 2.39 with well name ‘B1’. Since the optimization process cannot control the rate of B1 directly, we try to keep the rate of this injector close to zeros. This is the reason why there is a region with high oil saturation near B1. Due to the incompressibility of the field model, we enforce this constraint by requiring the sum of injection rates over all the other injectors equal to the sum of production rates over all producers. In this long-term problem, we use a constant oil price 100 USD/bbl. The unit cost for water production is 5 USD/bbl, and the unit cost for water injection is 3 USD/bbl. Besides the constraint requiring total injection equal to total production, we also constrain individual well rates between 10 bbl/D and 3000 bbl/D. We start the optimization from a ‘do-nothing’ strategy (keeping well rates at their values before the start of the optimization) for both methods. This initial solution returns objective value 35 MM USD. The computational setting for the streamline-based method is the same as in Field 4. The adjoint-based optimization is implemented with nonlinear optimization software IPOPT [13]. This optimizer makes use of the adjoint-based gradient vectors generated by AD-GPRS at each optimization iteration to locally search the next optimization step. The local search is based on a primal-dual interior point method [45]. Figure 2.40 shows the optimal well control strategies from the streamline-based method and the adjoint-based method. The control settings at producer 2 and 4 are very close. The rate at producer 2 is reduced to its lower bound in both solutions, which implies the inefficiency of this producer. From Figure 2.39, we can observe that producer 2 is located on a high permeability channel and the oil saturation on that channel is low. For that reason, the water cut of producer 2 is high. Producer CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 80 Figure 2.40: Field 5: the optimal well control strategies. Solid lines are streamlinebased solution, dashed lines are adjoint-based solution. Red lines are oil rates, blue lines are water rates, and green lines are total fluid rates. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 81 4 is located in the center of a relatively homogeneous region. It is preferred by both methods because of the large oil pocket between it and the almost-closed injector B1. Although the flow rate of B1 is forced to be small, producer 4 can still obtain oil from this region with the support from injector 5 or injector 7. In both solutions, the controls at injector 5 and injector 7 are complementary. The injection rate at injection 5 is very high in the first few periods and then drop to a very low level, while the control at the injection 7 is just on the opposite. Figure 2.41 shows the streamline maps over the saturation maps at the end of the third period and at the end of the 18 period respectively. There are streamlines from injector 5 to producer 4 and streamlines from injector 7 to producer 4 crossing the region of oil pocket in these two maps respectively. Figure 2.41: Field 5: streamline maps over the saturation maps at the end of the third period and at the end of the 18 period. The control strategies on producer 1 from these two methods are significantly different. The streamline-based method sets a very high rate at producer 1 at the beginning and gradually reduces it to a very low level, while the adjoint-based solution starts with very low rate and gradually increases it to a very high level. Since the effects of these two strategies on the long-term objective value is finally similar, we CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 82 believe the difference of the solutions is due to the fact that these two optimization methods reach two different local optima. Figure 2.42 shows the field rates (top left), cumulative field volumes (top right), profits (bottom left) and cumulative profits (bottom right) corresponding to the solutions obtained by these two methods. From the viewpoint of the entire field, the adjoint-based solution injects and co-produces a relatively large amount of additional water to get a relatively small amount of additional oil (see Figure 2.42 top right). Since the oil price is high, it yields to a higher objective value than the solution from the streamline-based method. However as mentioned in the previous paragraph, we believe the difference of the objective values is due to the difference of the local solutions these two methods converge to. As the main trend of the control strategies at most wells in the solutions are close, this example verifies the performance of our proposed method. Regarding the computational cost, these two methods use a similar number of reservoir simulations, although the numbers are not exactly the same due to the difference of the optimization framework and the convergence path. This is what we expect, since both methods require a single simulation at each optimization iteration. However, the streamline-based method uses streamline simulator 3DSL and the real time needed for one simulation is shorter than the real time used by AD-GPRS by about 50%. 2.7.3 Green Field Optimization with Long-Term Sensitivity Analysis In Section 2.6.2, we addressed a long-term sensitivity analysis based on flow fraction along streamlines. In mature fields, this method does not enhance the performance of the streamline-based waterflood optimization method significantly. The main reason is that flow fraction usually does not vary rapidly along a streamline in mature fields, therefore the estimated long-term influence is tiny in general. In Field 5, we apply both long-term and short-term sensitivity analysis, and the results are close. In green fields, on the contrary, oil cut at producers is more likely to decline CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 83 Figure 2.42: Field 5: field rates (top left), cumulative field volumes (top right), profits (bottom left) and cumulative profits (bottom right) corresponding to the streamlinebased method (solid lines) and adjoint-based solution (dashed lines). In the two top plots, red lines represent oil production, blue lines represent water production, and green lines represent water injection. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 84 rapidly. As addressed in Section 2.6.2, short-term sensitivity analysis cannot provide sufficient information to guide optimization in a long-term view in such a case. In this section, we show the proposed optimization method with long-term sensitivity analysis applied to a green field. Although the streamline-based optimization method was originally designed for waterflood optimization in mature fields, its performance shown in this section demonstrates its capability in solving long-term waterflood optimization problems in green fields when equipped with long-term sensitivity analysis described in Section 2.6.2. Field 6 Field 6 is a synthetic, homogeneous field model mainly used to illustrate the importance of long-term sensitivity analysis in green field. Its well location is shown in Figure 2.43. With a 100 × 100 square two-dimensional grid, Field 6 has 4 injectors at the 4 corners respectively and 1 producer located at (15, 30). In the initial state of the field, oil saturation is 1 all over the field. We fix the oil production rate of the producer at 12,000 bbl/D. The fluid and rock are assumed incompressible, therefore the total injection rate is also equal to 12,000 bbl/D. The upper/lower bounds of the total fluid rate at injectors are 800 bbl/D and 5,000 bbl/D respectively. The objective is to maximize the NPV of the field over a 5-year timeline that is uniformly divided into 10 periods. The oil price used in this case is 80 USD/bbl, and the unit cost for water injection and water production are 15 USD/bbl and 25 USD/bbl respectively. Discount rate is zero in this example. At the beginning of the optimization, the values of oil production efficiency of all the four injector-producer pairs are 100%, since oil cut of the only producer is 100%. From the viewpoint of short-term optimization, there is not sufficient information to distinguish their efficiency. Applying the proposed optimization method without longterm sensitivity analysis to the problem, the injection rate of the four injectors would be the same at the first period in the optimized strategy (see Figure 2.44). Figure 2.45 shows the evolution of the oil saturation map in Field 6 in annual frequency, assuming the short-term based solution is applied to the field. Although the water front from injector 1 and 2 are closer to the producer, short-term based sensitivity CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 85 Figure 2.43: Field 6: well location map. analysis is not able to identify these two injectors until the water front arrives at the producer. Short-term based sensitivity analysis captures the inefficiency of these injectors as soon as their water front reaches the producer and reduces the injection rates to the lower bound. However, since the lower bound of the injection rate in this example is set relatively high (800 bbl/D), the cost caused by water production is not avoidable in later periods. Similarly, injector 4 obtains more attention in the assignment of total injection volume only after water breakthrough, since the oil production efficiency between injector 4 and the producer does not outperform the other injectors’ before that. On the other hand, when using long-term based sensitivity analysis, we can identify the potentially efficient/inefficient injectors before water breakthrough. Figure 2.46 and Figure 2.47 show the optimal well control strategy obtained by the proposed method with long-term sensitivity analysis and its corresponding saturation maps. The potential inefficiency of injector 1 and 2 is captured by the long-term sensitivity analysis, and the rates at these two injectors are reduced to the lower bound at the first period even if the oil production efficiency between them and the producer is 100% at that time. Similarly, the potential efficiency of injector 4 is also identified CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES Figure 2.44: Field 6: short-term based injection strategy. 86 CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 87 Figure 2.45: Field 6: oil saturation maps corresponding to the short-term based injection strategy. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 88 from the first period and its rate is increased to the upper bound in the first period. Figure 2.47 shows a more efficient sweep where the water breakthrough is delayed to the latest time with feasible well controls. Figure 2.48 provides a clear comparison of the the short-term based solution and long-term based solution by showing the difference between the saturation maps obtained by these two methods. The difference of the water front from injector 1, 2 and 4 is highlighted. Regarding the objective value NPV, both methods start local search from a uniform and constant (3,000 bbl/D) injection strategy that returns 875 MM USD. The long-term based solution returns 1,191 MM USD (36% improvement), while the short-term based solution returns 1,123 MM USD (28% improvement). Adjoint-based method is also applied to this case as a benchmark, and the solution is very close to the long-term based solution. Figure 2.46: Field 6: long-term based injection strategy. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 89 Figure 2.47: Field 6: oil saturation maps corresponding to the long-term based injection strategy. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 90 Figure 2.48: Field 6: difference of oil saturation maps between the short-term and long-term based injection strategies. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 2.8 91 Discussion In previous sections, we propose a waterflood optimization method based on flux patterns. We introduce the original form of the method, as well as two variants where we corporate the optimization method with finite-volume simulation and two long-term optimization generalizations. The performance of this method in shortterm and long-term waterflood optimization is verified by six case studies. In this section, we discuss some of the key issues that emerged in the study. 2.8.1 Compressibility In the cases studied in this dissertation, incompressible or slightly compressible phases at reservoir conditions are assumed for the field models considered. We introduced this assumption because it is consistent with the streamline simulation framework and also leads to significantly reduced run times. It is important to underline that streamline simulation and the proposed streamline-based optimization approach are able to incorporate modest fluid compressibility. The well-pair voidage ratio defined in Section 2.3, Cij , is exactly equal to one in incompressible cases. In compressible cases, these parameters are not equal to one, and as a result the linearized model can account for fluid compressibility. However, a potential difficulty for using the linearized model in compressible cases is the time lag that will occur between control changes applied to injectors and the corresponding response observed at producers. The more compressible the fluids are, the longer the time lag will be. Indeed, for very compressible systems (e.g. gas reservoirs), injecting water would result in very large (infinite for all practical purposes) response times. In other words, for gas reservoirs the flux pattern is not a particularly good linearization. Therefore it is important to underline that this work is limited to floods where the principle production mechanism is displacement of oil by the injection of water, as opposed to production from expansion for example. The model linearization assumes that there is a direct response on oil production at offset producers if injection is modified at connected injectors. If expansion is the main production mechanism, this would no longer hold and the flux patterns would not CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 92 offer a good basis for determining oil production. 2.8.2 Nonlinear Constraints In the formula of the optimization problem we used for this work ((2.1-2.4) for shortterm optimization and (2.23)-(2.28) for long-term optimization), constraints only include maximum/minimum well rate, the limit on rate changes and fixed voidage constraint. However, other linear constraints with respect to well rates, such as field injection limit, maximum flow rate of well groups, etc., can be readily included in the problem without impacting the proposed optimization method. They can be treated in exactly the same way as the currently existing linear constraints. Nonlinear constraints, such as BHP constraints, are currently not included in the problem. We have not studied this topic, although we are confident that nonlinear constraint can be introduced in the optimization by means of the filter method. The filter method is an add-on to most optimization methods, and in general yields efficient performance [21, 20]. Alternatively, a number of nonlinear constraints can also be incorporated in the simulator itself using heuristic procedures (e.g. for BHP, most simulators allow one to specify controls through well rates and then include individual well pressure constraints). These procedures do not provide exact optimal solutions, but very often perform satisfactorily. 2.8.3 Global Optimality Since the method proposed in this work is essentially a local search based derivativefree method, there is some risk that the search process will be trapped in an unsatisfactory local solution, as is the case for all traditional derivative-free local search methods. Theoretically, it is impossible to obtain an algorithm that guarantees global optimality in general nonlinear optimization problem. To increase the likelihood to reach a satisfactory local solution in terms of the objective value, a simple but effective means is to incorporate global exploration in the algorithm to reduce this kind of risk. Simulated annealing described in Section 2.3.4 is such a method. The choice of an initial solution is also usually of great importance. A good initial solution in CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 93 terms of objective value yields higher probability and fewer number of iterations in finding a good local solution. 2.8.4 Decline Model In the two-stage method for long-term optimization problems, we make use of a decline model to guide the field injection/production target in long term. The modified exponential decline model is a simplified model of the long-term behavior of the reservoir and is likely to work best for fields that have been on a long historical decline. But even in such cases, the exponential model may be inaccurate when oil production does not decrease monotonically. This may happen when previously unswept oil is being mobilized by rate changes, which is at the heart of any improved reservoir management strategy for mature fields. We suggest a manual or automatic mechanism to detect this sort of behavior in practice and modify the model accordingly. Theoretically, the two-stage decomposition does not guarantee a long-term optimal solution, because in general optimizing a sequence of short-term problem is not equivalent to optimizing the long-term problem. However, by means of the master problem based on decline models, we are able to approximately guide the sequence of short-term optimizations through the constraints of the subproblems. The decline model allows us to predict and guide each short-term optimization so that when combined they aim at optimizing the waterflood over the entire time frame. 2.8.5 Long-Term Sensitivity Analysis Another method for long-term optimization addressed in this dissertation is based on the long-term sensitivity analysis using flow fraction along streamlines. Compared to the two-stage method using decline model, this method is more capable to optimize green fields. In the optimization of green fields, identifying efficient/inefficient wells in long-term view is of more importance than optimizing short-term control settings. The decline model performs poorly sometimes in green fields, because the oil recovery trend is unstable but the decline model assumes a smooth decline curve. In contrast, in mature fields, to identifying efficient/inefficient wells ahead of time CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 94 is not so important as optimizing short-term control settings, since the flux pattern is usually stable in mature fields and the difference between long-term and short-term sensitivity analysis is small. Moreover, mature fields usually contain a large number of wells, and the connectivity relationship between wells is complicated. The onedimensional simplification of the flow between a well-pair is not a valid approximation with significant interference between well-pairs. This may yield large error to the longterm sensitivity analysis. On the other hand, the decline model tends to be more stable in field with a large number of wells, since the noisy data in a few wells will not bring too many noises to the field data. For the viewpoint of implementation, longterm sensitivity analysis requires streamline software to output the flux information along all streamlines, and the I/O procedure may be time-consuming if the number of streamlines is large. This is not a problem for short-term sensitivity analysis since only flux information at wells is required. 2.8.6 Aquifers The linearized model (2.13) includes the oil and water produced as a result of the presence of aquifers, i.e. the part of production represented by (2.11)-(2.12). Aquifers represent a particular challenge, since one cannot control aquifers directly. From the viewpoint of optimization, including the aquifer term in the linearized model helps the optimization algorithm to control producers that are being supported by aquifers. Increasing/decreasing production from a well connected with an aquifer can clearly impact production. Additionally, aquifer properties are generally not well known and are at times inserted manually (although in reality an aquifer may not exist) for computational reasons. A conservative strategy is therefore to exclude aquifers from the optimization problem, and this means that the aquifer terms are not included in the linearized model as well as in the objective function. If a significant amount of production is associated with aquifers, the optimization results based on a model with and without aquifers will be different. In the cases studied in this dissertation, the impact of aquifers on production is minor, and the optimal strategies obtained do not change CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 95 significantly whether or not aquifers are considered. 2.8.7 Efficient Wells and Inefficient Wells In the numerical results shown in Section 2.5 and 2.7, the algorithm qualitatively identified efficient and inefficient wells (e.g. see analysis for Case 16 and 20 of Field 3 and analysis for Field 5). It was particularly revealing to see how injection wells that were moderately efficient initially became highly efficient over time. Although the algorithm is designed to give precise control settings under quantitatively defined market circumstances, uncertainties in the market forecast will influence the precision of the optimal control settings and therefore the precise control settings need to be interpreted loosely. Additionally, it is usually not possible to implement rates in the field with the precision demanded by the algorithm. However, the qualitative information obtained from our optimization is likely to be significantly less sensitive to uncertainties in the market forecast: efficient/inefficient wells are likely to remain efficient/inefficient across a wide range of market conditions. The ability to identify and quantify the efficiency of wells is invaluable information for an operator needing to make decisions about closing wells or performing costly workover programs. 2.9 Future Work In this section, we point out some directions in which our research can continue in future. Nonlinear Constraint In the previous section, we addressed the potential improvement of this method in dealing with nonlinear constraints. The current absence of nonlinear constraints, especially BHP-related constraints, is one of the main drawbacks of this method in practice. Strategies without considering BHP-related constraints are unlikely to be implemented in real fields. For this reason, to improve the capability with nonlinear constraint is of great importance. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 96 Quality of Gradient Approximation In this dissertation, we have compared the performance of the streamline-based method with an adjoint-based method in Field 5 and Field 6. However we have not compare the sensitivity analysis in each optimization step. A comparison between the adjoint-based gradient and the streamline-based gradient approximation will be necessary to verify the quality of the approximation in both short-term problem and long-term problem. We expected a satisfactory match in short-term problem with incompressible model. In long-term problems or fields with modest high compressibility, to analyze the mismatch is expected to be helpful for locating the causes of inaccurate approximation. General Optimizer Currently the optimization framework used in the proposed method is a simple trustregion method. There is no theoretical guarantee for convergence even for local optima. The main reason is that the quality of the gradient approximation has not been systemically verified, and most general optimizers (e.g. IPOPT or SNOPT) do not perform well when the gradient is noisy. If the quality of the gradient approximation can be verified as suggested above, then to incorporate the method with general optimizer will bring not only theoretical guarantee of local convergence but also more robust performance in practice. Finite-Volume Simulation In Section 2.4, we addressed two approaches to incorporate the streamline-based method with finite-volume simulation. However, we have not spent much time to study this generalized method with real field models. As the importance of this generalization is significant in practice as introduced earlier, to verify the performance of this method working with a finite-volume simulator is valuable. CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 97 Nonlinear Model Based on Flux Patterns In this dissertation, we introduce an approximation model linearizing the simulation model based on flux patterns. It makes the subproblem in each optimization iteration a linear programming problem which can be solved fast. Nowadays, optimization techniques and softwares for general convex optimization problems or even well-conditioned non-convex optimization problems have advanced. To use higherorder analytical model (e.g. quadratic model) to approximate the simulation model can also achieve computational efficiency. We have not spent much time to study possible alternative analytical models to the proposed linear model, and it is a possible direction to improve the method. 2.10 Conclusion In this chapter, we addressed a new waterflood optimization technique using flux patterns. The flux pattern generated with a single simulation is used to analyze the sensitivity of the objective function with respect to the control variables. Compared to traditional gradient-based or local derivative-free methods which require a number of evaluations of the objective function which are on the same order as the number of control variables in each optimization iteration, this method reduces the number of simulation in each iteration to one and makes it independent of the number of control variables. Our method increases the computational efficiency significantly, which is of great importance in the management of mature fields with a large number of wells. We introduced the original form of the method using streamline simulation to generate the flux patterns, as well as two variants where the flux patterns are generated by postprocessing the velocity fields obtained from finite-volume simulation with streamlines and a flow diagnostic technique respectively. While the original form was straightforward to implement, these two variants can be incorporated with finitevolume simulator when streamline simulation is not applicable to the field model. The postprocessing does not impact the computational efficiency of the method in general. The performance of the method in short-term production optimization is CHAPTER 2. WATERFLOOD OPTIMIZATION USING STREAMLINES 98 demonstrated for Field 1 and Field 2. We also generalize the method to long-term optimization. Besides the simple generalization using the short-term sensitivity analysis directly which works well in mature fields (Field 3, Field 4 and Field 5), we also introduced two approaches for long-term optimization. Two-stage optimization uses an analytical decline model to optimize field target over the long-term, and optimizes the well controls in each period using flux patterns under the field targets. Simulation results in the subproblem stage in return calibrates the decline model in master stage. Such an iteration loop tends to converge to a solution optimizing the long-term objective. The methods is verified with Field 1 and Field 2. A drawback of this method is that the decline model may not always be complex enough to represent the trend of oil recovery. Thus we also introduced a one-stage optimization approach that analyzes the long-term sensitivity of the objective function directly with flux patterns. This approach takes the temporal production information between wells (along the streamlines) into account when quantifying the influence on long-term objective caused by a certain perturbation of well controls. In particular, the flow fraction distribution along streamlines versus drainage time (DRT) estimates the change of oil/water cut in future, and it is especially effective in the optimization of green fields. The performance of this method is tested with Field 6. The computational efficiency and robustness of the proposed method is the main contribution of this work and is demonstrated by case studies. The satisfactory optimization performance is also shown in the numerical examples as the approach succeeds in finding profitable exploitation strategies. These results confirm that the proposed optimization approach can be an effective technique when applied to reservoirs with a large number of wells in need of an efficient waterflooding strategy over a short (less than half year) or long (5 to 15 years) production time frame. Chapter 3 Risk Analysis in Reservoir Management with Market Uncertainty Reservoir management predicts and manages the recovery of oil from the field along a timeline. It is used to determine the most beneficial exploitation strategy to develop a new field or to bring new life to a mature field with an enhanced oil recovery measure such as waterflooding. Modern reservoir simulation techniques are able to predict the recovery process with given operation strategies along the timeline. This enables formal mathematical optimization approaches to search for the optimal strategy in terms of certain objective. The work introduced in Chapter 2 is such an example where well rates are optimized in waterfloods using a trust-region optimization framework combined with physics-based model linearization. We apply the method to both short-term (a few months) and long-term (5-15 years) waterflood optimization problems. In practice, uncertainty contained in reservoir management problems makes the long-term optimization challenging. There are mainly two types of uncertainty that significantly influence the performance of the operational strategies obtained by solving reservoir optimization problems like the one in Chapter 2. One is the geological uncertainty in the field model used for reservoir simulation. History matching is the 99 CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 100 inverse process which uses production data to recover the field model. It has been studied for decades and various history matching approaches are developed [46]. The inverse problem is usually ill-conditioned in terms of the fact that multiple but different field models may yield similar production data, which brings uncertainty to the history matched field model. Modern history matching methods usually take stochastic factors into account by sampling a number of field models instead of a single solution according to a posterior distribution based on given production data. In reservoir management, closed-loop mechanism combines reservoir optimization and history matching in real time to reduce the uncertainty of field model in reservoir management [30]. It has been shown as an effective framework in various types of reservoir management problems [48, 58, 12]. The other important type of uncertainty is market uncertainty. For long-term reservoir management problems, NPV is one of the most widely used objective functions. Like Equation (2.22), NPV is defined as the cumulative discounted profits, which is composed of oil revenue and operational costs. Oil revenue depends on the oil price in the future and operational costs depend on the unit costs (e.g. cost per barrel of water injection) in the future. In Chapter 2, we assume the curve of oil price on which the optimization is based to be deterministic. It can be regarded as the expectation of the oil price along the timeline based on a given stochastic distribution of the oil price, or a market scenario that is most likely to occur. In the real world, however, the crude oil market is highly uncertain and can hardly be represented by a single deterministic forecast. Reservoir optimization based on a deterministic scenario may carry high risk associated with the uncertainty in market, since the optimal strategy with respect to this deterministic economic scenario is not necessarily close to the optimal strategy with respect to the real market scenario. In this case, investment in reducing market uncertainty may be worthwhile. The investment can aim at better knowledge of the evolution of market (e.g. hiring more experienced economists), and it can also aim at more influence in the market (e.g. more political efforts to stablize price). An outstanding issue is how much the potential value of an oil price forecast is, which is an important reference to determine how much to invest in the efforts CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 101 reducing market uncertainty. This value depends on not only the forecast itself but also the field we are considering. For example in a waterflooding field, if the water cut is low, the optimal strategy is likely to be aggressive no matter what the oil price is. In other words, in this case, optimal strategy is not sensitive to the market, and therefore it is not worthwhile to invest much for better market forecast. On the other hand, if the water cut is high in the field and it costs much to separate and dispose of the water, then an aggressive strategy is suboptimal unless the oil price is very high, and the optimal strategies in many scenarios are sustainable ones. In this case, optimal strategy is more sensitive to the oil price, hence more investment to reduce market uncertainty may be worthwhile. In this chapter, we define a monetary measure (which will be known in later sections as the value of knowledge of oil price) to quantify the risk of a proposed operation strategy (e.g. the optimal strategy with respect to expected oil price) that is associated with the market uncertainty. This measure reflects the potential loss in terms of the objective in the field due to the lack of knowledge of market, therefore it can be regarded as a good reference to decide the amount of investment for reducing market uncertainty. Since the risk depends on the specific field, to compute this measure requires reservoir simulation that is usually time-consuming. One of main contributions of this work is that we propose an efficient approach to estimate this risk measure. It makes this proposed method practical for reservoir management. We emphasize that the framework of risk analysis addressed in this chapter is not constrained to waterflood optimization problem defined in Chapter 2. In fact, it can be used in general reservoir management problems with various types of recovery mechanism and field development. 3.1 Stochastic Formulation of Reservoir Management As mentioned above, a long-term reservoir management problem is related to the market scenario which usually contains uncertainty. To assess the risk of a certain CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 102 reservoir operation strategy, we need to formulate the reservoir management problem in a more reasonable way taking the stochastic feature of the market into account. In most literatures studying reservoir optimization techniques, a common way to include the stochastic feature in reservoir optimization problems is to use the average of the NPVs calculated over all market scenarios as the objective function. Compared to just using a single market forecast, taking an average over all possible scenarios appears to make the optimization result more robust to the market uncertainty. However, in fact, this formulation is not always satisfactory. This is essentially still a deterministic form, since it is equivalent to building an average market scenario and using this single scenario in a deterministic manner. The risk of the single representation of market forecast is not eliminated in this formulation. Before we address our stochastic formulation of reservoir management, we introduce the notation used in this chapter at first. In reservoir management, a long-term strategy contains a sequence of control settings, e.g. well flow rates, BHP, etc. In general, it can also contains the time and location of new well completion, old well shut down, etc. In this chapter, we use x to represent operation strategy. It is a general vector that contains all controllable variables. For example, suppose we are only allowed to change the flow rates of well #1 and #2, once a month from January to December, then the strategy vector is x= flow rate of well #1 in January flow rate of well #2 in January flow rate of well #1 in February flow rate of well #2 in February . .. . flow rate of well #1 in December flow rate of well #2 in December Assuming a strategy is applied to the field, the corresponding oil recovery can be simulated along the timeline by reservoir simulators. We use q to represent the data of oil recovery that we are interested in. For example, if we concern the revenue from CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 103 oil production between January and December as well as the cost for water injection and that for water production, we can define the oil recovery variable as volume of oil production in January volume of water production in January volume of water injection in January volume of oil production in February volume of water production in February q(x) = volume of water injection in February .. . volume of oil production in December volume of water production in December volume of water injection in December . Note that oil recovery variable q is a vector function of operation strategy x, and its component associated with the k th period only depends on the operation before and at that period. The evaluation of function q requires reservoir simulation based on the field we are considering. As mentioned in Chapter 2, a feasible strategy must satisfy certain operational constraints in practice. For example, well flow rates are usually restricted below certain maximum limit. An optimization procedure searches for the optimal strategy among the strategies satisfying all operational constraints. In this chapter, we use Λ to represent the set of all feasible strategies that satisfy operational constraints. The objective of the optimization is usually market-related. In many cases, it can be written in the form of pT q(x), where p is a vector containing market variables and independent to the field. For the previous example, if we concern the revenue from oil production as well as the cost for water injection and that for water production, CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 104 the market vector p is defined as oil price in January −1 × unit cost for water production in January −1 × unit cost for water injection in January oil price in February −1 × unit cost for water production in February p= −1 × unit cost for water injection in February .. . oil price in December −1 × unit cost for water production in December −1 × unit cost for water injection in December . Then pT q(x) is the cumulative profit from January to December in this field assuming strategy x is applied. We write the optimization problem as follows, max pT q(x). x∈Λ (3.1) In this chapter, problem (3.1) is called deterministic problem with respect to p, or DPp , since the market variable p is assumed deterministic here. In real world, the future market scenario is never known. Therefore market variable p is considered as a random variable following distribution F. For each realization of p, there is an optimal solution x∗ (p) corresponding to DPp . To avoid the ambiguity of objective associated with the uncertainty of market variable p, a widely used formulation is DPEp , i.e. solving the deterministic problem with the expected market variable. As mentioned above, this is equivalent to maximizing the average of the NPVs based on all market scenarios, and does not capture some important stochastic feature for risk analysis. From a dynamic view, the optimal control setting at current time period should depend on a) the currently (deterministically) known market information (e.g. the current oil price), and b) the current stochastic information of market in future (e.g. the current distribution of the oil price in future). It is reasonable to expect that CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 105 the optimization process will be repeated at the next time period, once the market information is updated. Following this dynamic logic, the reservoir management problem can be formulated as follows: max pT1 q1 (x1 ) + Ep2 |p1 [h2 (x1 ; p2 )], x1 ∈Λ1 (3.2) where h2 (x1 ; p2 ) = max pT2 q2 (x1 , x2 ) + Ep3 |p1 ,p2 [h3 (x1 , x2 ; p3 )], x2 ∈Λ2 (x1 ) and sequentially so on until hn (x1 , . . . , xn−1 ; pn ) = max xN ∈Λn (x1 ,...,xn−1 ) pTn qn (x1 , . . . , xn−1 , xn ). Here n is the number of time periods we are interested in (i.e. NT in Chapter 2). xk , qk and pk are the operation variable, oil recovery data and market variable at the k th period respectively. Λk (x1 , . . . , xk−1 ) is the feasible region associated with xk and inferred from Λ when the variables x1 , . . . , xn−1 are fixed. There are n stages in this problem corresponding to the n periods. On each stage k, the corresponding optimal strategy maximizes the cumulative profit from that period to the last period based on a) the known information at that period pk and b) the expectation of future production assuming that future decisions are also so rational (i.e. function hk+1 ). The production at period k, qk (x1 , x2 , . . . , xk ), depends not only on the controls at that period xk but also on the controls in previous periods x1 , x2 , . . . , xk−1 . So does the feasible region Λk (x1 , . . . , xk−1 ), especially when there exists operational constraint over multiple periods (e.g. the limit of rate change used in Chapter 2). Problem (3.2) models the reservoir management problem with stochastic market variables, so in this dissertation we call it a stochastic problem (SP). The multi-stage structure of SP makes it computationally very expensive to solve in general. Every evaluation of the primary objective function (objective function in the first stage) requires solving a second-stage optimization. And similarly every evaluation of the second-stage objective function requires solving a third-stage optimization, and so on. Therefore, if solving a optimization generally requires M evaluations of its objective CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 106 function, solving SP (3.2) requires M n evaluations of the objective function in the last stage. With the computational cost increasing exponentially with respect to the number of time periods n, solving SP directly is intractable in general. DPEp can be regarded as an approximation of SP. In fact, DPEp is equivalent to replacing the Epk |p1 ,...,pk−1 [hk (x1 , . . . , xk−1 ; pk )] in SP with hk (x1 , . . . , xk−1 ; Epk |p1 ,...,pk−1 [pk ]). In some literature (e.g. [18]), DPEp is also called the deterministic counterpart problem (DCP) of the stochastic problem. As mentioned in the previous section, the solution to DCP is not necessarily close to the solution to SP. To know the gap between DCP and SP is of great importance for determining the amount of investment that aims at reducing market uncertainty. In the next section, we will propose a measure that indicates the risk of using the solution to DCP in uncertain market. 3.2 Value of Knowledge of Oil Price As mentioned in the previous section, the computational cost to solve SP is exponential to the number of time periods n. For this reason, our risk measure is not supposed to contain SP, otherwise it is infeasible to be quantified in practice. [8] introduces a similar stochastic model as ours, and uses the value of information as a reasonably tight upper bound of the difference of the solution of SP and deterministic solution from DCP. In this section, we generalize this upper bound from the linear, two-stage case in [8] to our nonlinear, multi-stage case. We use x0 to represent a operation strategy obtained by some deterministic method (e.g. the solution of DCP). Then from the view point of stochastic modeling (Equation 3.2), the expected loss of profit caused by using x0 instead of the solution of SP is { max p1 q1 (x1 ) + Ep2 |p1 [h2 (x1 ; p2 )]} − {p1 q1 (x01 ) + Ep2 |p1 [h2 (x01 ; p2 )]}, x1 ∈Λ1 (3.3) which is equal to the gap between the optimal value of SP and the suboptimal value of the objective function of SP evaluated at x0 . This difference is upper bounded by Ep pT q(x∗ (p)) − pT q(x0 ) , (3.4) CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 107 where x∗ (p) is the optimal solution of the deterministic problem with oil price p (DPp ), i.e. x∗ (p) = argmaxx∈Λ pT q(x). This relation is a direct result from two inequalities: max p1 q1 (x1 ) + Ep2 |p1 [h2 (x1 ; p2 )] ≤ Ep pT q(x∗ (p)) , (3.5) p1 q1 (x01 ) + Ep2 |p1 [h2 (x01 ; p2 )] ≥ Ep pT q(x0 ) . (3.6) x1 ∈Λ1 and The first inequality (3.5) is derived as follows: max p1 q1 (x1 ) + Ep2 |p1 h2 (x1 ; p2 ) x1 ∈Λ1 = max Ep2 |p1 [p1 q1 (x1 ) + h2 (x1 ; p2 )] x1 ∈Λ1 ≤ Ep2 |p1 max (p1 q1 (x1 ) + h2 (x1 ; p2 )) x1 ∈Λ1 = Ep2 |p1 max p1 q1 (x1 ) + max p2 q2 (x1 , x2 ) + Ep3 |p1 ,p2 h3 (x1 , x2 ; p3 ) x1 ∈Λ1 x2 ∈Λ(x1 ) = Ep2 |p1 max p1 q1 (x1 ) + max Ep3 |p1 ,p2 [p2 q2 (x1 , x2 ) + h3 (x1 , x2 ; p3 )] x1 ∈Λ1 x2 ∈Λ(x1 ) ≤ Ep2 |p1 max p1 q1 (x1 ) + Ep3 |p1 ,p2 max (p2 q2 (x1 , x2 ) + h3 (x1 , x2 ; p3 )) x1 ∈Λ1 x2 ∈Λ(x1 ) (3.7) = Ep2 |p1 max Ep3 |p1 ,p2 p1 q1 (x1 ) + max (p2 q2 (x1 , x2 ) + h3 (x1 , x2 ; p3 )) x1 ∈Λ1 x2 ∈Λ(x1 ) ≤ Ep2 |p1 Ep3 |p1 ,p2 max p1 q1 (x1 ) + max (p2 q2 (x1 , x2 ) + h3 (x1 , x2 ; p3 )) x1 ∈Λ1 x2 ∈Λ(x1 ) = Ep2 ,p3 |p1 max (p1 q1 (x1 ) + p2 q2 (x1 , x2 ) + h3 (x1 , x2 ; p3 )) x1 ∈Λ1 ,x2 ∈Λ(x1 ) ≤ ······ ≤ Ep max (p1 q1 (x1 ) + p2 q2 (x1 , x2 ) + · · · + pn qn (x1 , x2 , . . . , xn )) x∈Λ = Ep pT q(x∗ (p)) , CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 108 where all inequality signs are due to a general fact that max Ep f (x, p) ≤ Ep max f (x, p), x x since the right hand side allows x to adapt to the realization of p. Inequality (3.6) is derived as follows, p1 q1 (x01 ) + Ep2 |p1 h2 (x01 ; p2 ) 0 0 0 = p1 q1 (x1 ) + Ep2 |p1 max p2 q2 (x1 , x2 ) + Ep3 |p1 ,p2 h3 (x1 , x2 ; p3 ) x2 ∈Λ2 (x1 ) ≥ p1 q1 (x01 ) + Ep2 |p1 p2 q2 (x01 , x02 ) + Ep3 |p1 ,p2 h3 (x01 , x02 ; p3 ) = p1 q1 (x01 ) + Ep2 |p1 [p2 ] q2 (x01 , x02 ) + Ep3 |p1 ,p2 h3 (x01 , x02 ; p3 ) (3.8) ≥ ······ ≥ p1 q1 (x01 ) + Ep2 |p1 [p2 ] q2 (x01 , x02 ) + · · · + Epn |p1 ,...,pn−1 [pn ] qn (x01 , x02 , . . . , x0n ) ≥ Ep pT q(x0 ) . Combining inequalities (3.5) and (3.6), we have the fact that (3.3), the difference of objective values of SP evaluated at its optimal solution and a given feasible solution x0 is upper bounded by (3.4). In fact (3.4) can be explained as the expected difference of the objective values of DPp ’s evaluated at their optimal solutions x∗ (p) respectively and at x0 . It compares the NPV obtained with x0 and that obtained in the imaginary case where market trend is exactly known ahead of time in every possible market scenario represented by p and takes an average over them. We define it as the value of the knowledge of oil price (VKO) with respect to this given operational strategy, VKO(x) = Ep pT q(x∗ (p)) − pT q(x) , Ep [G(x; p)] . (3.9) The part under the expectation operator, G(x; p) = pT q(x∗ (p)) − pT q(x), measures how much more we could obtain if we were to know the real market scenario p in advance. VKO(x) is its average value based on our knowledge of the randomness of p, therefore it indicates the value of the exact market knowledge compared with our current information. In particular, the value of VKO associated with the solution to CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 109 DCP, i.e. VKO(x∗ (Ep)), indicates the risk of using the solution of DCP based on our current knowledge of the stochastic property of the market. And as proved above, VKO(x∗ (Ep)) upper bounds the gap between DCP solution and SP solution. Since VKO(x) depends on the particular control setting x and represents a loss due to missing information, we could think of minimizing VKO(x) with respect to the operational strategy x. It is worthwhile to note that VKO(x∗ (Ep)) is the smallest among all VKOs by definition, because minimizing Ep pT q(x∗ (p)) − pT q(x) among all feasible x is equivalent to maximizing Ep pT q(x) , i.e. solving DCP (note that x∗ (p) hence the first term Ep [pT q(x∗ (p)] does not depend on x). In other word, the solution of DCP, x∗ (Ep), has the lowest risk in terms of VKO. To know this estimated loss helps decision makers to quantify future investments that aim at reducing uncertainty in the oil market. For example, if an oil field is operated using a production strategy given by strategy x, and VKO(x) is 50 MM USD, then it does not make sense that more than 50 MM USD are spent in acquiring information for reducing uncertainty in the oil price, because even in the unreal case that the oil price is exactly known in advance, the gain will not be higher than 50 MM USD on average. To compute VKO(x) by directly applying its definition, N realizations of market variable {pi }N i=1 are considered, each of them with probability yi , and we estimate VKO(x) by VKO(x) = Ep [G(x; p)] ≈ N X i=1 yi G(x; pi ) = N X yi pTi q(x∗ (pi )) − pTi q(x) . (3.10) i=1 According to theory of Monte Carlo method, this estimation is accurate when N is large. However this computation requires solving N optimization problems to obtain x∗ (pi ). It can be very expensive if the number of market scenarios N is relatively large, since to solve x∗ (pi ) is in general computational expensive in the context of oil reservoir management as introduced in Chapter 2. For this reason, in the rest of this section, we propose two methods that efficiently estimate a lower bound and an upper bound for VKO(x) respectively. Before that, we introduce a property of function G(x; p) which plays an important role in both CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 110 the lower and the upper bound of VKO: function G(x; p) is a convex function of the market variable p at any fixed x. Recall that G(x; p) = pT q(x∗ (p)) − pT q(x). It is a convex function of p with any fixed x, since for any 0 ≤ θ ≤ 1, θG(x; p1 ) + (1 − θ)G(x; p2 ) = θpT1 q(x∗ (p1 )) − θp1 T q(x) + (1 − θ)pT2 q(x∗ (p2 )) − (1 − θ)p2 T q(x) ≥ θpT1 q(x∗ (θp1 + (1 − θ)p2 )) − θpT1 q(x) + (1 − θ)pT2 q(x∗ (θp1 + (1 − θ)p2 )) − (1 − θ)pT2 q(x) (3.11) = (θp1 + (1 − θ)p2 )T q(x∗ (θp1 + (1 − θ)p2 )) − (θp1 + (1 − θ)p2 )T q(x) = G(x; θp1 + (1 − θ)p2 ), where the inequality sign is due to the optimality of x∗ . 3.2.1 Lower Bound of VKO Well-known Jensen’s inequality lower bounds the expectation of a convex function by the value of the convex function at an expectation. Since VKO(x) = Ep [G(x; p)] is essentially the expectation of convex function G, we apply Jensen’s inequality to lower bound it, VKO(x) = Ep [G(x; p)] ≥ G(x; Ep) = (Ep)T q(x∗ (Ep)) − (Ep)T q(x). (3.12) To compute this lower bound, we only need to solve one long-term optimization problem (DCP). However, to lower bound VKO(x∗ (Ep)) by this means is not satisfactory, since in that case x = x∗ (Ep) and this lower bound is reduced to 0. This result is trivial since function G is always non-negative by definition. We denote the set of all possible market scenarios as Ω. To get a tighter lower bound, we divide Ω into K disjoint areas {Ωk }K k=1 and apply Jensen’s inequality on each of them. In practice, the partition process can be done by apply clustering approach (e.g. K-means clustering [40]) to the N realizations of market variable {pi }N i=1 , and their index set is divided into I1 , . . . , IK . The lower bound is obtained CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 111 as follows, VKO(x) = Ep [G(x; p)] = K X Ep [G(x; p)|Ωk ]prob(Ωk ) k=1 ≥ K X k=1 G(x; E[p|Ωk ])prob(Ωk ) ≈ K X k=1 " ! # P X y p i i i∈I yi . (3.13) G x; P k i∈Ik yi i∈I k Figure 3.1 illustrates a two-dimensional (n = 2) case where the entire space of possible p is divided into four subregions (K = 4). The computation of this lower bound requires solving K DPs in scenarios respectively represented by K market realizations P P i∈Ik yi pi / i∈Ik yi , k = 1, 2, . . . , K. And these K DPs can be solved independently and in parallel. Larger K tends to result in tighter bound, but requires more computational cost. In the extreme case where K = N , computing the lower bound is equivalent to estimating VKO(x) directly. The choice of K should be determined based on the available capability of distributed computing. Figure 3.1: An example for the division of the space of possible p (n = 2, K = 4). CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 3.2.2 112 Upper Bound of VKO Since the oil price is a quantity that can be assumed to be bounded, the set of all possible market scenarios Ω can be covered by a bounded and convex polytope whose vertices are represented by p̂1 , . . . , p̂m . This polytope will be denoted here as Poly(p̂1 , . . . , p̂m ). Thus for any p ∈ Ω, there exists at least one vertex representation P Pm θ(p) ∈ [0, 1]m such that p = m j=1 θj (p)p̂j and j=1 θj (p) = 1. Since G(x; p) is convex with respect to p, we can write the following upper bound for VKO(x), " VKO(x) = Ep [G(x; p)] = Ep G x; m X !# θj (p)p̂j j=1 " ≤ Ep m X j=1 # θj (p)G (x; p̂j ) ≈ m X N X yi θj (pi )G (x; p̂j ) . (3.14) j=1 i=1 The computation of this upper bound requires solving m long-term reservoir optimization problems (DPp̂j ) to obtain all x∗ (p̂j ). Figure 3.2 illustrates an one-dimensional example of the upper bound. In the figure, the blue curve is the value of G(x; p) evaluated along p-axis. Suppose that the one-dimensional p is uniformly distributed in interval Ω = [60 USD/bbl, 200 USD/bbl], the value of VKO(x) is proportional to the area of the blue shadowed region. To estimate it by Monte Carlo method, we need to evaluate a large number of points on the blue curve, each of which requires solving a corresponding DP. Alternatively, we pick interval [40 USD/bbl, 220 USD/bbl] as the one-dimensional polytope that covers Ω. The values of G(x; p) at p̂1 = 40 USD/bbl and p̂2 = 220 USD/bbl implies a upper bound of G(x; p) over Ω, i.e. the red line in the figure. Thus the area of the red shadowed region is an upper bound of the area of the blue shadowed region. To estimate the area of the red shadowed region, we only need to solve two DPs corresponding to p̂1 and p̂2 respectively. We also need to determine the vertex representation for all N scenarios of oil price, p1 , p2 , . . . , pn , in order to determine the corresponding convex combination of the G(x; p̂j )’s as the upper bound of G(x; pi ). It is important to notice that the vertex representation of pi is not unique, since in general the set {p̂j }m j=1 is linearly dependent (as can be expect when m is larger than n + 1). This non-uniqueness CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 113 Figure 3.2: An example of the upper bound of VKO(x) (n = 1, m = 2). influences the computation of the upper bound for VKO(x). Different upper bounds for VKO(x) can be obtained with different selection of vertex representation. In other words, (3.14) provides a family of upper bounds instead of a single one. From all of these upper bounds, we are interested in the tightest one, i.e. the solution to the minimization problem min θ(p1 ),...,θ(p1 ) s.t. m X N X yi θj (pi )G (x; p̂j ) , j=1 i=1 m X pi = θj (pi )p̂j , ∀i = 1, 2, . . . , N, (3.15) (3.16) j=1 m X θj (pi ) = 1, θj (pi ) ≥ 0, ∀i = 1, 2, . . . , N, (3.17) j=1 which is a linear programming problem that can be solved efficiently compared with CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 114 DP. Note that no additional reservoir simulation is required here, and that the minimization is separable over all N scenarios so they can be solved in parallel. Therefore the computational cost to find the vertex representations can be neglected with respect to the cost for solving the m DPs. Choice of the Polytope Since the main part of computational cost is the m DPs (DPp̂j , j = 1, 2, . . . , m), we prefer a convex polytope with less vertices. The number of vertices of a general polytope in n dimensional space is on the order of 2n , which is unacceptable in our case. In the best case, a n dimensional simplex has only n + 1 vertices. However, on the other hand, we also prefer polytopes that covers Ω tightly. If the polytope covering is too loose, then some of its vertices p̂j will be far away from possible region of oil price Ω, and the NPV loss based on that oil price G(x; p̂j ) tends to be large since the control setting x is usually obtained based on a reasonable oil price, e.g. the expected oil price. In general, polytope with more vertices has a potential to cover a region more tightly. Therefore the covering over Ω by a n dimensional simplex is usually loose, especially when n is large. In this dissertation, we obtain the trade-off by using one-norm ball which has 2n vertices to cover Ω. Besides using a polytope with more vertices, proper rotation and stretch applied to the polytope can also yield a tighter covering over Ω. In the example in Figure 3.2, if we properly stretch the one-dimensional polytope to [60 USD/bbl, 200 USD/bbl] from [40 USD/bbl, 220 USD/bbl], it is easy to see that we would get a tighter bound. In higher dimensional space, rotation is as helpful as stretch, since Ω is usually not in standard coordinate because of the correlation of oil price between different periods. Figure 3.3 shows the comparison between a minimal standard one-norm ball covering Ω and a rotated one-norm ellipsoid generated by applying principle component analysis (PCA; [31]) on the oil price samples when n = 2. This procedure can be applied to general n. Now we introduce the detailed process to transform a standard one-norm ball to the rotated one-norm ellipsoid we use in this dissertation. Given N samples of oil price representing Ω ⊆ Rn , we hope to construct a rotated one-norm ball Poly(p̂1 , . . . , p̂2n ) CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 115 Figure 3.3: A standard one-norm ball (left) and a rotated one-norm ellipsoid (right) covering 3,000 oil price samples from a two-dimensional correlated Gaussian distribution. to cover all N samples as tight as possible. We first compute the PCA coordinate e1 , . . . , en , and convert p1 , . . . , pN into this new coordinate. Along each coordinate direction, we find the two (positively and negatively) farthest sample points from the center of the sample set, and we hence get a n dimensional rectangular box in the rotated coordinate which covers all N sample points. The rectangle has 2n faces. To find a one-norm ellipsoid covering this n dimensional rectangular box, we can simply extend the center of each face outwards by n times. The one-norm ellipsoid defined by these 2n extended face centers covers the rectangular box (it covers the 2n vertices of the box just perfectly). As a result, it is guaranteed to cover all N sample points. However it is not tight as long as no sample point coincides with any vertex of the rectangular box, which is a usual case. So we can do some more modification. We first shrink the 2n vertices of the ellipsoid toward its center simultaneously in the same relative speed until a sample point is on a face of the one-norm ellipsoid. Then we modify the diameters of the ellipsoid. When estimating the upper bound of VKO(x), we prefer vertices corresponding to oil prices that have similar trend as the one we use to solve for the decision x (e.g. Ep if x = x∗ (Ep)), since the value of G(x; p̂j ) tends to be small if x∗ (p̂j ) and x are similar. Thus we use a measure of similarity to score the similarity between the oil price we use to solve for x and each p̂j , shrink the diameters corresponding to the vertices with low similarity scores and CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 116 stretch those with high similarity scores, until the scores of all vertices are balanced. In this process, we require the one-norm ellipsoid should always cover all N samples. Note that the shrinkage and modification part requires checking whether a certain point is inside the polytope for a large number of times. If the polytope is rotated onenorm ellipsoid, it can be done fast by projecting the sample point to the n coordinate directions in the quadrant it belongs to, and check whether the sum of the relative lengthes of the projection is less or equal to 1. If so, then the point is inside the onenorm ellipsoid, otherwise it is outside. In a general polytope, the checking process has to contain a solution of a linear programming problem, which computationally is more expensive. This is also a reason why we choose one-norm ellipsoid to cover Ω. Tighten the Upper Bound Note that the performance of the upper bound obtained by this method can be improved by expanding the set of {p̂j }. It is not necessary that all {p̂j } are vertices of the polytope covering Ω. The essential requirement is that for any p ∈ Ω, it can be written as a convex combination of {p̂j }. Adding some interior points inside Ω into the set {p̂j } does not impact this fact. However, it improves the performance of upper bound significantly. The upper bound is a convex combination of G(x, p̂j )’s. As mentioned above, the value of G(x, p̂j ) tends large when p̂j is far from Ω, while it tends small inside Ω. When more interior points are added into p̂j , the weight of the components corresponding to the vertices of Poly(p̂1 , . . . , p̂m ) is reduced in the best vertex representation of each p ∈ Ω (i.e. the solution of (3.15)-(3.17)), so the convex combination of G(x; p̂j )’s is smaller. This is illustrated in Figure 3.4. Using only vertices p̂1 and p̂2 , the upper bound for G(x; pi ) is UB1 . If interior point p01 is added, the upper bound is reduced to UB2 . This modification increases the computational cost to evaluate the upper bound, since function G(x; p) is required to be evaluated at the newly added points. However the experiment result in Section 3.4 shows that adding a number of interior points on the same order of n brings significant improvement to the upper bound. Particularly, if the lower bound for VKO(x) is also evaluated by the method introduced in the Section 3.2.1, we can simply add the K interior points P P i∈Ik yi pi / i∈Ik yi into {p̂j }, which does not require additional computation, since CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY all G x; P i∈Ik y i pi / P i∈Ik 117 yi have been computed when evaluating the lower bound for VKO(x). Figure 3.4: An example of the improvement of the upper bound for VKO(x) with an additional interior point. 3.3 Risk Analysis with Distributional Uncertainty Sometimes, the distribution that oil price follows is hardly known exactly. In some cases, the stochastic information is partially known and the distribution is restricted to a family of distributions instead of a single one, i.e. there is ambiguity in the choice of the distribution. For example, we may know the range of expected oil price and an upper/lower bounds of the variance and covariance of oil prices, since the information of the first and second order moments is easier to estimate. This case is called a case with distributional uncertainty [17]. In this situation, people usually consider the worst distributional scenario [49, 17]. More precisely, the following problem is considered max inf p1 q1 (x1 ) + EF [h2 (x1 ; p2 )], x1 ∈Λ1 F ∈D (3.18) CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 118 where D is the set of all candidate distributions that the oil price may follow, and EF represents the expectation based on distribution F. This problem is called the distributional robust stochastic problem (DRSP). Notice that in SP (3.2) the distribution of p is assumed known and hence the expectation operator is well-defined. In DRSP (3.18) there is more than one (or even uncountable) candidate distributions in D, thus we need to take infimum over all the candidate distributions in the objective function to obtain distributional robustness. In this section, we prove that the solution to DRSP is the same as that to DCP when D satisfies some conditions. We also analyze the risk of this solution in terms of distributional robustness by generalizing VKO to the distributionally uncertain case. This risk analysis quantifies the monetary value of a piece of stochastic information and provides reservoir managers a quantitative reference on the amount of investment for that information. 3.3.1 Distributional Robustness of DCP We now consider a family of Ds with a particular (but common in practice) property, and we will demonstrate in this subsection that the solution DRSP based on such a D is equal to a DP. We define D(Ω, µl , µu ) as the set of all the distributions supported on Ω whose expectation is upper bounded by µu and lower bounded by µl . Here µl and µu can be vectors defining the lower/upper bound for each component of p corresponding to each period. It represents one of the simplest stochastic model with only a piece of indefinite information of the first-order moment. Figure 3.5 shows four examples of the candidate distribution in D(Ω, µl , µu ) in a one-dimensional case, where Ω = [50 USD/bbl, 150 USD/bbl], µl = 80 USD/bbl and µu = 110 USD/bbl. The green and blue curves represent two Gaussian distributions, the red curve represents a triangular distribution, and the black line represents a uniform distribution. All these distributions are supported on [50 USD/bbl, 150 USD/bbl] and their expectation values (dashed lines) are between 80 USD/bbl and 110 USD/bbl. From the proof of inequality (3.6), we know that, when fixing an arbitrary feasible operational control in the first period x1 , the following inequality holds for any feasible CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 119 Figure 3.5: Four examples from D(Ω, µl , µu ), where Ω =[50 USD/bbl, 150 USD/bbl], µl =80 USD/bbl and µu =110 USD/bbl. CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 120 controls in later periods x2 , x3 , . . . , xn , EF h2 (x1 ; p2 ) ≥ EF [p2 ]q2 (x1 , x2 ) + · · · + EF [pn ]qn (x1 , x2 , . . . , xn ). (3.19) Note that oil production is always nonnegative, so we also have that EF h2 (x1 ; p2 ) ≥ µl2 q2 (x1 , x2 ) + · · · + µln qn (x1 , x2 , . . . , xn ) (3.20) holds for any feasible x2 , x3 , . . . , xn and F ∈ D(Ω, µl , µu ). Notice that the maximal value of the right hand side over all feasible x2 , . . . , xn is equal to Eδ(µl ) h2 (x1 ; p2 ) where δ(µl ) is the Dirac distribution where p = µl with probability one. Since δ(µl ) is contained in D(Ω, µl , µu ), we have max inf x1 ∈Λ1 F ∈D(Ω,µl ,µu ) p1 q1 (x1 ) + EF h2 (x1 ; p2 ) = max p1 q1 (x1 ) + x1 ∈Λ1 inf EF h2 (x1 ; p2 ) max (3.21) µl2 q2 (x1 , x2 ) + · · · + µln qn (x1 , x2 , . . . , xn ) F∈D(Ω,µl ,µu ) = max x1 ∈Λ1 = max p1 q1 (x1 ) + x1 ,...,xn ∈Λ x2 ,...,xn ∈Λ(x1 ) p1 q1 (x1 ) + µl2 q2 (x1 , x2 ) + · · · + µln qn (x1 , x2 , . . . , xn ) = µTl q(x∗ (µl )). This result demonstrates DRSP based on D(Ω, µl , µu ) is equivalent to DPµl . In particular, in the case where µl = µu = Ep, i.e. the expected oil price is known, then DRSP is equivalent to DCP. In other word, the DCP solution is distributionally robust when DRSP is defined on D(Ω, Ep, Ep). The proof above also implies that this result still holds if we add more constraints to D as long as δ(µl ) ∈ D is satisfied. For example, an upper bound for the variance of oil prices is sometimes known and added into the definition of D as a restrict on the second-order moment of F. In this case, the result of distributional robustness is also valid. CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 3.3.2 121 Value of Distributional Information To evaluate the risk of an operational strategy with distributional uncertainty, we consider the worst distributional scenario in terms of VKO, i.e. we estimate the supremum of the VKO(x) over all feasible candidate distribution F ∈ D, VDI(x) = sup VKO(x) = sup EF pT q(x∗ (p)) − pT q(x) . F ∈D (3.22) F ∈D We call it the value of distributional information (VDI). As for VKO, we hope to figure out a bound for the VDI that can be evaluated efficiently. Similar problem is studied by [18], which proves an upper bound of the VDI in the special case where n = 2, function q is linear and D = D(Ω, µ, µ). We find that the method can be generalized into a more general case where n > 2, q is nonlinear and D = D(Ω, µl , µu ). By building the dual problem of the maximization problem over F ∈ D as follows, min s,λu ,λl s.t. s − µTl λl + µTu λu s ≥ pT q(x∗ (p)) − pT q(x) + pT (λl − λu ), λl , λu ≥ 0, (3.23) ∀p ∈ Ω, (3.24) (3.25) one can use weak duality theory [39] and have the solution of this dual problem as the upper bound of VDI(x). Since pT q(x∗ (p)) − pT q(x) + pT (λl − λu ) is convex with respect to p, we can tighten the constraints to ∀p ∈ Poly(p̂1 , . . . , p̂m ) where the polytope covers Ω as Section 3.2.2, and then equivalently transform the constraint to s ≥ p̂Ti q(x∗ (p̂i )) − p̂Ti q(x) + p̂Ti (λl − λu ), ∀i = 1, . . . , m. Then to solve problem (3.23)-(3.25), we need to solve m DPs (DPp̂j ), and then solve the linear programming problem. One of the main drawbacks of this method is that the bound is generally too loose. The tightening of the dual problem is equivalent to a relaxation of the primal problem in the definition of VDI (3.22). It relaxes the worst VKO(x) over all the distributions supported on D(Ω, µl , µu ) to those supported on D(Poly(p̂1 , . . . , p̂m ), µl , µu ), and the worst distribution in D(Poly(p̂1 , . . . , p̂m ), µl , µu ) is usually the one concentrating most CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 122 probability density on a few farthest vertices of the polytope, which is unlikely the real distribution even when the polytope covers Ω tightly. Another drawback is that this method cannot be used in general D. To avoid the unlikely distributions from D, conditions on higher-order moment of distribution F are usually added into D. For example, [17] added an upper bound (in the semidefinite sense) for the covariance matrix of the distributions in D. However, if we add additional conditions on higher-order moment into D, the constraints in the corresponding dual problem is no longer convex with respect to p in general, and the computational cost of the method cannot be reduced as above, although in some cases the specific structure of the problem may help to figure out a solvable bound (e.g. the jet fleet composition problem in [18]). In this section, we propose a general method that plugs the upper bound for VKO(x) into the definition of VDI(x). The upper bound obtained in this way enables the flexibility of D. Representing Ω by N oil price realization {pi }N i=1 , the supremum in the definition of VDI(x) is replaced by maximization, and the upper bound for VDI(x) is as follows max y∈RN s.t. N X yi i=1 N X min θ(pi )∈Θ m X ! θj (pi )G(x; p̂j ) , (3.26) j=1 yi = 1, yi ≥ 0, (3.27) i=1 y ∈ Y. (3.28) Here Θ represents the constraints on vertex representation, (3.16) and (3.17). Y is the constraints on the discretized probability y inferred from D. For example, if D is all the distributions with expectation µ and covariance matrix upper bounded (in semiP PN T definite sense) by Σ, then Y = {y ∈ RN | N i=1 yi pi = µ, i=1 yi (pi − µ)(pi − µ) Σ}. To estimate this upper bound, at first we need evaluate G(x; p̂1 ), . . . , G(x; p̂m ), whose computational cost is equal to m times the computational cost required by one DP. We then need to solve N linear programming problem as we did for the upper CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 123 bound of VKO for the best vertices representation at each market variable sample (i.e. the linear coefficients in the objective function (3.26). Finally we need to solve the optimization problem (3.26)-(3.28). As the process to estimate the upper bound of VKO described in Section 3.2.2, the only step including reservoir simulation is the evaluation of G. However for this upper bound of VDI, the computational cost of the final step depends on the definition of the feasible distribution set D. In the case where Y is linearly defined (e.g. if D = D(Ω, µl , µu )), (3.26)-(3.28) is a linear programming problem which can be solved much faster than a reservoir simulation even if the number of market scenarios N is very large. If a semi-definite upper bound of the second-order moment of the distribution in D is given (as the earlier example), a semi-definite programming problem (SDP) is required to be solved. This may be as time-consuming as reservoir simulation if N is very large (e.g. on the order of 109 ). However, since the primal solution y tends to be very sparse, we can expect that most of the N constraints in the dual SDP problem of (3.26)-(3.28) are inactive at the optimal solution. Using column generation process [38] can reduce the computational cost of such a dual SDP problem to that of a few SDPs with only a small number (on the order of 10 to 100) of constraints and make it much more efficient computationally. If D has more complicated definition, the selection of the optimization method and the corresponding computational cost may vary accordingly. To estimate the lower bound of VDI(x) is still under study. [18] proposes an approach for the special case of n = 2 and linear objective q, however it is computational intractable in the context of oil reservoir management which is more complicated. To directly generalize the lower bound of VKO(x) in Section 3.2.1 does not work, since the conditional expectation of each partition area depends on specified distribution. However, since VDI is defined as the supremum over a family of VKO, the value of VKO(x) based on any feasible distribution F ∈ D is a lower bound of VDI(x) although the tightness is not quite controllable as the bounds we introduced before. CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 3.4 3.4.1 124 Case Study An Analytical Toy Field Model In this section, we apply the method to a toy oil field model. This model approximates the oil/water production as an analytical function of field injection rate, i.e. xi is a one-dimensional variable at each period, and q(x) is an analytical function. This analytical model is the decline model introduced in Section 2.6.1. The parameters in the decline model is set based on the simulation on the final decline model of Field 1 Case 1 in Section 2.7.1. With a similar problem setting as Section 2.7.1 Field 1, the aim of the optimization is to maximize the NPV over a time horizon discretized into 30 periods of 90 days. Discount factor is set zero here. And costs considered here include that for water injection and that for water separation and disposal. The default field injection rate before the start of optimization is 15, 000 m3 /d, and the field injection rates are constrained from 5, 000 m3 /d to 30, 000 m3 /d. Between two consecutive periods, the field injection rate can vary up to 10%. In the experiments, DPs are solved by SNOPT v7.0, a software package for solving large-scale nonlinear optimization problems [24]. All the linear programming problems are solved by MOSEK v6.0 [42], and all the semidefinite programming problems are solved by CVX v1.21 [26] with SeDuMi solver. We emphasize here that the technique introduced in this chapter is designed for risk analysis when reservoir optimization is time-consuming. The setting of this toy problem is different since its objective function is analytical and easy to evaluate. VKO in this case can be estimated with Monte Carlo method directly. The reason we show this study case is to verify the method by comparing the bounds with the value of VKO. Case 1: Toy Field Model with a Fully Known Distribution of Oil Market We test three distributions, each of which is represented by 1,000 samples oil price evolution from that distribution. All three distributions are Wiener processes with CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 125 drift on a square rooted time horizon. The oil price in the first period is known as 107 USD/bbl. The expected oil price is increasing (Distribution 1), constant (Distribution 2) and decreasing (Distribution 3) respectively in these three cases (Figure 3.6) . The change of oil price from period k1 to k2 follows Gaussian distribution with mean equal p zero and standard deviation equal to k22 − k12 × 1 USD/bbl. Figure 3.6 shows the 1,000 samples of oil price evolution for each distribution. The cost for water injection and that for the separation and disposal of water production are both 2 USD/bbl. Figure 3.6: Case 1: expected oil price (top left), samples of oil price from Distribution 1 (top right), 2 (bottome left) and 3 (bottom right). Solving DCP, we get the optimal NPV with expected oil price is 1.4 billion USD, 1.2 billion USD and 1.1 billion USD, respectively for each distribution. Applying the approach introduced in Section 3.2.1 with K = 2n and K-means clustering, we get lower bounds of VKO(x∗ (Ep)) for each distribution as 6.7 MM USD, 6.3 CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 126 MM USD and 4.8 MM USD respectively. The relative lower bounds based on the optimal value of DCP are 0.5%, 0.5% and 0.4% respectively. Applying the approach introduced in Section 3.2.2 (using rotated one-norm ellipsoids), we get upper bounds of VKO(x∗ (Ep)) for each distribution as 49.8 MM USD, 53.4 MM USD and 51.9 MM USD respectively. The relative upper bounds based on the optimal value of DCP are 3.5%, 4.5% and 4.7% respectively. If we use standard one-norm balls, the relative upper bounds are 9.0%, 11.9% and 13.1% respectively, which are looser than those obtained with rotated one-norm ellipsoids. This comparison demonstrates the importance of the rotation and stretch on the polytope. We also evaluate the VKO of the default ‘do-nothing’ control setting x0 which keeps the field injection rate 15, 000 m3 /d. The relative lower bounds of VKO(x0 ) is respectively 18.3%, 17.5% and 15.2%, while the upper bounds of VKO(x0 ) obtained with rotated one-norm ellipsoid are 21.8%, 22.0% and 22.9% respectively. This implies that, compared with using the solution to DCP, using this control setting not only returns less expected NPV, but also brings more risk of losing NPV with uncertain oil price. Detailed results of this part is listed in Table 3.1. In the table, UB1 represents the upper bound obtained with rotated one-norm ellipsoids, and UB2 represents the upper bound obtained with standard one-norm balls. Case 2: Toy Field Model with a Partially Known Distribution of Oil Market In this case, we firstly assume we only know the expected oil price and have no other distributional information. We test three distribution families, each of which has the expectation as shown in Figure 3.6 respectively. Using the approach introduced in Section 3.3.2, we estimate upper bounds of VDI(x∗ (Ep)). For the three distribution families, the relative upper bounds of the VDIs are 6.8%, 8.8% and 9.7% respectively, while the dual problem method (tightening (3.23)-(3.25)) gives 15.2%, 20.3% and 22.7%. If we add an additional condition of the covariance matrix, that is, the greatest eigenvalues of the covariance matrices of the candidate distributions are upper bounded by (100 USD/bbl)2 , then the relative bound is reduced to 5.3%, 6.8% and CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY x∗ (Ep) Expected NPV with (MM USD) LB of VKO(x∗ (Ep)) (MM USD) Relative LB of VKO(x∗ (Ep)) UB1 of VKO(x∗ (Ep)) (MM USD) Relative UB1 of VKO(x∗ (Ep)) UB2 of VKO(x∗ (Ep)) (MM USD) Relative UB2 of VKO(x∗ (Ep)) Expected NPV with x0 (MM USD) LB of VKO(x0 ) (MM USD) Relative LB of VKO(x0 ) UB1 of VKO(x0 ) (MM USD) Relative UB1 of VKO(x0 ) UB2 of VKO(x0 ) (MM USD) Relative UB2 of VKO(x0 ) Distribution 1 1,436.5 6.71 0.53% 49.76 3.47% 128.50 8.95% 1,220.1 223.08 18.28% 266.13 21.81% 344.87 28.27% Distribution 2 1,202.3 6.32 0.48% 53.41 4.45% 143.18 11.93% 1,028.7 179.91 17.49% 227.00 22.04% 316.78 30.76% 127 Distribution 3 1,094.7 4.80 0.44% 51.86 4.71% 144.11 13.10% 933.6 141.93 15.20% 213.00 22.90% 305.25 32.82% Table 3.1: Case 1: the numerical results of the toy model case without distributional uncertainty. 7.4% respectively. The difference between the upper bounds of VDI(x∗ (Ep)) with this additional information and that without it indicates the value of this additional information for managers who make decision on how much to spend on the investments in market consulting. Detailed results of Case 2 are listed in Table 3.2. In the table, UB3 represents the upper bound of VDI for the distribution family without second order moment condition, and UB3+ represents that with second order moment condition. UB4 represents the upper bound of VDI obtained by the dual problem approach. x∗ (Ep) Expected NPV with (MM USD) UB3 of VDI(x∗ (Ep)) (MM USD) Relative UB3 of VDI(x∗ (Ep)) UB4 of VDI(x∗ (Ep)) (MM USD) Relative UB4 of VDI(x∗ (Ep)) UB3+ of VDI(x∗ (Ep)) (MM USD) Relative UB3+ of VDI(x∗ (Ep)) Distr. Family 1 1,436.50 96.99 6.75% 218.08 15.18% 75.99 5.29% Distr. Family 2 1,202.30 106.04 8.82% 244.09 20.30% 81.87 6.81% Distr. Family 3 1,094.70 105.59 9.65% 248.63 22.71% 80.65 7.37% Table 3.2: Case 2: the numerical results of the toy model case with distributional uncertainty. CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 3.4.2 128 A Two-Dimensional Field Model In this section, we study a field which is represented on a two-dimensional 40×40 grid. Eight wells (four injectors and four producers) drive the flow in the field. The wells are arranged in a line drive pattern as shown in Figure 3.7. The optimization aims at maximizing oil production revenue. The production time frame is 300 days/period × 10 periods. The BHPs of the wells at each period are the control variables in this problem. So the total number of optimization variables is 80. The constraints in this optimization problem are all in form of BHP ranges. More details on the problem setup can be found in [19]. Figure 3.7: The permeability map and well location of the 2D field model In this problem, reservoir is simulated by Stanford’s General Purpose Research Simulator (GPRS; [54]), and the revenue optimization is solved by Hooke-Jeeves direct search (HJDS; [29]). Case 3: 2D Field Model with a Fully Known Distribution of Oil Market We firstly assume a known distribution of the oil price. We assume the oil price in the first period is known as 80 USD/bbl, and the oil prices in the following nine CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 129 period follows Wiener process with expectations all equal to 80 USD/bbl and the p standard deviation of the price change between period k1 and k2 equal to (k22 − k12 )× 2 USD/bbl. We use 10,000 samples of oil price from this distribution which are shown in Figure 3.8. Figure 3.8: Case 3: the 10,000 samples of oil price curve. Solving DCP, we get optimal revenue 39.2 MM USD with constant oil price 80 USD/bbl. The lower bound for the VKO of this control setting which is computed with 2N K-means clusters is 0.7 MM USD, which is 1.8% of the DCP solution. The upper bound computed with the vertices of the rotated one-norm ellipsoid is 4.7 MM USD, which is 12.1% of the DCP solution. If we add the interior points used to compute the lower bound and Ep into the set {p̂j }, then the upper bound of VKO is 2.6 MM USD, which is 6.8% of the DCP solution. We reiterate that this improvement does not increase total computational cost, if the lower bound has already been or will be computed. Case 3: 2D Field Model with a Partially Known Distribution of Oil Market We now assume that we only know the region of possible oil price Ω is covered by the rotated one-norm ellipsoid used above, and the expected oil price is 80 USD/bbl. CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 130 Applying the methodology introduced in Section 3.3.2, we compute the upper bound for VDI(x∗ (Ep)) and it is equal to 9.0 MM USD, which is 23.0% of the DCP solution. This a relatively large value, since the candidate distribution set D defined here is too large and it lacks strong condition on the stochastic information. Now we assume the candidate distribution set D is restricted to all the distributions with 90% accurate covariance matrix, besides the 100% accurate expectation. Then a lower bound and an upper bound on the covariance matrix is added to the feasible set Y in constraint (3.28). In real world, these bounds may be obtained from some resource which guarantees that the bounds restrict the error of covariance matrices of the distributions in D within 10% of that of the real distribution. With this new stochastic information, the upper bound for VDI(x∗ (Ep)) is reduced to 4.2 MM USD, which is 10.8% of the DCP solution. The reduction of the upper bound of VDI implies the monetary value of this piece of stochastic information. 3.4.3 A Three-Dimensional Field Model In this section, we study Field 1 in Section 2.5 which is represented on a threedimensional 80 × 81 × 20 grid. 17 wells (7 injectors and 10 producers) drive the flow in the field. Figure 2.7 shows the permeability map of the field and the well locations. The optimization aims at maximizing NPV with discount 3% per year. The optimization time frame is 90 days/period × 30 periods. The flow rates of the wells at each period are the control variables in this problem. So the total number of optimization variables is 510. The constraints in this optimization problem includes range of flow rates, the limit on the change of flow rates between periods, etc. Detailed setting of the optimization problem can be found in Section 2.5. In this problem, reservoir is simulated by streamline simulator 3DSL [53], and the NPV optimization is solved by two-stage optimization approach using streamline simulation proposed in Section 2.6.1. CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 131 Cases with Fully Known Distribution of Oil Price We firstly assume a known distribution of the oil price. We assume the oil price in the first period is known as 107 USD/bbl, and the oil prices in the following nine period follows Wiener process with expectations all equal to 107 USD/bbl and the p standard deviation of the price change between period k1 and k2 equal to (k22 − k12 )× 1 USD/bbl. It is the same as Distribution 2 in the toy model case (Figure 3.6). We use 10,000 samples of oil price from this distribution. Solving DCP, we get optimal NPV 1.3 billion USD with constant oil price 107 USD/bbl. The lower bound for the VKO of this control setting computed with 2N K-means clustering is 2.2 MM USD, which is 0.2% of the DCP solution. The upper bound computed with the vertices of the rotated one-norm ellipsoid and the interior points used to compute the lower bound is equal to 45.1 MM USD, which is 3.6% of the DCP solution. Cases with Partially Known Distribution of Oil Price We now assume that we only know the region of possible oil price Ω is covered by the rotated one-norm ellipsoid above, and the expected oil price is 107 USD/bbl. Applying the methodology introduced in Section 3.3.2, we compute the upper bound for VDI(x∗ (Ep)) and it is equal to 85.0 MM USD. If we add a new condition to D which restricts the spectral radius of covariance matrix less than (50 USD/bbl)2 , then the upper bound for VDI(x∗ (Ep)) is reduced to 77.9 MM USD. If we further add a condition that restricts the variance of the k th period between 0.8k 2 × 1 USD/bbl and 1.2k 2 × 1 USD/bbl for every period, then the upper bound for VDI(x∗ (Ep)) is reduced to 69.2 MM USD. The reduction of the upper bound of VDI provides the reservoir manager a quantitative reference on the monetary values of these pieces of additional stochastic information. CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 3.5 132 Discussion and Future Work The methodology introduced in this chapter relies on the fact that function G(x; p) is convex with respect to p for any fixed x. The convexity results from x∗ (p) is the global optimal solution of DPp . Therefore the methodology requires that G(x; p̂j ) are all evaluated based on the global optimal solution to DPp̂j . In practice, this requirement may be challenging if the DPs are too complicated to be solved globally. In that case, G(x; p̂j ) tends to be underestimated, and reservoir managers should be aware to the possibility of risk underestimation. This methodology is not limited to the area of petroleum engineering. As long as the stochastic problem has the same form as the SP in Section 3.1 (random variables are only linearly contained in objective function), the risk of its DCP solution or other decision can be analyzed by this method. For example, [18] models a real world problem of jet fleet composition in such way, where risk can be analyzed by this method. We look forwards more application of this work in various areas in future. In the context of oil reservoir management, the concept of value of information can also be used to analyze the risk caused by geological uncertainty. The relationship between the uncertain field model to the objective function is no longer linear, therefore most bounds addressed in this dissertation do not hold. However, researches based on this risk measure is expected to be valuable in future. 3.6 Conclusion In this chapter, we propose a risk analysis method for reservoir management with market uncertainty. We model the reservoir management problem in a dynamic form in order to capture the stochastic factor from uncertain market. Based on this stochastic problem, we define a risk measure, the value of the knowledge of oil price (VKO), to quantify the risk in reservoir management caused by market uncertainty. We demonstrate the solution based on the deterministic problem using expected market scenario (DCP) is the safest decision in terms of VKO. Moreover, we introduce a numerical method to estimate the lower bound and upper bound of VKO which CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 133 is computationally difficult to evaluate directly. The estimation of the lower bound requires K times of the computational cost required by one deterministic reservoir optimization problem (DP), where K can be determined according to the computational capability in hand. The upper bound requires 2n times of the computational cost required by one DP, where n is the number of time periods. The upper bound can be further improved by taking advantage of the interior points used to compute the lower bound without additional computation. We also generalize this technique from the case where the distribution of random market variables are fully know to the case where distributional uncertainty exists. In the later case, we define the value of distributional information (VDI) as a risk measure. An estimation approach for the upper bound and lower bound of VDI is also introduced. Using this method, we analyze the risk from the uncertainty of oil price based on a toy model, a two-dimensional field model and a three-dimensional real field field model. The case study demonstrates the capability of this technique in offering reservoir managers quantitative reference about capital investments for reducing market uncertainty. Nomenclature Abbreviations BHP bottom hole pressure DCP deterministic counterpart problem DP deterministic problem DRSP distributional robust stochastic problem DRT drainage time MM million NPV net present value PCA principal component analysis SDP semi-definite programming SP stochastic problem TOF time-of-flight USD US dollar VKO value of the knowledge of oil price VDI value of distributional information Variables and Parameters in Chapter 2 α limit on the relative change of well rates β tuning parameter in simulated annealing γ tuning parameter in the decline model 134 CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY 135 δ trust-region radius ε trust-region update threshold η mean-reverting parameter in Ornstein-Uhlenbeck process θ performance indicator of linearized approximation λ decline factor in the decline model µ long-term mean of oil price (for Ornstein-Uhlenbeck process) φ porosity c tracer concentration c i unit cost for water injection cp unit cost for water production C voidage replacement ratio E oil production efficiency f p (superscript) fluid production FTR trust-region update factor i (subscript) injector i ij (subscript) well pair i-j j or J (subscript) producer j or J J original objective function k or K (subscript) period k or K K∗ best period for operation termination l (superscript) linearization L lower bound for well rate L linearized objective function N recoverable oil reserve (for decline model) N0 recoverable oil reserve at the start of optimization (for decline model) Nb number of iterations since last improvement (for simulated annealing) NI number of injectors NP number of producers NT number of short-term periods op (superscript) oil production p oil price CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY Pacc acceptance probability in simulated annealing q flow rate ∆q perturbation of flow rate q vector of well rate setting R fluid rate ratio s (subscript) control variables later than period K ∗ t time ∆t length of short-term period u field water injection target u vector of field water injection target U upper bound for well rate U trust region ~v velocity field wi (superscript) water injection wp (superscript) water production Z Gaussian random variable Variables and Parameters in Chapter 3 δ Dirac distribution θ vertex representation of market variable sample Θ feasible set of vertex representation λ dual variable Λ feasible set of operational control µ mean of market variable Ω the set of possible market scenarios D set of all feasible distributions of market variable E expectation F distribution of market variable G gap function (for VKO) h optimal objective value of later periods 136 CHAPTER 3. RISK ANALYSIS WITH MARKET UNCERTAINTY i (subscript) index of market variable sample I index set of sample space subregion (for lower bound of VKO) j (subscript) index of polytope vertex k (subscript) period k K number of subregions (for lower bound of VKO) m number of polytope vertices n number of periods N number of market variable samples p market variable p vector of market variables p̂ vertex of polytope prob probability Poly polytope q field variable q vector of field variables s dual variable x operational control x ∗ vector of operational controls x optimal operational strategy y probability of market variable sample Y set of feasible discretized distribution 137 Bibliography [1] A. Alhuthali, D. Oyerinde, and A. Datta-Gupta. Optimal waterflood management using rate control. SPE Reservoir Evaluation & Engineering, 10(5):539– 551, 2007. [2] J. S. Aronofsky, L. Masse, and S. G. Natanson. A model for the mechanism of oil recovery from the porous matrix due to water invasion in fractured reservoirs. Petroleum Transactions, AIME, 213:17–19, 1958. [3] C. Audet and J. E. Dennis Jr. Analysis of generalized pattern searches. SIAM Journal on Optimization, 13(3):889–903, 2002. [4] C. Audet and J. E. Dennis Jr. Mesh adaptive direct search algorithms for constrained optimization. SIAM Journal on Optimization, 17(1):188–217, 2006. [5] K. Aziz and A. Settari. Petroleum reservoir simulation, volume 476. Applied Science Publishers London, 1979. [6] R. P. Batycky, M. R. Thiele, R. O. Baker, and S. H. Chugh. Revisiting reservoir flood-surveillance methods using streamlines. SPE Reservoir Evaluation & Engineering, 11(2):387–394, 2006. [7] H. Bessembinder, J. F. Coughenour, P. J. Seguin, and M. M. Smoller. Mean reversion in equilibrium asset prices: Evidence from the futures term structure. The Journal of Finance, 50(1):361–375, 2012. [8] J. R. Birge. The value of the stochastic solution in stochastic linear programs with fixed recourse. Mathematical Programming, 24(1):314–325, 1982. 138 BIBLIOGRAPHY 139 [9] S. Boyd, N. Parikh, E. Chu, B. Peleato, and J. Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Foundations and Trends in Machine Learning, 3(1):1–122, 2011. [10] D. R. Brouwer and J. D. Jansen. Dynamic optimization of water flooding with smart wells using optimal control theory. SPE Journal, 9(4):391–402, 2004. [11] J. Caers, S. Krishnan, Y. Wang, and A. Kovscek. A geostatistical approach to streamline-based history matching. SPE Journal, 7(3):250–266, 2002. [12] Y. Chen, D. S. Oliver, and D. Zhang. Efficient ensemble-based closed-loop production optimization. SPE Journal, 14(4):634–645, 2009. [13] COIN-OR. IPOPT, 2014. [14] A. R. Conn, N. Gould, and Ph. L. Toint. Trust-Region Methods, volume 1. Philadelphia, Pennsylvania: Society for Industrial and Applied Mathematics, 2000. [15] A. R. Conn, K. Scheinberg, and L. N. Vicente. Introduction to derivative-free optimization, volume 8. Society for Industrial Mathematics, 2009. [16] A. Datta-Gupta and M. J. King. Streamline Simulation: Theory and Practice. Richardson, Texas: Textbook Series, SPE, 2007. [17] E. Delage and Y. Ye. Distributionally robust optimization under moment uncertainty with application to data-driven problems. Operations Research, 58(3):595– 612, 2010. [18] E. Delage, Y. Ye, and S. F. Arroyo. The value of stochastic modeling in two-stage stochastic programs with cost uncertainty. Working paper, 2011. [19] D. Echeverrı́a Ciaurri, O. J. Isebor, and L. J. Durlofsky. Application of derivativefree methodologies to generally constrained oil production optimisation problems. International Journal of Mathematical Modelling and Numerical Optimisation, 2(2):134–161, 2011. BIBLIOGRAPHY 140 [20] D. Echeverrı́a Ciaurri, T. Mukerji, and L. J. Durlofsky. Derivative-free optimization for oil field operations. In Computational Optimization and Applications in Engineering and Industry, pages 19–55. Springer, 2011. [21] R. Fletcher and S. Leyffer. Nonlinear programming without a penalty function. Mathematical Programming, 91(2):239–269, 2002. [22] C. Gardiner. Stochastic Methods: A Handbook for the Natural and Social Sciences. Berlin: Springer, fourth edition, 2009. [23] R. Gibson and E.S. Schwartz. Stochastic convenience yield and the pricing of oil contingent claims. The Journal of Finance, 45(3):959–976, 2012. [24] P. E. Gill, W. Murray, and M. A. Saunders. SNOPT: An SQP algorithm for largescale constrained optimization. SIAM Journal on Optimization, 12(4):979–1006, 2002. [25] D. E. Goldberg. Genetic algorithms in search, optimization, and machine learning. Addison-Wesley, 1989. [26] M. Grant and S. Boyd. CVX: MATLAB software for disciplined convex programming, version 1.21, 2010. [27] J. Harris and H. Stocker. Handbook of Mathematics and Computational Science. New York City: Springer, 1998. [28] B. He, M. Xu, and X. Yuan. Solving large-scale least squares semidefinite programming by alternating direction methods. SIAM Journal on Matrix Analysis and Applications, 32(1):136–152, 2011. [29] R. Hooke and T. A. Jeeves. Direct search solution of numerical and statistical problems. Journal of the ACM, 8(2):212–229, 1961. [30] J. D. Jansen, D. R. Brouwer, Naevdal G., and C. P. J. W. van Kruijsdijk. Closedloop reservoir management. First Break, 23(1), 2005. [31] I. Jolliffe. Principal component analysis. Wiley Online Library, 2005. BIBLIOGRAPHY 141 [32] J. Kennedy and R. Eberhart. Particle swarm optimization. In IEEE International Conference on Neural Networks, Perth, Australia, 1995. [33] S. Kirkpatrick, C. D. Gelatt, and M. P. Vecchi. Optimization by simmulated annealing. Science, 220(4598):671–680, 1983. [34] T. G. Kolda, R. M. Lewis, and V. Torczon. Optimization by direct search: New perspectives on some classical and modern methods. SIAM Review, 45:385–482, 2003. [35] O. Kramer, D. Echeverrı́a Ciaurri, and S. Koziel. Derivative-free optimization. In Computational Optimization, Methods and Algorithms, pages 61–83. Springer, 2011. [36] Kewen. Li and R. Horne. An analytical model for production decline-curve analysis in naturally fractured reservoirs. SPE Reservoir Evaluation & Engineering, 8(3):197–204, 2005. [37] T. Lolomari, K. Bratvedt, M. Crane, W. J. Milliken, and J. J. Tyrie. The use of streamline simulation in reservoir management: methodology and case studies. In SPE Annual Technical Conference and Exhibition, Dallas, Texas, United States, 2000. [38] M. Lübbecke and J. Desrosiers. Selected topics in column generation. Operations Research, 53(6):1007–1023, 2004. [39] D. G. Luenberger and Y. Ye. Linear and nonlinear programming, volume 116. Springer Verlag, 2008. [40] J. MacQueen. Some methods for classification and analysis of multivariate observations. In Proc., the 5th Berkeley Symposium on Mathematical Statistics and Probability, Berkeley, California, volume 1, pages 281–297, 1967. [41] W. J. Milliken, A. S. Emanuel, and A. Chakravarty. Applications of 3d streamline simulation to assist history matching. SPE Reservoir Evaluation & Engineering, 4(6):502–508, 2001. BIBLIOGRAPHY 142 [42] MOSEK, ApS. MOSEK, version 6.0. Copenhagen, Denmark, 2012. [43] M. Muskat and R. D. Wyckoff. The Flow of Homogeneous Fluids through Porous Media. Boston, Massachusetts: International Human Resources Development Corporation, 1937. [44] J. R. Natvig, K. A. Lie, B. Eikemo, and I. Berre. An efficient discontinuous galerkin method for advective transport in porous media. Advances in Water Resources, 20(12):2424–2438, 2007. [45] J. Nocedal and S. J. Wright. Numerical optimization. Springer, 2006. [46] D. S. Oliver and Y. Chen. Recent progress on reservoir history matching: a review. Computational Geosciences, 15(1), 2011. [47] R. S. Pindyck. The long-run evolution of energy prices. The Energy Journal, 20(2):1–27, 1999. [48] P. Sarma, L. J. Durlofsky, K. Aziz, and W. H. Chen. Efficient real-time reservoir management using adjoint-based optimal control and model updating. Computational Geosciences, 10(1):3–36, 2006. [49] H. Scarf, K. J. Arrow, and S. Karlin. A min-max solution of an inventory problem. Studies in the Mathematical Theory of Inventory and Production, 10:201– 209, 1958. [50] M. Shahvali, B. Mallison, K. Wei, and H. Gross. An alternative to streamlines for flow diagnostics on structured and unstructured grids. SPE Journal, 17(3):768– 778, 2012. [51] J. E. Smith and K. F. McCardle. Options in the real world: Lessons learned in evaluating oil and gas investments. Operations Research, 47(1):1–15, 1999. [52] R. Storn and K. Price. Differential evolution–a simple and efficient heuristic for global optimization over continuous spaces. Journal of GlobalOoptimization, 11(4):341–359, 1997. BIBLIOGRAPHY 143 [53] Streamsim Technologies, Inc. 3DSL, version 4.10. San Francisco, CA, 2012. [54] SUPRI-B, Stanford University. General Purpose Research Simulator (GPRS). Stanford, CA, 2012. [55] SUPRI-B, Stanford University. Automatic Differentiation General Purpose Research Simulator (AD-GPRS). Stanford, CA, 2014. [56] M. R. Thiele and R. P. Batycky. Using streamline-derived injection efficiencies for improved waterflood management. SPE Reservoir Evaluation & Engineering, 9(2):187–196, 2006. [57] M. R. Thiele, R. P. Batycky, and D. H. Fenwick. Streamline simulation for modern reservoir-engineering workflows. Journal of Petroleum Technology, 62(1):64– 70, 2010. [58] C. Wang, G. Li, and A. Reynolds. Production optimization in closed-loop reservoir management. SPE Journal, 14(3):506–523, 2009. [59] Y. Wang and A. R. Kovscek. Streamline approach for history matching production data. SPE Journal, 5(4):353–362, 2000. [60] T. Wen, M. R. Thiele, D. Echeverrı́a Ciaurri, K. Aziz, and Y. Ye. Reservoir management using two-stage optimization with streamline simulation. In The 13th European Conference on the Mathematics of Oil Recovery, Biarritz, France, 2012. [61] Z. Wu and A. Datta-Gupta. Rapid history matching using a generalized traveltime inversion method. SPE Journal, 7(2):113–122, 2002.