Abstract

Polymer flooding is one of the most important technologies for enhanced oil recovery (EOR). In this paper, an optimal control model of distributed parameter systems (DPSs) for polymer injection strategies is established, which involves the performance index as maximum of the profit, the governing equations as the fluid flow equations of polymer flooding, and some inequality constraints as polymer concentration and injection amount limitation. The optimal control model is discretized by full implicit finite-difference method. To cope with the discrete optimal control problem (OCP), the necessary conditions for optimality are obtained through application of the calculus of variations and Pontryagin’s discrete maximum principle. A modified gradient method with new adjoint construction is proposed for the computation of optimal injection strategies. The numerical results of an example illustrate the effectiveness of the proposed method.

1. Introduction

It is of increasing necessity to produce oil fields more efficiently and economically because of the ever-increasing demand for petroleum worldwide. Since most of the significant oil fields are mature fields and the number of new discoveries per year is decreasing, the use of EOR processes is becoming more and more imperative. At present, polymer flooding technology is the best method for chemically EOR [1]. It could reduce the water-oil mobility ratio and improve sweep efficiency [25].

Due to the high cost of chemicals, it is essential to optimize polymer injection strategies to provide the greatest oil recovery at the lowest cost. The optimization procedure involves maximizing the objective function (cumulative oil production or profit) from a polymer flooding reservoir by adjusting the injection concentration. One way of solving this problem is direct optimization with the reservoir simulator. Numerical models are used to evaluate the complex interactions of variables affecting development decisions, such as reservoir and fluid properties and economic factors. Even with these models, the current practice is still the conventional trial and error approach. In each trial, the polymer concentration of an injection well is selected based on the intuition of the reservoir engineer. This one-well-at-a-time approach may lead to suboptimal decisions because engineering and geologic variables affecting reservoir performance are often nonlinearly correlated. And the problem definitely compounds when multiple producers and injectors are involved in a field development case. The use of the optimal control method offers a way out.

The optimal control method has been researched in EOR techniques in recent years. Ramirez et al. [6] firstly applied the theory of optimal control to determine the best possible injection strategies for EOR processes. Their study was motivated by the high operation costs associated with EOR projects. The objective of their study was to develop an optimization method to minimize injection costs while maximizing the amount of oil recovered. The performance of their algorithm was subsequently examined for surfactant injection as an EOR process in a one-dimensional core flooding problem [7]. The control for the process was the surfactant concentration of the injected fluid. They observed a significant improvement in the ratio of the value of the oil recovered to the cost of the surfactant injected from 1.5 to about 3.4. Optimal control was also applied to steam flooding by Liu et al. [8]. They developed an approach using optimal control theory to determine operating strategies to maximize the economic attractiveness of steam flooding process. Their objective was to maximize a performance index which is defined as the difference between oil revenue and the cost of injected steam. Their optimization method also obtained significant improvement under optimal operation. Ye et al. [9] were involved in the study of optimal control of gas-cycling in condensate reservoirs. It was shown that both the oil recovery and the total profit of a condensate reservoir can be enhanced obviously through optimization of gas production rate, gas injection rate, and the mole fractions of each component in injection gas. Brouwer and Jansen [10], Sarma et al. [11], Zhang et al. [12], and Jansen [13] used the optimal control theory as an optimization algorithm for adjusting the valve setting in smart wells of water flooding. The water flooding scheme that maximized the profit was numerically obtained by combining reservoir simulation with control theory practices of implicit differentiation. They were able to achieve improved sweep efficiency and delayed water breakthrough by dynamic control of the valve setting.

For the previous work on optimal control of polymer flooding, Guo et al. [14] and Lei et al. [15] applied the iterative dynamic programming algorithm to solve the OCP of polymer flooding. However, the optimal control model used in their study is so simple that it is not adapt for practical oilfield development. As a result of the complicated nature of reservoir models with nonlinear constraints, it is very tedious and troublesome to cope with a large number of grid points for the state variables and control variables. To avoid these difficulties, Li et al. [16] and Lei et al. [17, 18] used the genetic algorithms to determine the optimal injection strategies of polymer flooding and the reservoir model equations were treated as a “black box.” The genetic algorithms are capable of finding the global optimum on theoretical sense, but as Sarma et al. [11] point out, they require a tens or hundreds of thousand reservoir simulation runs of very large model and are not able to guarantee monotonic maximization of the objective function.

In this paper, an optimal control model of DPS for polymer flooding is established which maximizes the profit by adjusting the injection concentration. Then, the determination of polymer injection strategies turns to solve this OCP of DPS. The model is discretized by the full implicit finite difference method. Necessary conditions for optimality are obtained by Pontryagin's discrete maximum principle. A new gradient-based numerical algorithm which makes it relatively easy to create adjoint equations is presented for solving the OCP. Finally, an example of polymer flooding project involving a heterogeneous reservoir case is investigated and the results show the efficiency of the proposed method.

2. Mathematical Formulation of Optimal Control

2.1. Performance Index

Let Ω𝑅2 denote the domain of reservoir with boundary 𝜕Ω, let 𝑛 be the unit outward normal on 𝜕Ω, and let (𝑥,𝑦)Ω be the coordinate of a point in the reservoir. Given a fixed final time 𝑡𝑓, we set Ψ=Ω×[0,𝑡𝑓], Γ=𝜕Ω×[0,𝑡𝑓], and suppose that there exist 𝑁𝑤 injection wells and 𝑁𝑜 production wells in the oilfield. The injection and production wells are located at 𝐿𝑤={(𝑥𝑤𝑖,𝑦𝑤𝑖)𝑖=1,2,,𝑁𝑤} and 𝐿𝑜={(𝑥𝑜𝑗,𝑦𝑜𝑗)𝑗=1,2,,𝑁𝑜}, respectively. This descriptive statement of the cost functional must be translated into a mathematical form to use quantitative optimization techniques. The oil value can be formulated as 𝑡𝑓0Ω𝜉𝑜1𝑓𝑤𝑞out𝑑𝜎𝑑𝑡,(2.1) where 𝜉𝑜 is the cost of oil per unit mass (104$/m3), 𝑓𝑤(𝑥,𝑦,𝑡) is the fractional flow of water, and 𝑞out(𝑥,𝑦,𝑡) is the flow velocity of production fluid (m/day). We define 𝑞out(𝑥,𝑦,𝑡)0 at (𝑥,𝑦)𝐿𝑜 and 𝑞out(𝑥,𝑦,𝑡)0 at (𝑥,𝑦)𝐿𝑜.

