A numerical well model considering capillary end effect for the low-permeability gas reservoir

. In the recovery of low permeability reservoir, the capillary pressure has an important effect, which may reduce gas production. Due to the capillary end effect, there are two ﬂ ow patterns in the vicinity of the production well: both water and gas phases can ﬂ ow into the production well and only gas phase can enter the production well. Based on the analytical equations of one-dimensional radial ﬂ ow considering the capillary end effect, an alternative numerical well model for low permeability gas reservoir is constructed. Numerical examples show that the proposed model can re ﬂ ect the dramatic change for saturation and gas-phase pressure in the vicinity of the production well both for two ﬂ ow patterns, and therefore can predict the gas and water productions accurately at different grid scales. In contrast, the original Peaceman well model for multi-phase ﬂ ow, which is directly extended from that for single-phase ﬂ ow, only can provide good prediction under the condition of that the grid size is enough small. Especially, for the original Peaceman well model, this problem is out of control since it is dif ﬁ cult to estimate a suitable grid size.


B
Capillary pressure constant, MPa h Thickness of the reservoir, m K Absolute permeability, mD, 10 À15 m 2 K r Relative permeability K rg,eq1 Equivalent relative permeability L eq Equivalent interblock distance, m m Pseudo-pressure, kg/(m 3 Á s) P Pressure, Pa P c Capillary pressure, Pa P init Initial pressure of gas reservoir, Pa P (e) Pressure at equivalent radius, Pa q Phase flow rate, m 3 /d r e Equivalent radius, m r w Wellbore radius, m S Water phase normalized saturation S o Outlet saturation in the condition of only water flowing into wellbore S g Gas phase saturation S rw Water saturation at the entrance of wellbore T Temperature, K T eq Equivalent transmissibility, m 4 Á s kg À1

Dx
Grid length, m / Porosity k Mobility, m Á s kg À1 k w,eq1 Equivalent mobility, m Á s kg À1 l Viscosity, Pa Á s q Density, kg/m 3

