A semi-implicit approach for the modeling of wells with inflow control completions

. In the last two decades, new technologies have been introduced to equip wells with intelligent completions such as In ﬂ ow Control Device (ICD) or In ﬂ ow Control Valve (ICV) in order to optimize the oil recovery by reducing the undesirable production of gas and water. To optimally de ﬁ ne the locations of the packers and the characteristics of the valves, ef ﬁ cient reservoir simulation models are required. This paper is aimed at presenting the speci ﬁ c developments introduced in a multipurpose industrial reservoir simulator to simulate such wells equipped with intelligent completions taking into account the pressure drop and multiphase ﬂ ow. An explicit coupling or decoupling of a reservoir model and a well ﬂ ow model with intelligent completion makes usually unstable and non-convergent results, and a fully implicit coupling is CPU time consuming and dif ﬁ cult to be implemented. This paper presents therefore a semi-implicit approach, which links on one side to the reservoir simulation model and on the other side to the well ﬂ ow model, to integrate ICD and ICV.

A semi-implicit approach for the modeling of wells with inflow control completions Eric Flauraud and Didier Yu Ding * IFP Energies nouvelles, 1 et 4 avenue de Bois-Préau, 92852 Rueil-Malmaison Cedex, France Received: 20 January 2020 / Accepted: 29 April 2020 Abstract. In the last two decades, new technologies have been introduced to equip wells with intelligent completions such as Inflow Control Device (ICD) or Inflow Control Valve (ICV) in order to optimize the oil recovery by reducing the undesirable production of gas and water. To optimally define the locations of the packers and the characteristics of the valves, efficient reservoir simulation models are required. This paper is aimed at presenting the specific developments introduced in a multipurpose industrial reservoir simulator to simulate such wells equipped with intelligent completions taking into account the pressure drop and multiphase flow. An explicit coupling or decoupling of a reservoir model and a well flow model with intelligent completion makes usually unstable and non-convergent results, and a fully implicit coupling is CPU time consuming and difficult to be implemented. This paper presents therefore a semi-implicit approach, which links on one side to the reservoir simulation model and on the other side to the well flow model, to integrate ICD and ICV. Volumetric flow rates of the water, oil, and gas phase in the annulus segment k Q t w;k ; Q t o;k ; Q t g;k Volumetric flow rates of the water, oil, and gas phase in the tubing segment k Q ICD w;m ; Q ICD o;m ; Q ICD g;m Volumetric flow rates of the water, oil, and gas phase in the ICD m WI j Well index at the perforation j X r The set of unknowns in the reservoir grid blocks Z ref Bottom hole reference depth of the well ÁZ k;kþ1 Height difference between the nodes k and k þ 1 " q mass k Mass density of the fluid mixture in the segment k Refer to the discret time t n n + 1 Refer to the discret time t nþ1