The polymer cost is expressed mathematically as 𝑡𝑓0Ω𝜉𝑝𝑞in𝑐pin𝑑𝜎𝑑𝑡,(2.2) where 𝜉𝑝 is the cost of oil per unit volume (104$/m3),𝑐pin(𝑥,𝑦,𝑡) is the polymer concentration of the injection fluid (g/L), and 𝑞in(𝑥,𝑦,𝑡) is the flow velocity of injection fluid (m/day). We define 𝑞in(𝑥,𝑦,𝑡)0 at (𝑥,𝑦)𝐿𝑤 and 𝑞in(𝑥,𝑦,𝑡)0 at (𝑥,𝑦)𝐿𝑤.

The objective functional is, therefore, max𝐽=𝑡𝑓0Ω𝜉𝑜1𝑓𝑤𝑞out𝜉𝑝𝑞in𝑐pin𝑑𝜎𝑑𝑡.(2.3)

2.2. Governing Equations

The maximization of the cost functional 𝐽 given by (2.3) is not totally free but is constrained by the system process dynamics. The governing equations of the polymer flooding process must, therefore, be developed to describe the flow of both the aqueous and oil phases through the porous media of a reservoir formation. The equations used in this paper allow for the adsorption of polymer onto the solid matrix in addition to the convective and dispersive mechanisms of mass transfer. Let 𝑝(𝑥,𝑦,𝑡),𝑆𝑤(𝑥,𝑦,𝑡), and𝑐𝑝(𝑥,𝑦,𝑡) denote the pressure, water saturation, and polymer concentration of the oil reservoir, respectively, at a point (𝑥,𝑦)Ω and a time 𝑡[0,𝑡𝑓], then 𝑝(𝑥,𝑦,𝑡),𝑆𝑤(𝑥,𝑦,𝑡), and𝑐𝑝(𝑥,𝑦,𝑡) satisfy the following partial differential equations (PDEs).(1)The flow equation for oil phase: 𝜕𝑘𝜕𝑥𝑝𝑟𝑜𝜕𝑝+𝜕𝜕𝑥𝑘𝜕𝑦𝑝𝑟𝑜𝜕𝑝𝜕𝑦1𝑓𝑤𝑞out𝜕=𝜙𝜕𝑡1𝑆𝑤𝐵𝑜,(𝑥,𝑦,𝑡)Ψ.(2.4)(2)The flow equation for water phase: 𝜕𝑘𝜕𝑥𝑝𝑟𝑤𝜕𝑝+𝜕𝜕𝑥𝑘𝜕𝑦𝑝𝑟𝑤𝜕𝑝𝜕𝑦+𝑞in𝑓𝑤𝑞out𝜕=𝜕𝑡𝜙𝑆𝑤𝐵𝑤,(𝑥,𝑦,𝑡)Ψ.(2.5)(3)The flow equation for polymer component: 𝜕𝑘𝜕𝑥𝑑𝑟𝑑𝜕𝑐𝑝+𝜕𝜕𝑥𝑘𝜕𝑥𝑝𝑟𝑐𝜕𝑝+𝜕𝜕𝑥𝑘𝜕𝑦𝑑𝑟𝑑𝜕𝑐𝑝+𝜕𝜕𝑦𝑘𝜕𝑦𝑝𝑟𝑐𝜕𝑝𝜕𝑦+𝑞in𝑐pin𝑓𝑤𝑞out𝑐𝑝𝜕=𝜙𝜕𝑡𝑝𝑆𝑤𝑐𝑝𝐵𝑤+𝜌𝑟(1𝜙)𝐶rp,(𝑥,𝑦,𝑡)Ψ.(2.6)(4)The boundary conditions and initial conditions: 𝜕𝑝|||𝜕𝑛𝜕Ω=0,𝜕𝑆𝑤||||𝜕𝑛𝜕Ω=0,𝜕𝑐𝑝||||𝜕𝑛𝜕Ω𝑝=0,(𝑥,𝑦,𝑡)Γ,(2.7)(𝑥,𝑦,0)=𝑝0(𝑥,𝑦),𝑆𝑤(𝑥,𝑦,0)=𝑆0𝑤(𝑥,𝑦),𝑐𝑝(𝑥,𝑦,0)=𝑐0𝑝(𝑥,𝑦),(𝑥,𝑦)Ω.(2.8) where the corresponding parameters are defined as 𝑘𝑝=𝐾,𝑘𝑑𝑟=𝐷,𝑜=𝑘𝑟𝑜𝐵𝑜𝜇𝑜,𝑟𝑤=𝑘𝑟𝑤𝐵𝑤𝑅𝑘𝜇𝑤,𝑟𝑐=𝑘𝑟𝑤𝑐𝑝𝐵𝑤𝑅𝑘𝜇𝑝,𝑟𝑑=𝜙𝑝𝑆𝑤𝐵𝑤.(2.9)The constant coefficient 𝐾(𝑥,𝑦) is the absolute permeability (𝜇m2), 𝐷(𝑥,𝑦) is the diffusion coefficient of polymer (m2/s), (𝑥,𝑦) is the thickness of the reservoir bed (m), 𝜌𝑟 is the rock density (kg/m3), and𝜇𝑜is the oil viscosity (mPa · s).

The oil volume factor 𝐵𝑜, the water volume factor 𝐵𝑤, the rock porosity 𝜙, and the effective porosity to polymer 𝜙𝑝 are expressed as functions of the reservoir pressure 𝑝: 𝐵𝑜=𝐵𝑜𝑟1+𝐶𝑜𝑝𝑝𝑟,𝐵𝑤=𝐵𝑤𝑟1+𝐶𝑤𝑝𝑝𝑟,𝜙=𝜙𝑟1+𝐶𝑅𝑝𝑝𝑟,𝜙𝑝=𝑓𝑎𝜙,(2.10) where𝑝𝑟is the reference pressure (MPa), 𝜙𝑟, 𝐵𝑜𝑟, and 𝐵𝑤𝑟 denote the porosity, the oil and water volume factor under the condition of the reference pressure, respectively, 𝑓𝑎 is the effective pore volume coefficient, 𝐶𝑜, 𝐶𝑤, and 𝐶𝑅 denote the compressibility factors of oil, water, and rock, respectively.

Functions relating values of the oil and water relative permeabilities 𝑘𝑟𝑜 and 𝑘𝑟𝑤 to the water saturation 𝑆𝑤 are 𝑘𝑟𝑤=𝑘𝑟𝑤𝑟𝑜𝑆𝑤𝑆𝑤𝑐1𝑆𝑤𝑐𝑆𝑜𝑟𝑛𝑤,𝑘𝑟𝑜=𝑘𝑟𝑜𝑐𝑤1𝑆𝑤𝑆𝑜𝑟1𝑆𝑤𝑐𝑆𝑜𝑟𝑛𝑜,(2.11) where 𝑘𝑟𝑤𝑟𝑜 is the oil relative permeability at the irreducible water saturation 𝑆𝑤𝑐, 𝑘𝑟𝑤𝑐𝑤 is the water relative permeability at the residual oil saturation 𝑆𝑜𝑟, 𝑛𝑤, and 𝑛𝑜 are constant coefficients.

