Академический Документы
Профессиональный Документы
Культура Документы
Approach Formulation
Our method can be represented by a logical extension of Fig. 1, The global system of equations includes the reservoir conservation
with the word “Well” replaced by “Network.” The well domain and constraint equations and the network equations. The network
has been redefined as a single domain containing the wells and equations consist of perforation-rate equations, component-rate
facilities, which we call “network”. Within each simulator Newton balances at network nodes, hydraulics equations, network con-
iteration, we solve the network through its own Newton iteration. straint equations, and composition equations. All quantities in the
Within the network Newton, individual-well subdomains are de- network equations are treated fully implicitly unless otherwise noted.
coupled from the network and solved, also through Newton itera- The total number of primary network equations is given by
tion. Our network model represents a decoupled facility/well simu-
共Nperfs + Ncons兲Nc + Nnodes, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (1)
lator that operates at fixed reservoir boundary conditions. The
global network and well subnetworks are solved with the same corresponding to the primary variables of Nc component mass flow
code, except for a few minor differences. rates in the Nperfs perforations and in the other Ncons network
The main advantage of our fully coupled model over partially connections, as well as pressures at network nodes. The only pri-
coupled methods is that the latter do not implicitly represent the mary network equations that are always fixed in identity are the
facility equations in their conventional reservoir/well domain solve component mass rate balances at nodes and hydraulics relation-
at the end of the Newton iteration. As a result, if the partial cou- ships for connections representing flow paths that do not contain
pling is explicit, then errors and oscillations from timestep to adjustable devices. The remaining primary network equations are
timestep can occur, and if the partial coupling is implicit, iterative dynamic, and they apply as described in each subsection.
oscillations and/or reduced convergence rate can occur. If the par- The secondary network variables are device settings, one for
tial coupling is strictly implicit, a final convergence check is re- each adjustable device. In general, the number of secondary equa-
quired to ensure that rates and pressures at the interface of the well tions is equal to the number of constraints being imposed by the
and surface domains have not changed significantly; if they have, adjustable devices plus the number of fixed device settings. If the
extra simulator Newtons or timesteps are required. Otherwise, er- number of degrees of freedom (the number of adjustable devices
rors can also occur. minus the number of secondary equations) is greater than zero,
Our treatment of network convergence is exactly the same as there are three possible methods to obtain a solution:
that applied to the well model in a conventional simulator. By • Find the optimal solution that maximizes/minimizes some
default, timestep convergence is based only on the reservoir con- benefit/detriment function.
servation and constraint equations. However, because of the • Mathematically represent a production-optimization strategy
simultaneous global solve and prior resolution of the network, to supply the missing equations, resulting in implicit application of
the network equations will be converged within the accuracy of the strategy.
their linearizations, assuming continuity of active constraints. An • Explicitly apply a production-optimization strategy to deter-
option for specification of convergence tolerances for the perfora- mine a number of settings and/or constraints equal to the number
tion-rate equations is provided, mainly to test our assertion that of degrees of freedom.
using it is not necessary because it does not significantly affect the The type of optimization needed depends on the application. If the
overall result. goal is to determine which methodology would optimize produc-
Excluding the capability of representing facilities, our model is tion at a given time, then the first type is needed. If the goal is to
very similar to the advanced well models of Stone1,3 and Holmes.2 determine how production will behave given a methodology, one
The main difference is that our network model is steady-state, of the latter two types is needed. We have currently implemented
while the advanced well models include wellbore capacitance and only the last type, explicit application of predefined and/or user-
are thus transient. When wellbore conditions are changing, defined predictive control logic. Active production and injection
timestep size in the transient models is limited by the time scale targets on connections or groups of connections (group targets in
in which the nonlinearities of the wellbore flow equations can a conventional model) are explicitly allocated to the specified con-
be resolved through Newton iteration. Because our network trolling devices as constraints so that in the network model solu-
equations contain no time dependencies, the network model intro- tion, any active constraint is controlled by adjusting a single device.
兺
Given these assumptions, the numbers of secondary network
variables and equations are always the same and are equal to the Qip = Cp⌬⌽p kr kr zikr , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (4)
k=1
number of adjustable devices. The identity of the secondary equa-
tions is presented later in the subsection on Hydraulics Equations. ⌬⌽p = ⌽rp − ⌽wp, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (5)
Reservoir Equations. All discretized reservoir simulators solve ⌽rp = Pr + ␥r共Dp − Dr兲, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (6)
conservation equations of the general form and ⌽wp = Pn + ␥wp共Dp − Dn兲, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (7)
Rir = Qiin − Qiout − ai + Gi − 兺
p∈pr
Qip, . . . . . . . . . . . . . . . . . . . . . . . (2) where C is the wellbore constant, equal to the well index21 times
the permeability-thickness product; kr is the volumetric mobility
where the residual, R, of component i for each reservoir cell r is (relative permeability/viscosity) of phase k in cell r; kr is the
driven to zero at full convergence of the equations. For component density of phase k in cell r; and zikr is the mass fraction of com-
兺q + 兺Q = 兺q , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (9)
are not. The default may be overridden, except that sink connec-
ij ip ij tions are not allowed to backflow.
j∈In p∈pn j∈On
The terminal-node pressure constraints are always active and
where In and On are lists of the defined inflow and outflow non- applied in the source or sink connection, unless a rate constraint
perforation connections, respectively, at node n. Rates are negative controlled in the source or sink connection would be violated.
for flow in the reverse of the defined direction. The perforation The general form of a volumetric rate constraint controlled in
rates Q are summed over all perforations attached to the node. The connection j is
network rate balances are linear in the primary variables. All other
network equations, except for pressure constraints, surface volu- Qjmax ⱖ Qf 共qជ j,Pjin,Pjout兲, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (12)
metric rate constraints in black-oil systems, and explicitly treated
wellbore hydraulics equations (gradients), are nonlinear. where Qf is the result of a flash to either surface conditions
(through a specified fixed-condition separator, making the pressure
Hydraulics Equations. The general form of the hydraulics equa- dependence zero) or to in-situ conditions.
tion, applying to each connection j except for sinks, sources, and A minimum pressure constraint controlled in connection j takes
perforations, is the form
Pjin − Pjout = f 共qជ j,P jin,P jout,Vj兲, . . . . . . . . . . . . . . . . . . . . . . . . . . . . (10)
Pjin ⱖ Pmin, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (13)
where f is some function of rates, inflow and outflow node pres-
sures, and, if representing an adjustable device, its setting V. Given
and a maximum pressure constraint takes the form
our assumptions, it is not necessary to know the dependence of f on
V. When a device is not being adjusted to achieve a constraint
(when no constraint controlled by the device is violated), Eq. 10 Pjout ⱕ Pmax. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (14)
applies as a primary network equation, with the device at a fixed
operating setting (V⳱Vmax is the secondary equation). Otherwise, Active constraints apply as equalities.
qij = zij qTj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (15a) where r denotes reservoir, and where the terms appearing in Eq. 18
are the values from the network domain solution. The reservoir cell
and 1 ⱕ i ⱕ Nc − 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (15b) mass and pressure coefficients of the perforation-rate equations,
Apr, are added to the perforation-rate equations. These include
where qTj is the total mass rate in connection j. coefficients caused by the implicit treatment of all perforated res-
When a node has more than one outflowing connection, we ervoir cell variables.
assume, pending the addition of inline phase separations, that each The reservoir conservation equation (Eq. 2) residuals (Rr) and
outflowing connection has the same composition. For each pair of coefficients (Arr, Arp) are then built. Arr are the coefficients caused
network connections (including perforations) j1 and j2 flowing out by intercell flow and accumulation. Arp are the coefficients of the
of the same node, the equal composition equations are perforation-rate terms (Qip), and for the rows of component con-
servation equations for a cell, these are identity submatrices for
qij1 qij2
⳱ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (16a) (columns corresponding to) each perforation contained in the cell.
qTj1 qTj2 At this point, the global system of equations has been built and
is ready for the elimination of the secondary reservoir equations
and 1 ⱕ i ⱕ Nc − 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (16b) and variables. For reservoir cells using the IMPES (implicit in
If a node has Nout outflowing connections, there are Nout–1 inde- pressure only) reservoir formulation, the conservation equations
pendent sets of equations of this form. (the secondary equations) are used to eliminate the mass coeffi-
cients of the cell volume constraint, Eq. 3, creating the pressure
Closure of the Network Equations. The number of network equation, and they are also used to eliminate the cell mass coef-
equations and unknowns balance exactly for physically possible ficients of the perforation-rate equations. For fully implicit reser-
flowing systems. This can be shown through careful accounting voir cells, the volume constraint (the secondary equation) is used
and the use of the observation that to eliminate the mass coefficients of the last component (water) in
the reservoir conservation equations and, for cells containing per-
Ninj + Ncons − Nnodes = Ncomp, . . . . . . . . . . . . . . . . . . . . . . . . . . . . (17) forations, in the perforation-rate equations. These linearized and
reduced reservoir, modified perforation, and other network equa-
where Ninj is the number of injecting perforations, Ncons is the tions can also be represented by Eq. 19, with the reduction having
number of nonperforation connections, and Ncomp is the number modified the dimensions and values of Rr, Rp, Arr, Arp, and Apr and
of independent sets of Nc–1 composition equations. “Physically the values of App. The equations are solved at the end of the
possible” means that each node has at least one inflowing and simulator Newton iteration with an unstructured solver, which is
one outflowing connection. When parts of the network are shut described in the Appendix. The reservoir domain (Rr, Arr, xr) may
in, a zero-rate constraint that is otherwise written as a single equa- be divided into subdomains, while the network system is treated as
tion must sometimes be expanded to Nc equations of zero compo- a single domain. Because of the form of the network equations (as
nent rate. we order them), standard iterative solution techniques cannot be
applied to the network domain. We currently apply a direct solve
Solution Method to the network domain using sparse elimination with partial pivoting.
At the beginning of each simulator Newton iteration, mobilities
and densities are computed for each reservoir cell either containing Results
a perforation or being treated implicitly in the reservoir. These are The first example case consists of several runs based on the SPE9
the variables, in addition to the reservoir grid-cell pressures and test case.22 We also present run statistics for a field application. In
compositions, that couple the network equations to the reservoir all cases, we compare results from our new model (Model A) and
equations. The network equations (Eqs. 4 through 16) are then results from a commercial model (Model B). Model B cases,
solved by Newton iteration, holding fixed the current iterate values which include production networks, use the partially coupled
of the reservoir variables. The form of the decoupled primary method of Litvak et al.8
system of network equations is Statistics for all example case runs are given in Table 1, including:
冋 册冋 册 冋 册
• Number of timesteps.
Aff Afp ␦xf Rf
=− , . . . . . . . . . . . . . . . . . . . . . . . . . . . . (18) • Number of global (outer) simulator Newton iterations.
Apf App ␦xp Rp • Number of network domain Newton iterations; these are zero
in Model A for cases decoupled bottomhole.
where f and p denote facility and perforation (facility designates
• Number of well subdomain Newton iterations.
network equations other than the perforation-rate equations), R
• Number of global linear solver iterations.
denotes the residuals, and A (the Jacobian) contains the deriva-
• Total CPU time. All Case 1 runs were made on a 3.056-GHz
tives of the residuals with respect to the variables x. Of those
PC with an Intel Xeon* processor.
equations designated by p, Ninj × Nc–1 of them are network com-
• CPU time in the network domain.
position equations.
• CPU time in the well subdomains (part of network). For
At the start of each network iteration, the variable network
Model B cases, this includes both the reservoir well model and the
equations (Eqs. 10 through 16) are checked to determine which are
network model and is comparable to network domain time for
active. For connections representing adjustable devices, the limit-
Model A.
ing constraint for a given iteration is taken as the constraint that is
• CPU time for linear solves in network (includes well solves,
most violated (i.e., hydraulics, rate, or pressure). Additional con-
also a part of the network domain time).
straint checking is required to detect and prevent overconstrained
• CPU time for global linear solves.
systems resulting from combinations of rate and pressure con-
• Cumulative oil, gas, and water production.
straints. When an overconstrained system is detected, constraints
All Model A runs use explicit wellbore gradients in the well-
are eliminated using estimates of which constraints are limiting.
bore connections and explicit injected-fluid densities. Hydraulics
These estimates must become accurate as convergence of the ap-
tables used in the test cases are available on request.
plied constraints is iteratively approached.
At convergence of the network equations, the fully coupled
system of network and reservoir equations is assembled, which is
represented by * Trademark of Intel, Santa Clara, California.
of crossflow, when explicit gradients and injected-fluid densities wellbores. The Model B network case was run with the default
are used. The well subdomain iterations do not increase by very two-iteration coupling. Of particular interest in this study was the
much when network domain iterations are performed because successful modeling of well crossflow and numerical performance.
within most network domain iterations, the well subnetworks are Cases 2b and 2c are nearly physically identical problems because
converged and do not require iteration. of low pressure drops between the wellhead nodes and the manifold.
For the Model A wellhead case (1b), network domain Newton Table 1 gives cumulative production predictions for the three
efficiency (network Newtons per simulator Newton) is approxi- sets of runs, normalized to the Model B Case 2a results. Differ-
mately 1.5. This is significant because in this case, the network ences between the models are less than 1% in the bottomhole case
domain includes implicit nonlinear tubing hydraulics equations. and approximately 4% in the tubinghead case. While Model A
The addition of a gathering network (1c) causes this figure to rise gives exactly the same production in the wellhead and network
to more than 3, along with a corresponding rise in network-domain cases as expected, Model B shows about a 6% discrepancy in oil
CPU time. This is because of the increased difficulty in solving and gas and a 9% discrepancy in water. Model A results fall in
systems with multiple hydraulics functions in series. between the Model B wellhead and network results. Differences in
In these cases, the Model A network model is generally less the model results are attributed to explicit treatment of tubinghead-
efficient than the conventional well model with or without partially pressure constraints in Model B Case 2b and to the two-iteration
coupled facilities in Model B. While network domain CPU time in partial coupling in Model B Case 2c.
the network case (1c) is approximately the same as that in Model Table 1 clearly shows the improvement in efficiency gained by
B with implicit coupling (2.22 seconds for Model A, 2.27 for the new formulation. While improvements in global Newton effi-
Model B), it is 40% higher as a fraction of total run time. This is ciency will be the subject of a future paper, what is of most interest
primarily because of Model A’s use of the Newton method on a here is the change in outer iterations and CPU time between the
larger system of equations. wellhead case (2b) and the network case (2c). While adding the
Use of a segmented wellbore in Model A results in no differ- network to Model B causes Newton iterations to increase by more
ence in production and virtually no difference in performance over than 40% and CPU time to increase by 50%, these figures are
the lumped case for these problems. Differences in production are virtually unchanged for the new formulation. This is directly at-
expected only when perforation-composition differences affect the tributable to the fully coupled method.
wellbore composition and pressure profile sufficiently for perfo-
ration potentials (buildup or drawdown) to be significantly af- Conclusions
fected, which is not the case here. The well subdomain Newton 1. Complete integration of a facilities model with a conventional
efficiency is almost unaffected by the wellbore treatment. well model yields a fully coupled formulation with configurable
gridded wellbore capabilities.
Case 2. The integrated model was benchmarked on a deep-sea oil 2. The generalized formulation is a highly efficient and accurate
reservoir, modeled with two separate grids coupled through a pro- method for coupling surface facility and reservoir models, and
duction network. Wells in each grid flow into a common back- for conventional simulation of decoupled systems.
pressure manifold node. Hydraulic tables are used to model the 3. Complex preconditioners are not required for fully coupled ef-
pressure drops in each of 25 producers. Maximum liquid rates are ficiency, contrary to previous assertions.
specified at the wells, and a minimum manifold pressure is also 4. Segmented wellbores can be modeled with very little perfor-
specified for the network case. The system is black-oil and fully mance penalty over cases with simple mixed wellbores.
implicit with a total of 56,995 active cells. Pressure maintenance is
Nomenclature
achieved through water injection.
Three sets of runs were made: Case 2a, with minimum bottom- a ⳱ rate of accumulation
hole-pressure constraints specified for individual producers; Case A ⳱ Jacobian matrix
2b, with minimum well tubinghead-pressure constraints specified C ⳱ wellbore constant
for individual producers; and Case 2c, with minimum pressure D ⳱ depth
specified at the manifold node. Model A was run with lumped e ⳱ vector of ones
冋 册冋 册 冋 册
24. Wallis, J.R.: “Incomplete Gaussian Elimination as a Preconditioning
for Generalized Conjugate Gradient Acceleration,” paper SPE 12265 Ãnn ÃnB xn −R̃0n
= , . . . . . . . . . . . . . . . . . . . . . . . . . . (A-5)
presented at the 1983 SPE Reservoir Simulation Symposium, San Fran- ÃBn ÃBB xB −R̃B0
cisco, 15–18 November.
25. D’Azevedo, E., Forsyth, P.A., and Tang, W.-P.: “An Automatic Or- where
dering Method for Incomplete Factorization Iterative Solvers,” paper −1
Ãnn = Ann − AnR ARR ARn, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-6a)
SPE 21226 presented at the 1991 SPE Reservoir Simulation Sympo-
−1
sium, Anaheim, California, 17–20 February. ÃBn = ABn − ABR ARR ARn, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-6b)
26. D’Azevedo, E.F., Forsyth, P.A., and Tang, W.-P.: “Towards a Cost-
−1
Effective ILU Preconditioner with High Level Fill,” BIT (1992) 32, No. ÃnB = AnB − AnR ARR ARB, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-6c)
3, 442. −1
27. Saad, Jousef: Iterative Methods for Sparse Linear Systems, second ÃBB = ABB − ABR ARR ARB, . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-6d)
edition, Soc. of Industrial and Applied Mathematics, Philadelphia, −1 0
R̃0n = R0n − AnR ARR RR, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-6e)
Pennsylvania (2003).
−1 0
and R̃B0 = RB0 − ABR ARR RR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-6f)
Appendix—The Linear Equation Solver
At each Newton iteration, it is necessary to solve the following We actually solve the reduced matrix equation, Eq. A-5, rather
global matrix equation. than the original global matrix equation, Eq. A-1. We obtain xR
冋 册冋 册 冋 册
by backsolving.
Ann Anr xn −R0n To solve Eq. A-5, we construct an approximate factorization of
= . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-1) it using the nested factorization column sum principle.23 The form
Arn Arr xr −Rr0 of the factorization is
Ann and Anr contain the network equation coefficients that multiply
network and reservoir unknowns, respectively. Arn and Arr contain
the reservoir equation coefficients that multiply these same un-
knowns; xn and xr are the network and reservoir unknown vectors,
冋 册 冋 册冋
Ãnn ÃnB
ÃBn ÃBB
≅
Ãnn 0
ÃBn ØBB
I Ã−1
0
nn ÃnB
I
册
, . . . . . . . . . . . . . . . (A-7)
respectively. The network unknowns are pressures at network where ØBB = ÃBB − diag共ÃBnÃ−1
nn ÃnBe 兲; . . . . . . . . . . . . . . . . . . . . . (A-8)
nodes and component rates on network connections, including
perforations. The reservoir unknowns are cell pressures if IMPES e is the column vector having all of its entries equal to one, and
is being used and cell pressures and masses if the calculations are diag(x) is the diagonal matrix having on its diagonal the entries of
fully implicit. R0n and Rr0 are the initial residual vectors. the column vector x.
To solve the global matrix equation, it is necessary to solve We need a preconditioner for ØBB. If the reservoir equations are
subproblems of the form IMPES, we need a preconditioner for the IMPES pressure equa-
tion. If they are fully implicit, we use Wallis’ constrained pressure
Ann␦xn = −Rn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-2) residual (CPR) method,24 which also requires a preconditioner for
the pressure equation. In either event, we need a preconditioner for
and Arr␦xr = −Rr , . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (A-3)
the pressure equation; for this, we use incomplete lower triangular-
where Rn and Rr are residual vectors. Eq. A-2 is equivalent to Eq. upper triangular (ILU) factorization. To improve performance of
19. To solve Eq. A-2, we use sparse Gaussian elimination with row the preconditioner, we do two things:
pivoting. To decrease the cost of solving Eq. A-3, we perform a • Reorder the unknowns and equations in a way that reduces
red/black reduction. We determine the cell colors as follows. the amount of infill. Our procedure is similar to but simpler than
1. Designate all cells to be uncolored. that described by D’Azevedo et al.25,26 In deciding which un-
2. Designate the first cell as red. This creates the first group of known to eliminate next, we determine the infill that would be
red cells. generated by each possibility and eliminate the unknown that gen-
3. Find all uncolored cells connected to the latest group of red erates the smallest infill. Here, infill is computed as the sum of the
cells. Designate these to be black. magnitudes of all infill coefficients that would be introduced into
4. Find all uncolored cells connected to the latest group of the matrix during the elimination of this particular unknown.
black cells (from Step 3). These are candidates to be red. Designate • Determine which infill coefficients to retain on the basis of
the first one to be red. Cell by cell within this group, determine their sizes. The procedure is similar to Saad’s ILUT (ILU that
whether each cell is connected to any red cell. If it is not, designate discards infill larger than a specified threshold).27 We retain a
it to be red. If it is connected to a red cell, designate it to be black. possible infill coefficient if its magnitude is larger than 0.007 times
The red cells identified in this step become the next group of the magnitude of the diagonal coefficient in the row in which it falls.
red cells. The process of reordering the unknowns and determining
5. Repeat Steps 3 and 4 until no connected uncolored cells can which potential infill to retain is quite expensive computationally.
be found. As a result, we create a template containing the information needed
6. Search all cells for an uncolored cell. If one is found, des- to perform and use the factorization. The template is constructed at
ignate it to be red, and return to Step 3. the beginning of a run on the basis of the matrix coefficients for the
On a structured grid, this procedure yields the normal check- first Newton iteration of the first timestep. It can be updated from
erboard pattern. The procedure results in two lists, one containing time to time later in the run if needed.
the red cells and the other containing the black cells. Given these
lists, we can partition Arr and rewrite Eq. A-1 as follows.
SI Metric Conversion Factors
冤 冥冤 冥 冤 冥
ARR ARn ARB xR −RR0
bbl × 1.589 873 E – 01 ⳱ m3
AnR Ann AnB xn = −R0n . . . . . . . . . . . . . . . . . . . . (A-4)
ft3 × 2.831 685 E – 02 ⳱ m3
ABR ABn ABB xB −RB0 psi × 6.894 757 E + 00 ⳱ kPa
The R and B subscripts denote red and black cells, respectively.
ARR is diagonal for the IMPES pressure equation and block diago- Brian K. Coats is a senior technical advisor with Landmark
nal for the fully implicit set of equations. As a result, it can be Graphics, where he continues his work in reservoir simulation
inverted economically. (which began at J.S. Nolen and Assocs. and continued at