Subscripts and superscripts
g Gas phase w Water phase (i, j) Physical quantity in well-contained grid (adj) Physical quantity in adjacent grid inlet Physical quantity at the inlet outlet Physical quantity at the outlet + Left-hand limit À Right-hand limit use grid blocks whose horizontal dimensions are much larger than the diameter of a well (Williamson and Chappelear, 1981). As a result, the pressure calculated for a well block is greatly different from the bottom-hole pressure of the well. In the reservoir simulation, it is necessary to build a numerical well model to calculate the well flow rate associating with the well block pressure and the bottom-hole pressure. Peaceman well model, constructed from the analytical solution of One-Dimensional (1D) radially symmetric single-phase flow, is widely used in the general reservoir simulator. Initially, Peaceman's finite difference well model was for the well located at the center of square grid for single phase flow (Peaceman, 1978). Then, it was extended into various applications, including horizontal wells, anisotropic reservoirs, and also multiphase flow, etc. (Babu and Odeh, 1988;Babu et al., 1991;Peaceman, 1983;Shiralkar, 1989;Su, 1995). Chen and Zhang (2009) extended the well model for other numerical methods such as standard finite element, control volume finite element, and mixed finite element methods. By analogy to single-phase flow, numerical well models are directly extended to multi-phase flow without the solid support of mathematical analysis. The single-phase flow in the neighborhood of the well is described by the linear equations, in contrast to that the multi-phase flow should be described by the nonlinear equations. Only when the phase saturations remain constant, the direct extension to multiphase flow is accurate. It has been shown that, at the interface of two different type rocks which have the different relative permeability and capillary pressure curves, multiphase flows in porous media face the problem of the discontinuities of fluid properties and transport properties (Ding et al., 2016;Wang et al., 2006). This implies that the physical quantities might vary quickly in the neighborhood of the production wells.
It has been observed that in the core experiment, when two-phase fluid flows into the non-capillary force container from the core sample containing capillary force, the wetting phase saturations at the outlet end of the core increase significantly compared with the rest of the area (Richardson et al., 1952). This phenomenon was called as the capillary end effect. Ignoring the capillary end effect, the measurements of relative permeability will produce big errors. Assuming that water-phase saturation is 1 at the outlet end of the water-wet core, a saturation distribution equation near the outlet end was established (Hadley and Handy, 1956). Then the way to correct the errors in the relative permeability measurements, considering the capillary end effect, has been proposed (Huang and Honarpour, 1998;Virnovsky et al., 1995).
In the low-permeability reservoir, the capillary pressure has an important role on multi-phase flows. The capillary pressure can be ignored inside the wellbore while it should be considered for the multi-phase flow inside the reservoir. Analogous to the core experiment described above, the capillary end effect may also have a significant impact on fluid flows in the vicinity of production well. Actually, it has already been shown that the capillary end effect in water-wet reservoir creates a water layer near the wellbore with residual saturation of gas or oil. This layer will cause the hydraulic resistance for gas or oil flow (Barenblatt et al., 1989;Bedrikovetsky, 2013). Holditch (1979) found out that water phase will be completely trapped in reservoir if the pressure drop between the formation pressure and the bottom-hole pressure cannot overcome the capillary end effect. Even when the pressure drop is large enough to overcome the capillary end effect, severe reduction in gas production may also occur, depending on the level of capillary pressure inside the reservoir. Settari and Aziz (1974) analyzed the incompressible two-phase flow in the vicinity of the production well. Ding (1995) presented a scaling-up procedure for the radial flow near the well which consists in scaling up transmissibility and numerical PI in the vicinity of the well, then he extended this technique to the near-well upscaling and formation damage modeling which can give quite satisfactory results for long-term productivity prediction (Ding, 2004(Ding, , 2009(Ding, , 2011. Naik et al. (2018) established a semi-analytical modeling of steadystate gas-water flow in the rock with constant and piecewise-constant contact angles accounting for gas compressibility and found out that, water saturation significantly rises at the end-effect zone, creating a hydraulic resistance for gas flow. The capillary end effect may have the significant impact on the production well. As far as we know, this capillary end effect has not been considered in the existing well model for reservoir simulation. In this article, we will construct an alternative numerical well model to describe the gas recovery for the low-permeability water-wet reservoir.
For the convenience of generalization to non-uniform grids and flexible grids, Ding proposed a more accurate and effective numerical well model for the single-phase flow (Ding and Jeannin, 2004;Ding and Renard, 1994;Ding et al., 1998). The technique proposed by Ding et al. is applied. The article is organized as follows. The numerical well models are introduced in Section 2. In Section 3, the 1D radial steady flow for immiscible two-phase fluid toward well is investigated. Section 4 describes the procedure to establish the well model for multi-phase flow. In Section 5, the accuracy of the proposed well model is verified by numerical examples and the capillary end effect on the gas and water production is analyzed. Conclusion and discussion are given in Section 6.

Brief review of the previous numerical well models
In the neighborhood of the production well, the single-phase flow can be approximated by 1D radially symmetric steady flow: Assuming the isolated well is at (x 0 , y 0 ), the pressure distribution is given by: where r ¼ ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi ðx À x 0 Þ 2 þ ðy À y 0 Þ 2 q .
Consider the single phase flow in two dimensional grids with Dx = Dy (see Fig. 1). For the incompressible singlephase flow, the exchange flow rate between the control volume (i, j) and its neighbors can be obtained from the discretization of Darcy's equation as follows: where the variables q, l and K represent the fluid density, fluid viscosity and permeability, respectively. If supposing P (i+1,j) = P (iÀ1,j) = P (i, j+1) = P (i,j-1) = P (adj) , the relation equation (3) becomes: To establish the numerical well model, an equivalent radius r e is introduced, where the flowing pressure equals P (i,j) . With the boundary condition Pj r¼re ¼ P ði;jÞ and P| r=Dx = P (adj) , we can integrate equation (1) to get the pressure distribution. The flow rate q ¼ 2pr qKh l dP dr is then calculated to be Combing equations (4) and (5), we can get Integrating equation (1) with the boundary condition Pj r¼r w ¼ P wf and Pj r¼r e ¼ P ði;jÞ again, we have where P wf and r w are respectively the bottom-hole pressure and the radius of the production well. The relation equation (7) with the definition of equivalent radius equation (6) is just the well-known Peaceman well model. The above derivations can be found out in the literature (Peaceman, 1978). Without the solid mathematical analysis, Peaceman well model equation (7) for single-phase flow is directly extended to multi-phase flow and then get where the subscript a represents the different phase, K ra is the relative permeability and h is the layer thickness.
Here, r e is still calculated by the relation equation (6). The Peaceman well models equations (6) and (7) are widely used in reservoir simulators. As pressure varies rapidly logarithmically near the well, its gradient cannot be approximated by linear relation. To improve the accuracy and the efficiency for the prediction, Ding and Renard (1994) proposed an alternative numerical well model based upon the analytical solution equation (2). The finite-volume method applied to the flow equation for the wellblock yields: Take the interface C1 between wellblock and adjacent block (i + 1, j) as example, the flow-term at the interface is Ding et al. (1998) defined an equivalent interblock distance L eq1 to replace the original interblock distance Dx 1/2 . The pressure P (e) is located at the equivalent radius r e . The numerical flow-term at the interface can be expressed as where T eq,1 is the equivalent transmissibility to relate P (e) and adjacent grid pressure through equivalent interblock distance. From equations (2), (10) and (11), the equivalent interblock distance and equivalent transmissibilities can be respectively given as: arctan Áy Áx and T eq;1 ¼ Kh l For the other three directions, equivalent interblock distances and equivalent transmissibilities can be calculated using the same way. Substituting the flow-terms at four directions into equation (9), the pressure P (e) located at equivalent radius r e can be given by: Substituting the P (e) into the analytical solution equation (2), the equation relating pressure, wellbore pressures and the flow rate of the well can be expressed as: Equations (13) and (14) constitute the new numerical well model for the incompressible single-phase flow. It should be noted that the equivalent radius r e can be any value in this model.
3 Two flow patterns for the one-dimensional radial steady flow for immiscible two-phase fluid toward well In this section, the 1D radial steady flow for immiscible two phase fluid (gas and water) toward well is investigated. A condition of constant temperature is supposed in this paper. And the governing equations can be written as: Only the gas compressibility is considered here, and it varies with the change of gas phase pressure: Denote S wi as the irreducible water saturation and S gr as the residual saturation of gas phase, then the water saturation S w can be normalized as: The relative permeability K ra of the a-phase can be expressed as the function of the normalized water saturation. That is: with K rw being a strictly increasing function, but K rg being a decreasing function. The capillary pressure, defined as the difference between the gas and water pressures, is also a decreasing function of the normalized water saturation S: Capillary pressure is relatively large inside the reservoir but can be ignored inside the wellbore. There are two different capillary pressure curves on the two sides of the entrance of the production well. Analogous to fluid flows through the interface of the different type rocks, physical quantities may change significantly around the interface. Settari and Aziz (1974) pointed out that both water and gas can flow into the production well when the normalized water saturation reaches the value of 1 on the wall of the wellbore and otherwise water phase will be trapped in the reservoir. That means there are two different flow patterns at the vicinity of the wellbore. Define P inlet and S inlet as the gas-phase pressure and normalized water-phase saturation of the point r = r inlet in the vicinity of the production well. When P inlet 2 (P wf + P c (S inlet ), 1), both two phase can flow into wellbore, i.e., q g > 0 and q w > 0 . When P inlet 2 (P wf , P wf + P c (S inlet )], only the gas can flow into wellbore, i.e., q g > 0 and q w = 0. Details of these two flow patterns are provided in the following sections.
3.1 Flow pattern 1: both two phases flowing into wellbore In the case where both water and gas flow into the well, we will have: The reason that the relation equation (20) holds is as follow.
If Sj r¼r þ w < 1, then K rg r¼r þ w > 0 and P c j r¼r þ w > 0. Thus, P g r¼r þ w > P w j r¼r þ w . Since there is no capillary pressure in the well, we have P w j r¼r À w ¼ P g r¼r À w ¼ P wf . The water pressure must be continuous at r = r w , so P g will result in infinite velocity of gas phase, which is impossible. Thus, the relation equation (20) holds. Under the condition Sj r¼r þ w ¼ 1, we have K rg r¼r þ w ¼ 0. Considering the gas flow rate q g > 0, so dPg dr r¼r þ w ! þ1. This will lead to the relation dS dr r¼r þ w ! À1 (see Fig. 2).
3.2 Flow pattern 2: only gas phase flowing into wellbore If P inlet 2 (P wf , P wf + P c (S inlet )], then we have P w j r¼r inlet P wf and P g r¼r inlet > P wf . Thus, the water phase is trapped in the reservoir and only the gas phase can flow into the wellbore. In this article, we only consider the production well case, so we have: Then, we obtain: where S rw represents saturation at the entrance of wellbore. The saturation and pressure distributions are shown in Figure 3. Given the pressure P inlet and saturation S inlet , the pressure and saturation in the vicinity of the production well for the two flow patterns can be determined, which will be given in the next section.

Modified well model
In Section 2, numerical well models for the incompressible single-phase flow are reviewed. In the following, we will use Ding's finite-volume method to derive an alternative numerical well model for multi-phase flow based upon the analytical equation of the two flow patterns described in the above section.
The finite-volume method applied to the flow equation for the wellblock yields:

See The Equation ð23Þ bottom of this page
where k a = K ra /l a is the mobility of the a-phase fluid and m is the pseudo-pressure defined by: Take the interface C1 between wellblock and adjacent grid (i + 1, j) as example. Considering the axisymmetric properties of the phase pressure distributions, from equation (15), the flow-term between the adjacent grid and wellblock grid can be obtained To let the equivalent interblock distance be phaseindependent, we choose its value L eq1 = [Dyln(Dx 1/2 /r e )]/ [2arctan(Dy/Dx)], just the same as that in the single-phase  flow given by equation (12). Considering that the different phases have the different pressure distributions, we put the flux corrections into the mobility and relative permeability terms, which is expressed as following: where k w,eq1 and K rg,eq1 are the equivalent mobility and equivalent relative permeability, respectively. With the help of the boundary condition P a j r¼re ¼ P ðeÞ a and P a j r¼Áx ¼ P ðiþ1;jÞ a , we integrate equation (15) from r = r e to r = Dx 1/2 and then obtain From equations (25)-(27), the equivalent mobility (k w,eq1 ), equivalent relative permeability (K rg,eq1 ) and equivalent transmissibilities for the water and gas phases can be obtained: The other three adjacent grid equivalent mobilities (or relative permeability) and equivalent transmissibilities can be calculated as the same method. Substituting flow-terms at four directions into equation (23), the pressure P (e) located at r e can be determined by:

See the Equation (29) bottom of this page
After obtaining the pressure P (e) located at equivalent radius, integrating equation (15) on the interval [r w , r e ] again in the wellblock grid, we obtain the calculation formula for two-phase flow expressed as: Equations (29) and (30) constitute the two-phase flow well model based on finite-volume method. And the equivalent radius can also be any value.
To get the gas and water production from the formula, the saturation distribution on the interval [r w , r e ] should be calculated. In the following, we present the procedure to calculate the saturation distribution for two different flow patterns.
4.1 Both of two phase flowing into wellbore (when P ði;jÞ g À P c ðS ði ;jÞ Þ > P wf ) The phase pressures can be given by the following equation: with the boundary condition: 4.2 Only gas phase flowing into wellbore (when P ði ;jÞ g À P c ðS ði;jÞ Þ P wf ) Substituting equation (21) into equation (15), we obtain the following saturation equation: with the boundary condition: where the saturation S rw is determined by equation (22) and the phase pressures are given by equation (35): Equations (31)-(35) can be solved numerically. In order to describe the dramatic changes of saturation and pressure near the wellbore, the logarithmic coordinate grids are adopted. In the following numerical tests, the solution interval [r w , r e ] is divided into enough equal parts on the logarithmic coordinate. Newton-Raphson iteration method is applied in the solution of the discretized nonlinear equations for equations (31)-(35) to obtain the saturation and pressure distributions for two-phase flow and only gas flow, respectively. Practically, a short subroutine can be added into the numerical simulator. Due to solving the ordinary differential equations, the computation speed is very fast. The additional modification has little influence on the program speed.

Numerical results
In this section, numerical tests are performed to validate the accuracy of the proposed model. In the Two-Dimensional (2D) examples of Test 1 and Test 2, the layer thickness is assumed to be unit thickness, i.e., h = 1. For comparison, the numerical results calculated from the original Peaceman well model equation (7) are also provided. Based upon the calculations, the capillary end effects on the predictions of the gas recovery for the low-permeability reservoir are analyzed. In the proposed numerical well model the equivalent radius (r e ) can be any value. Without loss of generality, in the following calculations, we choose r e = 0.208Dx, just the same as that in the Peaceman well model.

Test 1
In this numerical test, the simulation area is a 2D square reservoir with the size 500 Â 500 m. There are five production wells in the gas reservoir, whose distribution is shown in Figure 4. The outer boundary is imposed with impermeable boundary conditions. Two-phase immiscible flow for water and natural gas is considered here. Water is incompressible with invariable density 10 3 kg/m 3 and gas is compressible with its density varying with its pressure. The relevant parameters of the reservoir and fluids are shown in Table 1. The capillary pressure curve takes the form P c = ÀBlnS, where B = 1 MPa. The capillary pressure curves and relative permeability are shown in Figure 5. In this test, we aim to explore the accuracy of proposed well model for the multi-well problem. Since the grid size is much bigger than wellbore radius, the impermeable boundary has little effect on the well model performance.
To test the accuracy of the original Peaceman and the proposed well models, different grid systems of 50 Â 50, 150 Â 150 and 250 Â 250 are adopted in the computations. Due to that the locations of four production wells in the corner have the geometric symmetry, only the calculations of Well 1 and Well 2 are analyzed. For the calculations of the proposed well model, it is shown that the water and gas productions weakly depend upon the grid size, i.e., the calculated results obtained from the different grid sizes are very close (see Fig. 6). However, if adopting the original Peaceman model, there are the obvious deviations among the results for water and gas productions of the different grid sizes.
The water saturation increasing phenomenon will cause the hydraulic resistance for gas flow and increase the water production. All the grid sizes in this example are much larger than the size of the water layer near the wellbore. Therefore, without considering the capillary end effects, Peaceman well model overestimates the gas production and underestimates the water production under the coarse grid system. But it is indicated that, under the mesh refinement, the calculations of the Peaceman well model gradually approach to those of the proposed well model.
In Test 2, a further analysis of the capillary end effect on the well productions is presented.

Test 2
In this numerical test, the simulation area is a 2D square reservoir with the size 500 m Â 500 m. Parameters are the same as Table 1. A production well is located at the center of the reservoir. In this example, the two-phase flow can be simplified to be 1D radial flow since the wellbore radius is much smaller than the computational domain size. It means that we can get the reference solution by solving the ordinary difference equation of equation (15) for two different flow patterns, respectively. Though actually the simulation area is not radial symmetry, the radially symmetric solution can be seemed as a good reference in the neighborhood of the well. To test the accuracy of the original Peaceman and the proposed well models, the different size grids of 50 Â 50, 100 Â 100, 200 Â 200 and 300 Â 300 are adopted in the computations. In the following, first we consider the capillary pressure curve with B = 1 MPa in the calculations for Figures 7 and 8 and then investigated the influence the capillary pressure curve with different values of the constant B in the calculations for Figures 9 and 10.

Parameters Values
Absolute permeability K (mD) 0.1 Porosity / 0.1 Initial gas phase pressure P init (MPa) 6 Initial water phase saturation S| t=0 0.5 Bottom-hole pressure P wf (MPa) 3.6 Water phase relative permeability K rw S 4 Gas phase relative permeability K rg (1 À S 2 )(1 À S) 2 Water phase viscosity l w (Pa Á s) 1eÀ3 Gas phase viscosity l g (Pa Á s) 2eÀ5 Temperature T (K) 300 Wellbore radius r w (m) 0.1 Figure 7 shows that all the calculations with different grid size are agreed with the reference solution very well when adopting the proposed well model. Nevertheless, adopting Peaceman well model, the calculations of the coarse grid system 50 Â 50 deviate from the reference solution even up to 40%. With the mesh subdivision, the result of Peaceman well model is gradually approaching to the reference solution. The calculations indicate that Fig. 6. a) Gas production of Well 1; b) water production of Well 1; c) gas production of Well 2; d) water production of Well 2. extremely fine grid is needed if using the original Peaceman well model. The capillary end effect has the important influence for the prediction of the low-permeability reservoir recovery. Due to the capillary end effect, the saturation and the gas-phase pressure change rapidly in the vicinity of the production well and the saturation and the gas-phase  pressure gradients may even diverge at the entrance of the wellbore (see Fig. 8), which is the same as Figure 2. In the original Peaceman well model, these dramatic changes are not considered and therefore may cause a poor prediction for the low-permeability reservoir recovery.
To investigate the influence of the strength of the capillary pressure upon the predictions of the original Peaceman well model, we perform the calculations with the grid number of 100 Â 100 for the different values of the constant B = 0.1 MPa, 1 MPa and 3 MPa. When the capillary pressure is much smaller than the pressure difference between the formation pressure and the well bottom-hole pressure, for instance, in the case of B = 0.1 MPa, Peaceman well model can provide a rather accurate result (see Fig. 9). However, along with the increase of the strength of the capillary pressure, zone affected by capillary pressure is also increasing (see Fig. 10) and therefore the gap between the calculations of Peaceman well model and the proposed model becomes larger and larger. When B = 3 MPa, the water phase is blocked inside the reservoir and then cannot flow out of the production well. In this case, the original Peaceman well model yield an incorrect calculation if the grid size is not enough small.