The polymer solution viscosity 𝜇𝑝 (mPas), the permeability reduction factor 𝑅𝑘, and the amount adsorbed per unit mass of the rock 𝐶𝑟𝑝 (mg/g) which depend on the polymer concentration 𝑐𝑝 are given by 𝜇𝑝=𝜇𝑤1+𝑎𝑝1𝑐𝑝+𝑎𝑝2𝑐2𝑝+𝑎𝑝3𝑝,𝑅𝑘𝑅=1+𝑘max1𝑏𝑟𝑘𝑐𝑝1+𝑏𝑟𝑘𝑐𝑝,𝐶𝑟𝑝=𝑎𝑐𝑝1+𝑏𝑐𝑝,(2.12) where 𝜇𝑤 is the viscosity of the aqueous phase with no polymer (mPa · s), 𝑎𝑝1, 𝑎𝑝2, 𝑎𝑝3, 𝑅𝑘max, 𝑏𝑟𝑘, 𝑎 (cm3/g), and 𝑏(L/g) are constant coefficients.

The fractional flow of water 𝑓𝑤 is given by 𝑓𝑤=𝑟𝑤𝑟𝑜+𝑟𝑤.(2.13)

2.3. Constraints

Since the polymer injection amount is limited, and the negative and overhigh injection concentrations are not allowed, the constraints in polymer flooding are expressed mathematically as follows.(1)The polymer injection amount constraint: 𝑡𝑓0Ω𝑞in𝑐pin𝑑𝜎𝑑𝑡𝑚𝑝max.(2.14)(2)The injection polymer concentration constraint: 0𝑐pin𝑐max,(2.15) where 𝑚𝑝max is the maximum polymer injection amount and 𝑐max is the maximum injection polymer concentration.

3. Full Implicit Finite Difference Method

The governing equations given by (2.4)–(2.8) are nonlinear PDEs. Several finite difference approximations for the numerical simulation of such DPS are possible. We adopt a full-implicit finite-difference scheme for the calculation of the governing equations. The scheme is described below.

For two space variables, we now consider the grid system with which we divide up the reservoir region in the 𝑥-𝑦 plane. The integer 𝑖 (𝑖=1,2,,𝑛𝑥) is used as the index in the 𝑥-direction, and the integer 𝑗 (𝑗=1,2,,𝑛𝑦) for the index in the 𝑦-direction. Thus, 𝑥𝑖 is the 𝑖th value of 𝑥, and 𝑦𝑗 is the 𝑗th value of 𝑦. Double indexing is used to identify functions within the two-dimensional region. Let 𝐮(𝑥,𝑦,𝑡)=[𝑝,𝑆𝑤,𝑐𝑝]𝑇 denote the system state vector. The discrete state vector in grid point (𝑥𝑖,𝑦𝑗) is described by 𝐮𝑖,𝑗𝑥=𝐮𝑖,𝑦𝑗.(3.1)

The reservoir domain is divided into 𝑛𝑥×𝑛𝑦 blocks, and the point (𝑥𝑖,𝑦𝑗) is considered to be at the center of block (𝑖,𝑗). There are 𝑛𝑥 blocks in the 𝑥-direction and 𝑛𝑦 blocks in the 𝑦-direction. Further details concerning this grid are given in Figure 1. We identify the coordinate 𝑥𝑖(1/2) with the left side of the block (𝑖,𝑗), and 𝑥𝑖+(1/2) with the right side of the block. Similarly, 𝑦𝑗(1/2) is identified with the bottom of the block, and 𝑦𝑗+(1/2) with the top.

Using the predefined grid system, the derivatives in (2.4)–(2.6) are replaced by finite differences. Three formulas are useful in this context: 𝜕𝐮=𝐮𝜕𝑡𝑛+1𝐮𝑛Δ𝑡𝑛,𝜕𝐮=𝐮𝜕𝑥𝑖+(1/2),𝑗𝐮𝑖(1/2),𝑗,Δ𝑥𝜕𝐮=𝐮𝜕𝑦𝑖,𝑗+(1/2)𝐮𝑖,𝑗(1/2),Δ𝑦(3.2) where 𝑛=0,1,,𝑁1 is the index of reservoir simulation time step, 𝑁 is the number of simulation time steps, Δ𝑡𝑛 represents the size of the 𝑛th time step in days, 𝐮𝑛+1 represents the state vector at time 𝑡𝑛+1,𝑡𝑛+1 is the total simulation time in days at the end of the 𝑛th time step (𝑡𝑁=𝑡𝑓), and Δ𝑥 and Δ𝑦 (m) denote the space step lengths in the 𝑥-direction and 𝑦-direction, respectively.

Apply the formulas (3.2) to discretize the governing equations (2.4)–(2.6), and multiply the grid area Δ𝑥Δ𝑦 (m2) to the two sides of the equations. For the full implicit finite difference method, the second spatial derivative items in (2.4)–(2.6) are evaluated at time 𝑡𝑛+1 instead of at 𝑡𝑛. Then, the full-implicit finite-difference equations of the polymer flooding model has the general form: 𝐠𝑛=𝐅𝑛+1̃𝐮𝑛+1+𝐖𝑛+1̃𝐮𝑛+1,𝐯𝑛𝐀𝑛+1̃𝐮𝑛+1𝐀𝑛(̃𝐮𝑛)=𝟎,(3.3) where 𝐠=[𝐠𝑇1,1,,𝐠𝑇𝑖,𝑗,,𝐠𝑇𝑛𝑥,𝑛𝑦]𝑇𝑅𝑛𝑥×𝑛𝑦×3 is the discrete governing equations of polymer flooding model, ̃𝐮=[𝐮𝑇1,1,,𝐮𝑇𝑖,𝑗,,𝐮𝑇𝑛𝑥,𝑛𝑦]𝑇𝑅𝑛𝑥×𝑛𝑦×3 is the discrete state vector, 𝐯=[𝑣𝑖,𝑗𝑣𝑖,𝑗=𝑐pin𝑖,𝑗,(𝑖,𝑗)𝜅𝑤]𝑇𝑅𝑁𝑤 is the control vector, 𝜅𝑤 is the set of grid coordinates where injection wells located, 𝐅 refers to the flux terms, 𝐖 refers to the source terms, and 𝐀 refers to the accumulation terms.