Introduction
Intelligent completions have become increasingly popular, especially for horizontal and multilateral wells, as the companies are striving to maximize the oil production and minimize the number of wells. Subsequently, Inflow Control Devices (ICDs) are widely equipped in the well in order to equalize wellbore pressure drop to achieve an evenly distributed flow profile along the well or to control the production in some particular branches. Active control devices such as Autonomous Inflow Control Device (AICD) or ICV are also more and more used to optimize the oil recovery by reducing the undesirable production of gas and water. The technique of inflow control devices was introduced in the 90s (Brekke and Lien, 1992) to adjust the pressure drop along the well and to balance the inflow along the length of the completion. This technique has also the ability to improve sweep efficiency, delay water or gas breakthrough by reducing the localized drawdown and redistributing the influx over a long wellbore length, by taking into consideration reservoir heterogeneities and pressure drops across the completion. Later on, active control devices such as AICD were developed to optimally choke back unwanted fluids. ICVs, which can be controlled from the surface in order to reduce undesired fluid production, are also greatly used. In recent years both ICDs and ICVs have gained popularity and are being applied to a wide range of fields. Their efficiency has been studied through a variety of field cases (see, e.g., Al-Enezi et al., 2012;Al-Khelaiwi and Davies 2007;Al-Thuwaini et al., 2009;Broni-Bediako et al., 2019;Das and Al-Enezi, 2014;Dimitios et al., 2009;Gurses et al., 2019;Javid et al., 2018;Raffn et al., 2007).
Various types of intelligent well completions have been proposed to improve well performances and ultimate recoveries (see, e.g., Al-Khelaiwi, 2013). These completions are capable of managing the fluid flow into or out of the length of the wellbore in order to optimize the well production. Among the advanced completions, an ICD is a sandface completion technology specifically developed to help balance the flow contribution along the length of the wellbore. It is a device that restricts or chokes the inflow of fluids from the screen section. The nozzle type of ICD is the most commonly used. The size and the number of nozzles are designed to balance the inflow profile along the wellbore. The original ICD concept had a number of labyrinth channels installed within a pre-packed screen mounted on a solid base pipe. Other types of ICDs such as helical channels, slots, tubes, nozzles, and orifices, etc. have also been developed by various suppliers. Autonomous ICDs generally involve a more complex flow path to generate more flow restriction with higher pressure drops when flowing fluids are lighter or less viscous than oil.
Appropriate ICD/ICV completion design is the main factor for successful completion performance over the entire production life of wells. In many cases, a simplified semianalytical type approach is used to describe the pressure drop through ICDs for various design configurations (see, e.g., Das and Al-Enezi, 2014;Lauritzen and Martiniussen, 2011). During the design phase, the fluid flow along the well is taken into consideration in the modeling, and sometimes, annular flow is also considered. However, the inflow computation from the reservoir is generally simplified, using an analytical or semi-analytical approach (Das and Al-Enezi, 2014;Das et al., 2012). This kind of approaches can be considered suitable for a rapid design, which focuses only on the immediate near-well region and needs a fast response. However, to evaluate long-term production, the model should be coupled with a numerical reservoir simulator, which takes into account reservoir heterogeneities, aquifers and gas cap, as well as at the presence of other injection/ production wells.
From reservoir study point of view, there is also a need to model ICDs with a reservoir simulator to predict longterm well productions. The integration of the reservoir simulator with a wellbore model and intelligent completions forms an essential part of optimal reservoir management. In most reservoir simulators, this kind of intelligent wells is modeled using the multi-segment well model (see, e.g., HoJeen and Dogru, 2007;Holmes et al., 1998;Holmes et al., 2010;Stone et al., 2015;Wan et al., 2008;Youngs et al., 2009). In the multi-segment well model, the wellbore is discretized by several segments that have their own characteristics (length, diameter, inclination, roughness, etc.) and may or may not be connected to one or more reservoir grid blocks. Besides, additional segments can easily be tuned to represent special devices such as ICDs. Compared to the standard well model, the multi-segment approach allows the well geometry to be represented more accurately and to better describe fluid flows in the wellbore. However, solving implicitly a multi-segment well model coupled with the reservoir model is often complex and penalizes the simulation time, and an explicit decoupled modeling is usually not stable or convergent.
In this paper, we present a semi-implicit approach to integrate ICD/ICV model in a reservoir simulator with a simplified multi-segment concept. The annulus is discretized with a node in each perforated grid cell. A Well Index (WI) is used to link the reservoir and the annulus. A wellbore flow model is used to simulate various pressure losses, including friction, acceleration, and hydrostatic pressure drops, inside the tubing along the well. ICDs are used to link the annulus and the tubing, and ICVs are generally placed inside the tubing. The reservoir model and the well flow model can be two standalone modules. The proposed approach is based on a locally implicit scheme to make the connection between these two models. In most cases, the pressure drop across an ICD/ICV is generally much higher than that in the annulus or tubing. So the modeling in the annulus can be simplified. We will first present the numerical approach of this semi-implicit scheme, and then present the numerical examples, which illustrate the effectiveness of this coupling strategy in terms of production efficiency and computational performance.