Conclusion
In the recovery of low permeability reservoirs, the capillary pressure has an important effect, which may reduce gas production. When pressure difference between the formation pressure and the well bottom-hole pressure is not large enough to overcome the capillary end effect, only the gas phase can flow into the wellbore and cause the gas production significantly reduced. When the pressure drop is enough to overcome the capillary end effect, both water and gas phases can flow into the wellbore. In this case, the saturation and gas-phase pressure gradients diverge in the vicinity of wellbore. To construct an effective numerical well model for gas reservoir simulation is the main objective of this article. In this article, other near-wellbore processes, such as perforation damage, fines movement, near-wellbore fracturing and wettability changes introduced by stimulation, are not considered. The conclusion can be summarized as follows: 1. Considering the capillary end effect, there are two flow patterns in the vicinity of the production well: both water and gas phase can flow into the production well and only gas phase can enter the production well.
With the help of the solution of the 1D radially symmetric flow for two-phase immiscible flow, an alternative well model for low permeability gas reservoir is constructed, where two different flow patterns are considered. 2. When the capillary pressure is much smaller than the pressure difference between the formation pressure and the well bottom-hole pressure, the original Peaceman well model can provide a rather accurate result. The Peaceman well model of multi-phase flow is extended directly from that of single-phase flow, where the capillary end effect is not considered. As a result, along with the increase of the strength of the capillary pressure, the error of the predictions of Peaceman well model becomes larger and larger.
The saturation and the gas-phase pressure changes rapidly in the vicinity of the production well and their gradients may even diverge at the entrance of the production well. As a result, the original Peaceman well model can provide good prediction only when the grid size is enough small. This problem is out of control since it is difficult to estimate the suitable grid size for the original Peaceman well model. 3. In contrast to the original Peaceman well model, the proposed well model can provide rather accurate prediction for gas and water productions. The prediction weakly depends on the grid size adopting in the computation, since the dramatic change for saturation and gas-phase pressure in the vicinity of the wellbore has been already considered in the proposed well model. In the recovery of the low-permeability gas reservoirs, the capillary end effect is the main reason for water-phase trapping. The increasing water phase saturation reduces gas mobility near wellbore and then affects well productivity and gas recovery. The proposed well model can accurately describe the capillary end effect in the recovery procedure for low-permeability recovery.
For the single-phase flow, Ding et al. (1998) established the well model based upon the finite-volume method by using the axisymmetric analytical solution. In this article, flow patterns in low-permeability gas reservoirs are obtained from the near well axisymmetric equation. With the help of the solution equations (31)-(35) of the 1D radially symmetric flow for the two-phase flow, the well model for low permeability gas reservoir in cartesian mesh is established, based upon Ding's method. It is expected that the proposed method can be extended to flexible grids based upon the near-well axisymmetric solutions. This remains the future research.