The discrete governing equations𝐠𝑖,𝑗=[𝑔𝑜𝑖,𝑗,𝑔𝑤𝑖,𝑗,𝑔𝑐𝑖,𝑗]𝑇 for the grid point (𝑖,𝑗) at time 𝑡𝑛 are given by 𝑔𝑛𝑜𝑖,𝑗=𝐹𝑛+1𝑜𝑖,𝑗+𝑊𝑛+1𝑜𝑖,𝑗𝐴𝑛+1𝑜𝑖,𝑗+𝐴𝑛𝑜𝑖,𝑗𝑔=0,𝑛𝑤𝑖,𝑗=𝐹𝑛+1𝑤𝑖,𝑗+𝑊𝑛+1𝑤𝑖,𝑗𝐴𝑛+1𝑤𝑖,𝑗+𝐴𝑛𝑤𝑖,𝑗𝑔=0,𝑛𝑐𝑖,𝑗=𝐹𝑛+1𝑐𝑖,𝑗+𝑊𝑛+1𝑐𝑖,𝑗𝐴𝑛+1𝑐𝑖,𝑗+𝐴𝑛𝑐𝑖,𝑗=0.(3.4) Equations (3.4) are discrete flow equations for oil phase, water phase, and polymer component, respectively. The full-implicit finite-difference schemes for the flux terms 𝐅𝑖,𝑗=[𝐹𝑜𝑖,𝑗,𝐹𝑤𝑖,𝑗,𝐹𝑐𝑖,𝑗]𝑇 are given by 𝐹𝑛+1𝑜𝑖,𝑗𝑘=Δ𝑦𝑝𝑖+(1/2),𝑗𝑟𝑜𝑛+1𝑖+(1/2),𝑗𝑝Δ𝑥𝑛+1𝑖+1,𝑗𝑝𝑛+1𝑖,𝑗+𝑘𝑝𝑖(1/2),𝑗𝑟𝑜𝑛+1𝑖(1/2),𝑗𝑝Δ𝑥𝑛+1𝑖1,𝑗𝑝𝑛+1𝑖,𝑗𝑘+Δ𝑥𝑝𝑖,𝑗+(1/2)𝑟𝑜𝑛+1𝑖,𝑗+(1/2)𝑝Δ𝑦𝑛+1𝑖,𝑗+1𝑝𝑛+1𝑖,𝑗+𝑘𝑝𝑖,𝑗(1/2)𝑟𝑜𝑛+1𝑖,𝑗(1/2)𝑝Δ𝑦𝑛+1𝑖,𝑗1𝑝𝑛+1𝑖,𝑗,𝐹𝑛+1𝑤𝑖,𝑗𝑘=Δ𝑦𝑝𝑖+(1/2),𝑗𝑟𝑤𝑛+1𝑖+(1/2),𝑗𝑝Δ𝑥𝑛+1𝑖+1,𝑗𝑝𝑛+1𝑖,𝑗+𝑘𝑝𝑖(1/2),𝑗𝑟𝑤𝑛+1𝑖(1/2),𝑗𝑝Δ𝑥𝑛+1𝑖1,𝑗𝑝𝑛+1𝑖,𝑗+𝑘Δ𝑥𝑝𝑖,𝑗+(1/2)𝑟𝑤𝑛+1𝑖,𝑗+(1/2)𝑝Δ𝑦𝑛+1𝑖,𝑗+1𝑝𝑛+1𝑖,𝑗+𝑘𝑝𝑖,𝑗(1/2)𝑟𝑤𝑛+1𝑖,𝑗(1/2)𝑝Δ𝑦𝑛+1𝑖,𝑗1𝑝𝑛+1𝑖,𝑗,𝐹𝑛+1𝑐𝑖,𝑗𝑘=Δ𝑦𝑑𝑖+(1/2),𝑗𝑟𝑑𝑛+1𝑖+(1/2),𝑗𝑐Δ𝑥𝑛+1𝑝𝑖+1,𝑗𝑐𝑛+1𝑝𝑖,𝑗+𝑘𝑑𝑖(1/2),𝑗𝑟𝑑𝑛+1𝑖(1/2),𝑗𝑐Δ𝑥𝑛+1𝑝𝑖1,𝑗𝑐𝑛+1𝑝𝑖,𝑗𝑘+Δ𝑥𝑑𝑖,𝑗+(1/2)𝑟𝑑𝑛+1𝑖,𝑗+(1/2)𝑐Δ𝑦𝑛+1𝑝𝑖,𝑗+1𝑐𝑛+1𝑝𝑖,𝑗+𝑘𝑑𝑖,𝑗(1/2)𝑟𝑑𝑛+1𝑖,𝑗(1/2)𝑐Δ𝑦𝑛+1𝑝𝑖,𝑗1𝑐𝑛+1𝑝𝑖,𝑗𝑘+Δ𝑦𝑝𝑖+(1/2),𝑗𝑟𝑐𝑛+1𝑖+(1/2),𝑗𝑝Δ𝑥𝑛+1𝑖+1,𝑗𝑝𝑛+1𝑖,𝑗+𝑘𝑝𝑖(1/2),𝑗𝑟𝑐𝑛+1𝑖(1/2),𝑗𝑝Δ𝑥𝑛+1𝑖1,𝑗𝑝𝑛+1𝑖,𝑗𝑘+Δ𝑥𝑝𝑖,𝑗+(1/2)𝑟𝑐𝑛+1𝑖,𝑗+(1/2)𝑝Δ𝑦𝑛+1𝑖,𝑗+1𝑝𝑛+1𝑖,𝑗+𝑘𝑝𝑖,𝑗(1/2)𝑟𝑐𝑛+1𝑖,𝑗(1/2)𝑝Δ𝑦𝑛+1𝑖,𝑗1𝑝𝑛+1𝑖,𝑗.(3.5) The discrete source terms 𝐖𝑖,𝑗=[𝑊𝑜𝑖,𝑗,𝑊𝑤𝑖,𝑗,𝑊𝑐𝑖,𝑗]𝑇 are expressed as 𝑊𝑛+1𝑜𝑖,𝑗=1𝑓𝑛+1𝑤𝑖,𝑗𝑄𝑛out𝑖,𝑗,𝑊𝑛+1𝑤𝑖,𝑗=𝑄𝑛in𝑖,𝑗𝑓𝑛+1𝑤𝑖,𝑗𝑄𝑛out𝑖,𝑗,𝑊𝑛+1𝑐𝑖,𝑗=𝑄𝑛in𝑖,𝑗𝑐𝑛pin𝑖,𝑗𝑓𝑛+1𝑤𝑖,𝑗𝑄𝑛out𝑖,𝑗𝑐𝑛+1𝑝𝑖,𝑗,(3.6) where 𝑄out is the fluid production rate (𝑄out=Δ𝑥Δ𝑦𝑞out, m3/d, 𝑄out𝑖,𝑗0 at (𝑖,𝑗)𝜅𝑜, and 𝑄out𝑖,𝑗0 at (𝑖,𝑗)𝜅𝑜), 𝜅𝑜 is the set of grid coordinates where production wells located, 𝑄in is the fluid injection rate (𝑄in=Δ𝑥Δ𝑦𝑞in, m3/d, 𝑄in𝑖,𝑗0 at (𝑖,𝑗)𝜅𝑤, and 𝑄in𝑖,𝑗0 at (𝑖,𝑗)𝜅𝑤). The full-implicit finite-difference schemes for the accumulation terms 𝐀𝑖,𝑗=[𝐴𝑜𝑖,𝑗,𝐴𝑤𝑖,𝑗,𝐴𝑐𝑖,𝑗]𝑇 are 𝐴𝑛+1𝑜𝑖,𝑗=𝑉𝑖,𝑗Δ𝑡𝑛𝜙𝑛+1𝑖,𝑗1𝑆𝑛+1𝑤𝑖,𝑗𝐵𝑛+1𝑜𝑖,𝑗,𝐴𝑛𝑜𝑖,𝑗=𝑉𝑖,𝑗Δ𝑡𝑛𝜙𝑛𝑖,𝑗1𝑆𝑛𝑤𝑖,𝑗𝐵𝑛𝑜𝑖,𝑗,𝐴𝑛+1𝑤𝑖,𝑗=𝑉𝑖,𝑗Δ𝑡𝑛𝜙𝑛+1𝑖,𝑗𝑆𝑛+1𝑤𝑖,𝑗𝐵𝑛+1𝑤𝑖,𝑗,𝐴𝑛𝑤𝑖,𝑗=𝑉𝑖,𝑗Δ𝑡𝑛𝜙𝑛𝑖,𝑗𝑆𝑛𝑤𝑖,𝑗𝐵𝑛𝑤𝑖,𝑗,𝐴𝑛+1𝑐𝑖,𝑗=𝑉𝑖,𝑗Δ𝑡𝑛𝜙𝑛+1𝑝𝑖,𝑗𝑆𝑛+1𝑤𝑖,𝑗𝑐𝑛+1𝑝𝑖,𝑗𝐵𝑛+1𝑤𝑖,𝑗+𝜌𝑟1𝜙𝑛+1𝑖,𝑗𝐶𝑛+1𝑟𝑝𝑖,𝑗,𝐴𝑛𝑐𝑖,𝑗=𝑉𝑖,𝑗Δ𝑡𝑛𝜙𝑛𝑝𝑖,𝑗𝑆𝑛𝑤𝑖,𝑗𝑐𝑛𝑝𝑖,𝑗𝐵𝑛𝑤𝑖,𝑗𝜌𝑟1𝜙𝑛𝑖,𝑗𝐶𝑛𝑟𝑝𝑖,𝑗,(3.7) where 𝑉 is the grid volume (𝑉𝑖,𝑗=𝑖,𝑗Δ𝑥Δ𝑦, m3).