The well model 2.1 The well discretization
The configuration of the multilateral well with ICDs considered in this paper is illustrated by the Figure 1. The annulus part of well branches is subdivided into isolated compartments with packers. Each compartment is equipped with ICDs. We consider that in an annulus, there is only one flow path for the fluid to go into the tubing through ICDs. Besides, for the multilateral wells, it is convenient to add in the tubing Inflow Control Valves (ICVs) to balance the flow rates from laterals and then optimize the production (Das and Al-Enezi, 2014).
At the discrete level, the annulus and the tubing are discretized into several segments. Each segment is delimited by two neighboring nodes which are symbolically represented by the center of the perforated grid blocks. In the following, we denote by N the number of well perforations and by M the number of compartments. The nodes in each compartment are numbered from k m 1 to k m 2 (from toe to heel) where k m 1 and k m 2 are respectively the index of the first and last node of the compartment m. We still denote by k, for k ¼ 1; N À 1, the segment delimited by the nodes k and k þ 1.
An ICD is represented through a connection between a node of each compartment to its immediate neighbor in the tubing. Concerning the ICVs, they are associated to an existing tubing segment and add an additional pressure drop in the segment. Finally, an additional top segment connects the last node of the tubing to the well's bottom hole reference depth Z ref where we define the Bottom Hole Pressure (BHP). In the following, we take the example of nozzle type ICD in the modeling, and only under-critical conditions are considered for the ICV.

