multisegment well modeling in a sequential implicit
TRANSCRIPT
MULTI-SEGMENT WELL MODELING
IN A SEQUENTIAL IMPLICIT COUPLING FRAMEWORK
A DISSERTATION
SUBMITTED TO THE DEPARTMENT OF ENERGY RESOURCES
ENGINEERING
AND THE COMMITTEE ON GRADUATE STUDIES
OF STANFORD UNIVERSITY
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE DEGREE OF
MASTER OF SCIENCE
Jiawei Li
November 2018
c� Copyright by Jiawei Li 2019
All Rights Reserved
ii
Abstract
Accurate well modeling becomes essential in the reservoir simulation because more and more complex
well operations are employed in the petroleum industry. The prevailed standard well model is proved
to be computationally e�cient, while it lacks the ability to capture the multiphase flow details
within the wellbore. MultiSegment well (MSWell) model was then proposed to approximate the
actual physical shape of the well and perform accurate simulation within the wellbore. However,
the increasing complexity of the MSwell model also introduced additional di�culties in solving the
coupled MSWell and reservoir flow problem. Several nonlinear solver and linear solver techniques
were proposed to accelerate the convergence of the MSWell problem, while there isn’t a systematic
discussion about the convergence and the accuracy of the various proposed techniques.
In this work, we discuss the convergence and the accuracy for di↵erent coupling strategies for
coupled MSWell and reservoir flow problem. First, we introduce the numerical implementation
of the MultiSegment well (MSWell) in an in-house simulation Automatic-Di↵erentiation General
Purpose Research Simulator (AD-GPRS) under the General Implicit Coupling Framework (GENIC).
A consistent normalization technique for MSWell equations is discussed and carefully clarified. In
addition, the component-based CFL number and the phase-based CFL number for MSWell equations
are introduced, which are coherent with the CFL number defined in the reservoir block.
After the clear illustration of the model details, we investigate three di↵erent coupling strategies
for couple MSWell and reservoir flow problem, which are fully implicit method, sequential fully
implicit method and fully implicit method with local facility solver. Numerical examples are con-
structed to validate the convergence and the accuracy of these three coupling strategies. Then a
general discussion about the convergence and accuracy based on CFL number is conducted regarding
di↵erent time step and grid size (segment length). The numerical results and the theoretical analysis
show that the relative nonlinearity between the MSWell equations and the reservoir flow equations
is the primary factor a↵ecting the global convergence rate, while the time step will significantly
influence the simulation accuracy of the wellbore flow. Thus, we proposed a possible solution to
achieve both high accuracy for wellbore flow and global computational e�ciency.
iv
Acknowledgments
First of all, I would like to express my sincere and most profound gratitude to my advisor Prof.
Hamdi Tchelepi, for his guidance and support for the last two years. I deeply appreciate his insightful
suggestion and profound discussion in the research. Hamdi introduced me to the area of the reservoir
simulation and helped me to start my research on MultiSegment well. It is a privilege for me to
continue my Ph.D. program under his supervision at Stanford University.
I would like to express gratitude to Dr. Pavel Tomin for his great support for my research. Pavel
followed my research closely and provided me with much useful help both in software development
and research knowledge in reservoir simulation. Thanks are also due to Dr. Ruslan Rin. He o↵ered
me many suggestions on how to use AD-GPRS and shared me his experience on GENIC framework,
which is essential for my work. I’m grateful to Dr. Yifan zhou, Dr. Mohammad Karimi-Fard, Dr.
Christine Maier, Dr. Timur Garipov, Dr. Kirill Terekhov for your help on my research.
I would like to thank the financial support from the Department of Energy Resources Engineering
and the SUPRI-B research group. I would also like to thank all the faculty, sta↵ and students of the
Department of Energy Resources Engineering for being so helpful for these two years.
I would also like to thank all my friends and colleagues, whom I had the pleasure to work with
during my time at Stanford. Special thanks to my parents, who supported me all the time in these
two years.
v
Contents
Abstract iv
Acknowledgments v
1 Introduction 1
1.1 Background and Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Previous Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Mathematical Formulation 6
2.1 Variables and Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.1 Mass Balance Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.2 Energy Balance Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.3 Momentum Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Numerical implementation in AD-GPRS . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.1 GENIC Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.2 MS Well Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.3 MS Well Subproblem and Global Status Table . . . . . . . . . . . . . . . . . 11
3 Coupling Framework for MSWell 13
3.1 Fully Implicit Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 Sequential implicit method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 Local Facility solver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.4 Convergence Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.5 CFL in MSWell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.6 Convergence Analysis for MSWell Model . . . . . . . . . . . . . . . . . . . . . . . . . 21
4 Numerical Results 23
4.1 Compositional Fluid case in MSWell . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Upscaled SPE10 Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
vi
4.2.1 Comparison with Standard Well . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2.2 Well control For MSWell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.2.3 Segments refinement for MSWell . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.4 Well group control example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2.5 Time scale examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.2.6 Well group switch control and time scale example . . . . . . . . . . . . . . . . 37
5 Conclusions Remarks 41
5.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Bibliography 43
vii
List of Tables
2.1 Example of subsets and corresponding unknowns and properties for three subproblem 11
2.2 Global status table for coupled well and flow problem . . . . . . . . . . . . . . . . . 12
4.1 Parameters for compositional fluid case in MSWell . . . . . . . . . . . . . . . . . . . 23
4.2 Parameters for upscaled SPE10 case . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3 Detailed ordinates for Each Well . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4 Comparison between Standard Well and MSWell . . . . . . . . . . . . . . . . . . . . 27
4.5 Tunning parameters for each examples . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.6 Simulation convergence statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.7 Well Control for each stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.8 Tunning parameters for each examples . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.9 Well Control for each stage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.10 Tunning parameters for each examples . . . . . . . . . . . . . . . . . . . . . . . . . . 39
viii
List of Figures
1.1 The illustration of the original MSWell model (From [14]) . . . . . . . . . . . . . . . 4
1.2 The illustration of the generalized MSWell model (From [14]) . . . . . . . . . . . . . 4
3.1 Illustration of di↵erent coupling strategies in MSWell . . . . . . . . . . . . . . . . . . 14
4.1 Simulation results for three di↵erent coupling strategies . . . . . . . . . . . . . . . . 24
4.2 Simulation results for three di↵erent coupling strategies . . . . . . . . . . . . . . . . 24
4.3 Properties for upscaled SPE10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.4 Well structure for upscaled SPE10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.5 Gas injection rate for injectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.6 Production data for di↵erent well control types of producer 3 . . . . . . . . . . . . . 28
4.7 Simulation results for di↵erent Well control type . . . . . . . . . . . . . . . . . . . . 29
4.8 34 segments for each MSWell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.9 Illustration of the segments for refinement examples . . . . . . . . . . . . . . . . . . 30
4.10 Gas injection rates for the injectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.11 Production data for producer 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.12 Simulation results for segments refinement examples . . . . . . . . . . . . . . . . . . 31
4.13 MSWell structure for well group example . . . . . . . . . . . . . . . . . . . . . . . . 32
4.14 Gas injection rates for the injectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.15 Comparison of the Production data . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.16 Simulation results for well group control . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.17 Simulation results for di↵erent averaged time steps . . . . . . . . . . . . . . . . . . . 35
4.18 Production data for producer 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.19 Production data for producer 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.20 Production data for producer 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.21 Gas injection rate for injectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.22 Production data for producer 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.23 Production data for producer 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.24 Production data for producer 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
ix
4.25 Production data for well group producer . . . . . . . . . . . . . . . . . . . . . . . . 40
4.26 Well group control BHP, bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
x
Chapter 1
Introduction
1.1 Background and Motivation
Accurate well simulation is essential in the modern reservoir simulation. Several well models were
proposed to achieve the detailed simulation of the wellbore flow. In the standard well model, well
is considered as a source/sink term in the perforated reservoir block [18],[19]. The standard well
model is computationally e�cient but lacks the ability to simulate the detailed flow in the wellbore.
However, the modern field operation requires the accurate simulation for the long deviated and
horizontal wells [14]. Since the fluid velocity is usually very large and the gravity e↵ect is not the
only dominant factor in the horizontal wells, The ignorance of the friction e↵ect and the acceleration
e↵ect may lead to significant error in the standard well simulation. [34], [25] also shows that the
holdup e↵ect behavior should be taken into account in the multiphase wellbore simulation with
significant density and viscosity di↵erence.
To overcome the above drawbacks of the standard well model, the Multi-Segment well model
is proposed, and the flow behavior in the wellbore is discussed in [12, 1]. Jiang proposed and
implemented the original and the generalized MultiSgment model (MSWell) in [14]. As described
in [14], the pressure drop due to friction e↵ect, acceleration e↵ect, and the hydrostatic e↵ect are
considered in the MSWell model. The well will be discretized into several segments, and the fluid
velocity, node pressure, and other properties can be captured in the wellbore along the well geometry.
The proposed MSWell model can flexibly approximate the actual physical geometry of each wellbore
and handle the complex well group control in the pipeline network.
However, with the increasing complexity of the MSWell model, solving the MSWell model ef-
ficiently both in linear and nonlinear level become a challenge. The CPR (Constrained Pressure
Residual) was proposed in [14] to handle the MSWell linear system and demonstrated the excellent
ability for the large-scale examples. Yifan extended the CPR (Constrained Pressure Residual) to
generalized MSWell and designed a local facility solver to help facilitate the Newton convergence
1
CHAPTER 1. INTRODUCTION 2
rate [31]. The above research results have present the MSWell model as a well-posed problem with
its consistent formulation and customized linear solver. However, there are still di�culties in e↵ec-
tively coupling MSWell model with reservoir flow problem. Therefore, This work is focused on the
analysis of the di↵erent coupling strategies for coupled MSWell and reservoir flow problem in terms
of convergence and accuracy. According to the analysis, we are able to generate a guideline how
di↵erent factors a↵ect the convergence and accuracy for the global problem, which could help us to
design novel and flexible coupling strategies for MSWell and reservoir flow problem.
In this thesis, we first introduce the mathematical formulation of the generalized MSWell. The
mass balance equations and momentum equations are described as well as the associated segment
variables and the connection variables. The three types of pressure drop e↵ects (friction e↵ect, ac-
celeration e↵ect, and hydrostatic e↵ect) are introduced. These sophisticated pressure drop functions
and the flow momentum equations will significantly increase the nonlinearity of the MSWell model.
Then we illustrate the numerical implementation in the Automatic-Di↵erentiation General Pur-
pose Research Simulator (AD-GPRS) [31, 30, 28], which is an in-house reservoir simulator at Stan-
ford University. The most recent implementation is based on General Implicit Coupling Framework
(GENIC) [20], which provides a general implicit framework for solving multi-physics problems. [21].
The conception and the data structure of subproblem and subset are introduced, which are the
essential components of GENIC. MSWell is defined as an individual subproblem, and it is associated
with customized MSWell subsets.
In GENIC, each subproblem consists of a specific set of equations representing a particular
physical process. For example, each MSWell is an individual subproblem, and reservoir flow is
another individual subproblem. The variables are presented in the subset associated with di↵erent
subproblems. Several MSWell subsets are associated with MSWell subproblem and reservoir flow
subproblem in the coupled MSWell and reservoir flow problem. Each subproblem and each subset
can be set as active or inactive, which enables us to generate a certain Jacobian with the selected
equations respect with the selected variables dynamically in the simulation. This flexible function
makes it very convenient to design and implement di↵erent coupling strategies for MSWell and
reservoir flow problem.
We investigated three major coupling strategies in this thesis. They are fully implicit method
(FIM), sequential fully implicit method (SEQ) and fully implicit method with local facility solver.
FIM is commonly used to solve the coupled MSWell and reservoir flow problem and is usually chosen
to be the baseline of di↵erent coupling strategies. SEQ [13] is another method proposed to solve a
multi-physics problem which will be e�cient when the multi-physics problem is not strongly coupled.
We also implement the local facility solver [31] in GENIC and incorporate the local facility solver in
the fully implicit method. The correctness of these three coupling strategies are validated, and the
convergence rate is discussed according to several test cases.
CHAPTER 1. INTRODUCTION 3
Some key factors a↵ecting the numerical convergence are clarified and discussed. The normal-
ization method for MSWell model is described for di↵erent situations. CFL number is another very
important factor that a↵ects the convergence and stability for a numerical scheme [8, 22, 16]. A
CFL calculation process for MSWell segment was proposed in a similar way as the reservoir block.
Given the CFL number for each segment in MSWell model, we are able to conduct analysis on the
convergence and the accuracy of the coupled MSWell and reservoir flow problem. Our discussion
focused on the segment grid size and the time step. Several numerical examples are constructed to
investigate the convergence and the accuracy properties.
1.2 Previous Work
The original MultiSegment Well (MSWell) model is described in [14]. Figure 1.1 illustrates the
structures and the associated variables in the original MSWell. Each MSWell is discretized into
several segments and act as a computational domain. Multiple properties are defined for each
segment, such as pressure, phase holdup (saturation) and the mole fraction. For each segment, a
heel end and a toe end are labeled at the two ends of the segment. A wellhead direction is also
predefined for each certain segment. The pressure for each phase is defined at the toe-end of the
segment, and the mixture velocity is defined at the heel end of the segment. Other properties such
as phase holdup (saturation) are defined for the whole segment.
As mentioned in [14], the original MSWell is able to perform the simulation on multilateral well
and the well group control can be applied on the exit segment. However, there are two major
drawbacks in the original MSWell model. The first drawback is that the original MSWell lacks
the ability to simulate the complex topology, such as loops and general branching [31]. Another
drawback is that the flow direction is predefined for each segment; however, the real flow direction
in the pipeline can change during the simulation.
In order to overcome these drawbacks, generalized MSWell model was proposed in [14]. Figure 1.2
illustrates the structure of the generalized MSWell model. Each generalized MSWell will also be
discretized into several segments, and each segment represents a node in the MSWell model shown as
the yellow dot in the Figure 1.2. There are three types of segments in the model, two-outlet segment,
multi-outlet segment, and special segment. The two-outlet segment is the major component of the
MSWell with only two outlets. A specific length and radius are defined for each two-outlet segment.
multi-outlet segment works as the joint segment for several two-outlet segments. The volume of the
multi-outlet segment is set to be zero; therefore, there is no accumulation e↵ect for the multi-outlet
segment. Special Segment is the customized segment for a certain function, such as a separator
segment that separates the fluid in di↵erent phases. The concept of the connection is introduced in
the general MSWell model shown as the red line in the Figure 1.2. A connection connects any two
segments.
CHAPTER 1. INTRODUCTION 4
Figure 1.1: The illustration of the original MSWell model (From [14])
Figure 1.2: The illustration of the generalized MSWell model (From [14])
The properties for generalized MSWell model are defined at the segment (node) or the connection.
The phase pressure, phase holdup (saturation) and mole fraction of a certain segment are defined at
the center of the segment. The mixture velocity is defined at each connection, which is the interface
of two segments. The discretization format of the generalized MSWell model is very similar to the
reservoir discretization. Thus it ables the generic design in the data structure and solving strategies
for MSWell and reservoir flow problems, which is a significant advantage for generalized MSWell
model. Due to above flexible design, the pipeline networks and complex topologies, such as loops
and branchings, can be represented in the generalized MSWell model. In addition, well constraints
can be applied to any segment or the exit connection.
CHAPTER 1. INTRODUCTION 5
More advanced functions have been discussed in [31] and implemented into AD-GPRS. One
advance design is the general branch where any segment can be connected with any number of other
segments, which enables the complex geometry of the MSWell to approximate the real physical
shape of the wells accurately. The fluid direction is determined by the mixture velocity variable at
the connections. Multiple exit segments are also supported, and multiple well constraints can be
applied to several segments and connections.
Extensive research has been conducted on the linear solver and nonlinear solver for coupled
MSWell and reservoir flow problem. [31] extended the two-stage CPR (Constrained Pressure Resid-
ual) preconditioner for the generalized MSWell model. The first stage is to solve the global pressure
system. The generalized MSWell model will be reduced to the standard well by algebraic reduction
on generalized equations and variables [32], [33]. Then the true IMPES reduction will be applied
on the reservoir equations to generate the reduced reservoir system of the pressure equations. The
constructed global pressure system will be solved and obtain the first stage pressure solution. The
second stage is to solve MSWell and reservoir flow locally based on our updated pressure. This
two-stage CPR preconditioner is able to improve the performance of the linear solver [32].
As mentioned in [31], the generalized MSWell equations can become highly nonlinear with com-
plex geometries (branching, loops) and physics (drift-flux model [24], [25]), which will result in a
slower convergence rate than the reservoir equations. Local facility solver is proposed in [31] to
accelerate the convergence rate for MSWell equations at the nonlinear level. The local facility solver
will be activated at the end of each Newton step when the reservoir solution is reaching the true
solution (i.e., the norm of the reservoir residual equations is smaller than a certain threshold). The
local facility solver will solve the local MSWell equations with the reservoir variables fixed. The
local facility solver has been proved to help increase the global convergence rate for high nonlinear
MSWell problems.
The original MSWell and generalized MSWell were firstly implemented in the General Purpose
Research Simulator (GPRS) [14]. The original GPRS was extended into Automatic-Di↵erentiation
General Purpose Research Simulator (AD-GPRS) [28] and the generalized MSWell was extended
into AD-GPRS [31]. General Implicit Coupling Framework (GENIC) was proposed in [21] and
then incorporated into AD-GPRS [20]. GENIC is a novel platform that enables us to design and
implement coupling strategies for multi-physics problems flexibly.
A generalized MSWell problem is implemented as an individual module in GENIC with its
governing equations and variables. The data structure for MSWell is similar to the data structure
to the reservoir flow, which enables the generic design for the nonlinear solver and linear solver.
Di↵erent physics can be coupled seamlessly in GENIC. Therefore, it is very easy to design and
implement the new coupling strategies and test their performances.
Chapter 2
Mathematical Formulation
This chapter describes the mathematical formulation and the numerical implementation of multi-
segment (MS) well models in AD-GPRS. First, we introduce the basic variables and the governing
equations for MS well model. Then two important components of AD-GPRS, General Implicit
Coupling Framework (GENIC) [21, 20] and Automatic Di↵erentiation Expression Templates Li-
brary (ADETL) [31], are described. Then we talk about the numerical implementation of MS well
within GENIC. Finally, we illustrate how to use GENIC to flexibly solve MS well problems using
di↵erent coupling strategies.
2.1 Variables and Governing Equations
Multi-segment well model in AD-GPRS consists of segments and connections. The implementation
of MS well model in AD-GPRS is based on Yifan Zhou’s PhD dissertation [31]. In MSWell model,
variables are defined at the segment and the connections. The governing equations of the MS well
model consist of mass balance equations, energy balance equations, and momentum equations.
The primary variables in segment basically share the same formulation as the variables in reser-
voir. For example, for natural formulation we have following variable:
• p is the pressure for this segment.
• T is the temperature for this segment
• ↵p
is the phase holdup (saturation) for phase p in this segment
• xc.p
is the mole fraction of component c in phase p
The primary variables in connection is defined as:
• Qm
is the total mixture flux of the connection
6
CHAPTER 2. MATHEMATICAL FORMULATION 7
2.1.1 Mass Balance Equations
For each segment, we have nc
mass balance equations for every component:
@
@t
X
p
⇢p
↵p
xc,p
� @
@z
X
p
⇢p
Vsp
xc,p
+X
p
⇢p
xc,p
qp
= 0, c = 1, · · · , nc
(2.1)
where:
• ⇢p
is the density of phase p
• Vsp
is superficial velocity of phase p
• qp
is the inflow (per unit volume) of phase p to the segment.
The discretized form of mass balance equation is:
Rseg
c,i
= Vi
X
p
⇣(⇢
p
xc,p
↵p
)n+1 � (⇢p
xc,p
↵p
)n⌘
i
��tX
j2nbr(i)
X
p
⇢p
xc,p
Qp
!
(i,j)
+�t
X
p
⇢p
xc,p
Qp
!
i
= 0, c = 1, · · · , nc
(2.2)
where:
• Vi
is the volume of the segment i,
• nbr(i) is the set containing all segments neighboring to segment i,
• (Qp
)(i,j) is the phase flow rate through connection (i, j),
•�Q
p
�i
is the volumetric inflow of phase p to the segment i.
There are three terms in the mass balance equations. The first term accounts for the accumulation
term. The second term accounts for the convective mass flux. The third term accounts for the mass
source/sink through the wellbore.
2.1.2 Energy Balance Equations
For each segment, there is one energy balance equation when considering thermal properties in the
multi-segment wells. The equation is:
@
@t
X
p
⇢p
↵p
✓Up
+1
2V 2p
◆+
@
@z
X
p
⇢p
↵p
Vp
✓H
p
+1
2V 2p
◆=X
p
⇢p
↵p
Vp
g �Qloss
+X
p
⇢p
Hp
qp
(2.3)
where:
CHAPTER 2. MATHEMATICAL FORMULATION 8
• Up
is the internal energy of phase p,
• Hp
is the enthalpy of phase p,
• Vp
is the interstitial velocity of phase p (Vp
= Vsp
/↵p
),
• g is the gravitational component along the well g = g · cos✓,
• Qloss
is the heat loss at this segment
There are five terms in the equation. The first term in the left-hand side accounts for the energy
accumulation. The second term accounts for the convective energy flux. The first term in the right-
hand side accounts for the gravitational work. The second term accounts for the heat loss from
the wellbore to the surroundings. The third term accounts for the energy source/sink through the
wellbore.
The discretized energy balance equation is as follow:
Rthermal
i
=Vi
�t
X
p
"✓⇢p
↵p
✓Up
+1
2V 2p
◆◆n+1
�✓⇢p
↵p
✓Up
+1
2V 2p
◆◆n
#
i
+X
j2nbr(i)
"X
p
⇢p
Qp
✓H
p
+1
2V 2p
◆#
(i,j)
� X
p
⇢p
Vsp
g � V Qloss
+X
p
⇢p
Hp
Qp
!
i
= 0
(2.4)
where:
• (Vsp
)i
is equal to (Vsp
)i,j
such that i is the upstream of node j.
2.1.3 Momentum Equations
The general multi-segment well model defines variables at the interface of the segments. Therefore,
the momentum equations are defined at the interface (connections of each segment). For each
connection, there is one momentum equation:
Rseg
p,i
= psegi
� psegi�1 � (�p
h,i
+�pf,i
+�pa,i
), i = 2, 3, . . . , n (2.5)
where:
• psegi
is the pressure of segment i,
• �ph,i
is the hydrostatic pressure di↵erence between segment i and i� 1,
• �pf,i
is the pressure di↵erence between segment i and i� 1 caused by friction,
• �pa,i
is the pressure di↵erence between segment i and i� 1 caused by fluid acceleration.
CHAPTER 2. MATHEMATICAL FORMULATION 9
The pressure di↵erences are defined as follows:
1. �ph,i
= ⇢segi
g�hseg
i
, where:
• ⇢segi
is the mixture density in segment i,
• �hseg
i
is the vertical height of the segment i.
2. �pf,i
=⇣
2ftp⇢seg
V
2m
d
⌘
i
�xi
, where:
• ftp
is the friction factor,
• d is the segment diameter,
• Vm
is the mixture velocity in the segment,
• �xi
is the segment length.
3. �pf,i
=�2minVm
A
�i
, where:
• min
is the mixture mass flow rate through a perforation,
• A is the cross-section area.
2.2 Numerical implementation in AD-GPRS
Automatic Di↵erentiation General Purpose Research Simulator (AD-GPRS) [31, 21, 20] is the re-
search platform developed and maintained by the Reservoir Simulation Research program (SUPRI-B)
at the Department of Energy Resources Engineering. Automatic Di↵erentiation Expression Tem-
plates Library (ADETL) was developed by Rami Younis [30], and further extended by Yifan Zhou
[31] and Ruslan Rin [20]. ADETL enables automatic di↵erentiation for a given variable. Thus
we can automatically generate Jacobian matrix according to the residual equations, which makes
physics extension much more convenient.
2.2.1 GENIC Framework
The new generation of AD-GPRS is implemented based on the General Implicit Coupling Frame-
work (GENIC) [21, 20]. GENIC supports variety coupling strategies for the complex multi-physics
simulation. Therefore we can explore di↵erent approaches to solve the coupled MSWell and reservoir
problem regarding computation cost and robustness.
GENIC platform emphasizes modular design. Each physical process is represented by an inde-
pendent module regarding software development, which is called a subproblem within the framework.
For example, WELL problem is defined as a separate subproblem, which is described by a set of
well equations. Both standard well and MS well are supported within WELL module. A standard
CHAPTER 2. MATHEMATICAL FORMULATION 10
well subproblem consists of one well control equation. An MS well subproblem consists of a set of
mass balance equations, momentum equations, and well control equation.
GENIC also provide flexibility in space and time discretization for a given physical subproblem.
Fully Implicit Method (FIM), Adaptive Implicit Method (AIM) [27, 22, 4, 9, 15], Sequential Fully
Implicit Method (SEQ), IMPES [23, 26, 7] are supported in terms of time discretization. Two-Point
Flux Approximation [3],Multi-Point Flux Approximation [2, 10] and several other techniques are also
supported in terms of space discretization, which enables us to applied di↵erent time discretization
and di↵erent space discretization for di↵erent subproblem. We can also dynamically choose the
primary variables and the order of the variables for a given subproblem during the simulation. The
Natural-variable formulation [6] and the molar-variable formulation [29, 11, 5] can be easily applied
to an individual problem.
A subset is an abstract computational domain with a defined unknowns and properties, which is
the core concept in GENIC. The variables in a subset can be divided into two categories: unknowns
and properties. If a variable is defined as an unknown, it will be considered as the primary variable,
and we will calculate the derivatives with respect to it when constructing the Jacobian matrix. If
a variable is defined as a property, it will be regarded as an intermediate variable, and we will not
include them in the Jacobian matrix. Each variable is associated with a status in a subset. If the
status of a variable is active, this variable is regarded as an unknown. If the status of a variable is
inactive, this variable is considered to be a property. There is a status table for each subset, which
stores the status for all the variables with this subset. Also, the subset status table can be modified
during simulation. Thus we can flexibly choose the primary variables as needed. Each subset also
has each own status. If the status of a subset is inactive, then all the variables in the subset will be
set as inactive.
Subproblem contains a particular combination of subsets. There are several kinds of subsets
defined in GENIC. For example, cell unknowns and properties are defined in a cell-based subset,
FlowCellSubset, with unknowns such as pressure, p, phase saturations, Sj
, and properties such as
relative permeabilities, krj
. For a connection-based subset, unknowns and properties are defined at
the interface of di↵erent cells (control volumes). For example, we have FlowConnectionSubset, with
unknown phase molar fluxes, vj
, and properties such as for example total volumetric flux, vt
.
Another critical concept in GENIC is the global status table. Each subproblem also has each own
status. If the status of a subproblem is inactive, all of the subsets associated with this subproblem
would be inactive. If the status of a subproblem is active, then at least one of the subset associated
with this subproblem is active.
2.2.2 MS Well Subsets
For isothermal MS well subproblem, the basic subsets are FlowCellSubset and WellConnectionSub-
set. FlowCellSubset is used to store unknowns and properties for each segment, such as segment
CHAPTER 2. MATHEMATICAL FORMULATION 11
pressure pseg, segment phase saturation (holdup) Sseg
j
and phase density ⇢j
, etc. FlowCellSubset
in MS well module is the same as the FlowCellSubset in FLOW module, which means that we will
treat flow data structure in the MS well segments in the same way as in the reservoir. WellConnec-
tionSubset is used to store unknowns and properties for each interface that connects two segments,
such as total flux Qm
and phase flux Qp
, etc.
Table 2.1 compares the subsets among three subproblems relevant with reservoir flow and well
flow. For standard well problem, we only have one BhpSubset which contains only contains the
bottom hole pressure (BHP) data for a standard well.
Table 2.1: Example of subsets and corresponding unknowns and properties for three subproblem
Subproblem Subset Unknowns and properties
FLOW cells faces boundaries p, Sj
,xij
,µ, ⇢j
Standard Well bhp BHP
MSWell cells faces pseg, Sseg
j
,xseg
ij
,Qm
,µ, ⇢j
2.2.3 MS Well Subproblem and Global Status Table
Each well is an individual subproblem. A WELL problem consists of equations and variables corre-
sponding to the subset. The governing equation for the standard well is one well control equation,
and the only active subset is BhpSubset. For MS well subproblem, the governing equations are mass
balance equations and momentum equations described in chapter 2.1 and subsets are described in
chapter 2.2.2. If the MS well model consists of nseg
segments and ncon
connections and the fluid is
nc
components and np
phases, we will have nc
⇥ nseg
mass balance equations and ncon
momentum
equations. The unknowns will have a total number of nc
⇥ nseg
+ ncon
we can rewrite the MS well
equations as follows: 8<
:Rm
W
(xF
, xm
W
, xc
W
) = 0,
Rc
W
(xm
W
, xc
W
) = 0,(2.6)
where Rm
W
is the residual for well mass balance equations and Rc
W
is the residual for well connection
momentum equations, xm
W
are the unknowns for mass balance equations in the MS well FlowCell-
Subset, xm
W
are the unknowns for momentum equations in the MS well WellConnectionSubset, xF
are the unknowns for the flow in the reservoir FlowCellSubset.
If we define RW
to be the total well equations and xW
to be total well unknowns:
xW
=
"xm
W
xc
W
#, R
W
=
"Rm
W
Rc
W
#. (2.7)
CHAPTER 2. MATHEMATICAL FORMULATION 12
Then the total MS well equations can be represented as:
RW
(xF
, xW
) = 0. (2.8)
Therefore, for a coupled flow and MS well problem, our system of equations can be represented
as: 8<
:R
F
(xF
, xW
) = 0,
RW
(xF
, xW
) = 0,(2.9)
where RF
is the residual equation for reservoir flow and transport.
There are three statuses in the global status table for a simulation contains one flow problem
and one well problem. Table 2.2 illustrates three di↵erent global statuses for coupled flow and well
problem.
Table 2.2: Global status table for coupled well and flow problem
Global Status Table Flow Problem Well Problem
(1,1) X X(1,0) X 7
(0,1) 7 X
If the global status is (1, 1), both flow problem and well problem are active in the current solving
scheme. Therefore, we need to solve the following system of equations:
8<
:Rn+1
F
(xn+1F
, xn+1w
) = 0,
Rn+1w
(xn+1F
, xn+1w
) = 0.(2.10)
If the global status is (1, 0), it means that the flow subproblem is active, while the well subproblem
is inactive. Therefore, we need to solve the following system of equations:
Rn+1F
(xn+1F
, xn
w
) = 0. (2.11)
If the global status is (0, 1), it means that the well subproblem is active, while the flow subproblem
is inactive. Therefore, we need to solve the following system of equations:
Rn+1w
(xn
F
, xn+1w
) = 0. (2.12)
Global status table enables us to dynamically change the equations to be solved during the
simulation, which provide a variety of ways to design coupling strategies for flow and well problems.
Chapter 3
Coupling Framework for MSWell
In this chapter, we will discuss di↵erent solving strategies for coupled MSWell and Flow problem
concerning nonlinear level. In ADGPRS, each MSWell is treated as an individual subproblem, which
consists of a set of governing equations and variables. The challenge for solving couple MSWell and
Flow problem comes from the significant di↵erence in flow characteristics. The flow in the reservoir
is usually Darcy flow through porous media. However, multiphase flow in pipes is governed by
Navier-Stokes equation. In reservoir simulation, it is challenging to solve Navier-Stokes equation.
Therefore, several simplifies flow models are developed, such as homogeneous model and drift-flux
model [34]. As a result, the mathematics formulation of flow in Reservoir and wellbore is significantly
di↵erent, which may lead to di�culties in solving coupled reservoir flow and MSWell problem.
Due to the di↵erent flow characteristics, the flow velocity within the well could be considerably
larger than the flow velocity in the reservoir. Thus, the CFL number of MSWell segment could be
significantly larger than CFL number in reservoir block given the same timestep�t. In this situation,
it is not suitable to use the explicit method in time discretization. Since the stability criteria in
explicit method require that CFL < 1 for all the blocks, the resulting CFL number for reservoir blocks
would be much smaller than 1. According to the basic definition of CFL number 3.18 and 3.19,
the timestep �t in the explicit method could be very small, which will lead to redundant newton
iterations. On the contrary, the implicit method is unconditional stable regarding the timestep,
which does not have such a strict requirement for the CFL number. Therefore, implicit method
proves to be a preferable choice for coupled MSWell and reservoir flow problem concerning the
computational e�ciency. In this work, we investigate three coupling strategies on solving coupled
MSWell and reservoir flow problem implicitly, which are fully implicit method(FIM), sequential fully
implicit method(SEQ) and the implicit method with facility solver.
Fully implicit method (FIM) is a commonly used method to solve coupled problems implicitly.
In this method, equations for all the subproblem are solved simultaneously. We will construct a
global Jacobian matrix all the equations and variables for all the subproblems will be updated after
13
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 14
one Newton iteration. Subfigure (a) in figure 3.1 illustrates the basic workflow of FIM at a time
step.
Sequential fully implicit method(SEQ) [13] also aims to solve all the equations implicitly. The
di↵erence comes from the solving process. For a given time step in SEQ, we will first fix the variables
of the MSWell and solve the equations for reservoir flow subproblem only. Sequentially, the MSWell
equations will be solved with reservoir flow variables fixed. This process will be iterated until all
the subproblems reach the convergence. Subfigure (b) in figure 3.1 illustrates the basic workflow of
SEQ at a time step.
Local facility solver is proposed by Yifan in [31] to improve the convergence of the fully implicit
method. A local facility solver is added after each Newton iteration. If the residual of the MSWell
equations meet the activation criteria (the solution for MSWell is near the converged solution under
a threshold), the local facility solver will be activated. Local facility solver will perform several
Newton iterations to solve MSWell equations with reservoir flow variables fixed. Then the whole
system will return to the fully implicit status and start next global Newton iteration. Subfigure (c)
in figure 3.1 illustrates how facility solver works within the fully implicit method.
(a) Fully Implicit (b) Sequential Fully Implicit (c) Local Facility Solver
Figure 3.1: Illustration of di↵erent coupling strategies in MSWell
3.1 Fully Implicit Method
Algorithm 1 illustrate a general approach to solve Flow and MSWell problem using the Fully implicit
method. At every time step, we need to the solve following fully coupled system of equations:
8<
:Rn+1
F
(xn+1F
, xn+1w
) = 0,
Rn+1w
(xn+1F
, xn+1w
) = 0.(3.1)
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 15
where: Rn+1F
and Rn+1w
are the Flow and MSWell residual equations at this time step and xn+1F
xn+1w
are the variables for Flow and MSWell subproblem. Both Flow and MSWell primary variables
are set as unknowns. Thus, we can construct the Jacobian matrix at the same time:
J =
2
664
@RF
@xF
@RF
@xw
@Rw
@xf
@Rw
@xw
3
775 (3.2)
Given the Jacobian matrix, we can update the unknowns for both Flow and MSWell problem.
Finally, we can solve the coupled equations until we reach the global convergence. 3.3
8<
:kRFk < ✏
F
kRWk < ✏w
(3.3)
Algorithm 1 Fully Implicit Method
1: procedure solve one time step(xn
F
, xn
w
) . unknowns of the last time step
2: Rn+1F
(xn+1F
, xn+1w
, xn
F
, xn
w
) = 0 . fully coupled residual for flow
3: Rn+1w
(xn+1F
, xn+1w
, xn
F
, xn
w
) = 0 . fully coupled residual for MSWell
4: Calculate residual and Jacobian for fully coupled problem
R(F,W ) and J (F,W )
5: while kRk > ✏ do
6: Solve the linear system
7: update xF
and xw
8: Calculate residual and Jacobian for fully coupled problem: R(F,W ) and J (F,W )
9: return xn+1F
, xn+1w
3.2 Sequential implicit method
Algorithm 2 illustrates the Sequential fully implicit method for solving Flow and MSWell subproblem.
At every time step, we will sequentially solve Flow subproblem and MSWell subproblem until we
reach the global convergence.
• Step 1 Solve the flow subproblem equations 3.4 with fixed MSWell variables. Construct
Jacobian matrix 3.5 only include flow equations and flow variables.
Rn+1F
(xn+1F
) = 0 (3.4)
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 16
J =@R
F
@xF
(3.5)
Update the flow variables until the flow equation residual norm reach the tolerance.
kRFk < ✏F
(3.6)
• Step 2 Solve the MSWell subproblem equation 3.7 with fixed flow variables. Construct Jaco-
bian matrix 3.8 only include MSWell equations and MSWell variables.
Rn+1w
(xn+1w
) = 0 (3.7)
J =@R
w
@xw
(3.8)
Update the MSWell variables until the MSWell equation residual norm reach the tolerance.
kRWk < ✏w
(3.9)
• Step 3 Iterate through Step 1 until we reach the global convergence
3.3 Local Facility solver
Algorithm 3 illustrates the local facility solver in the fully implicit method. At every time step, we
will solve a fully implicit flow and MSWell problem. In addition, after each Newton iteration, we
will check the MSWell problem residual norm. If the MSWell residual is reaching the tolerance, we
will activate the facility solver, which will solve the local well problem.
• Step 1 Solve the fully implicit flow and MSWell subproblem equations 3.1 for one Newton
step. Construct fully implicit Jacobian matrix 3.2. Solve the linear system and update both
flow and MSWell variables
• Step 2 If the MSWell residual norm meets the local facility solver activation criteria, we will
activate the local facility solver. Local facility solver will solve local MSWell problem 3.7 and
construct MSWell Jacobian matrix 3.8. We will keep update MSWell variables until we reach
the MSWell convergence criteria 3.9
• Step 3 iterate back to Step 1 and Step 2 until we reach the global convergence 3.3
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 17
Algorithm 2 Sequential implicit method
1: procedure solve one time step(xn
F
, xn
w
) . unknowns of the last time step
2: do
3: solve the flow problem first
4: do
5: fix the variables in the MSWell subproblem xn+1w
6: construct the Residual and Jacobian for Flow subproblem
7: Rn+1F
(xn+1F
) = 0 and JF
(xn+1F
)
8: solve the linear system
9: JF
(xn+1F
)�xn+1F
= �Rn+1F
(xn+1F
)
10: update the Flow subproblem variables xn+1F
11: while (kRFk > ✏F
)
12: solve the MSWell problem sequentially
13: do
14: fix the variables in the Flow subproblem xn+1F
15: construct the Residual and Jacobian for MSWell subproblem
16: Rn+1w
(xn+1w
) = 0 and Jw
(xn+1w
)
17: solve the linear system
18: Jw
(xn+1w
)�xn+1w
= �Rn+1w
(xn+1w
)
19: update the MSWell subproblem variables xn+1w
20: while (kRFk > ✏F
)
21: iterate until the global convergence
22: while (kRFk > ✏F
, kRWk > ✏w
)
23: return xn+1F
, xn+1w
3.4 Convergence Criteria
In GENIC framework, each subproblem has its own convergence criteria. The global convergence re-
quires all the subproblems meet its own convergence criteria. This section describes the convergence
criteria for MSWell problems.
Isothermal MSWell subproblem consists of mass balance equation and momentum equation.
These equations need to be normalized before the convergence check. Di↵erent normalization meth-
ods are employed on di↵erent equations.
• Mass Balance Equation 2.2: Normalizer for the mass balance equation is the total compo-
nent mass. According to discuss in chapter 2.1, the accumulation e↵ect for a MSWell segment
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 18
Algorithm 3 Local Facility Solver method
1: procedure solve one time step(xn
F
, xn
w
) . unknowns of the last time step
2: do
3: solve the fully coupled problem
4: construct the Residual and Jacobian for the coupled Flow and MSWell subproblem
5: Rn+1F
(xn+1F
, xn+1w
) = 0
6: Rn+1w
(xn+1F
, xn+1w
) = 0
7: solve the linear system
8:
9: Jn+1FW
"�xn+1
F
�xn+1w
#= �
"Rn+1
F
Rn+1w
#
10:
11: update the Flow and MSWell subproblem variables xn+1F
and xn+1w
12: activate local facility solver to solve MSWell subproblem individually
13: do
14: fix the variables in the Flow subproblem xn+1F
15: construct the Residual and Jacobian for MSWell subproblem
16: Rn+1w
(xn+1w
) = 0 and Jw
(xn+1w
)
17: solve the linear system
18: Jw
(xn+1w
)�xn+1w
= �Rn+1w
(xn+1w
)
19: update the MSWell subproblem variables xn+1w
20: while (kRFk > ✏F
)
21: iterate until the global convergence
22: while (kRFk > ✏F
, kRWk > ✏w
)
23: return xn+1F
, xn+1w
can be expressed as:
Aseg
c,i
= Vi
X
p
⇣(⇢
p
xc,p
↵p
)n+1 � (⇢p
xc,p
↵p
)n⌘
i
(3.10)
Then we can define the mass balance equation normalizer Nseg
c,i
to be the component total
mass at the current timestep:
Nseg
c,i
= Vi
X
p
(⇢p
xc,p
↵p
)n+1 (3.11)
However, we can disable the accumulation e↵ect in the MSWell model, which means that we
will not calculate the accumulation term Aseg
c,i
3.10. Therefore, we could not use the total
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 19
component mass at the current timestep to be the normalizer. Since we only consider the
mass convective flux term and the source/sink term through the wellbore, the mass convective
flux term is chosen to be the normalizer for mass balance equation.
Nseg
c,i
= �t
X
p
⇢p
xc,p
Qp
!
(i,j)
(j 2 nbr(i)) (3.12)
After the mass balance equation normalizer being calculated, the normalized mass balance
residual equation 3.13 can be obtained from the original mass balance equation 2.2 by dividing
the normalizer. The normalized residual equation will be used to check the convergence 3.16.
fig : upscaledp
roperties (3.13)
• Momentum Equation 2.5: The momentum equation consists of the pressure drop between
the connected segments and the pressure di↵erences caused by the hydrostatic e↵ect, the
friction e↵ect and the acceleration e↵ect. We choose the maximum of the pressures in two
connected segments to be the normalizer for momentum equation.
N conn
i
= max(psegi
, psegi+1) (3.14)
After the momentum equation normalizer is calculated, the normalized momentum residual
equation 3.15 can be obtained from the original momentum equation 2.5 by dividing the
normalizer. The normalized residual equation will be used to check the convergence 3.16.
R⇤conni
= Rconn
i
/N conn
i
(3.15)
After the normalized mass balance equation residual and momentum equation residual are cal-
culated, we can construct a normalized residual vector for MSWell problem by concatenating two
residual vectors.
R⇤W
=
"Rseg
w
Rconn
w
#(3.16)
Given the normalized MSWell residual vector, we can then check whether the norm of this vector
is smaller than the MSWell convergence tolerance ✏w
. Right now, we are using the infinity norm in
our implementation.
kR⇤W
kinf
< ✏w
(3.17)
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 20
3.5 CFL in MSWell
We use the same scheme in Reservoir block to calculate the CFL number within MSWell. In reservoir
flow simulation, stability criteria based on CFL are widely used([22],[8],[17]). Two types of CFL
number are considered in ADGPRS. The first type is the component-based CFL number 3.18:
CFLX,c
=�t
V �
Pp
⇢p
Qp
xc,pP
p
⇢p
Sp
xc,p
CFLX
= maxc
(CFLX,c
)
(3.18)
where: V � is the pore volume, (P
p
⇢p
Qp
xc,p
) is the total component mole flux, (P
p
⇢p
Sp
xc,p
) is
the total number of component moles.
Another type of CFL number is the phase-based CFL. The one-phase formula for phase-based
CFL number 3.19 is as follows. ADGPRS also implemented saturation CFL in two phase [4] and in
three phase [8]
CFLS
=Q
p
�t
V �(3.19)
Additionally, there are two kinds of phase fluxes Qp
for each segment, influx phase rate and
outflux phase rate. Influx phase rate is the sum of all the phase flow rates that goes from a neighbor
segment. Outflux phase rate is the sum of all the phase rates that goes from the current segment
into other segments. Therefore, our CFL calculation can based on influx phase rate or outflux phase
rate. [8] shows that the influx CFL is a more suitable choice for stability. ADGPRS also supports
to calculate the CFL number to be the maximum of influx based CFL and outflux CFL, which may
help to increase the stability.
In the implementation in ADGPRS, we follow four steps to calculate the CFL number for MSWell
subproblem. First, we will loop through all the connections in the MSWell well. For each connection,
we can determine the flow direction for each phase according to the phase velocity. This connection
will be assigned as the outflux connection for its upstream segment. At the same time, this connection
will be assigned as the influx connection for its downstream segment. After we determined influx and
outflux connection for each segment, we can calculate the influx phase volumetric rate and outflux
phase volumetric rate for each segment.
After we calculated the influx and outflux phase volumetric flow Qp
, we can then calculate
di↵erent CFL numbers. If the fluid is not black oil, we will calculate the component-based CFL
number for each segment. If we are using IMPES, AIM, FAIM or black oil model, we will also
calculate the phase-based model. Usually, we will choosemax(CFLX
, CFLs
) to be our CFL number.
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 21
3.6 Convergence Analysis for MSWell Model
This section discusses the convergence properties of the MSWell model. As has been discussed
previously, implicit method is applied to solve the coupled MSWell and reservoir flow problem. Due
to the unconditional stable properties of the implicit method, the stability criteria for CFL number is
not strictly constrained to be smaller than 1. However, the significant di↵erence for CFL number in
MSWell and reservoir flow may also challenge the nonlinear convergence. The typical CFL number
di↵erence can be as large as four orders of magnitude due to totally di↵erent fluid velocity and grid
size.
For each subproblem an appropriate initial guess and time step are needed to facilitate the
convergence. However, the optimal initial guess or the time step may be di↵erent for two subprob-
lems.Therefore, for a given time step, the convergence rate of two subproblems may be very di↵erent.
Since all the implicit methods proposed in this chapter solve a global implicit problem in a time step
and one time step is shared for both subproblem, it is very important to determine the dominant
nonlinearity of these two subproblems. Usually the convergence rates for MSWell subproblem and
reservoir flow subproblem are di↵erent.
In the first situation where the MSWell subproblem converges fast, the reservoir flow is the
dominant nonlinearity in this case. At each time step, the MSWell equation residual norm reduces
quickly and the bottleneck for the global convergence is the reservoir flow subproblem convergence.
The reservoir nonlinearity may be caused by the fractures and channels within the reservoir. In this
situation, the overall computational cost will barely a↵ected by the complexity of the MSWell model,
because the number of the overall Newton iteration is essentially determined by the complexity of the
reservoir. The increasing solving complexity mainly lies in the linear solver because of the larger and
more complicated Jacobian matrix. However, the MSWell subproblem usually consists of much less
equations than the reservoir, thus, the linear solver computational cost will not increase significantly
if the overall MSWell structure does not change fundamentally. As discussed above, we can expect
that for a reservoir nonlinearity dominant case, the computational cost for a standard well model
and a MSWell model should be comparable.
In the second situation where the reservoir flow subproblem converges fast, the MSWell sub-
problem becomes the dominant nonlinearity. The bottleneck of the global convergence turns to the
MSWell part. This situation usually happens when we have complex well network and complex well
group control. The reservoir is relative homogeneous on the contrary. A local facility solver can
incorporated into the implicit scheme to facilitate the convergence of the MSWell part.
As described in chapter 3.3, at the end of each Newton iteration for fully implicit method, a local
facility solver may be activated to solve the local MSWell problem. At the beginning of the next
global Newton iteration, the initial guess for the MSWell variables could be more accurate. In this
method, plenty of local Newton iteration will be performed to solve the local MSWell subproblem.
However, as we have discussed, the computational cost for solving a local MSWell subproblems
CHAPTER 3. COUPLING FRAMEWORK FOR MSWELL 22
relative small compared to the global Newton iteration and the majority of the simulation time is
spend on solving the global problem. Therefore, by providing more accurate initial guess for each
Newton iteration, the local facility solver can reduce the total number of the global Newton iteration
and thus increase the computational e�ciency for the coupled MSWell and reservoir flow problem.
Aside from the convergence, the simulation accuracy is another important aspect need to be
discussed. Generally, in order to solve a continuous partial di↵erential equation:
L(u)� f = 0 (3.20)
We need to use certain numerical methods (e.g. finite di↵erence method) to discretize the
continuous partial di↵erential equations into the discretized algebraic equations. The final results
are represented by the numerical solution of the algebraic equations.
L(u)� f = 0 + ✏T
(3.21)
Three major types of error will be introduced in this process. The first error is the machine-
precision error and the accumulation of the machine-precision error will turn into round o↵ error.
The last type of error is the truncation error, which is the error between the discretization form
and the continuous form. Here, the truncation error is our major focus and represented by ✏T
in
Equation 3.21.
The truncation error is usually a↵ected by the grid size and the time step. For MSWell model,
the grid size is defined by the segment structure which is separate from the reservoir grid block.
Thus we can flexibly modify the grid size for MSWell model to achieve a better accuracy. On the
contrary, the time step is shared by the reservoir equations and the MSWell equations, which is the
potentially di�culty to achieve the same level of accuracy for two subproblems with the same time
step. The governing equation 2.1 for MSWell is the parabolic partial di↵erential equation. Given
discretization form 2.2, the discretization error ✏T
is proportional to the time step.
As we have discussed above, the fluid velocity between MSWell subproblem and reservoir flow
problem may be significant di↵erent, which will lead to the significant di↵erence in the CFL numbers.
Typically,the well response is much sensitive than the reservoir flow, and a smaller time step may be
needed to achieve high accuracy for MSWell subproblem than reservoir flow subproblem. However,
a small time step on the other hand is computational ine�ciency for large scale reservoir part. The
numerical studies are in the later chapter.
Chapter 4
Numerical Results
4.1 Compositional Fluid case in MSWell
The first test case is a compositional case and it is used to investigate the convergence performance of
di↵erent coupling strategies. This case is a 2D reservoir with 51 * 51 * 1 grid. The fluid is two-phase
and three components C1, C3 and C10. The injection well (51 * 51) and production well (1 * 1) lies
on the opposite corners of the reservoir. The injection well is set as a standard well injecting 100%
C1. The production well is set as an MSWell and is only perforated at the cell (51,51,1). There are
53 segments and 52 connections in the production well. We consider the hydrostatic and the friction
e↵ect in the well segments. The well control for the injection well is the rate control with constant
gas injection rate 1e5m3/day, and the production well holds the constant BHP 5bar at the surface
exit segment. The model properties are shown in Table 4.1.
Table 4.1: Parameters for compositional fluid case in MSWell
Dimension (51,51,1)
Volume, m3 1000
porosity 0.35
Trans X, cP rm3/day bar 8.52702
Trans Y, cP rm3/day bar 8.52702
Depth, m 510
First, we compare the simulation results for three di↵erent coupling strategies, Fully implicit
(FIM), sequential fully implicit (SEQ) and local facility solver (FCT). The results of the oil pro-
duction rate and injector BHP are shown in figure 4.1. The simulation results show that all the
three coupling strategies generate very similar simulation results, which indicate the correctness of
the implementation of SEQ and local facility solver within GENIC framework in ADGPRS. It also
23
CHAPTER 4. NUMERICAL RESULTS 24
indicates that for a converged simulation result, all the three coupling strategies obtain the accuracy
at the same level in this case.
(a) Oil production rate (b) Gas injector BHP
Figure 4.1: Simulation results for three di↵erent coupling strategies
Next, we compare the Newton performance of three coupling strategies. Figure 4.2a illustrates
the total running time and the total Newton iterations for three coupling strategies. We can see that
the running time of the sequential fully implicit method (SEQ) is much larger than fully implicit
method and fully implicit method with facility solver. Correspondingly, the total Newton iteration
of SEQ is also much larger than the other two methods.
(a) Simulation Performance (b) Max CFL number averaged by timesteps
Figure 4.2: Simulation results for three di↵erent coupling strategies
For the comparison of the FIM and the FIM with facility solver, we can see that they generally
obtain the same results, both in running time and total Newton iterations. In this case, it seems
that the facility solver does not help to increase the total convergence rate. The reason is that the
CHAPTER 4. NUMERICAL RESULTS 25
reservoir is the dominant nonlinearity in this case. The averaged Newton iteration per time step is
2.05, and the overall convergence is very good. Therefore, we can see that when the convergence
bottleneck is the reservoir flow subproblem, the local facility solver would not contribute to the
acceleration of the convergence.
Figure 4.2b shows the CFL number for Reservoir flow and MSWell subproblem in a log scale. We
can observe that the CFL number of MSWell is significantly larger than reservoir flow CFL number,
which is consistent with our presumption above. However, CFL number of SEQ method is a little
bit larger than the other two methods. The reason could be that we do not need to solve the global
problem in SEQ method; therefore the maximum CFL could be larger in SEQ method.
4.2 Upscaled SPE10 Case
The second case is constructed based on numerical example in [31]. This case is designed to in-
vestigate di↵erent numerical properties of the current MSWell subproblem solving strategies. The
original SPE10 case is of dimension (60 * 220 * 85). In this case, the chopped SPE10 case with
dimension (48 * 208 * 80) has been chosen and upscaled by a factor of (4 * 4 * 4) to an upscaled
SPE10 case (12 * 52 * 20). The fluid of this is 2 phase 4 components. The basic properties of this
model are described in Table 4.2. The permeability map and the porosity map for this case are
shown in Figure 4.3
(a) Permeability Map for upscaled SPE10 (b) Porosity Map for upscaled SPE10
Figure 4.3: Properties for upscaled SPE10
Two injection wells and three production wells are defined in this case. Each injection well
is a vertical well with 12 perforations. Each production well has two branches of the horizontal
well, and each branch has 6 perforations. The perforation blocks are shown in Figure 4.4. The
detailed locations of wells are shown in Table 4.3. The injection wells are set as standard well, and
the production wells are set as MSWell in this case. For each production well, two branches will
converge into one pipeline up to the surface. Each Production well has 35 segments containing both
the horizontal part and the vertical part.
CHAPTER 4. NUMERICAL RESULTS 26
Table 4.2: Parameters for upscaled SPE10 case
Dimension 12 * 52 * 20Reservoir length X, m 292.6Reservoir length Y, m 634.0Reservoir length Z, m 48.8Number of Phase 2Components CO2, C1, C4, C10Initial molar fraction 0%, 5%, 25%, 70%
(a) Locations for well perforated blocks in the reser-voir (b) MSWell structure in the reservoir
Figure 4.4: Well structure for upscaled SPE10
Table 4.3: Detailed ordinates for Each Well
Well Name Branch Start(x,y,z), m End(x,y,z), m
Injector 1 1 (263, 212, 3672 ) (263, 212, 3697 )
Injector 2 1 (263, 424, 3672 ) (263, 424, 3697 )
Producer 1 1 (30, 128, 3697 ) (150, 128, 3697 )
Producer 1 2 (30, 188, 3697 ) (150, 188, 3697 )
Producer 2 1 (30, 286, 3697 ) (150, 286, 3697 )
Producer 2 2 (30, 346, 3697 ) (150, 346, 3697 )
Producer 3 1 (30, 444, 3697 ) (150, 444, 3697 )
Producer 3 2 (30, 504, 3697 ) (150, 504, 3697 )
4.2.1 Comparison with Standard Well
The first numerical example in upscaled SPE10 is to compare the Newton performance of MSWell
and Standard Well. In this example, we construct a counterpart case where all the production wells
CHAPTER 4. NUMERICAL RESULTS 27
are standard wells with the same perforations in Figure 4.4. Each injection well injects 100% CO2
with the constant BHP at 500 bar. The well control type for each producer is the constant oil
production rate at 1e4 (m3/day). We compared the simulation results and simulation statistics for
the standard well and the MSWell cases.
Table 4.4 shows the comparison between the MSWell and the Standard Well. We can see that
the running time and the total Newton iteration is basically the same for both situations, which
means that MSWell model itself is relatively computational e�ciency in this case and does not slow
down the overall convergence rate. The reason is that the dominant nonlinearity, in this case, is also
the reservoir flow and the MSWell equations converge much faster than the reservoir flow equations.
Therefore, the relative nonlinearity between reservoir flow and MSWell flow is an essential factor
that a↵ects the convergence properties of the coupled MSWell and reservoir flow problems.
In a complex heterogeneous reservoir scenario, such as a 3D reservoir with highly heterogeneous
permeability field, the nonlinearity would easily be dominated by the reservoir. Thus, FIM is
proved to be an acceptable coupling method, because local facility solver will only help increase the
convergence of the MSWell equations which are not the bottleneck in this situation.
Table 4.4: Comparison between Standard Well and MSWell
Model Standard Well MSWellRunning time, s 1036 1108Total Newton 196 196Newton/timeStep 4.0 3.7Max CFL (reservoir) 0.42 0.49
4.2.2 Well control For MSWell
This numerical example is designed to test the robustness of di↵erent well control type for MSWell.
All the injection wells are standard well and with the constant injection BHP 500 bar at reference
depth 3672 m. We investigate the BHP control, oil rate control and gas rate control in this test. In
the BHP control case, the wellhead pressure at the surface for MSWell producer is set as 30 bar. In
the oil rate control type, the production oil rate for each production well is set as 1e4 (m3/day). In
the gas control type, the gas rate for producer1 and producer2 is set as 1e5 (m3/day) and the gas
rate for producer 3 is set as 5e4 (m3/day).
Figure 4.5 shows the gas injection rates for two injectors. We can see that the injection rates are
very similar in this case since the well control for the injection wells is the same among all the cases.
Especially, we can see that the gas injection rates for oil rate control case in Standard Well and oil
rate control case in MSWell are basically the same, which again validate the correctness of MSWell
model. Figure 4.6a shows the oil production rate for producer 3 and Figure 4.6b plots the bhp data
for producer 3. The BHP of Standard well model is defined at the reference depth 3672m and the
CHAPTER 4. NUMERICAL RESULTS 28
BHP of MSWell is always defined at the surface exit segments; therefore, the BHP of Standard Well
is significantly larger than other cases. All the above cases demonstrate the correctness of MSWell
model implemented in AD-GPRS.
(a) Injector 1 gas injection rate (m3/day) (b) Injector 2 gas injection rate (m3/day)
Figure 4.5: Gas injection rate for injectors
(a) Producer 3 oil production rate (m3/day) (b) Producer 3 BHP (bar)
Figure 4.6: Production data for di↵erent well control types of producer 3
Figure 4.7a shows the simulation convergence statistics for di↵erent well control type. The
running time and the total Newton iterations for di↵erent well control type are comparable with
each other. The CFL numbers for both reservoir and MSWell part are also close to each other. The
robustness and the correctness of di↵erent well control type are proved in this test case. Especially,
it is shown that the MSWell is very computational e�ciency in a complex reservoir and would not
introduce extra computational di�culties compared with Standard Well.
CHAPTER 4. NUMERICAL RESULTS 29
(a) Simulation Performance (b) Max CFL number averaged by timesteps
Figure 4.7: Simulation results for di↵erent Well control type
4.2.3 Segments refinement for MSWell
In this section, we conduct grid refinement test on the MSWell model. The segments of the original
MSWell model is illustrated in Figure4.8. Segment 1 is the outlet segment to the surface and
segments 2 ! 19 represent the vertical part of MSWell. Segment 20 is the intersection segment.
Segment 21 and segment 28 connect horizontal branches with the intersection segment. Segments
22 ! 27 and 29 ! 34 are two horizontal branches.
Then we construct two finer MSWell model. In the case 2, we increased the number of segments
for the vertical part by 4 times (2 ! 73). The number of segments horizontal part expanded by 3
times (76 ! 93) and (95 ! 112). The resulting MSWell contains 112 segments in total. We also
construct case 3 with 8 times segments in the vertical part and 9 times segments in the horizontal
part. Case 3 consists of 256 total segments. Figure 4.9a and Figure 4.9b are brief illustrations of
the MSWell segments for case 2 and case 3.
In this example, all the three producers share the same perforation locations and the well control
as constant BHP at 30 bar for exit segment. The injection well still has the same BHP control as
above cases.
Figure 4.11 shows the oil production rate and gas production rate for producer 1. We can see
that the simulation results converge as we increase the number of segments, which again validates
the MSWell model. As shown in Figure 4.10 the gas injection rates for di↵erent cases are basically
the same, which means that the overall flow results stay the same when we have finer segments.
The Newton performances of the above examples are shown in 4.12a. All the three cases share
the same total Newton iterations and the running time is just a little bit longer for the 256 segments
case. It is clear that the nonlinearity in these cases is still dominated by the reservoir flow; thus the
increasing complexity in MSWell does not substantially decline the convergence rate.
CHAPTER 4. NUMERICAL RESULTS 30
Figure 4.8: 34 segments for each MSWell
(a) 112 segments for each MSWell (b) 256 segments for each MSWell
Figure 4.9: Illustration of the segments for refinement examples
(a) Injector 1 gas injection rate (m3/day) (b) Injector 2 gas injection rate (m3/day)
Figure 4.10: Gas injection rates for the injectors
The max CFL numbers for reservoir flow are the same for three cases, which is consistent with
the fact that the total Newton iterations stay the same. However, the max CFL number in MSWell
subproblem is about 3 times larger in case 2 (627.5) than the original case (224.2). The max CFL
CHAPTER 4. NUMERICAL RESULTS 31
(a) Producer 1 gas production rate (m3/day) (b) Producer 1 oil production rate (m3/day)
Figure 4.11: Production data for producer 1
number in case 3 (2017) is about 9 times larger than the original case (224.2). The perforated
horizontal part, in this case, can be shown to produce the largest CFL number in MSWell model.
These results are coherent with our MSWell structures, where the segment length in case 2 is 1/3
of the length in original case for the perforated horizontal part. In case 3, the segment length is 1/9
of the length in the original case.
It is shown the finer segments in MSWell will lead to better accuracy while the computational
cost stays the same when the reservoir flow the dominate nonlinearity.
(a) Simulation performance (b) Max CFL number averaged by timesteps
Figure 4.12: Simulation results for segments refinement examples
CHAPTER 4. NUMERICAL RESULTS 32
4.2.4 Well group control example
This numerical example is constructed to exam the well control for the MSWell model. The original
34 segments MSWell structure is chosen in this case. The well structure is shown in Figure 4.13. In
the original case, all the three producers will exit at the surface,while in the this well group example,
we connect these three exit segments in the surface and apply BHP control on the new exit segment.
Figure 4.13: MSWell structure for well group example
Figure 4.14 shows the injection rates of the injectors and Figure 4.15 shows the comparison of
the production data. We can see that the well group production rate is higher than all the three
individual cases. For injectors, the injection rate is a little bit higher than the base case.
(a) Injector 1 gas injection rate (m3/day) (b) Injector 2 gas injection rate (m3/day)
Figure 4.14: Gas injection rates for the injectors
Figure4.16a shows the simulation convergence statistics. It is shown that the running time and
the total Newton iterations are basically the same between the base case and the well group case,
CHAPTER 4. NUMERICAL RESULTS 33
(a) Comparison for gas production rate (m3/day) (b) Comparison for oil production rate (m3/day)
Figure 4.15: Comparison of the Production data
which means that the well group control is also very computational e�cient in this case and does
not increase the overall computational cost. CFL numbers are shown in Figure4.16b. The reservoir
CFL number stays the same, which is consistent with the fact that the time step is similar in two
cases. However, the MSWell CFL number in well group model is smaller than the base case, which
reflects that the pipeline fluid maximum velocity should be smaller in the well group control case.
The production rate shown in figure4.15 demonstrate the same results. The well group production
is higher than all the individual producers, while it is significantly smaller than the sum of the
production rates in the individual producers. Thus, the fluid velocity in the group control MSWell
should be significantly smaller than the maximum fluid velocity in the individual wells. This example
has proved the computational e�ciency of the well group control and the correctness of the results.
4.2.5 Time scale examples
In the previous section, it is shown that the segment refinement does not significantly a↵ect the
computational cost and the result accuracy of MSWell as long as the reservoir flow is the dominant
nonlinearity, even though the CFL number of MSWell has changed substantially. In this section, we
want to investigate how time step a↵ects the overall computational cost and the simulation accuracy.
The original MSWell model with 34 segments is chosen for this example. The well control type is
the same as the previous section. The injection wells are set as constant BHP 500 bar, and the
producer wellhead pressure of the exit segment at the surface is set as 30 bar.
We construct several examples with di↵erent tuning parameters in Table 4.5. In the table, min�t
is the minimum timestep in the simulation. Target max �p is the target maximum pressure change
per timestep, Target max �Si
is the target maximum saturation change per timestep, Target max
CHAPTER 4. NUMERICAL RESULTS 34
(a) Simulation performance (b) Max CFL number averaged by timesteps
Figure 4.16: Simulation results for well group control
�xij
is the target concentration change per timestep. These four parameters are used to suggest
the appropriate timestep within the simulation.
Table 4.5: Tunning parameters for each examples
CaseName
min �t(Day)
Target max �p(bar)
Target max �Si
Target max �xij
OriginalCase
5e-3 30 0.35 0.1
Case 2 5e-4 30 0.35 0.025Case 3 2.5e-4 30 0.35 0.01
The simulation statistics are shown in Table 4.6. We have obtained di↵erent average time steps
according to the di↵erent sets of tuning parameters. It is also shown that as we reduce the time
steps, the averaged Newton steps per time step decrease, which is consistent with the fact that the
smaller time step will facilitate the nonlinear convergence within a time step.
Table 4.6: Simulation convergence statistics
CaseName
Totaltimesteps
Averaged�t (Day)
Newton/timesteps
Wasted Newton
OriginalCase
17 5.9e-3 7.7 0
Case 2 95 1.1e-3 2.7 0Case 3 196 5.1e-4 1.8 0
However, as shown in Figure 4.17a, the running time becomes larger with smaller time steps as
well as the total Newton iterations. Although smaller time step leads to less Newton iterations per
time step, the total computational cost is increased with smaller time steps.
CHAPTER 4. NUMERICAL RESULTS 35
(a) Simulation performance (b) Max CFL number averaged by timesteps
Figure 4.17: Simulation results for di↵erent averaged time steps
Figure 4.18, 4.19 and 4.20 shows the production results for three producers. We can see that the
production rates are quite di↵erent for three cases among all the production wells. Especially, the
simulation results converge when the time step becomes smaller and approaches 0. Some detailed
well responses can be captured with smaller time steps. Figure 4.21 shows the injection rates for
two injectors; the results are still quite di↵erent for di↵erent cases. We can also observe that the
results converge as the time step decreases.
(a) Producer 1 oil production rate (m3/day) (b) Producer 1 gas production rate (m3/day)
Figure 4.18: Production data for producer 1
From the results above, it is shown that the time step can significantly a↵ect the accuracy of
the well production and injection rates. The reason for that could the inappropriate time step
for MSWell subproblem. For the Fully implicit method, a larger time step will lead to a higher
discretization error. Under the current scheme, the time step is calculated only by considering
CHAPTER 4. NUMERICAL RESULTS 36
(a) Producer 2 oil production rate (m3/day) (b) Producer 2 gas production rate (m3/day)
Figure 4.19: Production data for producer 2
(a) Producer 3 oil production rate (m3/day) (b) Producer 3 gas production rate (m3/day)
Figure 4.20: Production data for producer 3
reservoir flow properties, as in Table 4.5. This time step is appropriate for the reservoir flow.
However, as shown in Figure 4.17b, averaged CFL number for MSWell problem is substantially
larger than CFL number for reservoir flow, which means that this time step may not be appropriate
for the MSWell subproblem. Thus, an appropriate time step for reservoir flow may lead to inaccurate
results for MSWell subproblems.
On the other hand, the fluid velocity within reservoir could be significantly smaller than the fluid
velocity within the pipeline, which means that a smaller time step is needed for MSWell subproblem
to capture the rapid change within the wellbore. A time scale mismatch problem is addressed for
the general implicit method here.
CHAPTER 4. NUMERICAL RESULTS 37
(a) Injector 1 gas injection rate (m3/day) (b) Injector 2 gas injection rate (m3/day)
Figure 4.21: Gas injection rate for injectors
4.2.6 Well group switch control and time scale example
In this previous numerical example, we have shown the e↵ect of the time step on the simulation
accuracy. In this example we aim to construct a more complex model to incorporate more factors,
including well control type switch and well group control into our model. Four stages of simulation
are conducted in this example and each stage has a di↵erent well control type. The details of the
well control switch are shown in Table 4.7
Table 4.7: Well Control for each stage
CaseName
Time(Day)
P1 Well control P2 Well control P3 Well control
Stage 1 0.25 BHP, 30(bar) BHP, 30(bar) BHP, 30(bar)Stage 2 0.25 Oil Rate, 1e4 (m3/day) Oil Rate, 9.5e3 (m3/day) Oil Rate, 5e3 (m3/day)Stage 3 0.25 Gas Rate, 1.5e5 (m3/day) Gas Rate, 1.5e5 (m3/day) Gas Rate, 8e4 (m3/day)Stage 4 0.25 BHP, 25(bar) BHP, 25(bar) BHP, 25(bar)
The tunning parameters for three cases and the averaged time steps are shown in Table 4.8
Table 4.8: Tunning parameters for each examples
CaseName
min �t(Day)
Target max�p (bar)
Target max�S
i
Target max�x
ij
Totaltimesteps
Averaged�t (Day)
Case 1 1e-2 30 0.35 0.3 35 5.7e-3Case 2 5e-3 30 0.35 0.1 61 3.3e-3Case 3 5e-4 30 0.35 0.025 156 1.3e-3
The simulation results for di↵erent time steps are shown in Figure 4.22, Figure 4.23 and Fig-
ure 4.24. It can be observed that smaller time step lead to more accurate results especially in the
CHAPTER 4. NUMERICAL RESULTS 38
well control switch period. However, when the production control type is constant and the flow
becomes more stable, the simulation error becomes smaller. These results reveal that when we have
complex facility structures and complex well control types, a smaller time step is needed to achieve
high accuracy.
(a) Producer 1 oil production rate (m3/day) (b) Producer 1 gas production rate (m3/day)
Figure 4.22: Production data for producer 1
(a) Producer 2 oil production rate (m3/day) (b) Producer 2 gas production rate (m3/day)
Figure 4.23: Production data for producer 2
The last example incorporates well group control in the previous example. The well group
control 4.13 structure is used in this example. The well control type for four stages are shown in
Table 4.9 and the tunning parameters are shown in Table 4.10. The production rates are shown in
Figure 4.25 and the BHP for producer is shown in Figure 4.26. The same results can be observed,
that a smaller time step is needed to achieve a more accurate results.
In summary, the above examples conduct detailed analysis about the time step e↵ect on the
CHAPTER 4. NUMERICAL RESULTS 39
(a) Producer 3 oil production rate (m3/day) (b) Producer 3 gas production rate (m3/day)
Figure 4.24: Production data for producer 3
Table 4.9: Well Control for each stage
CaseName
Time(Day)
well group control
Stage 1 0.25 BHP, 30(bar)Stage 2 0.25 Oil Rate, 1e4 (m3/day)Stage 3 0.25 Gas Rate, 1.5e5 (m3/day)Stage 4 0.25 BHP, 25(bar)
Table 4.10: Tunning parameters for each examples
CaseName
min �t(Day)
Target max�p (bar)
Target max�S
i
Target max�x
ij
Totaltimesteps
Averaged�t (Day)
Case 1 1e-2 30 0.35 0.3 29 6.9e-3Case 2 5e-3 30 0.35 0.1 47 4.3e-3Case 3 5e-4 30 0.35 0.025 146 1.4e-3Case 4 2.5e-4 30 0.35 0.01 268 7.5e-4
coupled MSWell and reservoir flow simulation. It is shown that Reducing time step may increase
the computational cost of coupled reservoir flow and MSWell problem because the overall Newton
iterations could be increased. However, the wellbore simulation can generate more accurate results
that could capture the sensitive wellbore flow response. In addition, the favorable implicit scheme
ensures the convergence of the MSWell problem when reservoir flow is the dominant nonlinearity.
Therefore, a mismatch of the time scale between MSWell problem and reservoir flow problem is
addressed that needs to be solved in the further research.
CHAPTER 4. NUMERICAL RESULTS 40
(a) Producer 1 oil production rate (m3/day) (b) Producer 1 gas production rate (m3/day)
Figure 4.25: Production data for well group producer
Figure 4.26: Well group control BHP, bar
Chapter 5
Conclusions Remarks
5.1 Conclusions
A detailed discussion of the convergence and the accuracy of coupled MSWell and reservoir flow
solving strategies has been conducted in this work. First, we illustrate the MSWell model imple-
mentation under the current GENIC framework in AD-GPRS. The MSWell governing equations that
characterize the MSWell subproblems have been introduced. We also introduced the corresponding
WellCellSubset and WellConnectionSubset data structure which are used to define variables within
MSWell model. The well defined MSWell subproblem and the corresponding subsets enable us to
implement di↵erent novel coupling strategies easily.
Three di↵erent implicit coupling strategies are introduced and supported in the current simulator
AD-GPRS. These strategies are fully implicit method (FIM), sequential fully implicit method (SEQ)
and fully implicit method with local facility solver. We also discussed two important factors that
may a↵ect the simulation results in detailed. The first factor is the normalization term which is
used to normalize the residual equation when checking the convergence of the MSWell subproblem.
Another factor is the CFL number is the well segment. We proposed a method to calculate the CFL
number with MSWell segments directly using unknowns interface connection fluid velocity. Both
component-based CFL number and the saturation-based CFL number are discussed in the section.
These MSWell CFL numbers serves as an essential component in the later discussion about the
convergence and the accuracy of the coupled MSWell and reservoir flow solving strategies.
Extensive numerical examples have been performed to validate the correctness di↵erent solving
strategies. A detailed analysis of the convergence and the accuracy of the the coupled MSWell
and reservoir flow solving strategies has been conducted based on the numerical examples. It is
shown that the direct sequential fully implicit method (SEQ) is the most computational expensive
due the significant higher total Newton iterations. The computational cost of the fully implicit
method (FIM) and the fully implicit method with local facility solver relies on the relative dominant
41
CHAPTER 5. CONCLUSIONS REMARKS 42
nonlinearity between MSWell and reservoir flow. Several examples including well control type, well
group control and segment refinement have been conducted to analysis the computational cost of
di↵erent situation. The results indicate that the MSWell complexity would not substantially a↵ect
the overall convergence performance as long as the reservoir flow stays the dominant nonlinearity.
The mismatch of the di↵erent time scale between MSWell subproblem and reservoir flow sub-
problem has been addressed. The corresponding simulation results demonstrate that a smaller time
step may increase the total computational cost by increasing the total Newton iterations, while the
simulation results will be significantly accurate. These results lead to a future interesting topic
about designing the novel nonlinear solver to achieve both high accuracy and low computation cost
for coupled MSWell and reservoir flow problem.
5.2 Future Work
A flexible coupling framework for MSWell subproblem and reservoir flow subproblem are described
in this work. Based on the analysis and the numerical examples in this work, several interesting
research topics can be conducted in the future:
• Validate the MSWell convergence properties for di↵erent nonlinear formulations(e.g. Natural
variable formulation and Molar variable formulation) and incorporate thermal equations in the
MSWell subproblem.
• Apply novel nonlinear solver on coupled MSWell and reservoir flow problem to enable di↵erent
time step coupling under fully implicit scheme.
• Apply complex MSWell modeling in the fracture heterogeneous reservoir based on the workflow
with the discretization toolkit.
Several interesting research can be conducted once the above topics are completed and a robust-
ness and accurate MSWell model is presented.
• Apply well optimization based on MSWell model. Several well characteristics can be defined
based on our MSWell model, such as the well shape, well branches, branch angle and well
group control. Once these well characteristics are defined, the optimization process can be
applied to determine the optimal well drilling and well operations for oil production.
• Apply MSWell model to di↵erent unconventional reservoirs, such as hydraulic fracturing in
the shale oil reservoir and geothermal reservoir.
Bibliography
[1] Schlumberger geoquest. Eclipse Technical Description, Multi-Segment Wells, 2005.
[2] Ivar Aavatsmark, Tor Barkve, Trond Mannseth, et al. Control-volume discretization methods
for 3d quadrilateral grids in inhomogeneous, anisotropic reservoirs. SPE Journal, 3(02):146–154,
1998.
[3] Khalid Aziz and Antonin Settari. Petroleum reservoir simulation. Applied Science Publ. Ltd.,
London, UK, 1979.
[4] Hui Cao. Development of techniques for general purpose simulators. PhD thesis, Stanford
University Stanford, CA, 2002.
[5] MCH Chien, ST Lee, WH Chen, et al. A new fully implicit compositional simulator. In SPE
Reservoir Simulation Symposium. Society of Petroleum Engineers, 1985.
[6] Keith H Coats et al. An equation of state compositional model. Society of Petroleum Engineers
Journal, 20(05):363–376, 1980.
[7] Keith H Coats et al. A note on impes and some impes-based simulation models. SPE Journal,
5(03):245–251, 2000.
[8] KH Coats et al. Impes stability: selection of stable timesteps. SPE Journal, 8(02):181–187,
2003.
[9] Romain De Loubens, Amir Riaz, and Hamdi A Tchelepi. Error analysis of an adaptive implicit
scheme for hyperbolic conservation laws. SIAM Journal on Scientific Computing, 31(4):2890–
2914, 2009.
[10] Michael G Edwards and Clive F Rogers. Finite volume discretization with imposed flux con-
tinuity for the general tensor pressure equation. Computational Geosciences, 2(4):259–290,
1998.
[11] LT Fussell, DD Fussell, et al. An iterative technique for compositional reservoir models. Society
of Petroleum Engineers Journal, 19(04):211–220, 1979.
43
BIBLIOGRAPHY 44
[12] JA Holmes, T Barkve, O Lund, et al. Application of a multisegment well model to simulate flow
in advanced wells. In European petroleum conference. Society of Petroleum Engineers, 1998.
[13] Patrick Jenny, Seong H Lee, and Hamdi A Tchelepi. Adaptive fully implicit multi-scale finite-
volume method for multi-phase flow and transport in heterogeneous porous media. Journal of
Computational Physics, 217(2):627–641, 2006.
[14] Yuanlin Jiang. Techniques for modeling complex reservoirs and advanced wells. PhD thesis,
Stanford University, 2008.
[15] J Maes, A Moncorge, and H Tchelepi. Thermal adaptive implicit method: Time step selection.
Journal of Petroleum Science and Engineering, 106:34–45, 2013.
[16] Arthur Moncorge, Hamdi A Tchelepi, et al. Stability criteria for thermal adaptive implicit
compositional flows. SPE Journal, 14(02):311–322, 2009.
[17] Arthur Moncorge, Hamdi A Tchelepi, et al. Stability criteria for thermal adaptive implicit
compositional flows. SPE Journal, 14(02):311–322, 2009.
[18] J.S. Nolen. Treatment of wells in reservoir simulation. Technical report, 1990.
[19] Donald W Peaceman et al. Interpretation of well-block pressures in numerical reservoir simula-
tion (includes associated paper 6988). Society of Petroleum Engineers Journal, 18(03):183–194,
1978.
[20] Ruslan Rin. Implicit Coupling Framework for Multi-physics Reservoir Simulation. PhD thesis,
Stanford University, 2017.
[21] Ruslan Rin, Pavel Tomin, Timur Garipov, Denis Voskov, and Hamdi Tchelepi. General im-
plicit coupling framework for multi-physics problems. In SPE Reservoir Simulation Conference.
Society of Petroleum Engineers, 2017.
[22] TF Russell et al. Stability analysis and switching criteria for adaptive implicit methods based on
the cfl condition. In SPE Symposium on Reservoir Simulation. Society of Petroleum Engineers,
1989.
[23] JW Sheldon, WT Cardwell Jr, et al. One-dimensional, incompressible, noncapillary, two-phase
fluid flow in a porous medium. 1959.
[24] Hua Shi, Jonathan Holmes, Luis Diaz, Louis J Durlofsky, Khalid Aziz, et al. Drift-flux param-
eters for three-phase steady-state flow in wellbores. SPE Journal, 10(02):130–137, 2005.
[25] Hua Shi, Jonathan A Holmes, Louis J Durlofsky, Khalid Aziz, Luis Diaz, Banu Alkaya, Gary
Oddie, et al. Drift-flux modeling of two-phase flow in wellbores. Spe Journal, 10(01):24–33,
2005.
BIBLIOGRAPHY 45
[26] HL Stone, AO Garder Jr, et al. Analysis of gas-cap or dissolved-gas drive reservoirs. Society of
Petroleum Engineers Journal, 1(02):92–104, 1961.
[27] GW Thomas, DH Thurnau, et al. Reservoir simulation using an adaptive implicit method.
Society of Petroleum Engineers Journal, 23(05):759–768, 1983.
[28] D Voskov, Y Zhou, and O Volkov. Technical description of ad-gprs. Energy Resources
Engineering, Stanford University, 2012.
[29] Larry C Young, Robert E Stephenson, et al. A generalized compositional approach for reservoir
simulation. Society of Petroleum Engineers Journal, 23(05):727–742, 1983.
[30] Rami Younis. Modern advances in software and solution algorithms for reservoir simulation.
Stanford University, 2011.
[31] Y Zhou. Parallel general-purpose reservoir simulation with coupled reservoir models and
multisegment wells. PhD thesis, PhD Thesis, Stanford University, 2012.
[32] Yifan Zhou. Multistage preconditioner for well groups and automatic di↵erentiation for next
generation GPRS. PhD thesis, Masters thesis, Stanford University, 2009.
[33] Yifan Zhou, Yuanlin Jiang, and Hamdi A Tchelepi. A scalable multistage linear solver for
reservoir models with multisegment wells. Computational Geosciences, 17(2):197–216, 2013.
[34] Novak Zuber and JAa Findlay. Average volumetric concentration in two-phase flow systems.
Journal of heat transfer, 87(4):453–468, 1965.