The boundary condition (2.7) is equivalent to 𝜕𝐮𝜕𝑥=0,𝜕𝐮𝜕𝑦=0,(𝑥,𝑦,𝑡)𝜕Ω×0,𝑡𝑓.(3.8) Therefore, by using finite difference and (3.8), we have 𝐮𝑖,0=𝐮𝑖,1,𝐮𝑖,𝑛𝑦+1=𝐮𝑖,𝑛𝑦,𝑖=1,2,,𝑛𝑥,𝐮0,𝑗=𝐮1,𝑗,𝐮𝑛𝑥+1,𝑗=𝐮𝑛𝑥,𝑗,𝑗=1,2,,𝑛𝑦.(3.9)

The initial condition (2.8) is discretized as 𝐮0𝑖,𝑗𝑥=𝐮𝑖,𝑦𝑗,0,𝑖=1,,𝑛𝑥,𝑗=1,,𝑛𝑦.(3.10)

In solving the governing equations (2.4)–(2.8) by the full-implicit finite-difference methods, a problem that was originally described by PDEs defined over continuous time and spatial domains is transformed to problem that is described by a set of nonlinear discrete algebraic equations that are implicit form.

4. Necessary Conditions of OCP for Polymer Flooding

By using the full-implicit finite-difference method, the optimal control model of polymer flooding is discretized as the general form: max𝐽=𝑁1𝑛=0𝐽𝑛=𝑁1𝑛=0Δ𝑡𝑛𝜉𝑜(𝑖,𝑗)𝜅𝑜1𝑓𝑛+1𝑤𝑖,𝑗𝑄𝑛out𝑖,𝑗𝜉𝑝(𝑖,𝑗)𝜅𝑤𝑐𝑛pin𝑖,𝑗𝑄𝑛in𝑖,𝑗,(4.1)s.t.𝐠𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛̃𝐮,𝑛=𝟎,𝑛=0,,𝑁1,(4.2)𝑛||𝑛=0=̃𝐮0,(4.3)𝑁1𝑛=0Δ𝑡𝑛(𝑖,𝑗)𝜅𝑤𝑐𝑛pin𝑖,𝑗𝑄𝑛in𝑖,𝑗𝑚𝑝max,(4.4)𝟎𝐯𝑛𝐯max,(4.5) where (4.1) is the discrete performance index and (4.4) is the discrete constraint of polymer injection amount.

We desire to find a set of necessary conditions for the state vector, ̃𝐮, and the control, 𝐯, to be extremals of the functional 𝐽 (4.1) subject to the governing (4.2)-(4.3) and the constraints (4.4)-(4.5). A convenient way to cope with such a discrete OCP is through the use of Pontryagin's maximum principle. The first step is to form an augmented functional by adjoining the governing equations to the performance index 𝐽: 𝐽𝐴=𝑁1𝑛=0𝐽𝑛̃𝐮𝑛+1,𝐯𝑛+𝝀,𝑛𝑛+1𝑇𝐠𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛,,𝑛(4.6) where 𝝀=[𝝀𝑇1,1,,𝝀𝑇𝑖,𝑗,,𝝀𝑇𝑛𝑥,𝑛𝑦]𝑇 is the adjoint vector and 𝝀𝑖,𝑗=[𝜆𝑜𝑖,𝑗,𝜆𝑤𝑖,𝑗,𝜆𝑐𝑖,𝑗]𝑇.

We can simplify the augmented performance function of (4.6) by introducing the Hamiltonian, 𝐻, as 𝐻𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛,𝝀𝑛+1,𝑛=𝐽𝑛̃𝐮𝑛+1,𝐯𝑛+𝝀,𝑛𝑛+1𝑇𝐠𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛.,𝑛(4.7) Therefore, the augmented performance function can be written as 𝐽𝐴=𝑁1𝑛=0𝐻𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛,𝝀𝑛+1.,𝑛(4.8)