The pressure drop calculation
At the time scale of the reservoir, we suppose that the flow is stationary in the wells. Then the pressure losses in each segment in the well are given by the following steady-state momentum equations: In the annulus, we consider only hydrostatic pressure loss: where P a k and P a kþ1 are the pressures at the perforations k and k þ 1 of the annulus, ÁP a;hydro k the hydrostatic pressure difference on the segment k and Q a w;k ; Q a o;k ; Q a g;k are the volumetric flow rates in the segment k.
In the tubing, we take into account the hydrostatic pressure loss, the frictional pressure loss and eventually the ICV pressure loss: where P t k and P t kþ1 are the pressures at the nodes k and k þ 1 of the tubing. ÁP t;ICV k is the pressure loss through the ICV placed in the segment k of the tubing.
In the ICD, the momentum equation is given by: The different pressure losses are defined as follows: where g is the gravity constant, ÁZ k;kþ1 is the height difference between the nodes k and k þ 1, and " q mass k denotes the mass density of the fluid mixture in the segment k defined by, with q mass a;k the mass density of the phase a in the segment k and b a;k the volume fraction of the phase a: b a;k ¼ where l k , d k and f k are respectively the length, the diameter and the friction factor of the segment k.
where A ICV is the surface area of the ICV and C ICV is the constant constriction factor of the valve.
where A ICD is the surface area of the ICD and C ICD is the constriction factor of the device which depends of the Reynolds number (Re) (Lauritzen and Martiniussen, 2011).
All the pressure drops defined above are functions of the volume flow rates in the segments or in the devices. Considering a compositional fluid flow model and according to the principle that the total molar flow of each component is conservative, the phase volume flow rates are computed as follows: In the annulus segments: In the ICDs: In the tubing's segments: where F mol a;k and q mol a;k (resp. F mol a;m and q mol a;m ) are respectively the molar fraction and the molar density of the phase a in the segment k (resp. in the ICDs) and q mol ic;j is the total molar flow rate of the component ic between the reservoir and the well at the perforation j, where WI j is the well index, kr a;l and l a;l are the relative permeability and viscosity of the phase a and C a ic;l is the molar fraction of the component ic in the phase a. All these quantities are defined in the reservoir grid block l. P r;l is the reservoir pressure in the cell l. In the following, we denote by X r the set of unknowns in the reservoir grid block. The phase molar fractions F mol a;k are obtained from a thermodynamic flash calculation in each segment or device. To close the system (1)-(4), we add an equation that defines the well's control mode. A well can operate either in an imposed phase flow rate Q lim a (or the sum of flow rates in several phases) at the surface or bottom conditions or in imposed bottom hole pressure P lim . Finally, we obtain the following system in the well: See equation (14) top of next page where Q a X r ; BHP; ÁP a bh;k is the a phase volume flow rate which is computed from the sum of the molar inflow rate at the perforations q mol ic;j . The system (14) is formed of 2N + 1 nonlinear equations that are rewritten in the following condensed form: If we suppose that the reservoir's unknowns X r are fixed as boundary conditions of the system (15), then this nonlinear system can be solved using the Newton's method, to find the 2N þ 1 unknowns ðP a k Þ N k¼1 ; ðP t k Þ N k¼1 and BHP. Once the pressures in the tubing and the annulus are computed, we can deduce ÁP a bh;k (reps. ÁP t bh;k Þ the pressure drop between P a j (resp. P t j Þ and BHP: ÁP a bh;k ¼ BHP À P a k and ÁP t bh;k ¼ BHP À P t

Wells and reservoir coupling strategy
The coupling between the reservoir's unknowns and the well's unknowns comes from the molar flow rate of each component at the perforations: Using the definition of ÁP a bh;k (16), we can rewrite these fluxes as: q mol ic;k ¼ X a2 w;o;g f g WI k kr a;l q mol a;l l a;l C a ic;l P r;l À BHP À ÁP a bh;k : where n denotes the previous time step and n þ 1 the current time step. ÁP a;n bh;k are computed by solving the nonlinear system (15) with the Algorithm 1 in which the reservoir unknowns are fixed at the previous time step X r ¼ X n r and the initial guess for the Newton Algorithm is given by, Thus, the only well variable coupled with the reservoir is the Bottom Hole Pressure (BHP) and the global system to be solved at each time step is written as follows: F r represents the set of conservation equations for the number of moles of the components in the reservoir grid blocks and F w defines the well constraint equation. If the well is under volume flow rate control (Q lim a with a 2 w; o; g; wo f g ), F w is, If the well is under bottom hole pressure control F w is, The nonlinear system is solved using Newton's method: This method is efficient and works well as long as the well is operating at a prescribed flow rate. However, as soon as the well switches to fixed bottom hole pressure constraint, we observe numerical oscillations in the production curves due to the crossflow phenomena. P a kþ1 À P a k ¼ ÀÁP a k Q a w;k ; Q a o;k ; Q a g;k k ¼ k m 1 ; k m 2 À 1 and m ¼ 1; . . . ; M Algorithm 1 Well non-linear solver Initial guess: P a;0 , P t;0 and, BHP 0 .
While jjG k w jj > e do. Solve the linear system: Update the iterates: P a;kþ1 ¼ P a;k þ dP a , P t;kþ1 ¼ P t;k þ dP t and BHP kþ1 ¼ BHP k þ dBHP. At convergence, set P a ¼ P a;kþ1 , P t ¼ P t;kþ1 and BHP ¼ BHP kþ1 .
To deal with these instabilities, the pressure drop in equation (19) The main drawback of this approach is that all the well's unknowns and the perforated grid block's unknowns are coupled and the equations of the system (15) and of the system (21) must be solved simultaneously.

Semi-implicit coupling method
In order to keep the effectiveness of the previous method, we propose the semi-implicit coupling method which consists in calculating the pressure losses ÁP a;nþ1 bh;k at the beginning of each global Newton's iteration and to keep them constant during the iteration. These pressure drops in the well are then calculated by solving the non-linear system (15) using the latest iterative solution in the reservoir grid-block as boundary conditions.
The semi-implicit algorithm can be written as follows: The advantage of this method, in addition to being more stable, is that we do not have to change the global linear solver because the systems (24) and (26) have exactly the same structure. This method is not intrusive and therefore easy to implement.
Consider a sugar box reservoir of size 4100 Â 4100 Â 700 ft with three different permeability regions: 50 mD, 20 mD, and 800 mD, as shown in Figure 2. A horizontal well of length 2000 ft traverses these three zones, and the perforated drain is subdivided into four compartments equipped with nozzle type ICDs. Each compartment has a length of 500 ft. The first compartment is in the zone of 50 mD permeability, the second and the third compartments are in the zone of 20 mD permeability and the fourth compartment is in the zone of 800 mD permeability. The top of the reservoir is 9000 ft, and the horizontal drain is located at a depth of 9315 ft. An aquifer is found below the horizontal well, at the depth of 9350 ft.
In the simulation, this reservoir is uniformly discretized by 41 grid cells in the x-direction, 41 grid cells in the y-direction and 10 cells in the z-direction. The cell sizes are 100 Â 100 Â 70 ft. The horizontal drain contains 20 active well cells, and each compartment connects to five well cells. The initial reservoir pressure is 3700 psi. The control mode adopted in this study is a maximum total liquid rate of 2000 bbl/day and a minimum bottom-hole pressure of 2900 psi.
In this synthetic case, the number and the size of the nozzles are designed from a single-phase flow problem. Figure 3 shows the flow rate of these four compartments with optimized ICDs in a single-phase flow simulation. At the beginning, Compartment 4 has a very high flow rate due to the perforation in the high permeability zone, and the other compartments show low flow rates. Due to ICD controls, the flow rate in Compartment 4 quickly drops to 500 bbl/day, and the rates in other compartments increase to around 500 bbl/day. The productions in the four compartments are quite close. These ICDs are then used to oil/water two-phase flow simulations with an aquifer below. Figure 4 presents the oil and water production of the horizontal well with and without ICD equipment. It is clear that with ICDs the oil rate is significantly increased while the water production is reduced. Figure 5 presents the oil Explicit coupling method Compute ÁP a;n bh;k by solving G w P a;n ; P t;n ; BHP n ; X n r À Á ¼ 0 Define q mol;nþ1 ic;k ¼ P a2 w;o;g f g WI k kra;l q mol a;l l a;l nþ1 C a;nþ1 ic;l P nþ1 r;l À BHP nþ1 À ÁP a;n bh;k Initialization: X 0 While F k r > e r and jjF k w jj > e w do Solve the linear system: Update the iterates: X kþ1

Semi-implicit coupling method
Compute ÁP a;n bh;k by solving G w P a;n ; P t;n ; BHP n ; X n ic;l P nþ1 r;l À BHP nþ1 À ÁP a;n bh;k Initialization: X 0 If BHP n ¼ P lim then &Compute ÁP a;k bh;k by solving G w P a;k ; P t;k ; BHP k ; X k ic;k ¼ P a2 w;o;g f g WI k kra;l q mol a;l l a;l kþ1 C a;kþ1 ic;l P kþ1 r;l À BHP kþ1 À ÁP a;k bh;k Solve the linear system: Update the iterates: X kþ1 and water rates in each compartment for the base case without ICDs, and Figure 6 shows the results for the case equipped with ICDs. For the open-hole horizontal well without ICD equipment, very high flow rates are observed in the high permeability zone (Compartment 4) for both oil and water productions. The production in this zone can be greatly reduced with ICD completions. As a consequence, the water production is globally reduced. The advantage of ICD completions is simulated using the proposed semiimplicit model.
We now consider the case where the reservoir permeability is generated using a geostatistical model as shown by Figure 7. The vertical to horizontal permeability ratio is 0.1. The top six layers is the oil zone, and the bottom four layers is the aquifer. One producer (PRO) with four branches is drilled in Layer 3, while the injector (WINJ)    E. Flauraud and D.Y. Ding: Oil & Gas Science and Technology -Rev. IFP Energies nouvelles 75, 39 (2020) having two branches is drilled with one branch at Layer 3 in the oil zone and the other branch at Layer 9 in the aquifer (Fig. 7). A total flow rate of 12 000 bbl/day is imposed for both the injector and the producer. The initial reservoir pressure is 3700 psi, and the limited bottom-hole pressure is 3000 psi for the producer and 6800 psi for the injector.
As the upper branch (Branch 1) of the injector is located in the same layer as the production well, early water breakthrough may occur due to the water flooding from the upper injection branch. To get a better injection repartition, one solution is to equip the injection well with ICDs. Another solution is to install ICV in the top branch (Branch 1) to reduce the injection volume in that branch. For the ICD completion, each branch is completed with four compartments equipped with nozzle type ICDs. The nozzle sizes are selected according to the reservoir heterogeneity, petrophysical and fluid properties, as well as the sweep efficiency. Small nozzles are installed in Branch 1 and in the last compartment of Branch 2. Figure 8 compares the oil and water productions simulated with open-hole completion, ICD completion and ICV completion in the injection well. Equipped with intelligent completions in the injection well can control the sweep efficiency and hence delay the water breakthrough. Figure 9 presents the water saturation maps for different scenarios in Layer 3 after 5 years' water injection, and   Fig. 8. Oil and water rates on the production well.  Figure 10 shows the water saturation in a cross-section at the same time. Figure 11 presents the water repartition in the injection well. For the open-hole completion, the water injection is almost equally repartitioned in these two branches, while using ICD or ICV the volume of injected water in the upper branch (Br1 in Fig. 11) is greatly reduced, and the reservoir pressure support is maintained through the lower branch injection. The water sweeping front in the oil zone is amortized, and therefore the water production is delayed.
It has to be mentioned that for these well configurations, it is difficult to improve the oil production by other strategies. For example, implementation of ICD or ICV in the four branched production well cannot help to reduce the undesired water production. Figure 12 shows the well bottom hole pressure for different completions. At the beginning, the bottom-hole pressures do not reach their limit conditions, and the total flow rate is imposed at the wells. The production well flowing pressure is constrained by the limit pressure at around 7-9 years, and the injection well pressure is constrained by the upper pressure limit at around 8 years with the ICD completion.
For these two cases (the case of three permeability zones and the heterogeneous case), each model is repeatedly simulated 10 times on a linux machine to evaluate the CPU time. Table 1 shows the mean CPU time and its variance. The semi-implicit approach for ICD and ICV modeling does not much impact on the CPU time in this example. With the ICD completion, CPU time is almost unchanged comparing to the open-hole cases, while the ICV completion increases very slightly the CPU time with an average around 1.3%.

Example 2. Case SPE 10
SPE 10 is a highly heterogeneous case initially developed for upscaling comparison (Christie and Blunt, 2001). We use this fine scale heterogeneity field to simulate ICD completions with the proposed semi-implicit approach. The fine grid contains 60 blocks in the x direction, 220 blocks in the y direction and 85 layers. The reservoir contains oil and immobile water in the initial state. One fully penetrated injector is located at the center of this field and four fully penetrated vertical producers are drilled near the four corners (Fig. 13). A water rate of 5000 bbl/day is imposed at the injector, and the four production wells are constrained by a pressure limit of 4000 psi.
As the reservoir is very heterogeneous, ICDs are installed in the production wells to control the water breakthrough coming from connected channel layers. Each production well is completed with five compartments and equipped with nozzle type ICDs. Figure 14 compares the oil and water productions at the four producers for the case with and without ICD completions, and Figure 15 shows the field oil and water productions. It is clear that the field oil production is increased, while the whole water production is almost unchanged or even slightly reduced with ICD installations. The water sweeping is slowed down in some permeable layers due to the implementation of ICDs, and its sweep efficiencies are increased in other layers. The equipment of ICD shows its great efficiency in Wells P1 and P4 as well as P3, where the water productions are reduced and oil productions increased. Wells P2 is also a successful candidate. Although the water production is increased by 69.7 Mbbl in P2, a higher volume of oil of 85.1 Mbbl is produced. With ICD installations, a higher oil production is found in all the wells with the water-cuts controlled in a lower level (Fig. 16). The simulation without ICD equipment needs 2037 Newton iterations with 15 637 s in CPU time, while the simulation with ICDs requires 2044 Newton iterations and 15 737 s in CPU time. The total CPU time is increased only around 0.6% in this very heterogeneous field. This augmentation in CPU time is not significant. The simulation time and the number of Newton iterations with ICD completions depend on the ICD design. If extremely small nozzle sizes are used, a very high pressure drop may be created across the ICD, and this may impact on the convergence issue and CPU time. For the commonly-used ICD design, the proposed semi-implicit approach for the reservoir and well model coupling can simulate the flow through the intelligent completions with few impacts on the CPU time.

Conclusion
A semi-implicit approach is presented to couple a standard reservoir simulator and a well flow model with ICD/ICV completions. Further details have been given for this semi-implicit coupling. The presence of ICD/ICV equipment, which generates generally very high pressure drop