Following the standard procedure of the calculus of variations, the increment of 𝐽𝐴, denoted by Δ𝐽𝐴, is formed by introducing variations𝛿̃𝐮𝑛+1,𝛿̃𝐮𝑛,𝛿𝐯𝑛, and𝛿𝝀𝑛+1 giving Δ𝐽𝐴=𝐽𝐴̃𝐮𝑛+1̃𝐮+𝛿𝑛+1,̃𝐮𝑛̃𝐮+𝛿𝑛,𝐯𝑛+𝛿𝐯𝑛,𝝀𝑛+1+𝛿𝝀𝑛+1𝐽𝐴̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛,𝝀𝑛+1.(4.9) This formulation assumes that the final time, 𝑡𝑓, is fixed.

Expanding (4.9) in a Taylor series and retaining only the linear terms gives the variation of the functional, 𝛿𝐽𝐴, 𝛿𝐽𝐴=𝑁1𝑛=0𝜕𝐻𝑛𝜕̃𝐮𝑛+1𝑇𝛿̃𝐮𝑛+1+𝜕𝐻𝑛𝜕̃𝐮𝑛𝑇𝛿̃𝐮𝑛+𝜕𝐻𝑛𝜕𝝀𝑛+1𝑇𝛿𝝀𝑛+1+𝜕𝐻𝑛𝜕𝐯𝑛𝑇𝛿𝐯𝑛.(4.10) The variations 𝛿̃𝐮𝑛+1 and 𝛿̃𝐮𝑛 are not independent but can be related by a discrete version of the integration by parts as 𝑁1𝑛=0𝜕𝐻𝑛𝜕̃𝐮𝑛+1𝑇𝛿̃𝐮𝑛+1=𝑁1𝑛=0𝜕𝐻𝑛1𝜕̃𝐮𝑛𝑇𝛿̃𝐮𝑛𝜕𝐻1𝜕̃𝐮0𝑇𝛿̃𝐮0+𝜕𝐻𝑁1𝜕̃𝐮𝑁𝑇𝛿̃𝐮𝑁.(4.11)

By substituting (4.11) into (4.10), the first variation 𝛿𝐽𝐴 becomes 𝛿𝐽𝐴=𝑁1𝑛=0𝜕𝐻𝑛1𝜕̃𝐮𝑛+𝜕𝐻𝑛𝜕̃𝐮𝑛𝑇𝛿̃𝐮𝑛𝜕𝐻1𝜕̃𝐮0𝑇𝛿̃𝐮0+𝜕𝐻𝑁1𝜕̃𝐮𝑁𝑇𝛿̃𝐮𝑁+𝑁1𝑛=0𝜕𝐻𝑛𝜕𝝀𝑛+1𝑇𝛿𝝀𝑛+1+𝑁1𝑛=0𝜕𝐻𝑛𝜕𝐯𝑛𝑇𝛿𝐯𝑛+1.(4.12)

The following necessary conditions for optimality are obtained when we apply Pontryagin's discrete maximum principle.

4.1. Adjoint Equations

Since the variation 𝛿̃𝐮𝑛 is free and not zero, the coefficient terms involving the 𝛿̃𝐮𝑛 variation in (4.12) are set to zero. This results in the following adjoint equations: 𝜕𝐻𝑛1𝜕̃𝐮𝑛+𝜕𝐻𝑛𝜕̃𝐮𝑛=0.(4.13) Substituting the Hamiltonian (4.7) into (4.13), the adjoint equations reduce for the polymer flooding problem under consideration as given by 𝜕𝐠𝑛1𝜕̃𝐮𝑛𝑇𝝀𝑛+𝜕𝐠𝑛𝜕̃𝐮𝑛𝑇𝝀𝑛+1+𝜕𝐽𝑛1𝜕̃𝐮𝑛=0.(4.14)

4.2. Governing Equations

Since the variation 𝛿𝝀𝑛+1 is free, we have 𝜕𝐻𝑛𝜕𝝀𝑛+1=𝐠𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛,𝑛=0.(4.15)

4.3. Transversality Conditions

Since the initial state is specified, the variation 𝛿̃𝐮0 of (4.12) is zero. However, the final state is not specified; therefore, the variation 𝛿̃𝐮𝑁 is free and nonzero. This means the following relation must be zero: 𝜕𝐻𝑁1𝜕̃𝐮𝑁=0.(4.16) By substituting the Hamiltonian (4.7) into (4.16), the transversality conditions of adjoint equations for the polymer flooding OCP are expressed as 𝜕𝐽𝑁1𝜕̃𝐮𝑁+𝝀𝑁𝑇𝜕𝐠𝑁1𝜕̃𝐮𝑁=0.(4.17) Equation (4.17) shows that the adjoint variables are known at the final time 𝑡𝑁. Since the state variables are known at the initial time and the adjoint variables are known at the final time, the discrete OCP is a split two-point boundary-value problem.

4.4. Optimal Control

With all the previous terms vanishing, the variation of the functional 𝛿𝐽𝐴 becomes 𝛿𝐽𝐴=𝑁1𝑛=0𝜕𝐻𝑛𝜕𝐯𝑛𝑇𝛿𝐯𝑛.(4.18)

When the state and control regions are not bounded, the variation of the functional must vanish at an extremal (the fundamental theorem of the calculus of variations), therefore, 𝜕𝐻𝑛𝜕𝐯𝑛=𝜕𝐽𝑛𝜕𝐯𝑛+𝜕𝐠𝑛𝜕𝐯𝑛𝑇𝝀𝑛+1=0.(4.19)

Since there are bounds and amount constraints on the control 𝐯𝑛, we use the discrete maximum principle to assert the following necessary conditions for optimality: 𝐻𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝝀𝑛+1,𝐯𝑛=max𝐯𝑛𝐻𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝝀𝑛+1,𝐯𝑛,(4.20) where 𝐯𝑛 denotes the optimal control vector.

5. Numerical Solution

A gradient-based iterative numerical technique is proposed to determine the optimal injection strategies of polymer flooding. The computational procedure is based on adjusting estimates of control vector 𝐯𝑛 to improve the value of the objective functional. For a control to be optimal, the necessary condition given by (4.20) must be satisfied. If the control 𝐯𝑛 is not optimal, then a correction 𝛿𝐯𝑛 is determined so that the functional is made lager, that is, 𝛿𝐽𝐴>0. If 𝛿𝐯𝑛 is selected as 𝛿𝐯𝑛=𝑤𝜕𝐽𝑛𝜕𝐯𝑛+𝜕𝐠𝑛𝜕𝐯𝑛𝑇𝝀𝑛+1,(5.1) where𝑤 is an arbitrary positive weighting factor, the functional variation becomes 𝛿𝐽𝐴=𝑡𝑓0Ω𝑤𝜕𝐽𝑛𝜕𝐯𝑛+𝜕𝐠𝑛𝜕𝐯𝑛𝑇𝝀𝑛+1𝑇𝜕𝐽𝑛𝜕𝐯𝑛+𝜕𝐠𝑛𝜕𝐯𝑛𝑇𝝀𝑛+1𝑑𝜎𝑑𝑡0.(5.2) Thus, choosing 𝛿𝐯𝑛 as the gradient direction ensures a local improvement in the objective functional, 𝐽𝐴. At the higher and lower bounds on 𝐯𝑛, we must make the appropriate weighting terms equal to zero to avoid leaving the allowable region.

By substituting the discrete governing equations (3.3) and the performance index (4.1) into (5.1), the required gradient for the OCP of polymer flooding is expressed as𝛿𝐯𝑛𝑖,𝑗𝜆=𝑤𝑛+1𝑐𝑖,𝑗Δ𝑡𝑛𝜉𝑝𝑄𝑛in𝑖,𝑗,(𝑖,𝑗)𝜅𝑤.(5.3)

The computational algorithm of control iteration based on gradient direction is as follows.

Step 1. Make an initial guess for the control vector, 𝐯𝑛, 𝑛=0,,𝑁1.

Step 2. Using stored current value of 𝐯𝑛, 𝑛=0,,𝑁1, integrate the governing equations forward in time with known initial state conditions. Store the discrete states ̃𝐮𝑛+1, 𝑛=0,,𝑁1.

Step 3. Calculate the profit functional with the results of the forward integration.

Step 4. Solve the adjoint equations using the stored discrete states to calculate the adjoint variables 𝝀𝑛+1,𝑛=0,,𝑁1, with (4.14) and (4.17). Compute and store 𝛿𝐯𝑛 as defined by (5.3).

Step 5. Using the evaluated 𝛿𝐯𝑛, an improved function is computed as 𝐯𝑛new=𝐯𝑛old+𝛿𝐯𝑛,𝑛=0,1,𝑁1,(5.4) where 𝟎𝐯𝑛new𝐯max. A single variable search strategy can be used to find the value of the positive weighting factor 𝑤 which maximizes the improvement in the performance functional using (5.4).

Step 6. The optimization algorithm is stopped when the variation 𝛿𝐯 is too small to effectively change the performance measure, that is, when ||𝐽new𝐽old||<𝜀,(5.5) where 𝜀 is a small positive number.
A penalty function method is adopted to deal with the polymer injection amount constraint (4.4). For more information about that, we are able to use this method within gradient-based algorithm, see [19].
It is clear that one forward governing equations evaluation and one backward adjoint equations evaluation are required to calculate the gradients of the performance index, irrespective of the number of controls. The time required to solve the adjoint equations is of the same order of magnitude as the governing equations. Thus, with this process, a time equivalent to approximately two integrations is all that is required to calculate any number of gradients. This is why gradient-based algorithms can be very efficient and can potentially lead to huge time savings if the number of controls is large.

6. New Algorithm for Adjoint Construction

Despite the great efficiency of the gradient-based algorithm, a major drawback of the approach is that an adjoint code is required in order to apply the algorithm. The complexity of the adjoint equations is similar to that of the governing equations. A modified approach is proposed to construct the adjoint that makes it relatively easy to create the adjoint code. The approach is due to the properties of the full-implicit finite-difference code and the forms of the performance index used in the OCP model of polymer flooding.

The main coefficient terms of the adjoint equations given by (4.14) are the two Jacobians of the governing equations: 𝜕𝐠𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛𝜕̃𝐮𝑛,𝜕𝐠𝑛1̃𝐮𝑛,̃𝐮𝑛1,𝐯𝑛1𝜕̃𝐮𝑛.(6.1) The two terms are difficult to calculate because they are functions of the governing equations. During the forward integration of the governing equations, we solve (3.3) to determine ̃𝐮𝑛+1 at each time step. Since these equations are nonlinear with respect to ̃𝐮𝑛+1, the usual method to solve them is through the Newton-Raphson algorithm [20]: 𝜕𝐠𝑛𝜕̃𝐮𝑛+1||||̃𝐮𝑛+1,𝑘𝛿̃𝐮𝑛+1,𝑘=𝐠𝑛̃𝐮𝑛+1,̃𝐮𝑛,𝐯𝑛,̃𝐮(6.2)𝑛+1,𝑘+1=̃𝐮𝑛+1,𝑘̃𝐮+𝛿𝑛+1,𝑘,(6.3) where 𝑘 is the iteration index of the Newton-Raphson algorithm at a given time step, ̃𝐮𝑛+1,𝑘 is the state vector of the 𝑘th iteration and (𝜕𝐠𝑛̃𝐮/𝜕𝑛+1̃𝐮)|𝑛+1,𝑘 is the Jacobian of the 𝑘th iteration which is calculated by 𝜕𝐠𝑛𝜕̃𝐮𝑛+1||||̃𝐮𝑛+1,𝑘=𝜕𝐅𝑛+1𝜕̃𝐮𝑛+1,𝑘+𝜕𝐖𝑛+1𝜕̃𝐮𝑛+1,𝑘𝜕𝐀𝑛+1𝜕̃𝐮𝑛+1,𝑘.(6.4) Equation (6.2) is linear with respect to 𝛿̃𝐮𝑛+1,𝑘. At the convergence of the algorithm, the Jacobian used in (6.2) is the same as the second Jacobian of (6.1).

Considering the full-implicit governing equations (3.3), the first Jacobian of (6.1) is given as 𝜕𝐠𝑛𝜕̃𝐮𝑛=𝜕𝐀𝑛(̃𝐮𝑛)𝜕̃𝐮𝑛.(6.5) The governing equations of the previous time step is expressed as 𝐠𝑛1=𝐅𝑛(̃𝐮𝑛)+𝐖𝑛̃𝐮𝑛,𝐯𝑛1𝐀𝑛(̃𝐮𝑛)𝐀𝑛1̃𝐮𝑛1=𝟎.(6.6) Then the second Jacobian for this time step is given by 𝜕𝐠𝑛1𝜕̃𝐮𝑛=𝜕𝐅𝑛1(̃𝐮𝑛)𝜕̃𝐮𝑛+𝜕𝐖𝑛1̃𝐮𝑛,𝐯𝑛1𝜕̃𝐮𝑛𝜕𝐀𝑛(̃𝐮𝑛)𝜕̃𝐮𝑛.(6.7) The last term of (6.7) is the same as the right side of (6.5). Thus, the first Jacobian of any given time step is calculated during the computation of the second Jacobian of the previous time step.

The rest terms of adjoint equations are the derivatives of the scalar performance index 𝐽𝑛1 with respect to the state vector ̃𝐮𝑛. Due to the discrete form of performance index (4.1), the terms 𝜕𝐽𝑛1̃𝐮/𝜕𝑛 are directly functions of the source terms derivatives with respective to states 𝜕𝐖𝑛̃𝐮/𝜕𝑛. This is also calculated within the forward integration as seen from (6.4) and is easy to extract.

Thus, all the terms required for solving the adjoint equations can be calculated during the forward governing equations evaluation itself. The computational algorithm of control iteration based on gradient direction is modified as follows.

Step 1. Make an initial guess for the control vector, 𝐯𝑛, 𝑛=0,,𝑁1.

Step 2. Using stored current value of 𝐯𝑛, 𝑛=0,,𝑁1, integrate the governing equations forward in time with known initial state conditions. Store the discrete states ̃𝐮𝑛+1and the coefficients involved in the adjoint equations 𝜕𝐠𝑛̃𝐮/𝜕𝑛, 𝜕𝐠𝑛̃𝐮/𝜕𝑛+1, 𝜕𝐖𝑛+1̃𝐮/𝜕𝑛+1, 𝑛=0,,𝑁1.

Step 3. Calculate the profit functional with the results of the forward integration.

Step 4. Solve the adjoint equations using the stored Jacobians and source terms derivatives in Step 2 to calculate the adjoint variables 𝝀𝑛+1, 𝑛=0,,𝑁1, with (4.14) and (4.17). Compute and store 𝛿𝐯𝑛 as defined by (5.3).

Step 5. Using the evaluated 𝛿𝐯𝑛, an improved function is computed as (5.4).

Step 6. The optimization algorithm is stopped when the variation 𝛿𝐯 is too small to effectively change the performance measure.

It should be noted that mathematically there is no change in the algorithm, but the adjoint equations become much simpler to code. Furthermore, the adjoint equations code can be fully consistent with the governing equations if the polymer flooding model is changed. For example, some terms reflecting new physical characteristics are added to (3.3). This is because the coefficient terms in adjoint equations are taken directly from the governing equations in the proposed method.

7. Case Study

In this section, we present a numerical example of optimal control for polymer flooding done with the proposed implicit discrete maximum principle method.

The two-phase flow of oil and water in a heterogeneous two-dimensional reservoir is considered. The reservoir covers an area of 421.02 × 443.8 m2 and has a thickness of 5 m and is discretized into 90(9×10×1) grid blocks. The production model is a five-spot pattern, with one production well P1 located at the center of the reservoir (5,6) and four injection wells W1–W4 placed at the four corners (1, 10), (9,10), (1, 1), and (9,1) as shown in the permeability distribution map of Figure 2. Polymer is injected when the fractional flow of water for the production well comes to 97% after water flooding. The time domain of polymer injection is 0–1440 days and the polymer flooding project life is 𝑡𝑓=5500 (days). Figures 3 and 4 show the contour maps of the initial water saturation 𝑆0𝑤 and the initial reservoir pressure 𝑝0, respectively. The initial polymer concentration is 𝑐0𝑝=0(g/L). In the performance index calculation, we use the price of oil𝜉𝑜=0.0503(104$/m3) [80($/bbl)], and the cost of polymer 𝜉𝑝=2.5×104(104$/kg). The fluid rate of the production well is 𝑄out=60 m3/day, and the fluid rate of every injection well is 𝑄in=15 m3/day. The PDEs are solved by full-implicit finite-difference method with step size 10 days. For the constraint (2.15), the maximum injection polymer concentration is 𝑐max=2.2(g/L). The parameters of the reservoir description and the fluid data are shown in Tables 1 and 2, respectively.

The polymer injection strategies obtained by the conventional engineering judgment method (trial and error) are the same 1.8(g/L) for all injection wells. The performance index is 𝐽=$1.592×107 with oil production 32429 m3 and polymer injection 155520 kg. For comparison, the results obtained by engineering judgment method are considered as the initial control strategies of the proposed implicit discrete maximum principle method. The maximum polymer injection amount in constraint (2.14) is 𝑚𝑝max=155520 (kg). A backtracking search strategy [19] is used to find the appropriate weighting term 𝑤 and the stopping criterion is chosen as 𝜀=1×105. By using the proposed algorithm, we obtain a cumulative oil of 33045 m3 and a cumulative polymer of 155520.01 kg yielding the profit of 𝐽=$1.623×107 over the polymer flooding project life of the reservoir. The results show an increase in performance index of $3.1×105. Figures 5, 6, 7, and 8 show the optimal control policies of the injection wells W1–W4. As a result, the optimal injection polymer concentration profiles of W1, W2 are significantly different from those of W3, W4. It is mainly due to the differences of the well positions and the distance to the production well, as well as the reservoir heterogeneity and the uniform initial water saturation distribution. Figures 9 and 10 show the fractional flow of water in production well and the cumulative oil production curves of the two methods, respectively. It is obvious that the fractional flow of water obtained by implicit discrete maximum principle method is lower than that by engineering judgment. Therefore, with the same cumulative polymer injection, the proposed method gets more oil production and higher recovery ratio.

8. Conclusion

In this work, a new optimal control model of DPS is established for the dynamic injection strategies making of polymer flooding. Necessary conditions of this OCP are obtained by using the calculus of variations and Pontryagin's discrete maximum principle. A gradient-based iterative computational algorithm with new adjoint construction is proposed for the determination of optimal injection strategies. It is shown that the modified approach makes it relatively easy to code the adjoint equations as compared to the standard approach. The optimal control model of polymer flooding and the proposed method are used for a reservoir example and the optimum injection concentration profiles for each well are offered. The results show that the profit is enhanced by the proposed method. Meanwhile, more oil production and higher recovery ratio are obtained. And the injection strategies chosen by engineering judgment are the same for all the wells, whereas the optimal control policies by the proposed method are different from each other as a result of the reservoir heterogeneity and the uniform initial conditions.

In conclusion, given the properties of an oil reservoir and the properties of a polymer solution, optimal polymer flooding injection strategies to maximize profit can be designed by using implicit discrete maximum principle. The approach used is a powerful tool that can aid significantly in the development of operational strategies for EOR processes.

Acknowledgments

This work was supported by the Natural Science Foundation of China (60974039), the Natural Science Foundation of Shandong Province of China (ZR2011FM002), the Fundamental Research Funds for the Central Universities (27R1105018A), and the Postgraduate Innovation Funds of China University of Petroleum (CX-1245). The authors would like to express their great appreciation to the editors and anonymous referees for their helpful and constructive comments and suggestions, which have helped to improve this paper.