Está en la página 1de 169

A MIXED FINITE ELEMENT FRAMEWORK

FOR MODELING COUPLED FLUID FLOW


AND RESERVOIR GEOMECHANICS
A REPORT
SUBMITTED TO THE DEPARTMENT OF PETROLEUM
ENGINEERING
OF STANFORD UNIVERSITY
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE DEGREE OF
MASTER OF SCIENCE
By
Birendra Jha
June 2005
I certify that I have read this report and that in my opin-
ion it is fully adequate, in scope and in quality, as partial
fulllment of the degree of Master of Science in Petroleum
Engineering.
Ruben Juanes
(Principal advisor)
ii
Abstract
Reservoir geomechanics is concerned with the simultaneous study of uid ow and the
mechanical response of the reservoir. Quantication of the state of deformation and
stress in the reservoir is essential for the correct prediction of a number of processes,
such as recovery from compaction drive, waterooding, surface subsidence, seal in-
tegrity, hydrofracturing, sand production and well failure. The classical treatment of
deformation of the reservoir through the rock compressibility is far from adequate, and
the mechanical problem needs to be incorporated rigorously in the reservoir model.
Theoretical and practical diculties have prevented coupled geomechanical models
from being used routinely in oil and gas reservoir simulation studies. Some of these
challenges are the complex mechanical behavior of geomaterials, the strong coupling
between the mechanical and uid ow problems, and the fact that the reservoir mod-
els become very computationally intensive. As a result, the modeling of coupled ow
and geomechanics is relatively new to the oil industry.
In this report, we present a new approach for the simulation of coupled reservoir
geomechanics. The technical aspects that make our approach unique are:
1. The space and time discretization of the equations. The unknown variables are
the pressure, the uid velocity, and the rock displacements. We recognize that
these variables are of very dierent nature, and need to be discretized dier-
ently. We propose a mixed nite element space discretization, which is stable,
convergent, locally mass conservative, and employs a single computational grid.
To ensure stability and robustness, we perform an implicit time integration of
uid ow equations.
2. The strategies for the solution of the coupled system. We compare dierent so-
lution strategies, including the fully coupled approach, the usual (conditionally
iii
stable) iteratively coupled approach, and a new unconditionally stable sequen-
tial scheme.
3. The implementation in a reservoir simulator. Simulator has been developed
and implemented in an object oriented fashion (using Dipack libraries) with
modular design for further development and enhanced debugging capabilities.
We show several representative numerical simulations that illustrate the eective-
ness of the approach.
iv
Acknowledgments
I would like to express my deep sense of gratitude to Prof. Ruben Juanes, for his
invaluable support and guidance throughout the duration of this research work. I am
also highly indebted to Prof. Khalid Aziz for his constant encouragement by giving
his critical feedback and developing ideas on my work. I wish to thank our SUPRI-B
consortium (Reservoir Simulation Industrial Aliate Program at Stanford University)
for providing me with the opportunity and necessary funding to get involved with this
research project.
Special thanks goes to the faculties, colleagues and my friends at Department of
Petroleum Engineering who have provided me with interesting technical feedbacks
and also the inevitable human ingredient in realizing this work.
Birendra Jha
June 2005
Stanford University
v
Contents
Abstract iii
Acknowledgments v
Table of Contents vi
List of Tables xi
List of Figures xii
1 Introduction 1
1.1 Reservoir Geomechanics . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Compaction and Subsidence due to Fluid Withdrawal . . . . . . . . . 2
1.3 Traditional Viewpoints and Couplings . . . . . . . . . . . . . . . . . . 3
1.4 Current Challenges and Recent Work . . . . . . . . . . . . . . . . . . 6
1.5 Organization of the Report . . . . . . . . . . . . . . . . . . . . . . . . 7
2 The Physical and Mathematical Model 10
2.1 Governing Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.1 Fluid Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.2 Solid Deformation . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.2 Constitutive Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2.1 Fluid Component . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2.2 Solid Component . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 Characteristic Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.4 Porosity and Permeability Functions . . . . . . . . . . . . . . . . . . 20
vi
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3 Numerical Models Discretization 23
3.1 Motivation behind Mixed Finite Element Framework . . . . . . . . . 23
3.2 Spatial Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3 Temporal Discretization . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.4 Linearization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.5 Conditioning of Tangent Matrix . . . . . . . . . . . . . . . . . . . . . 34
3.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4 Coupling Strategies 37
4.1 Denition of Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.2 Levels of Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.3 Iteratively Coupled Methods . . . . . . . . . . . . . . . . . . . . . . . 43
4.4 Variants of Iterative Coupling . . . . . . . . . . . . . . . . . . . . . . 44
4.4.1 Drained Split . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.4.2 Undrained Split . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.5 Fully Coupled vs. Iteratively Coupled . . . . . . . . . . . . . . . . . . 47
4.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5 Implementation in Dipack 49
5.1 Brief Introduction on Dipack . . . . . . . . . . . . . . . . . . . . . . 49
5.2 Distinctive Features of the Simulator . . . . . . . . . . . . . . . . . . 50
5.2.1 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.2.2 Levels of Implicitness . . . . . . . . . . . . . . . . . . . . . . . 52
5.2.3 Levels of Coupling . . . . . . . . . . . . . . . . . . . . . . . . 53
5.2.4 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . 54
5.2.5 Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
5.2.6 Numbering of Unknowns . . . . . . . . . . . . . . . . . . . . . 57
5.2.7 Adaptive Time Stepping . . . . . . . . . . . . . . . . . . . . . 58
5.2.8 Variable Coecients . . . . . . . . . . . . . . . . . . . . . . . 63
5.2.9 Stress Computation . . . . . . . . . . . . . . . . . . . . . . . . 63
5.2.10 Linear Solver . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
vii
5.3 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6 Representative Numerical Simulations 66
6.1 Example 1: Single Phase Flow in quarter-to-ve-spot pattern . . . . . 67
6.1.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . 67
6.1.2 Eect of Gravity . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.1.2.1 Horizontal Case . . . . . . . . . . . . . . . . . . . . . 69
6.1.2.2 Vertical Case . . . . . . . . . . . . . . . . . . . . . . 72
6.1.2.3 Comparison between Horizontal and Vertical Cases . 72
6.1.2.4 Observations . . . . . . . . . . . . . . . . . . . . . . 75
6.1.3 Eect of Compressibility . . . . . . . . . . . . . . . . . . . . . 79
6.1.3.1 Observations . . . . . . . . . . . . . . . . . . . . . . 79
6.1.4 Choice on Level of Coupling . . . . . . . . . . . . . . . . . . . 82
6.1.4.1 Observations . . . . . . . . . . . . . . . . . . . . . . 82
6.2 Example 2: Uniaxial Compaction Test . . . . . . . . . . . . . . . . . 84
6.2.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . 85
6.2.2 Drained Test . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.2.3 Undrained Test . . . . . . . . . . . . . . . . . . . . . . . . . . 88
6.2.4 Comparison between Drained and Undrained Compaction . . 88
6.2.5 Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
6.3 Example 3: Comparison of Dierent Coupling Strategies . . . . . . . 90
6.3.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . 91
6.3.2 Heterogeneity . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.3.3 MandelCryer Eect . . . . . . . . . . . . . . . . . . . . . . . 95
6.3.4 Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.4 Example 4: Big Field Case . . . . . . . . . . . . . . . . . . . . . . . . 97
6.4.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . 97
6.4.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
6.4.3 Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.5 Example 5: Wellbore Failure Modeling . . . . . . . . . . . . . . . . . 103
6.5.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . 103
6.5.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
6.5.3 Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
viii
6.6 Example 6: Rened Grid Simulation . . . . . . . . . . . . . . . . . . 106
6.6.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . 106
6.6.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
6.6.3 Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.7 Example 7: Sensitivity on Poissons ratio and Biots coecient . . . . 114
6.7.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
6.7.2 Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
6.8 Example 8: Unstructured Grid . . . . . . . . . . . . . . . . . . . . . . 115
6.8.1 Model Description . . . . . . . . . . . . . . . . . . . . . . . . 115
6.8.2 Results and Observations . . . . . . . . . . . . . . . . . . . . . 118
6.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
7 Conclusions and Recommendations 119
7.1 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
7.2 Salient Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
7.3 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Bibliography 122
Appendix 126
A Plasticity Computations 127
A.1 Stress Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
A.2 Geomechanical Simulation . . . . . . . . . . . . . . . . . . . . . . . . 128
A.3 Return Map Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 129
A.4 Implicit Time Integration . . . . . . . . . . . . . . . . . . . . . . . . 131
B Finite Volume Framework 132
B.1 Mathematical Formulation . . . . . . . . . . . . . . . . . . . . . . . . 133
B.2 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . 135
B.3 Numerical Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . 136
B.4 Observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
ix
C Relevant Dipack Routines 138
C.1 Fully Coupled Simulator . . . . . . . . . . . . . . . . . . . . . . . . . 141
C.2 Iteratively Coupled Simulator . . . . . . . . . . . . . . . . . . . . . . 141
C.3 Important Class Denitions . . . . . . . . . . . . . . . . . . . . . . . 141
C.4 Important Functionalities . . . . . . . . . . . . . . . . . . . . . . . . 144
C.5 Code Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
C.5.1 Header and Source Files . . . . . . . . . . . . . . . . . . . . . 146
C.5.2 Input Data File . . . . . . . . . . . . . . . . . . . . . . . . . . 150
C.5.3 Output File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
x
List of Tables
5.1 Levels of implicitness in time domain . . . . . . . . . . . . . . . . . . 53
6.1 Example 1 - Input parameters for quarter-to-ve-spot pattern . . . . 68
6.2 Example 1 - Compressibility cases for quarter-to-ve-spot pattern . . 79
6.3 Example 2 - Input parameters for uniaxial compaction test . . . . . . 86
6.4 Example 3 - Input parameters for undrained split simulation . . . . . 92
6.5 Example 4 - Input parameters for Big Field simulation . . . . . . . . 99
6.6 Example 5 - Input parameters for Well Failure model . . . . . . . . . 104
6.7 Example 6 - Input parameters for Rened Grid simulation . . . . . . 107
6.8 Example 8 - Input parameters for Unstructured Grid eld simulation 117
xi
List of Figures
1.1 Modeling casing failure and shear stress around wellbore . . . . . . . 4
1.2 Steam Assisted Gravity Drainage . . . . . . . . . . . . . . . . . . . . 4
1.3 Vertical displacement in a SAGD reservoir . . . . . . . . . . . . . . . 5
1.4 Work ow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.1 Locations of the dierent unknowns (degrees of freedom) on triangles
and quadrilaterals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.2 Sketch of the interpolation functions on triangles . . . . . . . . . . . . 26
4.1 Drained Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.2 Undrained Split . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.1 Flow chart of iteratively coupled scheme of solution . . . . . . . . . . 54
5.2 Adaptive time stepping - capturing pressure transient . . . . . . . . . 59
5.3 Adaptive time stepping - capturing displacement transient . . . . . . 60
5.4 Adaptive Time Stepping - Linear Evolution of t in Accordance with
Transient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.5 Adaptive time stepping - logarithmic evolution of t in accordance with
transient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
6.1 Example 1 - Problem setting with boundary conditions . . . . . . . . 68
6.2 Example 1 - Deformed conguration in horizontal case . . . . . . . . 69
6.3 Example 1 - Displacement elds x component in horizontal case . . . 70
6.4 Example 1 - Displacement elds y component in horizontal case . . . 71
6.5 Example 1 - Deformed conguration under eect of gravity . . . . . . 72
6.6 Example 1 - Eect of gravity on displacement elds x component . . 73
xii
6.7 Example 1 - Eect of gravity on displacement elds y component . . 74
6.8 Example 1 - Pressure eld comparison for horizontal and vertical cases 75
6.9 Example 1 - Streamline eld comparison for horizontal and vertical cases 76
6.10 Example 1 - Eect of gravity on evolution of pressure at observation
node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
6.11 Example 1 - Comparison of displacement elds x component at obser-
vation node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
6.12 Example 1 - Comparison of displacement elds y component at obser-
vation node . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
6.13 Example 1 - Eect of compressibility on evolution of pressure in quarter-
to-ve-spot pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.14 Example 1 - Evolution of vertical displacement in quarter-to-ve-spot
pattern at observation node . . . . . . . . . . . . . . . . . . . . . . . 81
6.15 Example 1 - Comparison of evolution of pressure for drained and undrained
splits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
6.16 Example 1 - Comparison of evolution of vertical displacement for drained
and undrained splits . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
6.17 Example 2 - Uniaxial compaction test grid . . . . . . . . . . . . . . . 85
6.18 Example 2 - Pressure eld in drained compaction test . . . . . . . . . 86
6.19 Example 2 - Vertical displacement eld in drained compaction test . . 87
6.20 Example 2 - Pressure eld in undrained compaction test . . . . . . . 88
6.21 Example 2 - Vertical displacement eld in undrained compaction . . . 89
6.22 Example 2 - Comparison of evolution of pressure for drained and undrained
compaction tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
6.23 Example 3 - Undrained split simulation setting with observation node 91
6.24 Example 3 - Permeability eld . . . . . . . . . . . . . . . . . . . . . . 92
6.25 Example 3 - Pressure eld . . . . . . . . . . . . . . . . . . . . . . . . 93
6.26 Example 3 - Streamline eld . . . . . . . . . . . . . . . . . . . . . . . 94
6.27 Example 3 - Equivalent stress eld . . . . . . . . . . . . . . . . . . . 95
6.28 Example 3 - Mandel-Cryer Eect . . . . . . . . . . . . . . . . . . . . 96
6.29 Example 4 - Big Field problem setting with original undeformed grid 98
6.30 Example 4 - Big Fields permeability map . . . . . . . . . . . . . . . 98
xiii
6.31 Example 4 - Pressure eld . . . . . . . . . . . . . . . . . . . . . . . . 100
6.32 Example 4 - Streamline eld . . . . . . . . . . . . . . . . . . . . . . . 100
6.33 Example 4 - Equivalent stress eld . . . . . . . . . . . . . . . . . . . 101
6.34 Example 4 - Evolution of pressure at observation nodes . . . . . . . . 102
6.35 Example 4 - Cross-section plot of pressure and stress . . . . . . . . . 103
6.36 Example 5 - Well Failure models near-wellbore damage and stress
concentration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
6.37 Example 5 - Well Failure models pressure map . . . . . . . . . . . . 106
6.38 Example 6 - Rened Grid models permeability eld . . . . . . . . . . 107
6.39 Example 6 - Rened Grid models equivalent stress eld . . . . . . . 108
6.40 Example 6 - Rened Grid models horizontal displacement eld . . . 109
6.41 Example 6 - Rened Grid models vertical displacement eld . . . . . 110
6.42 Example 6 - Rened Grid models pressure eld . . . . . . . . . . . . 111
6.43 Example 6 - Rened Grid models streamline eld . . . . . . . . . . . 111
6.44 Example 6 - Rened Grid models displacement prole at x = 100m 112
6.45 Example 6 - Rened Grid models stress and pressure prole at x =
100m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
6.46 Example 6 - Stress space for the observation node in Rened Grid model113
6.47 Example 7 - Eect of and b . . . . . . . . . . . . . . . . . . . . . . 114
6.48 Example 8 - Unstructured grids problem setting . . . . . . . . . . . . 116
6.49 Example 8 - Unstructured Grid models simulated vertical displacement 118
7.1 Raviart-Thomas elements in two dimensions . . . . . . . . . . . . . . 121
A.1 Stress space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
A.2 Eclipse output - pressure map at end of simulation . . . . . . . . . . 130
A.3 Visualizing the state of stress for the entire eld in stress space . . . . 130
B.1 Finite volume grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
B.2 Pressure map from the nite volume simulator . . . . . . . . . . . . . 136
C.1 A sketch of simulator class, its base classes and internal objects. A solid
line indicates class derivation (is-arelationship), whereas dashed lines
represent a pointer/handle (has-a relationship). . . . . . . . . . . . 140
xiv
C.2 Class structure for iteratively coupled simulator. Relation between
solver classes and the pool of common relations in the simulator for
coupled uid ow and geomechanics is shown with solid arrows indi-
cating inheritance (is-a relationship) and dashed arrows indicating
pointers (has-a relationship). . . . . . . . . . . . . . . . . . . . . . 142
xv
Chapter 1
Introduction
1.1 Reservoir Geomechanics
Reservoir geomechanics plays an important role in hydrocarbon recovery (both pri-
mary and secondary recovery) and subsidence modeling due to uid withdrawal. Fluid
production or injection in a hydrocarbon reservoir results in decreasing or increasing
uid pressure and increasing or decreasing eective overburden load on reservoir rock.
The increase (or decrease) in eective overburden load will in turn compact (or di-
late) the reservoir rock and change the stress state in the reservoir. As the uid ows
through the porous media, its mechanical eect is witnessed in terms of high eec-
tive stress build-up in regions close and far from the sources or sinks (wells) in eld.
Such regions, also termed as stress-sensitive regions, respond to changes in eective
stress tensor in several ways depending upon the mechanical properties of medium
and its surrounding layers. Signicant permeability alterations associated with rock
compaction or dilation around the wellbore region is a well-known phenomenon in
oil and gas production from weak (soft or unconsolidated) reservoirs [12]. Reservoir
rock porosity and permeability decrease as a result of compaction which has adverse
eects on well productivity. On the favorable side, compaction drive in a reservoir
leads to higher pore pressure and enhancement in hydrocarbon recovery. It works on
much larger scale in the eld and is a natural way to maintain uid pressure in a
conned compressible formation.
Computational geomechanics is an active research eld being explored by many
1
CHAPTER 1. INTRODUCTION 2
researchers to predict simultaneous changes in reservoir pore volume and permeability
resulting from production and injection. Attempts have been made in the past to
simulate the whole process in coupled geomechanical simulator.
In the past decade, the oil industry has expressed the need for accounting of
geomechanical eects in their reservoir simulation studies [2]. In the current project
we address the issue of modeling the coupled ow and mechanics problem using a
mixed nite element approach and a fully implicit formulation to simultaneously
solve for ux, uid pressure and solid deformation. The results obtained so far are
quite encouraging from a number of viewpoints. The following chapters demonstrate
various steps taken in problem set-up and design, implementation and development
of the simulator and representative numerical simulations.
1.2 Compaction and Subsidence due to Fluid With-
drawal
Compaction of a geological formation resulting from pore pressure decline, and the ac-
companying subsidence can pose serious environmental problems. Pumping of ground
water is known to cause surface subsidence in Santa Clara and San Joaquin Valleys
(California), in areas of Mexico City, Houston-Galveston (Texas), Savannah (Georgia)
and Bangkok (Thailand) [10]. In a somewhat dierent context, production of oil and
gas can also lead to ground subsidence, in relatively shallow reservoirs. While this
poses environmental problems, formation compaction provides an important drive
for oil and gas production. There are cases such as Bolivar Coast elds in West-
ern Venezuela where 80% of the oil production had been due to compaction of the
reservoir rock. Measurement and prediction of surface subsidence is of interest for en-
vironmental reasons and also from the standpoint of reservoir production. Production
histories of elds exhibiting compaction-subsidence phenomena show that incremental
subsidence volumes are roughly equal to incremental uid withdrawals except during
the initial period, suggesting that compaction is the principal production mechanism.
Surface subsidence and compaction slightly dier in their connotation. Com-
paction refers to thickness reduction of a given formation whereas subsidence refers
to a decrease in elevation of the ground surface. Subsidence occurs over a much larger
CHAPTER 1. INTRODUCTION 3
area than the areal extent of the reservoir rock undergoing compaction. The dierence
between surface subsidence and compaction at any given point is determined by the
depth, mechanical properties of the overburden and the areal extent of the reservoir.
1.3 Traditional Viewpoints and Couplings
Traditionally, more emphasis has been given to solving the ow problem alone by
assuming a constant state of stress (total stress) in the system and by incorporating
a time-invariant rock compressibility term to account for the complete mechanical
response of the system. Conventional simulator neglects the interaction of a reservoir
with its overburden and sideburden and implicitly assumes equivalence of reservoir
conditions with laboratory conditions under which the rock compressibility was mea-
sured. This results in a crude oversimplication of the physics governing solid-uid
interactions. Solution to the coupled geomechanical problem, however, has started to
evolve from a research topic to an essential component of reservoir simulation, given
the enormous environmental and economic impact that the mechanical deformation
of the reservoir may have.
In recent years, solution to the coupled geomechanical problem has received in-
creasing attention for surface subsidence monitoring, well failure modeling (Figure 1.1)
and in enhanced oil recovery techniques such as steam assisted gravity drainage
(SAGD)
1
. Figure 1.2 conveys the basic idea in a SAGD recovery process. Figure 1.3
shows compaction in one such reservoir undergoing SAGD recovery scheme with a set
of injectors and producers completed horizontally in the eld.
In reality, rock mechanics or geomechanical eects are intimately coupled with
uid ow physics. Such coupling is a two-way coupling:
1. Fluid pressure variations aect the mechanical problem, because deformation is
driven by the eective stress (roughly speaking, the total stress minus the pore
pressure).
2. Deformation of the medium aects the ow problem in two ways:
1
This technique has been successfully tested in laterally extensive shallow reservoirs of Canada
containing heavy oils.
CHAPTER 1. INTRODUCTION 4
by Terralog Technologies
Figure 1.1: Modeling casing failure and shear stress around wellbore
by Schlumberger
Figure 1.2: Steam Assisted Gravity Drainage
CHAPTER 1. INTRODUCTION 5
Figure 1.3: Vertical displacement in a SAGD reservoir
(a) Flow properties coupling where uid pressure aects the solid conguration
and consequently porosity and permeability of the system
(b) Pore volume coupling where eective stress induces strains in the solid
skeleton resulting in pore volume alterations.
In a traditional reservoir simulator stress is assumed to be constant throughout the
simulation and all properties are understood as a function of pressure (and saturation
in case of multiphase ow). Rock compressibility, a scalar quantity, is used to account
for the complete tensorial response of the stress state and material stiness. In reality,
this rock compressibility term has been shown to be a function of the local conditions
and boundary conditions [9, 20] on the reservoir and is also inuenced by stress path
[33].
CHAPTER 1. INTRODUCTION 6
1.4 Current Challenges and Recent Work
Computational eciency, convergence of numerical solutions and merging of code for
two simulators (nite dierence uid ow and nite element stress simulators) are
three main challenges existing with analysis of coupled geomechanical physics. Em-
ploying the fully coupled model of reservoir simulation and geomechanics for full 3D
problems is generally considered impractical and unacceptable in reservoir manage-
ment exercises. Geomechanical model often constitute larger extensive grids beyond
the reservoir zone of interest.
Some of the recent work done in this direction take these factors in account and ad-
dress current challenges with varying degree of emphasis[42, 35]. In the doctoral work
of Jing Wan, stability analysis and development of a general stabilized nite element
formulation to remove possible oscillatory solutions in pressure for fully coupled and
iteratively coupled methods have been highlighted. Signicance of coupling present
in geomechanical processes has been duly addressed along with acknowledgement of
stress dependent variation in properties while implementing the geomechanical sim-
ulator. In Tao Shus work, which is focused on development of an ecient fully
coupled geomechanical simulator using nite dierence discretization schemes, im-
portant aspects involved in nding an optimal linear solver and implementing solver
parallelization has been discussed. An interesting discussion on iteratively coupled
geomechanical simulation is given in a paper by [13]. Also, very recently we have seen
another article by Prof. Settari in this area [41] where new approaches to iteratively
coupling the ow and mechanical subproblems have been identied. In this context,
works published by Terry Stone of Schlumberger is also noteworthy [37, 38] where
implementation of the fully coupled geomechanical module in a commercial simulator
and comparison of its performance with another industry standard stress simulator
has been presented.
In this report we propose an iterative method to make coupled simulations eco-
nomic and numerically feasible for practical eld applications. We present the for-
mulation and development of a single-phase fully coupled and iteratively coupled
geomechanical simulator. The implementation builds on the theory and discretiza-
tion introduced in the chapters immediately following the motivation which lays down
a framework for the solution of general problems in static and transient (dynamic)
CHAPTER 1. INTRODUCTION 7
Physical problem Mathematical model
Implementation Numerical method
Numerical experiments
Figure 1.4: Work ow
modes encountered in geomechanics. Schematically, report has been organized in the
order shown in Figure 1.4.
1.5 Organization of the Report
The report ows in a logical manner and has started with the motivational statements
on the signicance of solving a coupled reservoir geomechanical simulation. In later
chapters it describes the theoretical and algorithmic details of our approach. Govern-
ing equations and numerical discretization precede the implementation section. Then
we present a number of test cases run on this geomechanical simulator. The report
concludes with some remarks and recommendations for future work. Further details
of the implementation can be found in the appendices.
Chapter 2 describes the physical and mathematical models for coupled single-
phase ow and geomechanics. Fundamentals of continuum mechanics and the
governing equations are main ingredients of this chapter.
Chapter 3 describes the numerical model employed to discretize the governing
equations. We discuss the space and time discretization schemes adopted and
their role in ensuring stability and local mass conservation of the solution.
Chapter 4 describes the dierent schemes for coupling the ow and mechanical
components of the problem. We pay special attention to staggered or iterative
coupling methods for an ecient solution strategy. We also outline interesting
variants (drained and undrained splits) and features of such implementation
CHAPTER 1. INTRODUCTION 8
in context of this simulator. In doing so, it explains and prepares the stage
for one of the main achievements of this work, which is implementation of
an unconditionally stable iterative scheme, undrained split, to solve coupled
geomechanical problems.
Chapter 5 is focused on implementation of the numerical model discussed in
Chapter 3 in Dipack, a C++ environment suitable for the development of nite
element simulators. As anticipated, Chapter 4 plays a signicant role here as to
guide the implementation in such a way that various coupling strategies are fully
integrable and comparable in the simulator, while abstracting and separating
the unnecessary details of one module from another.
Chapter 6 presents results of various numerical test scenarios simulated us-
ing both fully coupled and iteratively coupled strategies. A variety of test
cases is presented to analyze the strengths and limitations of each approach.
Comparisons have also been performed within the implemented variants of the
iteratively coupled approach.
Chapter 7 concludes the report with few specic recommendations for future
work in this area, primarily aimed at further development of this prototype
simulator.
Appendix A describes a case of coupled geomechanical simulation performed
with the help of a commercial reservoir simulator with focus on investigating
plasticity computations and evolution of stress under various failure models. It
presents the logic behind justifying additional eorts needed for errorfree incor-
poration of nonlinear models of deformation within a geomechanical framework.
Appendix B describes the formulation and implementation of a single-phase
ow simulator using nite volume discretization. This work as done early on
while investigating the capabilities of a nite volume approach in implementing
a multiphase coupled geomechanical simulator. However, it was suspended in
favor of mixed nite element scheme on account of a few limitations encountered
at the time of its implementation in Dipack.
CHAPTER 1. INTRODUCTION 9
Appendix Cdiscusses some of the important library routines developed around
abstract classes for simulator development within Dipack. This also serves as
an additional short guide for understanding the simulator code.
Chapter 2
The Physical and Mathematical
Model
The mathematical models, or mathematical representation of the accepted physical
models, used to describe poromechanics borrows its foundation principles from the
basic problem dening uid-structure interaction. The governing equations for the
interaction of a uid phase with a deforming porous medium are formulated on the
basis of generalized Biots theory [7]. Flow of a uid around a structure gives rise to
forces and associated motion of the structure, which again inuences the uid ow.
The motion of the uid in porous rocks is described by Darcys law, whereas the
structural deformations might be governed by the equations of linear elasticity. In a
simplied setting, relevant to our case in geomechanics, we address a uid-structure
problem where we end up with a partial dierential equation (PDE) for the uid
ow and an ordinary dierential equation (ODE) for the motion of the structure.
This not only helps in reducing the mathematical and numerical complexity but also
exposes the details of software design in a way that plays a signicant role especially
when we decide to add further complexity and non-linearity in our programs. In the
sections that follow we describe constitutive relations and governing equations of our
mathematical models, which will form the backbone of our algorithm design and its
subsequent implementation in later chapters.
10
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 11
2.1 Governing Equations
For modeling purposes of the porous medium, we will adopt a continuum approach,
in which a representative elementary volume (REV) around any mathematical point
considered in the domain always contains both solid and uid phases, and classical
microscopic mass balance laws of continuum mechanics hold for each phase. The
derivations are consistent with those present in standard poromechanics text [15, 16]
and relies on following basic assumptions about the complexity of the domain:
1. Isotropic rock mechanical properties
2. Nonlinear elastic deformation under small strain
3. Instantaneous thermodynamic equilibrium for isothermal conditions
4. No diusion or dispersion in mass
By application of volume averaging techniques, we formulate a macroscopic mass
balance law suitable for describing the physics of the porous medium mixture. The
model resulting from nonlinear mass balance equation for uid subjected to Darcys
law and nonlinear equilibrium equation takes into account the eects of matrix and
uid compressibilities as proposed in generalized Biots theory.
2.1.1 Fluid Flow
The problem we are interested in solving is governed by physics of porous media ow,
most commonly formulated based on basic principle of uid mass conservation and
Darcys relationship. From the mass conservation equation or continuity relation of
a single-phase uid we have following equation,
m
t
+ (
f
v) = f (2.1)
m = (
f
J) (2.2a)
J = 1 +
vol
(2.2b)
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 12
In eqns. (2.1) to (2.2) m is the variation in uid mass content and
m
t
denotes rate
of change in this content with time. v is uid macroscopic velocity (volume averaged
values with respect to a stationary co-ordinate frame) and v denotes divergence
of this velocity over the REV to account for exchange of uid mass in and out of this
REV with adjacent volume elements. f is source term corresponding to wells in the
eld, positive for injectors and negative for producers.
In eqn. (2.2a)
f
denotes uid density, stands for eective reservoir porosity
(assumed to be homogeneous for the sake of derivations) and J is the Jacobian of
the transformation matrix given as J = detP if P = Grad x is deformation gradient
(given by the gradient of x with respect to reference conguration position vector
X). x is the present position vector of the material point at time t in current spatial
conguration after deformation has taken place.
In eqn. (2.2b) relationship of J is shown with the volumetric strain
vol
or volume
dilatation (also understood as ) as a result of deformation. Volumetric strain is
negative for compaction.
Fluid momentum balance equation is necessary to relate applied force (or pres-
sure gradient) to resulting momentum (or uid ux). Darcys law oers this viscous
resistance type linear expression for porous media as follows:
v =
k

(p
f
g) (2.3)
It states that the pressure forces (p) balance viscous forces in the pores (
v
k
) and
gravity (
f
g). Here k is the permeability tensor dened for the domain, and
f
are
dynamic uid viscosity and uid density (strong functions of pressure for compressible
uid) respectively, p is gradient vector of pore pressure in space and g is vector of
acceleration due to gravity. (p
f
g) is the net ow potential of the velocity v.
Form of mass balance dierential equation in a homogeneous reservoir with single-
phase ow becomes,
c
t

p
t
+ v = f (2.4)
where c
t
has been introduced as the total compressibility to account for volume
changes in accumulation term. It is a sum of uid compressibility (saturation weighted
in multiphase ow) and solid compressibility.
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 13
Eqn. (2.4) is the common form of the equation for traditional reservoir simulation
where stress is assumed to be constant and rock compressibility account for the entire
mechanical response of the system. In more general form, variation in mass (or volume
if density is assumed to be constant) can be written as,
1
M
_
1 +
b
2
M
K
o
_
(p p
o
) +
b
3K
o
tr =
m

f
(2.5)
where M is Biots modulus, b is Biots coecient (0 < b 1), K
o
is drained bulk
modulus of the composite system and p
o
is initial uid pressure. Superscript of zero
signies initial or reference conguration and has been assumed to correspond to zero
stress and pressure for subsequent derivations. tr denotes trace of stress tensor and
similar notation will be used for trace of strain.
Biot modulus M quanties the compressibility of uid and solid grains and is
obtained from microscopic properties of the system (uid and solid bulk moduli):
1
M
=

K
f
+
b
K
s
(2.6)
where K is undrained bulk modulus (a macroscopic quantity similar to K
o
), K
f
and K
s
are uid and solid microscopic moduli.
Biot coecient b is related to the bulk moduli of the solid skeleton K
s
by eqn. (2.7).
b = 1
K
o
K
s
(2.7)
b is a measure of grain compressibility. For soil it is close to 1, its maximum value,
and for rocks and concrete it is in the range of 0.4-0.6.
Eqn. (2.5) can also be written in terms of undrained bulk modulus K as follows,
1
M
_
K
K
o
_
p
t
+ b1
t
_
K
K
o
_

s
_
u
t
_
+ v = f (2.8)
Boundary conditions for the ow problem can be of either Dirichlet or Neumann
type:
p = p on
p
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 14
v n =
k

_
p
n

f
g
_
= v on
v
(2.9)
where
p
n
= p n (2.10)
In almost all the test cases described in subsequent chapters, the system boundaries
are considered to be impervious (no-ow-boundary), i.e.,
v n = 0 on
2.1.2 Solid Deformation
When uid ows through a porous medium there are three forces acting, per unit
volume, on the solid matrix: the solid weight, the buoyancy, and the drag or seepage
force [39, 44, 6]. These forces are automatically taken into account in our formulation
and expressed below in mathematical form.
The mechanical response of the coupled system is governed by overall momentum
balance equation as given below:
+ g = 0 (2.11)
Here, we note that mass force term corresponding to relative motion of solid and
uid phases have been ignored for small deformation, low frequency scenario prevailing
in most of the hydrocarbon reservoirs. Its retention is computationally undesirable
and its inuence is small. Also, here is the total density of the system (a macroscopic
quantity) computed using following relation:
=
f
+ (1 )
s
(2.12)
where
s
is solid density.
Now, we introduce eective stress, denoted by
eff
in mathematical represen-
tations and which is the actual force behind skeleton straining not the total stress
experienced by the solid grains.
eff
is dened such that it depends only on total
stress and pore pressure p as in eqn. (2.13).
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 15

eff
= bp1 (2.13)
and its relation with deformation or grain displacement is discussed in Section 2.
Boundary conditions linked to above equations are of two types: forced (Dirichlet
or essential) and natural (Neumann type) applying to displacement unknowns and
total stress:
u = u on
u
(prescribed displacement)
n = t on
t
(prescribed traction)
Stress and displacement boundary conditions are applied in various test cases some
of which will be discussed in Chapter 6. Pressure boundary conditions have been
applied in terms of xed well pressures in the eld at designated element centers.
2.2 Constitutive Models
Constitutive models provide the essential relationships between various macroscopic
and microscopic properties of a continuum and are necessary to complete the set of
equations governing the response of the matter under loading or perturbation of state.
They also determine the degree of nonlinearity we allow in our problem denition
which has a direct bearing on subsequent phases of solution development. As we
presented assumptions behind our governing equations, similarly we can mention the
important assumptions behind the constitutive models we are going to select for our
formulation:
1. The macroscopic constitutive theory assumes that at the micron-scale, the ma-
terial is homogeneous, and that as a result the strain eld is homogeneous and
stress is uniform in a region surrounding each point in the solid.
2. Laws of thermodynamics hold in our constitutive relations
3. These relations conform to the experimental observations
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 16
Any porous deposit can broadly be considered as a two-phase (solid and uids)
medium characterized by
1. a total stress
2. displacements of solid phase u
3. strain rate of solid phase
=
s
u (2.14)
as solid phase terms and uid phase terms are
1. uid phase pressure(s)
2. uid phase saturation(s)
2.2.1 Fluid Component
Constitutive relations for owing uids in porous media are usually given by density
relations (expressions relating phase density to phase pressure and temperature) and
are also termed as equations of state as they act on state variables.
c
f
=
1

f
p
(2.15)
When c
f
is held constant with respect to pressure we arrive at exponential relation
for density evolution as a function of pressure,

f
=
o
exp [c
f
(p p
o
)] (2.16)
2.2.2 Solid Component
Deformation of solid phase or skeleton depends on the eective stress which, as a
part of constitutive model, is linked to skeleton (solid grains and occluded porosity
1
)
strain and material specic property (may be a constant, depends on the behavior of
porous medium). Based on the compaction behavior measured in the laboratory and
1
unconnected pore spaces
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 17
observed in the eld, the constitutive model required for reservoir deformation could
vary from a simple linear-elastic model to a sophisticated elasto-plastic model. Here,
we consider an isothermal, linear poroelastic model, applicable to our system, with
following features,
1. The material is perfectly reversible (net work done on the solid subjected to a
closed cycle of strain is zero).
2. The stress at a point in the solid depends only on some appropriate measure
of strain at that point, and is independent of history or rate of loading.
3. The relationship between stress and strain is linear, stress is proportional to
strain and vice-versa.
4. Strains are small enough that the measure of innitesimal strain accurately
approximates the more rigorous nonlinear measures.
Hookes law, often used to mathematically represent the third assumption, is given
as
= C (2.17)
In more general circumstances, when we would like to track nonlinear deformations
(hardening, softening, creep etc.) the stress-strain relation is expressed as follows
= f (p, , stress history ) (2.18)
Stress and strain are tensor quantities but are usually written and implemented
as vector quantities in the engineering notation. Similarly, C, a four-rank tensor, is
transformed into a matrix D, Hookes proportionality coecient, under assumption
of isotropic conditions. D is usually computed from Youngs modulus E and Poissons
ratio . Since we have pointed out that it is the eective stress which characterizes
the deformation in the system, applying Hookes law over poroelastic continuum gives
us

eff
= D (2.19)
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 18
Stress and strain tensor can be expressed in terms of a volumetric component
and a deviatoric component. Volumetric and deviatoric split of strain tensor can be
expressed as in eqn. (2.20)
=
1
2

v
1 +e (2.20)
where e is deviatoric part of the strain tensor.
Strain is linked to grain displacement in such a way that the coupling between ow
and mechanical equations is only present in the volumetric component (no coupling
is present in deviatoric part). This relation is given in eqn. (2.21).
=
s
u =
1
2
_
grad u + grad
T
u
_
(2.21)
that is
=
_
u
x
1
2
_
u
x
+
u
y
_
sym
u
y
_
(2.22)
where
s
u denotes the symmetric part of the solid displacement gradient.
Volumetric strain is quantied as trace of the strain tensor,
v
= (
xx
+
yy
) =
trace () = tr and D can be expressed in terms of Youngs modulus E and Poissons
ratio ,
D =
E (1 )
(1 + ) (1 2)

1

1
0

1
1 0
0 0
12
2(1)

(2.23)
Following engineering notation
2
we can express stress and strain tensors as vectors.
In plane strain the stress and strain vectors are given as,
= (
xx
,
yy
,
xy
)
T
, = (
xx
,
yy
, 2
xy
)
T
We follow the sign convention of positive stresses in tension and positive pressure
in compression.
2
Engineering notation or an indicial notation helps to condense large mathematical expressions,
yet with a syntax that translates directly to program code.
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 19
In general, the tangent matrix C depends on the eective stress
eff
and on load-
ing direction but for simplied linear poroelasticity, isotropic conditions, is constant.
2.3 Characteristic Time
Analysis of characteristic times in a physical process of coupled phenomena is an
interesting topic in itself which can be utilized in designing and implementing the
simulation of such processes on computer [14]. This is of special signicance in a
coupled geomechanical and ow modeling as discussed below.
The relative time scales associated with consolidation and mechanical loading
should be appreciated while applying the time integration step. Mechanical defor-
mation involves a stationary vector equation as no time derivative is present in it.
Mechanical eects occur almost instantaneously, on the order of seconds or fractions
of seconds. However, uid ow is a long-term process: the dissipation associated
with consolidation takes place over hours, days or weeks. In practice, therefore, some
simulators do not attach any time frame with any of the mechanical sub-steps taken
in association with uid-ow steps in order to satisfy quasi-static equilibrium. When
compared to diusion eects, mechanical eects are treated as instantaneous and the
time dependency therein comes from varying total stress.
There are two characteristics times involved in simulating a uid-structure inter-
action problem. Expressions for these times are given below.
Fluid characteristic time
t
fluid
c
=
L
2
c
k
_
1
M
+
b
2
K
o
+
4
3
G
_
(2.24)
where L
c
is the characteristic length or dimension of the system, usually chosen
to be the smallest elements size to give conservative values, and G is the so-
called shear modulus of the material.
Mechanical characteristic time
t
mech
c
=
_
_

K +
4
3
G
_
L
c
(2.25)
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 20
where undrained bulk modulus is given by
K = K
o
+ b
2
M (2.26)
Actual diusion process within a system is governed by the ratio of diusivity
from mechanical and uid ow physics computed using above expressions. Relative
time scales may be estimated by considering the ratio of characteristic times for the
coupled and undrained processes. Assuming b = 1 we can write this ratio as follows,
t
f
c
t
m
c
=

M + K +
4G
3

L
c
(k/)
_
1
M
+
1
K +
4G
3
_
(2.27)
Again, G here is shear modulus. K
o
is drained bulk modulus and K is undrained
bulk modulus. Substituting common values in above equation results in a time ratio
of 10
8
L
c
for sandstone, 10
10
L
c
for limestone and 10
6
L
c
for clay.
Knowledge of characteristic time involved in a physical process can help us in
three ways:
1. guide us in choosing a suitable transient scale
2. guide us in choosing a suitable linear solver for individual processes
3. designing useful validation case studies for numerical experiments
In short, eciency of the code and its output can be optimized.
2.4 Porosity and Permeability Functions
Concept of True Porosity is presented in [33, 13] which also mentions its role in captur-
ing stress-sensitive character of the reservoir by incorporating stress dependent ow
properties in real-eld applications. Eqns. (2.28) and (2.29) gives a relation between
true porosity (based on a Lagrangian description with a deformable mesh congura-
tion) and reservoir porosity (based on a Eulerian description of the mesh conguration
which is xed in time) via volumetric strain present in the porous medium.

true
= 1 (1
0
) e
v
(2.28)
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 21

reservoir
=
0
+ (e

v
1) (2.29)
Permeability can be linked to porosity evolution in time using power law models
of the following form:
k
k
i
=
_

i
_
n
(2.30)
Here exponent n has been taken as 5.6 (experimentally veried for high-permeability
rocks [11]). In [11], interesting discussion is also given on computation of stress de-
pendent productivity index for real-eld scenarios.
2.5 Summary
Summarizing the complete discussion on mathematical model for coupled geomechan-
ical simulation we arrive at following set of equations (in integral form) to be subjected
to discretization techniques.
Fluid mass balance equation
_

c
t
p
t
d +
_

vd =
_

fd (2.31)
Darcys law
_

_
k

_
1
vd =
_

(p g) d (2.32)
Linear momentum balance equation
_

d+
_

gd = 0 (2.33)
Denitions, governing and constitutive equations together with appropriate bound-
ary conditions in the discretized system provide an equation set for which unique
CHAPTER 2. THE PHYSICAL AND MATHEMATICAL MODEL 22
solutions can be obtained for a large variety of coupled geomechanical problems. Pri-
mary unknowns of the system are v, p and u and their determination by numerical
nite element process is described in the next couple of chapters.
Chapter 3
Numerical Models Discretization
In Chapter 2 we described the mathematical model for coupled single-phase ow and
geomechanics. In this chapter we will develop numerical models that will enable us
to implement the mathematical model in a computer simulation code. This entails
a discussion on spatial and temporal discretization of the governing equations as the
rst step. Learning from our development using a nite volume approach (Appendix
B) we decided to study and investigate the mixed nite element space discretization
scheme for our prototypical coupled geomechanical simulator.
3.1 Motivation behind Mixed Finite Element Frame-
work
Main reason why one might not choose standard nite element techniques for dealing
with such problems is to avoid non-physical pressure oscillations. A more elaborate
reasoning can be given in terms of the invertibility of the matrix (pressure Schur
complement) encountered in solving ow problem for both velocity and pressure si-
multaneously.
The matrix system for a single-phase ow can be written as in eqn. (3.1).
_
A B
T
B C
_ _
v
p
_
=
_
f
g
_
(3.1)
23
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 24
where A and B
T
are integrals from Galerkin form of Darcys law linking velocity
unknowns to pressure unknowns. And B and C are Galerkin integrals from mass
balance or pressure equation. Diagonal block C is zero for incompressible uids and
system is indenite. Terms on right hand side are known sources/sinks of individual
equations and we solve for v and p vectors.
Individually, we can solve for velocity vector using the rst equation,
v = A
1
f A
1
B
T
p (3.2)
Substituting in the second equation and solving for the pressure unknowns gives,
BA
1
B
T
p = g BA
1
f (3.3)
Now, if the matrices come from a discretization where the velocity and the pressure
are approximated with the same type of elements, then the pressure Schur complement
BA
1
B
T
is singular and pressure oscillates [44] in the solution. Babuska-Brezzi,
or LBB, stability conditions address this very issue in the sense that they provide
guidelines for the approximation of the pressure and velocity unknowns in terms of
nite element shape functions. A mathematical convergence theory for mixed nite
element methods of the type discussed later in this chapter has been established using
the LBB conditions as key technical ingredient [30]. There is another reasoning given
behind the necessity of using mixed nite element especially when solving divergence-
free, (nearly) incompressible problems ( 0.5) which suer from the well-known
Mesh Locking phenomenon. In short,by using mixed elements we ensure that there
exist a unique solution to our problem depending continuously on the data. However,
there are other ways to satisfy/bypass the Babuska-Brezzi conditions such as penalty
method and the articial compressibility method [19, 44, 21].
Mixed elements for our ow problem, which resembles the Poissons equation,
satisfy the Babuska-Brezzi conditions with
W = H (div; ) (3.4)
= L
2
() (3.5)
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 25
where W and are suitable Hilbert spaces for v and p, respectively. In the case of
velocity spaces, we require continuity of the normal component of the velocity across
elements. One such popular element is the Raviart-Thomas element of order zero, in
which the x and y components of the velocity are linear functions on each element.
Pressure can be interpolated using a piecewise constant space.
Reiterating the fact that to simultaneously solve for uid velocity, uid pressure
and rock deformation over a single (structured/unstructured) grid under single-phase
compressible ow, variables of the ow sub-problem are spatially discretized using
mixed nite elements (Raviart-Thomas element of order zero) and appropriate shape
functions. Pressure is dened as a piecewise constant variable with local denition at
element centers and uid uxes are dened on the element faces (in three dimensional
elements) or element edges (in two dimensional elements, see Figure 3.2). This entails
use of special mapping and general numbering for the unknowns. Special mapping is
required because the isoparametric mapping does not preserve the continuity in the
normal direction and the mapped elements (from reference to global) do not reside in
H (div; ).
Variables in mechanical sub-problem are discretized using standard nite element
technique, which means displacements are nodal quantities with isoparametric map-
ping (basis function nodes are located at same place as geometric nodes having degree
of freedoms). Isoparametric mapping entails using same shape functions for interpo-
lating the unknown function over element and mapping the reference element to global
coordinates. In 2D each node is associated with two unknowns, that is, displacement
in x direction and displacement in y direction.
3.2 Spatial Discretization
Displacement of the solid skeleton, pore pressure and uid ux are taken as primary
unknowns of the model. Without going into details of the nite element method which
is described elsewhere [44], we can discretize the problem by introducing appropri-
ate shape functions for the pressure p, velocity v in mixed form and displacement u
variables in standard Galerkin nite element form. These three unknowns are inter-
polated using dierent interpolation functions, each suited to the individual needs of
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 26
Figure 3.1: Locations of the dierent unknowns (degrees of freedom) on triangles and
quadrilaterals
Figure 3.2: Sketch of the interpolation functions on triangles
the variables. The behavior of these interpolation functions is sketched in Figure 3.1.
The displacement interpolation function N
a
(x) attains a value of unity at node
a and zero at the remaining nodes. The velocity interpolation function
e
(x) is
designed to have a unit ux over edge e and zero uxes across remaining edges. Sim-
ilarly, for piecewise constant discontinuous pressure eld, the interpolation function

i
(x) takes a value of one over element i.
As can be seen from Figures 3.1 and 3.2, dierent variables are dened at dierent
locations as opposed to nite volume approach, where all the variables are basically
dened at volume center. This nite volume approach is not optimized in itself and
may lead to non-convergent solution. The mixed nite element approach is locally
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 27
mass conservative and capable of solving nearly incompressible uid ow problems.
There is a single computational grid discretizing the entire domain and it handles all
the variables at every time step for improved consistency.
The interpolation of each eld (velocity, pressure and displacement) is then given
by,
v =
nv

e=1

e
(x)V
e
(3.6)
p =
n
p

i=1

i
(x)P
i
(3.7)
u =
nu

a=1
N
a
(x)U
a
(3.8)
where V
e
, P
i
and U
a
are the individual degrees of freedom or unknowns. We note that
space of interpolation functions are dierent for velocity, pressure and displacement
unknowns.
Velocity approximation function v L
2
() H (div; ) (3.9a)
Velocity weighting function w L
2
() H (div; ) (3.9b)
where restricting the test functions w such that
w.n = 0 on
N
which also means w H
0,N
(div; )

N
denotes Neumann boundary (velocity or pressure gradient specied) and
D
denotes Dirichlet boundary. Similarly, for pressure and displacement we have,
Pressure approximation function p L
2
() (3.10a)
Pressure weighting function q L
2
() (3.10b)
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 28
Displacement approximation function u
_
H
1
()
_
2
(3.11a)
Displacement weighting function r
_
H
1
()
_
2
(3.11b)
Employing the Galerkin method, where the weighting functions are identical to
the trial functions, over the set of governing equations presented in Chapter 2 we
obtain following equations,
_

c
t
p
t
.qd +
_

vqd =
_

fqd, q L
2
() (3.12)
_

k
1

v wd
_

p wd =
_

D
pw nd, w H
0,N
(div; ) (3.13)
_

r. ( ) d +
_

r. (g)d = 0 (3.14a)
_

B
T
a
d
_

N
a
td
_

N
a
.gd = 0 (3.14b)
_

rs
N
a,s
d
_

N
a

rs
n
s
d
_

N
a
.gd = 0 (3.14c)
Eqn. (3.14c) is same equation as eqn. (3.14b) but written in indicial notation.
There, as per engineering notation, a sum over repeated indices is implied.
The discrete strain vector is expressed by
=
n

j=1
B
j
U
j
(3.15)
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 29
In eqn. (3.14b) and eqn. (3.15)
B
i
=

N
i,x
0
0 N
i,y
N
i,y
N
i,x

(3.16)
in plane stress and plane strain
1
.
At this point we remark on the characteristics of these equations as follows.
Fluid ow problem
Velocity is the primary unknown dened on edges and pressure unknowns
can be understood as Lagrange Multipliers (similar to v-p formulation [21])
Dirichlet boundary conditions (dening pressure values) become Neumann
boundary conditions. Element centered pressure values are extrapolated
to constant edge pressure values
Neumann boundary conditions (dening velocity or pressure gradient val-
ues) become Dirichlet boundary conditions
We assume that permeability (tensor) is non-zero here for its inverse to
be dened
Mechanical deformation problem
Nodal displacement are degree of freedom to be solved for.
This space discretization scheme results in a system of three discrete equations
corresponding to Darcys law, mass balance and linear momentum or force balance:
_

f
V
f

f
d +
_

j
c
t

i
dp
i
dt
d =
_

i
fd, i (1, n
e
) (3.17)
1
Plane stress and plane strain provides approximate model for analysis of specic body shapes
in 2D. Two-dimensional analysis for thin plate-like structures falls under plane stress and two-
dimensional analysis for bodies having the shape of a long prismatic cylinder, where loads are
uniformly distributed in the third dimension and act perpendicular to the cylinder, falls under plane
strain
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 30
_

k
1

f
V
f

f
d
_

i
P
i

i
d =
_

e
n pd, e (1, n
ed
)
(3.18)
n

b=1

B
T
a
DB
b
d U
b

N
a
td
_

N
a
gd = 0 i (1, n) (3.19)
Flow equations are part of the well-understood theory in reservoir simulation
community whereas geomechanical equations need some clarication at this stage.
In eqn. (3.19) for each a we have a vector equation with two components (in plane
stress/strain). The element matrix can be viewed as a block matrix with n
e
n
e
blocks
_
e
B
T
a
DB
b
d, a, b = 1, . . . , n
e
where n
e
is the number of nodes in the element.
The element vector can also be written in block form, with block number i taking the
form of the right-hand side in eqn. (3.19). A nice feature of this formulation is that
plane stress, plane strain, axisymmetric, and general three-dimensional problems can
straightforwardly be treated in a unied notation and implementation.
3.3 Temporal Discretization
In last section we presented the discrete form of the problem as a set of ODEs.
At this point, the only derivative appearing is that of time which require separate
discretization to convert the ODEs to a set of algebraic equations.
Time derivative of pressure is discretized in a central-dierence fashion common
in nite dierence scheme.
dp
dt

t
p
i
=
p
n+1
i
p
n
j
t
(3.20)
In eqn. (3.20) n denotes current level of time during simulation at which entire
degree of freedom vector is known and readily available for explicit use. n+1 denotes
next time level at which equations have to be solved for new degree of freedom vector.
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 31
Fully implicit scheme has been preferred over other possible options to solve the cou-
pled diusion-deformation problem to avoid time step constraints and inadmissibility
of displacement solutions under inelasticity (see Appendix A). However, to preserve
generality of the code, a parameter has been introduced in our discretization to
control the degree of implicitness granted to the solution scheme.
We will carry forward with our time discretization and present the residual and
tangent terms with coecient to solve for
_
v
n+
, p
n+
, u
n+
_
where
v
n+
= v
n+1
+ (1 ) v
n
(3.21)
and so on for pressure and displacements.
Time dependence in the coupled geomechanics arises from uid ow part or dif-
fusion of the pressure within the system. Problems in geomechanics may involve
time-dependent loadings, although the time scale is not suciently fast to require
inclusion of the acceleration term u
,tt
in the governing vector PDE (see Chapter 2).
That is, the term u
,tt
is much smaller in inuence than the inner stresses,
rs,s
, in the
body and therefore such problems are often referred to as quasi-static problems. This
feature of the mechanical model is encashed upon in implementation of the so-called
Iteratively Coupled Methods [33, 42] where a stationary elasticity problem is solved at
each time level and the boundary conditions may change from one time level to the
next.
Incorporating the time discrete form of the pressure derivative from eqn. (3.20)
we arrive at following residual equations.
Velocity or ux equation:
R
v
e
=
_

fl
g d +
_

e

e
p d
_

e
k
1
v d (3.22)
Pressure equation:
R
p
e
=
_

i
fd +
_

i
vd +
_

i
(
0
c)
t
pd +
_

i
(
o
b)
t

vol
d (3.23)
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 32
Displacement equation:
R
u
e
=

o
t

e
N
a
gd +
_

e
t
N
u
td
_

e
B
T
a
d

(3.24)
These equations are nonlinear as coecients depend on the value of degrees of free-
dom.
3.4 Linearization
After discretization of the variables, next step is linearization of the non-linear equa-
tions so as to apply Newtons iterative scheme over this linear system to solve for
change in variables at every time step. Our strategy here will be rst to look at
the general structure of the linearized system and its compatibility with the iterative
solver and then we will present and explain expressions specic to our development
which is subsequently inserted into the linear system.
The linear system is comprised of a tangent matrix S also called as Jacobian
matrix, a right hand side residual vector R and a vector of unknowns or degree of
freedom vector X. Denoting the tangent matrix components as S
ij
, residual vector
components as R
i
and unknown vector terms as P
j
we have following system to
submit to our non-linear solver:
S X = R (3.25)
where individual components of the tangent matrix is given as
S
(k)
ij
=
R
n+1,k
i
X
j
(3.26)
The linear system is solved at every time step using Newton

Ss iterative scheme.
The scheme applies correction vectors V, P and U to make the right hand side
term or residual vector zero. Jacobian or tangent matrix has an interesting block
structure e.g. S
pu
and S
up
are blocks present due to coupling between mechanical
deformation and mass balance equations. The complete tangent matrix can be made
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 33
symmetric positive denite under linear elasticity or small deformation paradigm.
Iterative solver involves the services of a linear solver which can be chosen from
a list of possible options (e.g. Conjugate Gradient, GMRES, BiConjugate Gradient
etc.) albeit restricted by the symmetry and positive deniteness of the tangent matrix.
Since convergence of a non-linear solver depends on its linear solver in an iterative
scheme we certainly need to pay close attention to the details of the linear solver in
any simulation development exercise. Also, depending on the condition number of the
tangent matrix, we may need to apply the services of some suitable preconditioners
for faster convergence of the non-linear solver. We utilize the coupling inherent in the
linear system to help us divide the problem in blocks or modules which are addressed
relatively independently from each other before being assembled for solution.
Expanding the linear system, that is, tangent matrix and residual vector is nec-
essary to explain the reasoning behind our approach and to appreciate its benets in
capturing the embedded physics of coupled processes in a geomechanical simulation.
Linearized matrix-vector system submitted to solver can be expressed in following
manner (eqn. (3.27)),

S
vv
S
vp
0
S
pv
S
pp
S
pu
0 S
up
S
uu

(k)

V
n+1
P
n+1
U
n+1

(k)
=

R
v
R
p
R
u

(k)
(3.27)
One obvious aspect of Jacobian matrix is that it is block-structured in appearance
and it exhibits the coupling between dierent physical processes in terms of separate
blocks e.g. S
pu
and S
up
captures the coupling between uid mass balance equation
and Darcy s law. Consequently each block can be computed separately and almost
independently in its own integrand function before being assembled into one big ma-
trix at element level and later at global level. Block-structure matrices not only ease
the storage requirements, they provide an essential ordering structure to the degree
of freedom vector which should not be compromised even if it means that a block ma-
trix can not be subjected to Gaussian Elimination procedure for code testing purposes
[23].
Now let us look at the expressions for block terms of tangent matrix for an arbi-
trary element in our grid. We suggest the reader to refer to eqns. (3.22) to (3.24) for
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 34
derivation of the terms given in eqns. (3.28) to (3.34).
Velocity or ux equation:
S
vv
e
=
_

e
k
1

l
d (3.28)
S
vp
e
=
_

e

e

j
d (3.29)
Pressure equation:
S
pv
e
=
_

i

l
d (3.30)
S
pp
e
=
1
t
_

i
(
0
c)
j
d (3.31)
S
pu
ib
=
1
t
_

0
bN
T
b
d (3.32)
Displacement equation:
S
up
aj
=
1
t
_

e
N
a

o
b
j
d (3.33)
S
uu
ab
=

o
t
_

e
B
T
a
CB
b
d (3.34)
At convergence the solution vector is updated by the vector of change in variables
i.e. x or X and the loop continues till it reaches the end of simulation time.
3.5 Conditioning of Tangent Matrix
As can be observed from eqn. (3.1), the structure of the tangent matrix for ow equa-
tions (mass balance and Darcys law) is such that it has rst diagonal block with
permeability and viscosity appearing as coecient and second diagonal block with
total compressibility appearing as coecient. When we solve real eld cases over
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 35
the geomechanical simulator (fully coupled or iteratively coupled) and assemble this
matrix for our linear system, it turns out to be highly ill-conditioned because the diag-
onal terms dier in large orders of magnitude. In SI unit system, block corresponding
to Darcys law is of the order of 10
12
and block corresponding to accumulation term
from mass balance equation is of the order of 10
10
, whereas o-diagonals are usually
of the order of 10
3
leading to very high condition number of the matrix and an
ill-posed problem for the linear solver.
To address this problem we compute a multiplication factor t
c
for the mass balance
equation (incorporating Darcys law into it) shown in eqn. (3.35)
c
t
p
t
D
+
_

/
t
c
(p g)
_
= f t
c
(3.35)
where
p
t
=
1
tc
p
t
D
This factor t
c
which can be computed (eqn. (3.36)) such that both accumulation
term and the permeability term are similar in order of magnitude to improve matrix
conditioning as well as to simplify specifying simulation time in data deck. The unit
of time can now be in days even if rest all input parameters are in SI units (in SI unit,
if we do not scale our problem, we need to take time in seconds which is cumbersome
for practical eld simulations).
t
c
=
_
t
kc
t
(3.36)
where t is the time step in simulator in original SI units. If we take t = 86400
seconds which is 1 day we obtain t
c
10
10
as our scaling factor.
3.6 Summary
Mixed nite element discretization scheme was applied for uid pressure and uxes to
address issues of stability and local mass conservation in space. Implicit integration
was inarguably the method of choice for time discretization to avoid the time step
constraints
2
. In the next chapter on coupling strategies, we have investigated fully
2
Also, to ensure admissibility of the deformation in plastic domain implicit time integration is
mandatory as highlighted in Appendix A.
CHAPTER 3. NUMERICAL MODELS DISCRETIZATION 36
coupled as well as iteratively coupled solution schemes, considering the substantial
impact it can have on the cost and eciency of the simulator.
Chapter 4
Coupling Strategies
In the last chapter we applied discretization techniques over our mathematical model
and came up with the matrix-vector system to solve for primary unknowns of the
system. The next logical step is implementing this numerical model into a reservoir
simulator code to test and validate its applicability and analyze the results obtained
subsequently. However, as we have pointed out in the introductory sections, the two
processes of uid ow and mechanical deformation in the reservoir are governed by
separate physical phenomena which are coupled to each other over the domain [25]
and the degree of coupling depends on the particular scenario or case, thus necessi-
tating judgmental input from the model user. Therefore, it becomes of paramount
importance to us to address the issue of coupling, as applied to simulator development,
with its possible impact on numerical eciency of the code. In this chapter we will
expand our discussion on various types of coupling, their subtleties and dierentiating
nature and their role in designing the ow chart and algorithm for simulator develop-
ment. We will end the chapter with a clear understanding of our approach selected to
represent this important aspect and it will lead us straight into the implementation
phase of this research.
4.1 Denition of Coupling
Many times the physical description of the problem-setting suces to convey the
meaning of a coupled problem. In this context we can refer to the denition of a
37
CHAPTER 4. COUPLING STRATEGIES 38
coupled problem and mixed formulation for their solution[43].
Coupled formulations are those applicable to multiple domains and depen-
dent variables which usually (but not always) describe dierent physical
phenomena and in which
neither domain can be solved separately from the other
neither set of dependent variables can be explicitly eliminated (at
PDE level).
Mixed formulation are those applicable to a single domain in which equa-
tions and boundary conditions describing the physical phenomenon and
used for the numerical solution contain a number of dependent variables
which could by reduced by elimination, still maintaining a soluble prob-
lem.
We should also note in conjunction with these denitions that a coupled prob-
lem can turn into an uncoupled problem under certain circumstances. For example,
steady state thermal stress (or poromechanical stress) are generally uncoupled as
the temperature (or pressure distribution) can be independently determined from
the deformation (and stress) elds. Same argument can be extended towards mixed
methods and we can state that in separate domains of a coupled problem both mixed
and irreducible (antonym of mixed) forms can occur.
4.2 Levels of Coupling
One of the pioneering works on summarizing the dierent levels of coupling in a
coupled geomechanical simulation is by [34, 17, 40] published recently. Here, we will
discuss those concepts briey and review their applicability in relation to our work.
Following the notation of [34] the linear system for single-phase geomechanical
simulation in Newton-Raphson method can be written as in eqn. (4.1).
_
K L
L
T
E
_
(k)
_
u
p
_
(k+1)
=
_
R
s
R
f
_
(k)
(4.1)
CHAPTER 4. COUPLING STRATEGIES 39
where K is the classical stiness matrix, E is the ow matrix, L is the coupling matrix
for ow unknowns in the force balance equations and L
T
is the coupling matrix due
to displacement unknowns within the ow equations. Complete matrix is evaluated
at current time level k to solve for u and p, that is, variations in displacement and
pressure unknowns respectively, which is evaluated at next time level k+1. Explicitly
these variations are given as u
k+1
= u
k+1
u
k
and p
k+1
= p
k+1
p
k
Occupying the right hand side, R
s
and R
f
are residual of solid force balance and
uid ow equations which are evaluated at current time level k. Coupling matrices
are transpose of each other but also opposite in sign. To provide symmetry to the
system we multiply the ow equation by -1 to obtain following system,
_
K L
L
T
E
_
(k)
_
u
p
_
(k+1)
=
_
R
s
R
f
_
(k)
(4.2)
Using the notation of [5], E = TD, where T is the symmetric transmissibility
matrix, D is the accumulation (block diagonal) matrix, and R
f
= Q Tp
k
is the
mass balance residual with Q denoting the vector of well (source/sinks as boundary
conditions) terms.
At this point we can make use of the system described in eqn. (4.2) to review
dierent types of coupling methods.
1. Decoupled
2. Explicitly Coupled
3. Iteratively Coupled
4. Fully Coupled
Decoupled: If we consider the ow part of problem separate from the mechanical
part and solve two linear systems, sequentially, instead of one system then it is
called a decoupled method. The only way ow part is aware of mechanical state
of the system is to incorporate new or updated porosity and/or permeability
into the ow equations. These ow properties are computed explicitly using
converged displacement values of last time step in mechanical domain. And the
CHAPTER 4. COUPLING STRATEGIES 40
only way mechanical part is aware of the existence of the ow in the reservoir
is via pressure loads applied on nodes of mechanical grid as boundary terms.
These nodal pressures are computed using the cell center pressures of the grid
used in ow part. Mathematically, when we consider only ow sub-problem we
are interested in solving eqn. (4.3),
(TD) p
k+1
= R
f
= QTp
k
(4.3)
under the assumption of constant stress. Similarly, when we assume pressures
do not change in momentum balance equation as part of the unknowns, we
successfully decouple this part to arrive at classical elasticity equations,
Ku
k+1
= R
s
Lp
k+1
(4.4)
Here pressure, known from the converged solution of ow system at last time
step is applied as external load. Decoupled methods attempt to simulate the
geomechanical behavior of the reservoir in two ways:
By allowing a variable rock compressibility in the ow equations (computed
using deformation analysis in mechanical part for specic and expected
containment type in the reservoir). This amounts to modifying D block
matrix in ow system and no explicit stress computation is necessary. How-
ever, we can compute zero-dimensional (scalar) average measures of stress
level from average pressures (assuming zero lateral strain) as in eqn. (4.6)
and incorporate it in our decoupled ow equation to improve the accuracy.
Modied ow system then appears as in eqn. (4.5).
(TD) p
k+1
= QTp
k
+L
T
u
avg
k+1
(4.5)

havg
= b
_
1 2
1
_
p
avg
(4.6)

havg
is average stress in horizontal direction.
Compute stresses based on the pressure solution of ow part for entire
CHAPTER 4. COUPLING STRATEGIES 41
simulation period. This amounts to almost no coupling or minimal cou-
pling (if we allow recomputation and updation of ow properties, that is,
porosity and permeability based on their relationships with eective stress,
at specied time steps).
Explicitly Coupled: This type of coupling is achieved by lagging the coupling
blocks one time step behind. As an example, if we have pressure values from
the last ow solution we advance the mechanical system using eqn. (4.7).
Ku
k+1
= R
s
Lp
k+1
(4.7)
And then we advance our ow sub-problem as given by eqn. (4.8), however L
T
here is not exactly implemented because the ow discretization (usually nite-
dierence) might not conform to mechanical discretization (nite-element). In-
stead, as mentioned in case of decoupled method above, porosity and perme-
ability are explicitly computed as functions of eective stress to preserve some
degree of coupling in transmissibility matrix and also accumulation matrix.
(TD) p
k+1
= QTp
k
+L
T
u
k
(4.8)
One such implementation of explicit coupling is in the 3D mixed nite element
black-oil reservoir simulator by Minko [29]. In that simulator, solid mechanics
code is provided by Sandia National Laboratory.
Iteratively Coupled: The iterative method proceeds by solving the sequence of
ow part and mechanical part a number of times, per time step to achieve
desired degree of convergence in solutions. In this way, it becomes a subset of
fully coupled method (discussed next) (which always converges, theoretically, by
simultaneous solve of complete system eqns. (4.2)) and a superset of explicitly
coupled scheme discussed in last item. Under iterative scheme the solution
approaches the problem according to eqns. (4.9),
(TD) p
k+1,+1
= QTp
k
+L
T
u
k+1,
(4.9a)
CHAPTER 4. COUPLING STRATEGIES 42
Ku
k+1,+1
= R
s
Lp
k+1,+1
(4.9b)
here refers to iteration number at new time step k + 1 and usually it is
choosed to minimize the computational cost. As can be noticed, mechanical
system uses the latest solution of pressure eld from p
k+1,+1
of ow system.
At convergence, p

= p
k+1
and u

= u
k+1
and the solution is identical to
fully coupled system. As pointed out under explicitly coupled scheme, coupling
block L
T
in eqn. (4.9a) is implemented by making porosity a function of pressure
and mean stress (or some suitable stress invariant such as I
1
) and by making
permeability/trasmissibility a function stress (explicitly T = T
k
or implicitly
T = T

)
Fully Coupled: This approach tackles the complete system (eqns. (4.2)) at once
in a Newtons iterative scheme and therefore is computationally expensive es-
pecially for larger grids. Fully coupled methods are most benecial if single
computational grid is employed to discretize both ow and mechanical parts.
Fully coupled system has unconditional convergence property for implicit time
integration and provides internal consistency in coding and analyzing the re-
sults.
When the sub-problems are discretized on dierent grids using dierent methods
then the individual simulators transfer their solutions, or functions thereof, to each
other in a black-box fashion. Porosity (and/or permeabilities) computed from stress
solutions are transferred to a ow-only simulator and stress simulator computes in
situ stress changes and rock displacements using the nodal loads from pressure. At
every time step iterations are performed between the uid ow simulator and the
geomechanical simulator to ensure accuracy of pore volume changes (and/or perme-
ability). One shortcoming pointed out with regard to this coupling approach is its
incapability to deal with negative compressibility scenarios when rock dilates during
shearing under excessive pressure drop [20].
CHAPTER 4. COUPLING STRATEGIES 43
4.3 Iteratively Coupled Methods
In last section we described dierent types and degree of coupling outlined in the liter-
ature. Benets and shortcomings of each one of them has also been briey reviewed.
At this point, we are ready to present and discuss the iteratively coupled method
proposed in this work. Although we have implemented and analyzed the results from
both fully coupled and iteratively coupled schemes, our objective remains to inves-
tigate and implement an iteratively coupled scheme which is stable, convergent and
computationally less expensive than the fully coupled approach. we will see next,
and in later chapters too, that it is the stability that is more dicult to ensure for an
iterative scheme than the economy of the computation.
Iteratively coupled schemes are characterized by dividing the complete problem
in subproblems and then solve each of the sub-problem sequentially while ensuring
full convergence of the solution at every time step. The iteratively coupled analysis
decomposes the coupled system of equations into two subsystems of equations that
correspond to the governing equations of the ow simulator and geomechanics model
through a data exchange interface. Our approach is based on a single discretized grid
for numerical solution of the sub-problems.
Mathematically, a staggered scheme or iteratively coupled scheme can be expressed
by modifying our linear system presented in Chapter 3, by making the contributions
from coupling blocks zero.

S
vv
S
vp
0
S
pv
S
pp
0
0 0 S
uu

(k)

V
n+1
P
n+1
U
n+1

(k)
=

R
v
R
p
R
u

(k)
(4.10)
This basically means to solve eqn. 4.11 and eqn. 4.12 sequentially. The order of
solving these two systems can have some impact on the eciency and convergence of
the code but some coupled problems, however, in our case the order did not produce
any large impact.
[S
uu
]
(k)
_
U
n+1
_
(k)
= {R
u
}
(k)
(4.11)
CHAPTER 4. COUPLING STRATEGIES 44
_
S
vv
S
vp
S
pv
S
pp
_
(k)
_
V
n+1
P
n+1
_
(k)
=
_
R
v
R
p
_
(k)
(4.12)
Now, under iteratively coupled schemes the traditional approach has been that of
drained split where pressure is frozen during the mechanical solve and solid congu-
ration is frozen during the ow part of the problem. Although this might appear the
immediate choice it is not the natural choice or the most stable choice. Undrained
split or the split in which uid mass content is frozen during the mechanical solve is
actually a scheme which is unconditionally stable in its implementation [18, 31, 43].
In next section we describe these two types of iteratively coupled method.
4.4 Variants of Iterative Coupling
For every time step there are more than one outer iterations (each outer iteration
involves one solve of ow sub-problem and one solve of mechanical sub-problem). Sub-
problems solve themselves using Newton

Ss iteration whereas outer iteration works


to emulate Gauss-Seidel sequence under operator splitting scheme (splitting means
mixed nite element form of ow problem is separately solved from the standard nite
element form of mechanical problem). The split can be realized in two dierent ways
when concentrating on the solution of the mechanical part of the problem.
1. Drained Split
2. Undrained Split
4.4.1 Drained Split
As an immediate choice, we can decide to freeze the pore pressure during mechanical
solve and this choice is termed as Drained Split. Drained here means we allow the
uid to escape or drain out of the system as system deforms under the applied load.
The case can as well be illustrated in uid entering the system instead of leaving it.
During solution of the ow sub-problem we x solid conguration. The scheme can
graphically be represented by Figure 4.1.
CHAPTER 4. COUPLING STRATEGIES 45
fix P = P
(k)
U
(k)
, P
(k)
U
(k+1)
, P
(k)
U
(k+1)
, P
(k+1)
fix U = U
(k+1)
U
(k+1)
, P
(k+1)
fluid escapes
Figure 4.1: Drained Split
Now we look at the specic forms of the residual vector terms and tangent matrix
terms for drained split.
Velocity equation:
R
v
e
=
_

fl
gd +
_

e
.
e
pd
_

e
k
1
vd (4.13)
S
vv
e
=
_

e
k
1

l
d (4.14)
S
vp
e
=
_

e
.
e

j
d (4.15)
Pressure equation:
R
p
e
=
_

i
fd +
_

i
.vd +
_

i
_
1
M
_

t
pd +
_

i
(b)
t

v
d (4.16)
S
pv
e
=
_

i
.
l
d (4.17)
S
pp
e
=
1
t
_

i
_
1
M
_

j
d (4.18)
Displacement equation:
CHAPTER 4. COUPLING STRATEGIES 46
set m = 0
U
(k)
, P
(k)
U
(k+1)
, P
undrained U
(k+1)
, P
(k+1)
fix U = U
(k+1)
U
(k+1)
, P
(k+1)
fluid does not escape and P
undrained
is computed locally
Figure 4.2: Undrained Split
R
u
e
=
1
t

e
N
a
gd +
_

e
t
N
u
td
_

e
B
T
a
d

(4.19)
S
uu
ab
=
1
t
_

e
B
T
a
CB
b
d (4.20)
=
o
tr 1 + 2 b (p p
o
) 1 (4.21)
4.4.2 Undrained Split
The other option for iterative coupling is that of undrained split where uid mass
content is frozen instead of uid pressure, which means uid is not allowed to leave
or enter into the system when its conguration is changing under the applied load.
This has a direct consequence on the pressure which is allowed to vary during the
undrained split, in such a way that uid mass is preserved intact. Of course, during
the ow solve when solid conguration is xed, uid mass content varies as governed
by the mass balance equation. This is similar to adiabatic/isentropic split in thermo-
mechanical problems [36, 32]. Many authors and researchers have looked at this
particular scheme in the past e.g. [31, 3, 4, 43]. This scheme can graphically be
illustrated as in Figure 4.2.
It is a novel idea as it combines the staggeredness or sequential advancement of the
solution of the complete problem with the unconditional stability of the fully coupled-
fully implicit approach. However, the extra benet of unconditional stability (that is,
possibility of simulating by large time steps) comes at the cost of quasi-incompressible
behavior induced into the system because when deformation is being generated within
CHAPTER 4. COUPLING STRATEGIES 47
the system, at the time of mechanical phase, the uid mass content is xed (hence
called undrained) and this causes pressure build-up in the region. System stiness
is increased (as expected on account of preserving the mass and adding the extra
force on the soil skeleton to enforce no-ow condition over the entire system during
the deformation phase) leading to additional nonlinear iterations. In the next phase
when ow sub-problem is tackled, uid is allowed to ow in and out of the system
letting the excess pressure to dissipate.
Implementing undrained split results in modication of the tangent matrix and
residual vector in mechanical problem. Suciently accurate predictors are supplied
to the problem at every time step for pressure, displacement and uxes. Below we
look at the specic forms of the residual and Jacobian blocks from displacement
equation (pressure and velocity terms are same as given above for drained split) for
any arbitrary element:
Displacement equation:
R
u
e
=
1
t

e
N
a
gd +
_

e
t
N
u
td
_

e
B
T
a

d +
_

e
B
T
a
1bpd +
_

e
B
T
a
b
2
M11
t
d

(4.22)
S
uu
ab
=
1
t
_

e
B
T
a
_
C+ b
2
M11
t
_
B
b
d (4.23)
= tr 1 + 2 bM
_
m

f
o
_
1 (4.24)

= tr1 + 2 (4.25)
4.5 Fully Coupled vs. Iteratively Coupled
At convergence we expect same results from iteratively coupled (both drained and
undrained splits) and fully coupled approaches, at least theoretically, because itera-
tively coupled scheme is nothing but a modied Newtons scheme where the Jacobian
CHAPTER 4. COUPLING STRATEGIES 48
matrix is not in its exact form hence convergence is no longer quadratic. However,
iteratively coupled approach has numerical eciency and benet in terms of the size
of the linear system to be solved (iteratively coupled scheme entails solving of the
ow problem rst, which involves tightly coupled uxes and pressures, and subse-
quently solving for loosely coupled displacement eld in mechanical phase. This is in
contrast to fully coupled methods handling of a large system of uxes, pressure and
displacement simultaneously). It oers exibility and modularity to the code as the
two subproblems can be solved using two dierent linear solvers now depending on
the requirement of each subproblem.
Fully coupled method is most robust in a sense that it requires all the equations
being set up in one Jacobian matrix, therefore more consistent at every solve of
the system. The degree of coupling between the mechanical phase and ow phase
(which is determined by the reservoir types and its exploitation history) can guide
us which method to choose from iteratively coupled and fully coupled approaches
because poor choice can result in iteratively coupled scheme consuming unwarranted
nonlinear iterations to achieve convergence between the two subproblems and hence
failing its very purpose. Other issues pointed out with iteratively coupled methods
are with respect to stability and uniqueness of the solution, especially observed for
tightly coupled problems.
4.6 Summary
Geomechanical simulation involves dealing with physically coupled processes of uid
ow and solid deformation. Physical couplings have been subdivided as coupling
throughout the domain and coupling at an interface. Our case falls under the former
type of coupling. It requires an integrated treatment of coupled elds and concurrent
computation of response variables to honor the dynamic interactions between the
elds. In this chapter we have motivated the need to implement both fully coupled
and iteratively coupled schemes of solution and next chapter is precisely devoted to
address this need.
Chapter 5
Implementation in Dipack
In last three chapters we have described the mathematical model with its discretiza-
tion and we have also selected our choice of coupling strategy to solve the geomechan-
ical problem. In this Chapter we intend to provide the implementation details of the
simulator developed as part of this research. Our objective is to explain the funda-
mental as well as non-standard features of our implementation without resorting to
rigorous discourses on coding and debugging principles followed, which is elaborated
in Appendix C of this report.
5.1 Brief Introduction on Dipack
Dipack is a C++ programming environment suitable for simulator development in
an object-oriented framework using nite element, nite volume or nite dierence
schemes [28]. The development environment of Dipack provides access to a large
suite of data structures and routines which can be smoothly applied in application
codes written in C++ for building simulator based on numerical solution of PDEs.
It oers vast set of reusable libraries to code and control nite element discretization
schemes, grid and data structures and degree of freedom vector manipulations. The
software package is maintained and licensed by inuTech (Innovative Numerical Tech-
nologies), a German consulting company oering software and consulting services in
49
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 50
the mathematical and engineering area
1
.
5.2 Distinctive Features of the Simulator
We will focus on particular features of our implementation, some of which are standard
and worth discussion on account of their importance and some are non-standard
features which needs to be highlighted. In the following list of items, we will revisit
many of the concepts outlined and proposed in previous chapters such as those on
discretization and coupling strategies.
5.2.1 Discretization
Mixed nite element grid with hybrid discretization of ow variables is a non-standard
feature for a reservoir simulator. We can explain this feature in light of Raviart-
Thomas element of order zero that we have used in our discretization to approximate
H(div; ) spaces. Pressure and velocity are discontinuous across elements, however,
normal component of velocity vector is continuous across elements to ensure mass
conservation at local level. These elements are identied by following interpolation
functions:

e
=
_
a + dx
b + dy
_
(5.1)
The constants a, b, c and d are determined such that

e
n
f
=

1, if i = j;
0, if i = j.
(5.2)
where
e
are the basis functions and n
f
are the normal vectors associated with the
sides e and f, respectively. This provides a global denition of the element. There are
three basis function nodes and three geometric nodes which are located at dierent
positions in the element. For a RT
0
triangular elements we can derive the three basis
1
inuTech develops and markets the Dipack Product Line for numerical modeling and simulation
and works closely together with its partner Simula Research Laboratory with respect to Dipack
development.
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 51
functions by applying eqns. (5.1)-(5.2) to the reference element geometry. In (
1
,
2
)
co-ordinates,

1
(
1
,
2
) =
1
, (5.3a)

2
(
1
,
2
) =

2
1
, (5.3b)

3
(
1
,
2
) = 1
1
, (5.3c)

1
(
1
,
2
) = 1
2
, (5.4a)

2
(
1
,
2
) =

2
2
, (5.4b)

3
(
1
,
2
) =
2
. (5.4c)
are element basis functions in
1
and
2
directions, respectively.
Similarly, we have co-ordinates of basis function nodes as
q
1
= (1/2, 0) , (5.5a)
q
2
= (1/2, 1/2) , (5.5b)
q
3
= (0, 1/2) . (5.5c)
And the expression for interpolating vector velocity eld using these basis func-
tions in a RT
0
element is given by,
v =

e
V
e

e
v is the approximation of exact velocity vector, as we explained in Chapter 3 on
discretization using Galerkin methods.
Dipack not only provides element denitions for vector elements such as RT
0
(which is not the same as for vector elements composed of scalar components as in
case of displacement-only discretization in elasticity problems), it also provides the
necessary mapping between the reference element and the global element to ensure
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 52
eqn. (5.2) and continuity in normal direction. Dipack implements the following
mapping for velocity basis functions,
(x) =
1
det B
e
.
ref
_
M
1
e
(x)
_
(5.6)
based on the ane geometric mapping expression of
x = M
e
() = x
e
+B
e
.
This mapping is called special mapping as opposed to general isoparametric map-
ping used for displacement unknowns where the nodal degree of freedom is a vector
quantity and basis function is a scalar. This implementation is reected in evaluation
of basis function components and its derivative at a given basis function node, in a
given co-ordinate direction.
Another aspect of our discretization is that since we have more than one unknown
(displacement components) per node, we need to treat the interaction between the
displacement vector eld and the unknowns in the linear system carefully. The degree
of freedom vector is composed of velocity unknowns in x direction then pressure
unknowns and then displacement elds x and y component. Arrangement of the
variation vector in Newtons method for fully coupled approach is as follows,
x = {v
x1
, v
x2
, . . . , p
1
, p
2
, . . . , u
x1
, u
y1
, u
x2
, u
y2
, . . .}
T
In iteratively coupled approach as there are two linear systems corresponding
to ow subproblem and mechanical subproblem, we have two variation vectors, one
comprising of velocity and pressure and the other, only mechanical displacement.
Specics of the numbering followed in this arrangement is given later as one of features
of implementation.
5.2.2 Levels of Implicitness
This refers to the dierent levels of implicitness in time integration of our simulator
equations. We have mentioned in Section 3.3 about the role of parameter in our
discretized equations. Its sole purpose is to control the degree of implicitness in our
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 53
Table 5.1: Levels of implicitness in time domain
Method
0 Forward Euler; Explicit
0.5 Crank-Nicolson; Mid-point rule
1 Backward Euler; Fully Implicit
solution scheme. Table 5.1 gives the three major varieties of solution methods in time
domain based on -rule.
Since is a user supplied input in the data deck, it can be varied to observe its
inuence on the eciency and stability of the code.
5.2.3 Levels of Coupling
Chapter 4 described the dierent types of coupling strategies with regard to solving a
coupled geomechanical and ow problem. It also highlighted drained and undrained
splits as variants of our approach in implementing iteratively coupled scheme.
Fully coupled scheme is implemented in standard fashion and derives straight
from the developed system of equations in Chapter 3. What needs to be mentioned,
however, is utilization of blocky structure of the Jacobian matrix S for assembling the
linear system. We dene and prepare each block separately, almost independent from
each other. This is a classic example of data structure abstraction and inheritance
that Dipack is capable of providing for our implementation.
Regarding iteratively coupled methods, we implement them separately in a dier-
ent simulator than the one designed for fully coupled scheme. This allowed us rig-
orous testing and investigation of each simulator independently and also diminished
the amount of debugging code generated in each case. Iteratively coupled simulator
is implemented as shown in Figure 5.1.
Under iteratively coupled approach we divide the complete problem in two sepa-
rate parts and solve them sequentially while ensuring convergence of the nal solution
at every time step. As depicted below in Figure 5.1, for every time step few Gauss-
Seidel iterations are performed over the sub-problems to get a converged solution.
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 54
New time step
GaussSeidel iteration
Mechanics
Flow
Converged ?
No
Yes
Figure 5.1: Flow chart of iteratively coupled scheme of solution
5.2.4 Boundary Conditions
Boundary conditions in a nite element simulator are of two types, either natural
or essential conditions. The former type of conditions involve integrals along (part
of) the boundary, whereas essential conditions involve manipulation of linear systems
and specication of nodal values. Implementation of the boundary conditions requires
knowledge of two things:
1. the sides of an element that are subjected to a certain type of natural conditions,
and
2. the nodes in the mesh that are subjected to a particular type of essential con-
dition.
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 55
Boundary information in Dipack is represented by the concept of boundary in-
dicators. A set of q binary-valued binary indicators is introduced, their values being
on or o. These q boundary indicators are dened at all the nodes in the mesh, with
values that can vary among the nodes. For example, at one node, boundary indicators
1, 2, and q can be on, the others being o, whereas at another node, only indicators
1 and q 1 can be on. If boundary indicator i is on at a node, we say that the node
is marked with indicator i.
A boundary indicators is associated with a particular boundary condition. Below
we consider examples for Dirichlet and Neumann conditions:
Essential Condition : As an example, indicator 1 can be used to mark nodes sub-
jected to a homogeneous Dirichlet condition u = 0. At the point where this
boundary condition is being applied in Dipack implementation, we simply scan
all the nodes and check if a node is marked with boundary indicator 1, using a
boolean function available as member of grid object. If so, special actions are
taken to assign the essential condition at that node(s).
Natural Condition : To implement a natural condition we check if a side in an
element has a boundary indicator We dene a side in an element as marked
with a certain boundary indicator if all nodes on that sides are marked with the
particular indicator. Scanning is provided by a boolean function member of the
specic nite element.
When boundary indicators are not dened explicitly, Dipack make use of its
default indicators which are dened for each side of domain. However, for complicated
and hybridized boundary conditions we need to redene this set of default indicators
using the functionality provided by the grid object. We can also extend the boundary
indicators to cover larger domain (new nodes) and we can add dierent material
types (having dierent physical properties or constants) to generate and manipulate
the custom grid, all using the grid functionalities.
Traction-free boundaries appear as natural boundary conditions in the present
problem. Essential boundary conditions (v
i
and/or p and/or u
j
known at a node) are
incorporated in the matrix system by substituting the equation corresponding to the
actual degree of freedom by the boundary condition. While doing so, we attempt to
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 56
preserve the symmetry of matrix S. The surface integral over is implemented for
normal tractions only, however, is extensible to incorporate inclined traction vectors.
5.2.5 Initialization
Initialization is a necessary step in solving an initial-boundary value problem such
as diusion. An initial state on the eld concerned should be determined before
the transient process is analyzed. In our case we need to initialize the data elds
corresponding to pressure, velocity and displacement and by initialization here we
primarily mean setting values of unknown degrees of freedom at time zero, that is,
before starting the simulation. Pressure initialization is commonly performed by
following gravity-capillary equilibrium principles in most of the reservoir simulators.
This routine takes datum pressure and depth, inclination or tilt of the grid as input to
compute pressure in each element of the grid. Capillary eects are absent in single-
phase ow. Displacement eld is initialized from initial (total or eective) stress
eld supplied as part of the input data. This initial stress could be overburden or
lateral conning or both and is used in static analysis to determine initial strain and
displacement eld. Besides initialization at simulation time zero there is another
initialization required for Gauss-Seidel like schemes which are referred to as predictor
values in many literature. This can be computed as some kind of average of data
elds at last two time steps or some other ingenuous method can be applied for faster
convergence of Gauss-Seidel (outer iterations) loop [43, 26].
We have implemented functionality for setting initial condition as soon as the
time loop begins in the simulator. To provide generality to the code, initialization is
performed using eld variables instead of scalar values for every degree of freedom.
Input format of these eld variables is also exible, we can set the format to either a
function, a le or constant values. Function format grants highest degree of generality
by providing member functions evaluated at every spatial point of the grid. File
format allows input of the entire initial eld in terms of a Dipack readable le.
Constant values assign xed numeric values to initialize the eld, usually applied for
material constants.
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 57
5.2.6 Numbering of Unknowns
An important aspect of assembly of the linear system, following discretization, is
related to the numbering scheme used for various degrees of freedom. It can be
classied as either a general numbering scheme or a special numbering scheme. Mixed
nite element discretization results in a system of linear algebraic equations and the
book-keeping of element degrees of freedom with respect to linear system degrees of
freedom is non-trivial. In other words, we need to pay close attention to the numbering
system used to build vector of unknowns both on element level as well as on global
level. There are two numbering systems in use:
1. General Numbering
2. Special Numbering
General Numbering : Let us denote n as the number of nodes in the element and m
as number of unknown scalar elds (e.g. two components of displacement vector
eld in x and y, for a 2D analysis). Then the strategy for general numbering,
at the element level, is as follows:
u
1
1
, u
1
2
, . . . , u
1
n
, u
2
1
, . . . , u
2
n
, . . . u
m
1
, . . . , u
m
n
(5.7)
Here u denotes element degrees of freedom. Superscript and subscript refers to
eld number and node number respectively. This can be generalized for cases
where number of nodes vary from eld to eld e.g.
u
1
1
, u
1
2
, . . . , u
1
n
1
, u
2
1
, . . . , u
2
n
2
, . . . u
m
1
, . . . , u
m
nm
(5.8)
where we have n
j
degrees of freedom for eld number j. Now the global number-
ing based on this local numbering scheme is constructed from a simple algorithm
that results in a reasonable small bandwidth: for each element we run through
each local degree of freedom and increase the corresponding global number by
one, provided the local degree of freedom has not been given a global number
in a previously visited element.
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 58
Special Numbering : Special numbering follows the same rule or structure at ele-
ment level and global level. Assuming isoparametric mapping and denoting total
number of nodes by n and total number of unknowns by m we have following
strategy for numbering the degrees of freedom of linear system:
u
1
1
, u
2
1
, . . . , u
m
1
, u
1
2
, . . . , u
m
2
, . . . u
1
n
, . . . , u
m
n
(5.9)
where u
j
i
is the degree of freedom of scalar eld number j at node i. Given a
global node i and a scalar eld number j, the global degree of freedom number
is m(i 1) + j.
We use general numbering for velocity degrees of freedom and special numbering
for displacement degrees of freedom, which helps to optimize the Jacobian bandwidth
while preserving the block structure of our matrix.
5.2.7 Adaptive Time Stepping
In many physical problems it is of interest to follow a rapidly changing event (such as
a sudden drop in pressure due to opening of well) by a much slower one (such as post
opening deformation or consolidation analysis). Each of these require a dierent time
step length to produce economic computation. While such time steps can be entered
into the computation a priori (separate computation of characteristics times for uid
diusion and mechanical deformation, for each specic problem) it is desirable to
incorporate into the programs an automatic, self-adaptive, procedure which adjusts
the time step so as to achieve computational eciency without sacricing accuracy.
More work is now in progress in this important area but some possibilities and their
application have been already discussed and implemented (e.g. time stepping criterion
based on maximum change in average displacement or pressure per element). In this
work we have incorporated adaptive time stepping based on number of nonlinear
(Newton) iterations.
For following problems,
Problems with non-equilibrium initial conditions (e.g. initial stress boundary
conditions are not in equilibrium with initial displacement eld, pressure eld
and/or ow eld.)
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 59
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05
1
0.5
0
0.5
1
1.5
2
Time
O
b
s
e
r
v
a
t
i
o
n

N
o
d
e

P
r
e
s
s
u
r
e
Figure 5.2: Adaptive time stepping - capturing pressure transient
Highly sti problems, low uid compressibility, quasi-static mechanical problem
coupled to transient ow problem
Problems having small characteristic time
one perhaps needs to adapt the time marching scheme in such a way so that the
short duration transients are captured in the solution. Below is an illustration of
this exible time stepping where single stepping has been used in the beginning when
most of the transient is expected and based on the convergence status of the linear
solver, it is decided if time step need to be decreased or increased or single stepping
has to be stopped in favor of full solve if time step can not be cut below a minimum
threshold.
Dipack also has a simpler way of controlling the time step size during run-time
via a input string in the data deck for the time integration parameters. This string
can be made suciently complicated to apply variable time steps, though, it is not
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 60
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05
9
8
7
6
5
4
3
2
1
x 10
3
O
b
s
e
r
v
a
t
i
o
n

N
o
d
e

V
e
r
t
i
c
a
l

D
i
s
p
l
a
c
e
m
e
n
t
Time
Figure 5.3: Adaptive time stepping - capturing displacement transient
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 61
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Simulation Time t
T
i
m
e

S
t
e
p

C
o
m
p
u
t
e
d

(
d
t
)
Figure 5.4: Adaptive Time Stepping - Linear Evolution of t in Accordance with
Transient
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 62
0 0.05 0.1 0.15 0.2 0.25 0.3 0.35
10
5
10
4
10
3
10
2
10
1
10
0
Simulation Time t
T
i
m
e

S
t
e
p

C
o
m
p
u
t
e
d

(
d
t
)
Figure 5.5: Adaptive time stepping - logarithmic evolution of t in accordance with
transient
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 63
precisely an adaptive technique as such for obvious reasons.
5.2.8 Variable Coecients
Spatially varying or heterogeneous coecient (such as permeability, compressibility,
porosity, Youngs modulus, Poissons ratio etc.) are implemented in Dipack with
large amount of exibility with a range of formats and assignment possibilities such
as,
1. a constant
2. an explicit formula realized as functions or objects
3. piecewise constant eld over material subdomains
4. a nite element or nite dierence eld on le (compatible to Dipack)
We can also have vector coecients (useful in case of anisotropic quantities such
as permeability).
5.2.9 Stress Computation
Other feature of interest is computation of stresses (and dierent types of scalar
equivalent stress measures) from the displacement eld. Having computed the latter,
the stress tensor eld can be computed using Hookes law. Since the stresses are linear
combinations of the derivatives of the displacement components, the computed stress
tensor eld will be discontinuous over the element boundaries whereas we would like
to have a continuous stress led (until unless the elastic constant E and themselves
are discontinuous) so as to plot and analyze it. We have two possible choices, not
exactly supplementary though.
1. Smooth out the stress eld to remove undesired discontinuities and plot the
stress eld map. We use such maps to visualize the eect of high shear or
normal stress on the alterations in ow properties (e.g. permeability) in the
eld. Objective here remains to optimally smooth the discontinuities arising
from the nite element interpolation functions, but keep the discontinuities due
to layered media (having dierent elastic constant).
CHAPTER 5. IMPLEMENTATION IN DIFFPACK 64
2. Compute equivalent measures of stress levels and/or stress invariants from the
stress tensor. Plotting stress invariants (deviatoric vs. isotropic or hydrostatic)
in stress space (see Appendix A) helps in analyzing the critical failure status of
a material. Besides, such smooth scalar measures are easier to interpret than
tensor elds. We will look at one such measure of equivalent stress implemented
in our simulator and called von Mises stress. In terms of stress tensor this
equivalent stress m reads,
m=
_
3
2

rs

rs
(5.10)
where

rs
is the stress deviator given as,

rs

rs

1
3

kk

rs
(5.11)
5.2.10 Linear Solver
Iterative solver has its own class, functions, properties and routines as we will see
in Appendix C. Iterative coupling between ow sub-problem and mechanical sub-
problem is achieved through a redesign of the simulator code provided in last sec-
tion under fully coupled simulator. We use conjugate gradient method (and similar
methods of Krylov subspace family) to solve our linear system in fully coupled im-
plementation. For iteratively coupled implementation, however, we have the option
of choosing two dierent linear solvers for the two dierent sub-problems so as to
optimize the performance of each sub-system.
Our discretization results in a symmetric systems of algebraic equations. Krylov
subspace methods take advantage of this symmetry in the sense that iterations become
inexpensive in terms of computational cost and storage requirements. The framework
from which the implementations of Krylov methods are derived takes care of the
allocation and initialization of the residual vectors needed by the given combination
of a linear system and a linear solver. Implementation also includes the exibility to
apply preconditioners over the residual vectors
2
.
As pointed out, for problems where the coecient matrix (Jacobian in Newtons
2
usually, Krylov iterations recursively update the residual vector, however, a subset of this family
of methods work on preconditioned residual s

= M
1
(b Ax

) = M
1
r

CHAPTER 5. IMPLEMENTATION IN DIFFPACK 65


method) is symmetric positive denite such as linear deformations of porous medium,
that is, A
T
= A and y
T
Ay > 0, y = 0, the conjugate gradient method is the de
facto choice of solver. In Dipack this method is available and does not require any
user-specied initialization parameters. We can combine it with suitable precondi-
tioner in order to speed up the convergence rate. That is, instead of solving Ax = b,
we consider the equivalent system M
1
Ax = M
1
b.
Besides conjugate gradient, we also have the option of choosing from BiConjugate
Gradient (Stabilized), Orthomin and GMRES solvers.
The linear solver may need some information on the start vector with which it
gets initialized. This factor is more crucial for iteratively coupled schemes where we
perform Gauss-Seidel iterations as opposed to fully coupled scheme which works on
Newtons scheme (where the start vector is a zero variation vector). The input data
deck can explicitly specify the option for selecting the start vector to apply iterative
solver. Options are
1. current value of solution vector
2. user specied start vector
3. random start vector (random values within a range)
4. zero start vector
5. right hand side as start vector
5.3 Summary
As demonstrated and experienced, coding a Dipack simulator is an interplay between
C++ programming, knowledge of the Dipack libraries, understanding of the involved
numerics and insight into the behavior of typical (may be analytical for simplied
cases) solutions of PDE.
Chapter 6
Representative Numerical
Simulations
This chapter presents various validatory simulation exercises performed over the im-
plemented simulator. Results obtained from these simulations demonstrate the ap-
plicability of the formulation in diverse scenarios.
Dierent problem-settings have been designed to investigate and emphasize spe-
cic features of the simulator. Additionally, we have,
tested the accuracy and robustness of the simulator code under varying bound-
ary and initial conditions, such as varying well boundary conditions and stress-
displacement boundary conditions,
tested the performance of the code in various other sensitivity directions such
as varying the inclination of the grid plane (aects gravitational force), varying
Poisson ratio and varying system compressibility.
analyzed interesting results and features of physics involved in coupled geome-
chanical simulation such as Mandel-Cryer eect.
This chapter is organized in sections of example or case studies. Each section
describes one example with each example accompanied by its purpose denition,
model description with grid, boundary conditions and problem specic parameters
and results. At the end of each section, the example is reviewed in light of the results
66
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 67
obtained from simulation and they have been compared to the anticipated response
for a few examples.
6.1 Example 1: Single Phase Flow in quarter-to-
ve-spot pattern
A quarter-to-ve spot waterooding exercise was simulated over a two-dimensional
structured grid in a homogeneous medium. Objective is to study the eect of gravity
on the simulation results, especially deformation induced in the eld as a result of
uid ow.
6.1.1 Model Description
This is a scaled model of a reservoir discretized symmetrically over a 15 15 2D grid
divided into (15 2) 15 = 450 RT
0
triangular elements. Dimension of the grid is
[0, 1] [0, 1]. Co-ordinate system is chosen such that positive x is from left to right
and positive y is from bottom to top (compaction appears as negative displacement).
This is true for all cases described below.
Reservoir undergoes single-phase ow and mechanical deformation on account of
change in pressure eld (subsequently eective stress eld) from initial stage to nal
stage as induced by the waterooding. Sketch of the gridded domain with applied
boundary conditions is given in Figure 6.1.
Boundary conditions are given in the list below and problem specic input para-
meters are given in Table 6.1.
Fluid pressure boundary conditions: 1 injector (xed bottom hole pressure)
situated on left bottom element and 1 producer (xed bottom hole pressure)
situated on right top element
Fluid velocity boundary conditions: no-ow outer boundary
Solid displacement boundary conditions: xed in normal direction on edges
x=0 and y=0 (Dirichlet); normal stress of magnitude -1 on edges x=1 and y=1
(Neumann)
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 68
Figure 6.1: Example 1 - Problem setting with boundary conditions
Table 6.1: Example 1 - Input parameters for quarter-to-ve-spot pattern
Parameter Value
Youngs modulus E 100
Poissons ratio 0.35
Fluid viscosity 1
Biots coecient 0.9
Fluid density
f
1
Total bulk density 2.2
Permeability (constant) k 1
Porosity (constant) 0.25
Total compressibility (constant) c
t
0.1
Injector well bottom hole pressure 10
Producer well bottom hole pressure -10
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 69
Figure 6.2: Example 1 - Deformed conguration in horizontal case
6.1.2 Eect of Gravity
Sensitivity analysis is performed on the inclination of the grid plane for waterooding
example. Colored contour maps of displacement elds i.e. u
x
(displacement in x
direction) and u
y
(displacement in y direction) and pressure-time series plot are shown
below for these two runs. Values of sensitivity parameters are also mentioned in each
case.
6.1.2.1 Horizontal Case
It is horizontal plane grid with inclination = 0

i.e. gravity-vector = [0.0, 0.0] and


total compressibility c
t
= 0.1. Results are shown in Figure 6.2, 6.3, and 6.4.
In absence of gravity (and any kind of body forces) the deformation is less, almost
negligible (see Figure 6.2). Also, since our boundary stresses are normal and equal in
magnitude the displacement elds x and y components are symmetric.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 70
Figure 6.3: Example 1 - Displacement elds x component in horizontal case
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 71
Figure 6.4: Example 1 - Displacement elds y component in horizontal case
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 72
Figure 6.5: Example 1 - Deformed conguration under eect of gravity
6.1.2.2 Vertical Case
It is a vertical plane grid with = 90

i.e. gravity-vector = [0.0, -1.0] and total


compressibility c
t
= 0.1. Results are shown in Figure 6.5, 6.6, and 6.7.
Displacement elds x and y components are not symmetric any more because
gravity acts on the nodes to displace more in y direction than in x direction.
Since in this simulation run we have not performed any gravity-pressure equilibra-
tion before starting the simulation, we observe a evolution in pressure as a function
of time. The magnitude of the transient depends on the system compressibility.
6.1.2.3 Comparison between Horizontal and Vertical Cases
Here we look at the comparison of two cases run with same total compressibility,
(c
t
= 0.001) but dierent inclinations - = 0

and 90

. In Figure 6.8 and Figure 6.9


we observe pressure and streamline solution maps for these two cases . However,
we have to note here that these pressure and velocity values are interpolated values
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 73
Figure 6.6: Example 1 - Eect of gravity on displacement elds x component
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 74
Figure 6.7: Example 1 - Eect of gravity on displacement elds y component
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 75
0 0.5 1
0
0.5
1
8
6
4
2
0
2
4
6
8
0 0.5 1
0
0.5
1
8
6
4
2
0
2
4
6
8
Horizontal Case Vertical Case
Figure 6.8: Example 1 - Pressure eld comparison for horizontal and vertical cases
from the actual nite element variable eld of pressure and velocity vector and hence
displayed on the grid composed on rectangular elements instead of the triangular
elements comprising the true grid.
Figure 6.10 compares the observation node pressure evolution in time for horizon-
tal and vertical cases.
Streamlines do not show any noticeable change as a result of gravity. Streamlines
are directly linked to the pressure distribution in the led and since the magnitude
of dierence between the two distributions is very small, streamlines are almost same
for horizontal and vertical cases. However, for a thick reservoir of eld dimensions
we do observe changes in velocity pattern as determined by the gradient of pressure
eld.
Displacement evolution for the two cases are shown in Figure 6.11 and Figure 6.12.
6.1.2.4 Observations
We should notice the increase in deformation of the grid in presence of gravity which
acts in the direction of overburden stress applied over the top edge. Additionally, we
can also observe that in presence of gravity we loose symmetry of the displacement
elds x and y component which was present in absence of gravity eld.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 76
0 1
0
1
0 1
0
1
Figure 6.9: Example 1 - Streamline eld comparison for horizontal and vertical cases
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.7
0.75
0.8
0.85
0.9
0.95
1
1.05
Time
O
b
s
e
r
v
a
t
i
o
n

n
o
d
e

p
r
e
s
s
u
r
e
Horizontal Case
Vertical Case
Figure 6.10: Example 1 - Eect of gravity on evolution of pressure at observation
node
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 77
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.005
0
0.005
0.01
0.015
0.02
0.025
Time
D
i
s
p
l
a
c
e
m
e
n
t

i
n

x

d
i
r
e
c
t
i
o
n
Evolution of displacement at observation node
Horizontal
Vertical
Figure 6.11: Example 1 - Comparison of displacement elds x component at obser-
vation node
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 78
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.07
0.06
0.05
0.04
0.03
0.02
0.01
0
Time
D
i
s
p
l
a
c
e
m
e
n
t

i
n

y

d
i
r
e
c
t
i
o
n
Evolution of displacement at observation node
Horizontal
Vertical
Figure 6.12: Example 1 - Comparison of displacement elds y component at obser-
vation node
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 79
Table 6.2: Example 1 - Compressibility cases for quarter-to-ve-spot pattern
Case no. Total Compressibility Grid Inclination
1. 0.1 90

2. 0.01 90

3. 0.001 90

4. 0.0001 90

6.1.3 Eect of Compressibility


In this section we look at inuence of total system compressibility over the results
from coupled geomechanical simulation. We recall that total compressibility is part of
the accumulation term in the uid mass balance equation as explained in Chapter 2.
This has a transient connotation during the simulation which can be seen clearly in
the term c
t
p
t
. Hence, we expect to see a longer transient or unsteady state behavior
for a system with higher compressibility than with lower compressibility. Let us
look at the evolution or time-series plots for few test cases which corroborates our
understanding. Values for compressibilities along with the grid inclination is given in
Table 6.2.
Figure 6.13 compares pressure evolution at observation node for the four cases
tabulated in Table 6.2.
Similarly, Figure 6.14 is a comparison plot of evolution of vertical displacement at
observation node for the four cases tabulated in Table 6.2.
6.1.3.1 Observations
At steady state u
y
(vertical displacement or compaction) is same in all cases.
First case takes longest time to reach steady state as the uid is most compress-
ible and even at t = 1 there is slight upward ow as can be seen.
For cases with low and very low compressibility all the transients are limited
to very short time in the beginning, much shorter than the constant time step
of 0.1 chosen above. Therefore, linear solver faces diculty in convergence at t
= 0.1 in the beginning and also we do not see much dierence in solutions for
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 80
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.65
0.7
0.75
0.8
0.85
0.9
0.95
1
1.05
Time
P
r
e
s
s
u
r
e
Evolution of pressure at observation node
c
t
=0.1
c
t
=0.01
c
t
=0.001
c
t
=0.0001
Figure 6.13: Example 1 - Eect of compressibility on evolution of pressure in quarter-
to-ve-spot pattern
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 81
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.0664
0.0662
0.066
0.0658
0.0656
0.0654
0.0652
0.065
Time
V
e
r
t
i
c
a
l

D
i
s
p
l
a
c
e
m
e
n
t
Evolution of vertical displacement at observation node
c
t
=0.1
c
t
=0.01
c
t
=0.001
c
t
=0.0001
Figure 6.14: Example 1 - Evolution of vertical displacement in quarter-to-ve-spot
pattern at observation node
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 82
lower compressibility cases 2,3 and 4 (see Table 6.2) because they are unable to
resolve the transient altogether.
As compressibility is reduced, the characteristic time of the transients also de-
creases and steady state conditions start to prevail as soon as boundary con-
ditions are applied. This can be noticed from the 2D evolution plots where
pressure (and displacement as well) reaches its steady state value so soon that
we are unable to capture the transient, with constant time stepping algorithm.
These couple of points create the need for adaptive time stepping implementa-
tion which has been addressed in previous chapters and which is used for most
of the later simulations carried out using the fully coupled simulator.
6.1.4 Choice on Level of Coupling
To analyze the eect of dierent coupling strategies we look at results from drained
and undrained splits corresponding to a simple geomechanical simulation carried out
using a reservoir model described in Example 1. Figure 6.15 and Figure 6.16 com-
pares pressure and vertical displacement solution from these two numerical splitting
algorithms and convinces us about the stability of undrained split method.
6.1.4.1 Observations
These plots highlight the conditional stability of drained Split scheme as opposed
to unconditional stability of undrained Split. We can also observe in Figure 6.15,
initial transient is very poorly resolved because of a time step value higher than the
characteristic time.
Drained Split with one Gauss-Seidel iteration produces an oscillatory solution
during the transient
Rening time-step removes the oscillation due to non-equilibrium initial condi-
tions, but not the hump in pressure
Drained Split scheme with one Gauss-Seidel iteration gets stabilized after initial
oscillations and the error does not blow up. However, this is not true in general,
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 83
0 0.5 1 1.5 2 2.5 3
2
3
4
5
6
7
8
Time
P
r
e
s
s
u
r
e
Evolution of pressure at observation node
Drained Split
Undrained Split
Fully Coupled
Drained Split (refined t)
Figure 6.15: Example 1 - Comparison of evolution of pressure for drained and
undrained splits
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 84
0 0.5 1 1.5 2 2.5
0.064
0.062
0.06
0.058
0.056
0.054
0.052
Time
V
e
r
t
i
c
a
l

D
i
s
p
l
a
c
e
m
e
n
t
Evolution of vertical displacement at observation node
Drained Split
Undrained Split
Fully Coupled
Figure 6.16: Example 1 - Comparison of evolution of vertical displacement for drained
and undrained splits
especially for complicated problems where explicit drained split produces non-
convergent solutions.
6.2 Example 2: Uniaxial Compaction Test
A uniaxial compaction test was carried out under drained and undrained boundary
conditions on the grid displayed in Figure 6.17. The terms drained and undrained in
boundary conditions of compression tests are completely dierent from drained and
undrained in iteratively coupled numerical splits explained in Chapter 4. In drained
compaction test uid is allowed to escape the system from specic boundary points
as it undergoes compaction, opposed to undrained compaction where no outlet is
provided for the uid to leave the system as there are no essential pressure boundary
conditions specied on the grid. This has a direct bearing on the degree of compaction,
eective stress observed by the material and its tendency to fail in a preferred way.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 85
Figure 6.17: Example 2 - Uniaxial compaction test grid
6.2.1 Model Description
It is a 5 10 asymmetric grid divided into (5 2) 10 = 100 RT
0
(right triangular)
elements. Dimension of the grid is [0, 0.5] [0, 1]. Overburden stress is acting on
the top side and remaining three sides are zero displacement (in respective normal
directions) boundaries.
Model inputs are given in Table 6.3.
6.2.2 Drained Test
Uniaxial compaction model was subjected to drained boundary conditions (xed pres-
sure uid outlet points in each of the element in top row of the grid). Results from
simulation follow in Figure 6.18 and 6.19.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 86
Table 6.3: Example 2 - Input parameters for uniaxial compaction test
Parameter Value
Youngs modulus E 100
Poissons ratio 0.35
Fluid viscosity 10
Biots coecient 0.9
Fluid density
f
0.8
Total bulk density 2.2
Permeability (constant) k 1
Porosity (constant) 0.25
Total compressibility (constant) c
t
0.01
No. of producers 10 (Drained Test), 0 (Undrained Test)
Producer well bottom hole pressure -5
Figure 6.18: Example 2 - Pressure eld in drained compaction test
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 87
Vertical Displacement
Figure 6.19: Example 2 - Vertical displacement eld in drained compaction test
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 88
Figure 6.20: Example 2 - Pressure eld in undrained compaction test
6.2.3 Undrained Test
Uniaxial compaction model was subjected to undrained boundary conditions (no uid
outlet and no specied pressure points in the grid). Results from simulation follow in
Figure 6.20 and 6.21.
6.2.4 Comparison between Drained and Undrained Compaction
Figure 6.22 plots evolution of pressure at observation node (observation node is shown
in Figure 6.17) for both drained and undrained compaction test.
In undrained compaction case, as is expected, pressure builds up relatively fast on
account of compaction (and also other body forces such as gravity) and reaches its
stabilized steady state value which is higher than the stabilized value reached during
drained compaction (Figure 6.22). This happens because of uid mass depletion in
case of drained test. Also uid pressure builds up very fast and to a much higher value
in undrained test because of no uid outlet provided whereas drained test results in
a negative pressure for this particular case.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 89
Vertical Displacement
Figure 6.21: Example 2 - Vertical displacement eld in undrained compaction
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 90
0 0.1 0.2 0.3 0.4 0.5
4
3
2
1
0
1
2
3
Time
P
r
e
s
s
u
r
e
Drained Compaction Test
Undrained Compaction Test
Figure 6.22: Example 2 - Comparison of evolution of pressure for drained and
undrained compaction tests
6.2.5 Observations
From Figure 6.19 we note that the compaction in a drained test is almost double
of the compaction observed in undrained test. This is a well understood reasoning
behind large subsidence observed in elds under primary depletion plan. Also, the
process of compaction drive adding to the hydrocarbon recovery is well understood by
this simple example. Drained and undrained simulations are usually carried out for
laboratory specimens to model their behavior a priori to design suitable lab settings
and to estimate material properties.
6.3 Example 3: Comparison of Dierent Coupling
Strategies
This section intends to compare fully coupled simulator with iteratively coupled sim-
ulators (both drained and undrained splits) for a given problem. Problem is designed
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 91
Figure 6.23: Example 3 - Undrained split simulation setting with observation node
to test and validate the undrained split implementation and to emphasize the salient
features of such an implementation vis-a-vis other coupling strategies implemented.
6.3.1 Model Description
This is the same model described in Example 1. Observation node has been moved
closer to the injector. Figure 6.23 presents the problem setting for following experi-
ments.
Model parameters are given in Table 6.4.
6.3.2 Heterogeneity
In this experiment we applied heterogeneity in our permeability eld (Figure 6.24) and
Figures 6.25, 6.26, 6.27 present the result maps and plots from the simulation along
with the important observations. Pressure and velocity are plotted on interpolated
grid and stress is computed using the von-Mises expression given in eqn. (5.10).
In the von-Mises equivalent stress map shown (Figure 6.27), it should be noted
that the original square symmetric grid is also outlined. Its purpose is to show the
amount of deformation experienced in horizontal and vertical directions, as a result of
applied stress boundary conditions and body forces prevalent in system. Regarding
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 92
Table 6.4: Example 3 - Input parameters for undrained split simulation
Parameter Value
Youngs modulus E 100
Poissons ratio 0.35
Fluid viscosity 1
Fluid compressibility c
t
0.001
Biots coecient 0.9
Fluid density
f
1
Injector well bottom hole pressure 10
Producer well bottom hole pressure -10
Grid inclination 90

Permeability field
East
N
o
r
t
h
0.0 30.000
0.0
30.000
1.000
10.000
100.000
1000 mD
Figure 6.24: Example 3 - Permeability eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 93
0 0.5 1
0
0.5
1
8
6
4
2
0
2
4
6
8
Figure 6.25: Example 3 - Pressure eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 94
0 1
0
1
Figure 6.26: Example 3 - Streamline eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 95
0 0.2 0.4 0.6 0.8 1
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
x
z
von Mises Equivalent Stress map on deformed grid
2
4
6
8
10
12
14
16
Figure 6.27: Example 3 - Equivalent stress eld
the choice of equivalent stress, it broadly depends upon the choice of the user and the
simulator is capable of reporting the scalar stress levels in the eld in terms of stress
invariants I
1
and

J
2
or mean stress measures.
6.3.3 MandelCryer Eect
One of the characteristic of any multi-dimensional geomechanical simulator is its
ability to capture the so-called Mandel-Cryer eect. such eects are present due
to non-zero Poissons ratio or multi-dimensional strain (lateral strain generated as
a result of longitudinal strains in the system). As soon as depletion begins in the
system, load bearing capacity of the bulk system (solid with uid) is reduced resulting
in additional load being transferred to adjacent solid grains. This phenomenon leads
to a squeezing eect farther away from point of depletion and enhanced total stress,
also called redistribution of total stress, hence increased pore pressure which lasts
temporarily and shows up as a hump in pressure prole (Figure 6.28).
In Figure 6.28 we also notice that a ow-only simulation can be carried out using
a coupled geomechanical simulator if we specify the system to be incompressible (or
Poissons ratio = 0.5).
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 96
0 2 4 6 8 10
0
1
2
3
4
5
6
7
Time(x1E3)
P
r
e
s
s
u
r
e
Drained Split (Explicit)
Drained Split (Converged)
No geomechanics or uncoupled case
Drained Split (Incompressible case)
Wells (injectorproducer pair)
opened
No wells
MandelCryer effect
Figure 6.28: Example 3 - Mandel-Cryer Eect
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 97
6.3.4 Observations
As we have mentioned in Chapter 1 while introducing iteratively coupled and fully
coupled numerical schemes of solution, at convergence all numerical methods yield
the same nal solution and that was observed for the heterogeneous case presented
above which was actually run on both fully coupled and iteratively coupled simulators.
Run-time of iteratively coupled simulator was at least ve times smaller than that
of fully coupled simulator for this example case. It highlights the potential benets
associated with the undrained split iteratively coupled method over other coupling
methods. Results (Figure 6.25, Figure 6.26, Figure 6.27) obtained from both fully
coupled and iteratively coupled schemes were exactly same at convergence.
6.4 Example 4: Big Field Case
Here we look at the fully coupled simulation results for a slightly larger grid. Purpose
of this simulation was to test the performance of the code on a larger system, that is,
a system with more degrees of freedom than encountered in previous examples. Also,
it simulates realistic eld scenarios with complicated geology and layered material
properties. All parameters have been chosen to mimic real eld values and simulation
was carried out for 20 days with a constant time step of 1 day.
6.4.1 Model Description
Problem setting has been sketched in Figure 6.29. Permeability eld is heterogeneous
and plotted in Figure 6.30. This is a larger grid with number of elements = 1250
and simulations run on this grid have eld scale parameters and units. Dimension
of the grid is [0, 3000] [0, 800] in meters. Wells have multi-block completions with
injector having a xed BHP (bottom hole pressure) control and producer having a
xed rate control. Injector is injecting in 10 blocks near bottom whereas producer
is producing from 5 blocks in the middle of the reservoir. Simulation results for
interpolated pressure eld, interpolated streamline eld and equivalent stress eld
are displayed in Figure 6.31, Figure 6.32 and Figure 6.33, respectively.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 98
Figure 6.29: Example 4 - Big Field problem setting with original undeformed grid
Permeability field
Horizontal
V
e
r
t
i
c
a
l
0 3000m
0
800m
1.000
10.000
100.000
1000.00
Figure 6.30: Example 4 - Big Fields permeability map
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 99
Table 6.5: Example 4 - Input parameters for Big Field simulation
Parameter Value
Top depth (m) 3000
Top pressure (MPa) 10000
Eective porosity 0.25
Initial stress
0
(MPa) 10000
Overburden stress (MPa) 10000
Youngs modulus E (MPa) 10000
Poissons ratio 0.35
Biot modulus M (MPa) 10000
Biots coecient 0.9
Elasticity type Plane Strain
Fluid viscosity (Pa/sec) 0.01
Fluid compressibility c
t
0.001
Total density (gm/cc) 2.2
Fluid density
f
(gm/cc) 0.8
Grid inclination 90

Injector well bottom hole pressure (MPa) 50000


Producer rate (m
3
/sec) 0.001
Degree of implicitness 1
Model input parameters are summarized in Table 6.5
1
.
6.4.2 Results
Pressure map shown in Figure 6.31 is on the interpolated grid composed of rectangular
elements, as explained for previous pressure maps. Same is true for the velocity or
streamline map. Also, both these maps are on the original undeformed mesh and
therefore display original length and depth of the reservoir. However, stress map in
Figure 6.33 is plotted on the actual grid of RT
0
triangular elements.
Trend of pressure increase at observation nodes (Figure 6.34) can be explained by
the overburden load exerted at each one of them (deeper is the node, higher is the
overburden) and also the heterogeneity of the eld (results in inhomogeneous sweep
1
MPa denotes 1000 Pa
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 100
0 1500 3000
0
400
800
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
1.5
2
2.5
3
3.5
4
4.5
x 10
7
Injector (fixed BHP)
Producer (fixed rate)
Figure 6.31: Example 4 - Pressure eld
0 3000
0
800
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
Injector (fixed BHP) Producer (fixed rate)
Figure 6.32: Example 4 - Streamline eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 101
Injector
Producer
Stress (N/m
2
)
Figure 6.33: Example 4 - Equivalent stress eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 102
0 2 4 6 8 10 12 14 16 18 20
1500
2000
2500
3000
3500
4000
4500
5000
5500
6000
6500
Time (days)
P
r
e
s
s
u
r
e

(
p
s
i
a
)
Evolution of pressure at observation nodes
(1500 m, 300 m)
(500 m, 600 m)
(1500 m, 80 m)
Figure 6.34: Example 4 - Evolution of pressure at observation nodes
in the eld and higher pressure at shallower depths). Figure 6.35 provides the cross-
section plot of pore pressure and equivalent stress in the eld drawn at a specic
abscissa, here at x = 100m.
6.4.3 Observations
Run-time for this simulation on a standard machine was approximately six hours, a
factor of ten when compared to run-time for Example 1 and 2 which are approximately
three times smaller in size. Run-time code optimization is an avenue for further re-
search in coupled ow and geomechanical simulations. Because of the large run-time
overhead, it delays the process of decision-making based on results from a geome-
chanical simulation run under fully coupled approach and therefore our stress was on
implementation of a iterative scheme since beginning. As discussed by Settari [33] and
Dean [17], one can choose to update the coupled parameters at a reduced frequency,
for suitable problems, to optimize the run-time of geomechanical simulations.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 103
0 100 200 300 400 500 600 700 800
0
1000
2000
3000
4000
5000
6000
7000
Depth (m)
P
r
e
s
s
u
r
e

a
n
d

S
t
r
e
s
s

(
p
s
i
a
)
Pressure at x=100 m
Equivalent stress at x=100 m
Figure 6.35: Example 4 - Cross-section plot of pressure and stress
6.5 Example 5: Wellbore Failure Modeling
This is another case of realistically big eld simulation (using undrained split iterative
coupling method) but with a slightly dierent purpose. Here we intend to induce a
high degree of deformation in and around the wellbore to indicate mechanical failure.
We capture not only the surface subsidence near producer but we also capture the
near wellbore damage in the trajectory of producer and injector as a result of high
eective stress buildup and stress sensitivity of the region. For this simulation, we
will concentrate on the resultant equivalent stress level (Figure 6.36) on the deformed
grid. It helps us visualize the eect of high pressure injection and excessive drawdown.
6.5.1 Model Description
The model is slightly similar to the one described in Example 1, that is, a 15 15
square symmetric grid divided into (15 2)15 = 450 RT
0
right triangular elements.
However dimension of the grid is [0, 1000][0, 800] in meters and boundary conditions
are also dierent. There is no lateral conning stress acting on side x = 3000m and it
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 104
Table 6.6: Example 5 - Input parameters for Well Failure model
Parameter Value
Top depth (m) 3000
Top pressure (MPa) 10000
Eective porosity 0.25
Initial stress
0
(MPa) 10000
Overburden stress (MPa) 10000
Youngs modulus E (MPa) 10000
Poissons ratio 0.35
Biot modulus M (MPa) 10000
Biots coecient 0.9
Elasticity type Plane Strain
Fluid viscosity (Pa/sec) 0.01
Fluid compressibility c
t
0.001
Total density (gm/cc) 2.2
Fluid density
f
(gm/cc) 0.8
Grid inclination 90

Injector well bottom hole pressure (MPa) 50000


Producer rate (m
3
/sec) 0.001
Degree of implicitness 1
is allowed to move. As in Example 1, bottom and left sides are not allowed to move
in y and x directions respectively and free to move otherwise. Overburden stress
is specied on side y = 800m. The simulation was carried out for a period of 15
days with a constant time step of 1 day and the wells were opened after 1 day to
allow equilibration between stress boundary conditions with the pressure within the
domain
2
.
Model input parameters are summarized in Table 6.6.
2
Instead of performing initialization as a part of the simulation, it can be encoded within the
simulator as a separate initialization routine using gravity, overburden stress and other body forces.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 105
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
500 1000
800
400
0
Injector
Producer
Equivalent Stress (N/m
2
)
Figure 6.36: Example 5 - Well Failure models near-wellbore damage and stress con-
centration
6.5.2 Results
In Figure 6.36 we notice that the elements corresponding to injector location in the
eld have experienced large deformations and they are in tension whereas elements
located on right side for producer have experienced contraction from their original
size due to compressional stress.
6.5.3 Observations
Results from the simulation successfully captures well failure scenario in a normal
injector-producer setting and demonstrates two fold benets, one, geomechanical sim-
ulation is a must for stress sensitive reservoirs to model wellbore failure and injection
pressure optimization in a eld, and second, the need to model plastic deformation
in such reservoirs to accurate model the nonlinear eects.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 106
0 500 1000
0
400
800
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
1
1.5
2
2.5
3
3.5
4
4.5
5
x 10
7
Pressure (N/m
2
)
Figure 6.37: Example 5 - Well Failure models pressure map
6.6 Example 6: Rened Grid Simulation
This is the third case in series of simulating large systems. It is dierent in two main
aspects from last example. It is vertically rened with 60 layers of elements in y
direction and it is run for an extended period of 100 days, with constant time step of
1 day.
6.6.1 Model Description
Model is similar to the one described for Example 5, however grid is rened in x and y
directions and boundary conditions are slightly modied in their values. Model input
parameters are summarized in Table 6.7.
Permeability eld is provided in Figure 6.38.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 107
Table 6.7: Example 6 - Input parameters for Rened Grid simulation
Parameter Value
Top depth (m) 1000
Top pressure (MPa) 1000
Eective porosity 0.25
Initial stress
0
(MPa) 10000
Overburden stress (MPa) 1000
Youngs modulus E (MPa) 10000
Poissons ratio 0.35
Biot modulus M (MPa) 10000
Biots coecient 0.9
Elasticity type Plane Strain
Fluid viscosity (Pa/sec) 0.01
Fluid compressibility c
t
0.001
Total density (gm/cc) 2.2
Fluid density
f
(gm/cc) 0.8
Grid inclination 90

Injector well bottom hole pressure (MPa) 20000


Producer rate (m
3
/sec) 0.0001
Degree of implicitness 1
Permeability field
Horizontal
V
e
r
t
i
c
a
l
0 3000m
0
800m
1.000
10.000
100.000
1000.00
Figure 6.38: Example 6 - Rened Grid models permeability eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 108
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
0 1500 3000
800
400
0
Stress (N/m
2
)
Injector
Producer
Figure 6.39: Example 6 - Rened Grid models equivalent stress eld
6.6.2 Results
Since the grid is rened in vertical direction we can take advantage of cross-section
plots extracted from the 2D elds and gain some valuable insight into the eect of
geomechanics on ow and deformation parameters within the reservoir.
In Figure 6.44, negative vertical displacement means compaction. We observe
that maximum compaction is near the top of the reservoir which is a boundary free
to move under overburden whereas bottom boundary has been xed in y direction or
vertical direction as part of displacement boundary conditions.
In Figure 6.45, uid pressure and stress increases with depth, however, we observe
that around a depth of 470m as sudden increase in pressure causes reduction in the
eective stresses. Stress invariant I
1
is negative suggesting compression of the matter.
In this context it would be interesting to see an evolution plot (Figure 6.46) for a
particular node in the stress space (discussed in Appendix A where stress invariant
I
1
is plotted against

J
2
) to analyze material failure given a failure envelope.
We have not modeled failure of the material in our geomechanical simulator at
this point therefore we do not see failure envelope in Figure 6.46.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 109
Horizontal displacement field
units: meter
100
90
80
70
60
50
40
30
20
10
0
500
1000
1500
2000
2500
3000
0
100
200
300
400
500
600
700
800
0
20
40
60
80
100
120
Figure 6.40: Example 6 - Rened Grid models horizontal displacement eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 110
Vertical displacement field
units: meter
0
-50
-100
-150
-200
-250
0
500
1000
1500
2000
2500
3000
0
100
200
300
400
500
600
700
800
-300
-250
-200
-150
-100
-50
0
Figure 6.41: Example 6 - Rened Grid models vertical displacement eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 111
0 1500 3000
0
400
800
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
2
x 10
7
Injector (fixed BHP)
Producer (fixed rate)
Pressure (N/m
2
)
Figure 6.42: Example 6 - Rened Grid models pressure eld
0 3000
0
800
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
Injector
Producer
Figure 6.43: Example 6 - Rened Grid models streamline eld
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 112
0 100 200 300 400 500 600 700 800
250
200
150
100
50
0
50
100
150
200
250
Depth (m)
D
i
s
p
l
a
c
e
m
e
n
t

(
m
)
Vertical displacement
Magnitude of total displacement vector
Crosssection at x= 100m
Figure 6.44: Example 6 - Rened Grid models displacement prole at x = 100m
0 100 200 300 400 500 600 700 800
3000
2000
1000
0
1000
2000
3000
Depth (m)
S
t
r
e
s
s

o
r

P
r
e
s
s
u
r
e

(
p
s
i
)
von Mises Stress
Invariant I
1
Invariant sqrt(J
2
)
Pressure
Crosssection at x = 100 m
Figure 6.45: Example 6 - Rened Grid models stress and pressure prole at x =
100m
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 113
3000 2500 2000 1500 1000 500
40
60
80
100
120
140
160
180
200
220
Isotropic stress (Invariant I
1
), psia
D
e
v
i
a
t
o
r
i
c

s
t
r
e
s
s

(
I
n
v
a
r
i
a
n
t

J
2
)
,

p
s
i
a
Evolution in time of the stress state at observation node
Figure 6.46: Example 6 - Stress space for the observation node in Rened Grid model
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 114
0 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01
0
1
2
3
4
5
6
7
8
Time
P
r
e
s
s
u
r
e
Evolution of pressure at observation node
(=0.15, b=0.7)
(=0.25, b=0.7)
(=0.45, b=0.7)
(=0.35, b=0.9)
(=0.499, b=0.9)
(=0.499, b=0.3)
No Geomechanics
Figure 6.47: Example 7 - Eect of and b
6.6.3 Observations
Rening has increased the number of elements to 3600 which adds signicant com-
putational cost over smaller models as each element carries more than one degree of
freedom. Run-time on standard machine varied between 20 hours to 1 day.
6.7 Example 7: Sensitivity on Poissons ratio and
Biots coecient
A set of simulations have been run with varying and b to understand their inuence
on the geomechanical results.
6.7.1 Results
We will only look at the evolution of pressure at observation node in following picture
(Figure 6.47).
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 115
6.7.2 Observations
Broadly, we can conclude that Poissons ratio aect the degree of hump observed in
pressure (explained earlier under section on Mandel-Cryer Eect), higher is the ratio,
lower is the hump because compressibility drops with . An incompressible system is
poor in communicating strain observed in one dimension to other dimensions which
is actually the source of this pressure hump.
Another point worth looking at is the initial build-up in pressure before wells are
opened up. In this interval there are no wells in the eld and boundaries are no-ow
type even then we observe the pressure build-up. The reason is equilibrium forces due
to gravity on the initial pressure eld. If we initialize our pressure eld according to
gravity equilibrium before starting the simulation then we will not observe the build-
up. Initialization of pressure, velocity and displacement has been implemented in the
code however initialization by simulator is also an option which not only provides a
validation of the initialization routine it also helps in achieving complex equilibrium
beyond the capabilities of explicit initialization. Another way to initialize has been
to introduce a dummy well in the system to achieve stress boundaries-pore pressure-
gravity equilibrium however that may warrant careful tracking of uid mass-in-place
as the dummy well might produce some uids during such initialization [1].
6.8 Example 8: Unstructured Grid
An example case was simulated using an unstructured grid (generated using GEOM-
PACK [22]) for the boundary conditions similar to Example 5 (constant BHP injector
and constant rate producer in a eld with overburden stress and laterally conned
sides).
6.8.1 Model Description
Problem setting is sketched in Figure 6.48. Model was simulated for 10 days only
with following set of input parameters as given in Table 6.8.
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 116
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
Material type 1
Material type 2
Overburden Stress
Figure 6.48: Example 8 - Unstructured grids problem setting
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 117
Table 6.8: Example 8 - Input parameters for Unstructured Grid eld simulation
Parameter Value
Number of elements 500
Top depth (m) 3000
Top pressure (MPa) 10000
Eective porosity 0.25
Initial stress
0
(MPa) 10000
Overburden stress (MPa) 10000
Youngs modulus E (MPa) 10000
Poissons ratio 0.35
Biot modulus M (MPa) 10000
Biots coecient 0.9
Elasticity type Plane Strain
Fluid viscosity (Pa/sec) 0.01
Fluid compressibility c
t
0.01
Total density (gm/cc) 2.2
Fluid density
f
(gm/cc) 0.8
Grid inclination 90

Injector well bottom hole pressure (MPa) 50000


Producer rate (m
3
/sec) 0.001
Degree of implicitness 1
CHAPTER 6. REPRESENTATIVE NUMERICAL SIMULATIONS 118
Horizontal distance (m)
V
e
r
t
i
c
a
l

d
i
s
t
a
n
c
e

(
m
)
Vertical displacement
( 10
2
m)
Figure 6.49: Example 8 - Unstructured Grid models simulated vertical displacement
6.8.2 Results and Observations
Figure 6.49 presents the result of a fully coupled simulation over this unstructured
grid. Plot in Figure 6.49 shows vertical displacement eld over the original unde-
formed grid.
6.9 Summary
Run-time for larger grids are prohibitive and create obstacles in extensive investigation
of some sensitivity parameters. Optimization of the code can easily be done in some
routines involving loop structures and Dipack provides appreciable resources and
guidance in that direction. However, the issue of optimization has not been addressed
explicitly in this work and needs separate thrust.
Chapter 7
Conclusions and Recommendations
Coupled solution to reservoir geomechanics has been investigated and a single-phase
geomechanical simulator has been implemented with dierent coupling strategies in-
cluding an unconditionally stable iteratively coupled formulation. Analysis of the
eect of geomechanical response on ow properties of a reservoir, subjected to pro-
duction and/or injection, has also been performed. Extension to multiphase ow and
incorporation of inelasticity models have been demonstrated to be possible based on
this prototype simulator [27].
7.1 Conclusions
1. A coupled single phase geomechanical simulator has been developed with various
degrees of coupling possible between ow and mechanical sub-problems
2. Several coupling strategies, including an unconditionally stable iterative scheme
(undrained split) has been implemented
3. Stable and mass conservative spatial discretization of variables (mixed nite el-
ement for ow, nodal FEM for deformation). Temporal discretization is implicit
with option for controlling the degree of implicitness.
4. The simulator has been implemented in an object-oriented framework and has
a modular design to facilitate continuous development as well as to allow it to
be linked to the GPRS (General Purpose Reservoir Simulator) [8].
119
CHAPTER 7. CONCLUSIONS AND RECOMMENDATIONS 120
7.2 Salient Features
Standard and mixed nite element discretization methods and modular design of the
simulator have been highlighted as special features of the implementation. Salient
features of the implementation are
Mixed nite element discretization in space for ow problem (pressure and
uxes)
Two dimensional unstructured grid (using GEOMPACK [22]), straightforward
to extend to three dimensions
Adaptive time stepping, varying degree of implicitness
Computation of equivalent stresses (von-Mises, stress invariants and mean stress
level)
Individual conditioning of linear solvers for ow and mechanical sub-problems
Porosity and permeability functions have also been implemented in the simulator
which keeps track of the changing pore volume and ow properties of the reservoir, by
explicit updating at every time step. This kind of coupling which has been mentioned
right in the beginning of the report (Chapter 1) under motivational statements behind
this research, is an important aspect of any geomechanical simulator as they directly
inuence the productivity (at well level) and recovery (at eld level) of the reservoir.
7.3 Recommendations
Building on the benets of modular structure of the software design, we can extend
the simulator code to include many features of interest for both research as well
as commercial purposes. From the point of view of immediate improvements, we
recommend extension of the code to incorporate
1. Well models
2. Raviart-Thomas quadrilateral elements of order zero
CHAPTER 7. CONCLUSIONS AND RECOMMENDATIONS 121
Figure 7.1: Raviart-Thomas elements in two dimensions
3. Models of inelasticity. Viscoelasticity, stress hardening and softening, plastic
failure models e.g. Cam-clay models)
4. Multiphase ow. Through transport equations and saturation variables [26,
27], it will be a favorable step in the direction of joining this geomechanical
simulator to our already existing in-house reservoir simulator GPRS. Linking
this geomechanical simulator to a general reservoir simulator such as GPRS will
enhance its capabilities manyfold.
5. Preconditioners. Investigate and improve upon the eciency of this code by
applying suitable preconditions (CPR and multigrid modules). Investigate pro-
ling to increase the numerical robustness of the current code
Bibliography
[1] Eclipse 300. Eclipse Technical Description. Schlumberger, 2004. 2004A.
[2] S. M. F. Ali. Integrated simulation of oil and gas production and the accompany-
ing rock deformations. In Proceedings of the Fourth International Conference on
Numerical Methods in Geomechanics Z. Eisenstein, editor, Numerical Methods
in Geomechanics, volume 3, pages 349365, Edmonton, Canada, May 31-June 4
1982. A. A. Balkema.
[3] F. Armero. Formulation and nite element implementation of a multiplicative
model of coupled poro-elasticity at nite strains under fully saturated conditions.
Computational Methods in Applied Mechanical Engineering, 171:205241, 1999.
[4] F. Armero and J. C. Simo. A new unconditionally stable fractional step method
for non-linear coupled thermomechanical problems. International Journal For
Numerical Methods in Engineering, 35:737766, 1992.
[5] K. Aziz and A. Settari. Applied Sciences, London, 1979.
[6] J. Bear. Dynamics of Fluids in Porous Media, volume 30 of Environmental
Science Series. Elsevier, New York, 1972. Reprinted with corrections, Dover,
New York, 1988.
[7] M. A. Biot. Theory of elasticity and consolidation for a porous anisotropic solid.
Journal of Applied Physics, 26(2), 1955.
[8] H. Cao. Development of Techniques for General Purpose Simulators. PhD thesis,
Stanford University, CA, USA, June 2002.
122
BIBLIOGRAPHY 123
[9] H. Y. Chen, L. W. Teufel, and R. L. Lee. Coupled uid ow and geomechanics
in reservoir study - i. theory and governing equations. Society of Petroleum
Engineers Journal, (SPE 30752):507519, October 1995. SPE Annual Technical
Conference and Exhibition.
[10] G. V. Chilingarian, E. C. Donaldson, and T. F. Yen. Subsidence due to Fluid
Withdrawal. Elsevier Science, New York, 1995.
[11] L. Y. Chin, R. Raghavan, and L.K. Thomas. Fully coupled geomechanics and
uid-ow analysis of wells with stress-dependent permeability. Society of Petro-
leum Engineers Journal, 5(1):3245, March 2000.
[12] L. Y. Chin and G. G. Ramos. Fluid ow coupled modeling of rock compaction
and its adverse eects on well productivity in weak reservoirs. American Rock
Mechanics Association, 2004.
[13] L. Y. Chin, L. K. Thomas, J. E. Sylte, and R. G. Pierson. Iterative coupled analy-
sis of geomechanics and uid ow for rock compaction in reservoir simulation.
Oil & Gas Science and Technology, 57(5):485497, 2002.
[14] Itasca Consulting. FLAC version 5.0 (Groundwater500). HCItasca Consulting
Group, Ontario, Canada.
[15] O. Coussy. Mechanics of Porous Continua. Number 3. John Wiley & Sons, Ltd,
West Sussex, England, 1995.
[16] O. Coussy. Poromechanics. Number 3. John Wiley and Sons, Ltd, West Sussex,
England, 2004.
[17] R. H. Dean, X. Gai, C. M. Stone, and S. Minko. A comparison of techniques
for coupling porous ow and geomechanics. In SPE Reservoir Simulation Sym-
posium, pages 19, Houston, Texas, February 2003. SPE. University of Texas at
Austin and Sandia National Laboratories.
[18] C. Farhat, K. C. Park, and Y. Dubois-Pelerin. An unconditionally stable stag-
gered algorithm for transient nite element analysis of coupled thermoelastic
BIBLIOGRAPHY 124
problems. Computer Methods in Applied Mechanics and Engineering, 85(3):349
365, 1991.
[19] C. A. J. Fletcher. Computational Techniques for Fluid Dynamics, volume I and
II of Springer Series in Computational Physics. Springer-Verlag, 1988.
[20] M. Gutierrez, R. W. Lewis, and I. Masters. Petroleum reservoir simulation cou-
pling uid ow and geomechanics. SPE Reservoir Evaluation & Engineering,
pages 164172, 2001. SPE 72095.
[21] T. J. R. Hughes. The Finite Element Method - Linear Static and Dynamic Finite
Element Analysis. Number 3. Dover Publications, Mineola, New York, 2000.
[22] B. Joe. Geompack - a software package for the generation of meshes using geo-
metric algorithms. Technical Report 13, Advanced Engineering Software, 1991.
[23] H. P. Langtangen. Advanced Topics in Computational Partial Dierential Equa-
tions. Numerical methods and Dipack Programming. Springer, Simula Research
Laboratory, Norway, rst edition, 2003.
[24] H. P. Langtangen and A. Tveito. Computational Partial Dierential Equations,
volume 1 of Numerical methods and Dipack Programming. Springer-Verlag,
Simula Research Laboratory, Norway, second edition, 2003.
[25] R. W. Lewis, P. Bettess, and E.Hinton. Numerical Methods in COUPLED SYS-
TEMS. Number 3. Wiley Science, University College of Swansea, Wales, rst
edition, 1984.
[26] R. W. Lewis and Y. Sukirman. Finite element modelling for simulating the sur-
face subsidence above a compacting hydrocarbon reservoir. International Jour-
nal For Numerical and Analytical Methods in Geomechanics, 18:619639, March
1993.
[27] X. Li, O. C. Zienkiewicz, and Y. M. Xie. A numerical model for immiscible two-
phase uid ow in a porous medium and its time domain solution. International
Journal For Numerical Methods in Engineering, 30:11951212, March 1990.
BIBLIOGRAPHY 125
[28] Dipack Technical Manual. Dipack Kernel and Toolboxes Documentation. in-
uTech, Germany, 4.0.00 edition. URL: http://www.diffpack.com/.
[29] S. Minko, C. M. Stone, J. G. Arguello, S. Bryant, J. Eaton, M. Peszynska, and
M. Wheeler. Staggered in time coupling of reservoir ow simulation and geome-
chanical deformation. Proceedings of the 1999 Reservoir Simulation Symposium,
(SPE 74142), February 1999.
[30] J. T. Oden and G. F. Carey. Finite Elements: Mathematical Aspects, volume IV.
Prentice-Hall, Englewood Clis, N.J., 1984.
[31] K. C. Park. Stabilization of partitioned solution procedure for pore uid-soil in-
teraction analysis. International Journal For Numerical Methods in Engineering,
19:16691673, 1983.
[32] A. Rieger and P. Wriggers. Adaptive methods for thermomechanical coupled
contact problems. International Journal For Numerical Methods in Engineering,
59:871894, 2004.
[33] A. Settari and F.M. Mourits. Coupling of geomechanics and reservoir simulation
models. In Siriwardane and Zaman, editors, Computer Methods and Advances
in Geomechanics, number 3, pages 21512158, Rotterdam, 1994. Balkema.
[34] A. Settari and D. A. Walters. Advances in coupled geomechanical and reser-
voir modeling with applications to reservoir compaction. SPE Journal, (SPE
74142):334342, September 2001. SPE Reservoir Simulation Symposium, Hous-
ton.
[35] T. Shu. Development of an ecient fully coupled geomechanics and uid ow
simulator. Masters thesis, Stanford University, CA, USA, 2003.
[36] J. Stabler and G. Baker. Fractional step methods for thermomechanical damage
analyses at transient elevated temperatures. International Journal For Numerical
Methods in Engineering, 48:761785, 2000.
BIBLIOGRAPHY 126
[37] T. Stone, G. Bowen, P. Papanastasiou, and J. Fuller. Fully coupled geomechanics
in a commerical reservoir simulator. Society of Petroleum Engineers Journal,
(SPE 65107), 2000. SPE European Petroleum Conference.
[38] T. Stone, C. Xian, Z. Fang, E. Manalac, R. Marsden, and J. Fuller. Coupled
geomechanical simulation of stress dependent reservoirs. Society of Petroleum
Engineers Journal, (SPE 79697), 2003. SPE Reservoir Simulation Symposium,
Houston, TX.
[39] K. Terzaghi. Theoretical Soil Mechanics. Number 2. Wiley, 1943.
[40] L. K. Thomas, L. Y. Chin, R. G. Pierson, and J. E. Sylte. Coupled geomechanics
and reservoir simulation. Society of Petroleum Engineers Journal, (SPE 77723),
October SPE Annual Technical Conference and Exhibition, 2002.
[41] D. Tran, A. Settari, and L. Nghiem. New iterative coupling between a reservoir
simulator and geomechanics module. In SPE/ISRM Rock Mechanics Conference,
Irvine, TX, October 2002. SPE 78192.
[42] J. Wan. Stabilized Finite Element Methods For Coupled Geomechanics And Mul-
tiphase Flow. PhD thesis, Stanford university, CA, USA, November 2002.
[43] O. C. Zienkiewicz, D. K. Paul, and A. H. C. Chan. Unconditionally stable stag-
gered solution procedure for soil-pore uid interaction problems. International
Journal For Numerical Methods in Engineering, 26:10391055, 1988.
[44] O. C. Zienkiewicz and R. L. Taylor. The Finite Element Method, volume 1.
McGraw-Hill Book Company, Berkshire, England, fourth edition, 1994.
Appendix A
Plasticity Computations
Reservoir rock deforms when it s subjected to increased eective overburden load
caused by a decline of pore pressure (or decrease in its stiness). The deformation
is called elastic if its reversible upon unloading and it is plastic if it is irreversible or
permanent. Weak materials (characterized by low cohesive strength or bulk modulus)
exhibit permanent deformation on compaction and it is also addressed in literature
as compaction hysteresis. Many applications in geomechanics (or solid mechanics in
materials under the inuence of porous ow) involve permanent plastic deformations
beyond the elastic range. This calls for the simulation of combined elastic and plastic
eects, using so-called elasto-plastic models. In this chapter on plastic computations,
we focus on two things. First the signicance of such models from the point of view
of their exibility, implementation in a simulator code and limitations invariably
encountered during one simulation or another. And second, the extensibility of our
code to include plastic models of deformation.
In the rst phase of the research work Eclipse [1] (a commercial reservoir simulator
by Schlumberger) was used to study and investigate the signicance of nonlinear
deformations in geomechanical simulation. In the 2003A version of Eclipse, which
uses staggered gridding technique to implement geomechanical momentum balance
equation over domain used for uid ow, there were few limitations as pointed out
in the technical description manual. In later version 2004A, both staggered nite
dierence and nite element method have been reported to be implemented. Several
test cases were designed in such a way that plastic deformations are induced into
127
APPENDIX A. PLASTICITY COMPUTATIONS 128
the system and then through close analysis of eective stresses and principal stresses
material (grid block) evolution in time was tracked on stress space.
A.1 Stress Space
The failure criterion is usually formulated in terms of invariants of the eective stress
tensor. The following standard stress invariants are used
I
1
=
ii
(A.1a)
s
ij
=
ij

ij
_
I
1
3
_
(A.1b)
J
2
=
1
2
s
ij
s
ij
(A.1c)
Stress space is a two-dimensional plot of deviatoric stress (

J
2
) on y-axis and
hydrostatic or isotropic stress (I
1
) on x-axis as shown in Figure A.1.
Essential component of a stress space is the failure envelope of the material type
subjected to loading/unloading conditions. We can see from the adjacent gure (Fig-
ure A.1) that as uid pressure is changing in the eld and eective stresses are in-
creasing, the material points or grid blocks also deforms in response to these stresses,
primarily due to shear or deviatoric component of the stress tensor. The failure en-
velope denes the admissible region in stress space for the deforming media. When
the material point has experienced so much shear as to reach the failure cap, it fails
plastically without further increase in stress (under hardening or softening stress may
still increase or decrease in plastic domain).
A.2 Geomechanical Simulation
To investigate the behavior of a system under simple loading and depletion condition
we designed a two dimensional Black-Oil data set over a quarter to ve spot water
ood in Eclipse (Figure A.2). Eclipse outputs eective stresses and principal stresses
under geomechanical simulation mode. We computed two sets of stress invariants I
1
APPENDIX A. PLASTICITY COMPUTATIONS 129
failure envelope
elastic domain
initial state
final state
inadmissible
trial state
I
1
J
2
return map
Total strain = Elastic strain + Plastic strain
Figure A.1: Stress space
and J
2
from two separate eective stress tensors - one directly output by Eclipse and
another computed out of principal stresses in our code. There were slight dierences
between these two eective stresses and so the stress invariants were also dierent.
Stress invariants are plotted over the stress space for every grid block of the sim-
ulation grid at every time step, to see the evolution of deformation in the porous
media under pre-specied stress boundary conditions. We can notice that almost all
the blocks move towards the failure cap which is a straight line of constant cohesive
strength and angle of friction in this hypothetical case. This behavior is anticipated
under the existing depletion and loading scenario. However what is not acceptable
is the points lying outside and beyond the failure region (Figure A.3) at late times
when system has undergone plastic deformation.
A.3 Return Map Algorithm
Main message being conveyed here is that to preserve admissibility of the solution-set
in plastic domain, one has to employ to specic techniques which ensure that points
lying outside the envelope are brought back onto the envelope. One such technique is
Return Map Algorithm. Detailed discussion on Returned Map Algorithm is beyond
the context of this report.
APPENDIX A. PLASTICITY COMPUTATIONS 130
Z Axis
X Axis
Injector
Y Axis
Producer
-0.01320 -0.00227 0.00866 0.01959
Vertical Rock Displacement, ft
-0.02412
Figure A.2: Eclipse output - pressure map at end of simulation
3000 2500 2000 1500 1000 500 0 500 1000 1500
0
50
100
150
200
250
300
350
400
450
500
Isotropic stress (Invariant I
1
), psia
D
e
v
i
a
t
o
r
i
c

s
t
r
e
s
s

(
I
n
v
a
r
i
a
n
t

J
2
)
,

p
s
i
a
Evolution in time of the
stress state of all the cells
Failure envelope
Figure A.3: Visualizing the state of stress for the entire eld in stress space
APPENDIX A. PLASTICITY COMPUTATIONS 131
A.4 Implicit Time Integration
Explicit solutions suer from instability and oscillations during transients in the sys-
tem if time step chosen for integration is above a constraint which is usually too small
to be practical. Therefore, we vouch for implicit integration in time to avoid such
constraints and also to ensure admissible solutions in inelastic domain.
Appendix B
Finite Volume Framework
After investigating the behavior and features of commercial simulators we decided to
develop our own coupled geomechanical simulator, especially oriented towards imple-
menting new solution strategies and related research. With respect to simulation and
modeling, main issues that still confront us are the coupling and discretization strate-
gies. Geomechanics is based on the solution of a coupled problem of uid and solid
interactions. And the degree of coupling granted to the solution scheme inuences
the cost and stability of the solution provided. Discretization becomes important on
account of dissimilar nature of the variables involved in the simulation which has a
bearing on the overall accuracy and stability of the scheme. To solve ow problem,
our rst choice was nite volume method for space discretization of dierent variables
as this method not only ensures stability and local mass conservation on an element
by element basis, it is also cheap in computational resources when compared to its
counterpart in nite element family of methods e.g. mixed nite element. Another
great advantage in the direction of nite volume method was that of straightforward
handling of dierent types of variables that we are dealing with in coupled geome-
chanical simulation i.e. pore pressure, phase saturations, and uid uxes. Pressure
and saturation are situated at volume center whereas uxes are dened on the edges
of a two dimensional CV (control volume) and faces of a three dimensional CV.
132
APPENDIX B. FINITE VOLUME FRAMEWORK 133
B.1 Mathematical Formulation
We consider only ow part of the complete geomechanical problem. Mass balance
equation over a representative element volume (control volume) is given by:
c
t
p
t
+ F = f
source
(B.1)
where c
t
is total system compressibility, F is uid volumetric ux and f
source
is the
source term in the equation.
F
t
n =
_

k
1
(p g)
_
t
n (B.2)
In integral form the same equation can be written as following:
_
V
I
c
t
p
I
t
dV +
nface

F=1
_
V
IF
F
t
.nd=
_
V
I
f
source
dV (B.3)
where nface denotes number of faces of the control volume over which volume (or
mass in case of varying uid density) integration is performed. Following gure helps
in visualizing the ow dened over control volumes.
Now the next step is to discretize the system (and the governing partial dierential
equation) and linearize it to yield the solve the problem via Newtons method. Hence
we compute residual vector and tangent matrix to prepare the system Ax= b for a
linear solver.
R
I
=
_
V
I
c
t
p
I
t
dV +
nface

F=1
_
V
IF
F
t
.nd
_
V
I
f
source
dV (B.4)
S
IJ
=
R
I
P
J
(B.5)
S
IJ
=
_
V
I
c
t
1
t

IJ
dV

nface

F=1

_
V
IF
1

k
1
IF
.
1
L
IF
.d

.
FJ
(B.6)
APPENDIX B. FINITE VOLUME FRAMEWORK 134
Figure B.1: Finite volume grid
APPENDIX B. FINITE VOLUME FRAMEWORK 135
Integrands function, which is the kernel of the simulator design, is completely
based on the form of this residual and tangent blocks, computed over each volume
or face. There are two types of integrands - face integrands and volume integrands
corresponding to the ux term and the accumulation term in the partial dierential
equation. Flux integration is performed for every face in the grid, separately for
interior volume faces and boundary faces. Then accumulation terms are computed
for every nite volume once. This sequence is repeated over the grid to build up
the complete residual vector and tangent matrix, as dened above under Newtons
iterative scheme of solving a nonlinear problem.
B.2 Implementation Details
Single phase porous media ow for compressible uids was modeled and implemented
in C++ using Dipack libraries. The ow chart of the program is very simple:
1. Read input le
(a) Read grid le for dimensions, grid properties
(b) Read uid properties and solution time domain
(c) Read linear solver type and parameters
2. Start simulation or time loop
(a) apply initial conditions for unknowns (pressures)
(b) solve at a given time step
i. apply essential boundary conditions for unknowns
ii. initial guess for Newton method is taken from previous solution set
iii. make (assemble) the linear system Ax = b with essential boundary
conditions imposed over it
A. integrate in space for elemental A and b
iv. solve the linear system using conjugate gradient
v. check for convergence of the solution and loop for few nonlinear iter-
ations every time step. Move to new time step on convergence
APPENDIX B. FINITE VOLUME FRAMEWORK 136
Figure B.2: Pressure map from the nite volume simulator
3. Print output les. This involves generating ASCII output les for pressure data
over the eld in a format suitable to read and plot using other plotting softwares.
B.3 Numerical Experiments
Results from a test case has been plotted below to validate the nite volume imple-
mentation for a single phase ow simulator. This is a case of homogeneous 21 21
grid with an injector in the middle of the grid and four producers on four corners of
this box shaped grid. All wells are constant pressure wells and it is a no-ow boundary
reservoir. Steady state pressure map solution is shown below:
B.4 Observations
Finite volume framework was the rst choice to develop our in-house coupled geo-
mechanical simulator. It oers some obvious benets not matched by any other
APPENDIX B. FINITE VOLUME FRAMEWORK 137
discretization technique being considered during or research such as inherent local
mass conservation and stability of solution provided at a lower cost, straightforward
extension to multiphase transport through saturation unknowns and incorporation
of nonlinearities from relative permeabilities. However, on account of some software
issues, later we switched to mixed nite element approach which has been described
in next chapter.
Appendix C
Relevant Dipack Routines
Dipack implementation proceeds in a logical and object-oriented fashion and it ben-
ets hugely from its emphasis on application of abstract data types [24, 23]. In
Dipack most of the functionalities are grouped in class hierarchies which have the
common feature of existence of an associated parameter class. We can summarize
the process of constructing a typical nite element solver or simulator in Dipack
to understand the specics of our implementation. The simulator is realized as a
class. Standard nite element algorithms can be inherited by having class FEM as
base class. For mixed nite element framework we have to inherit from class MxFEM
which is recognized as child of FEM. It is then necessary for the simulator class to
implement the viral function integrands for dening the integrands in the integrals
of the nite element equations after discretization of mathematical model. Class FEM
(and consequently MxFEM) is derived from SimCase, which allows multiple loops and
handling of numerical experiments through the nu system.
The data structures in a nite element solver are typically a grid (derived from
class GridFE), a nite element eld over the grid (derived from class FieldFE for
a scalar eld or FieldsFE for a vector eld such as displacement, velocity), an in-
terface to linear systems and linear solvers (derived from LinEqAdmFE), a mapping
between the eld representation and the linear system representation of the primary
unknown(s) (derived from class DegFreeFE), and perhaps some problem-dependent
constants and functions (like in our case heterogeneous permeability and porosity
eld, initial pressure and stress eld etc. They require additional data structures
138
APPENDIX C. RELEVANT DIFFPACK ROUTINES 139
derived from FieldFE or just a global function). The relations between a solver, its
base classes, and its internal data structures are shown in Figure C.1.
The standard member functions in a simulator are
adm for administering the menu system,
define for dening the items on the menu,
scan for reading input data from the menu system and initializing the internal
objects (grid, elds, etc.),
integrands (ElmMatVec, FiniteElement) for dening the integrands of the
element-level nite element conditions,
fillEssBC for marking essential boundary conditions
solveProblem for the main program ow of the solver,
resultReport for writing results.
Other routines employed in our code, though optional, are
calcElmMatVec for computing the element matrix and vector (normally, this
function will call the corresponding default version in class FEM and just do
some additional task, like debug output or surface integrals),
integrands4side for dening the integrands corresponding to boundary inte-
grals in the weak formulation,
saveResults for storing results on le,
solveAtThisTimeStep for advancing the solution one time step in time-dependent
problems
makeAndSolveLinearSystem for dening and solving the linear system in iter-
ation methods for nonlinear algebraic equations
In what follows, we look at some important classes and functionalities provided
by Dipack.
APPENDIX C. RELEVANT DIFFPACK ROUTINES 140
SimCase
FEM, MxFEM
Simulator Class
LinEqAdmFE
DegFreeFE,
BasisFuncGrid
GridFE
FieldFE,
FieldsFE
Figure C.1: A sketch of simulator class, its base classes and internal objects. A solid
line indicates class derivation (is-a relationship), whereas dashed lines represent a
pointer/handle (has-a relationship).
APPENDIX C. RELEVANT DIFFPACK ROUTINES 141
C.1 Fully Coupled Simulator
To implement fully coupled geomechanical simulator we basically need to solve the
linear system developed as a result of numerical discretization of the model equations
(Chapter 3). We design the program ow chart to highlight the data structures and
functionality we need in our simulator class. We look at the possibilities of inheritance
and abstraction made available to us by Dipack. Then we declare and dene our
class as a child to two parent classes - mixed nite element method (MxFEM) and
nonlinear equation solver (NonLinEqSolverUDC) to inherit the functionality required
to dene and populate a mixed nite element framework having data elds, geometric
grid, basis function grid with capabilities to operate on them to solve the nonlinear
system of tangent matrix and residual vector while marching ahead in time.
C.2 Iteratively Coupled Simulator
Implementation of iterative coupling or operator-splitting technique is slightly com-
plicated. It is implemented by extending the data structures to include a manager
class which manages calls to FlowS sub-problem and MomentumS sub-problem at every
time step. All three are dierent classes. They are connected to each other but only
through manager class which also connects to a fourth class named CommonRel (see
Figure C.2) storing all the functions and parameters common to both ow and me-
chanical subclasses.
C.3 Important Class Denitions
Although the simulator uses a large number of classes and data types and the detailed
structure tree of the Dipack is substantially huge to present, looking at following
classes suces the purpose. We can gain some outlook towards basic understanding
of the simulator besides acknowledging a few points unique to it.
ElmDef : Denition of the reference element is provided by subclasses of this par-
ent class which denes all the elements. In other words, objects of subclasses
APPENDIX C. RELEVANT DIFFPACK ROUTINES 142
Momentum
MomentumS
FlowS
Flow
Manager
CommonRel
Figure C.2: Class structure for iteratively coupled simulator. Relation between solver
classes and the pool of common relations in the simulator for coupled uid ow and
geomechanics is shown with solid arrows indicating inheritance (is-a relationship)
and dashed arrows indicating pointers (has-a relationship).
APPENDIX C. RELEVANT DIFFPACK ROUTINES 143
inherited from this class provide local denition of the basis functions used in
interpolation
FieldFE and FieldsFE : They contain a grid with nodal eld values and built-in
evaluation at arbitrary spatial points.
FiniteElement : It is designed to oer easy access to the global element i.e. the
basis functions, their global derivatives and the Jacobi determinant (here one
has to be pay attention to the convexity of the element geometry within the
grid), evaluated at a point in the reference domain
r
(corresponding to a
physical point x in
e
). Class FiniteElement is naturally based on a layered
design where it gains its information from instance of classes BasisFuncGrid,
ElmDef, BasisFuncAtPt, and GridFE. In the case of a mixed nite element one
needs a FiniteElement object for each type of basis functions. This is provided
by the class MxFiniteElement, which contains an array of pointers (handles) to
FiniteElement objects and much of the same interface as class FiniteElement.
Scalar nite element elds are represented by FieldFE and rely on information
from FiniteElement, BasisFuncGrid, and GridFE objects. FieldFE objects
are designed to represent the solution eld and can be evaluated and dierentiate
(FieldFEAtItgPt) at arbitrary points.
GridFE : An important class as it may sound, stores/exchanges information on the
elements, in particular the geometry nodes, their connectivity, and boundary
indicators (for imposing essential boundary conditions). Similarly, class Bas-
isFuncGrid contains the basis function nodes, their connectivity, the boundary
indicators at basis function nodes, etc. Class BasisFuncGrid keeps a handle to
GridFE object as it needs complete information of all the geometry and basis
function nodes and their associated data. Together, GridFE and BasisFunc-
Grid classes organize the global topology of the geometry and basis function
information as may be required in specic discretization schemes.
BasisFuncGrid : Actually to understand the dierence in implementation of a mixed
element and standard nite element discretization, one needs to pay attention
to the properties and characteristics of the BasisFuncGrid. This class simply
APPENDIX C. RELEVANT DIFFPACK ROUTINES 144
uses GridFE object for looking up basis function nodes and degrees of freedom in
scalar elds (e.g. pressure), in case of isoparametric mapping used by standard
nite elements and hence BasisFuncGrids presence is not felt at all in such
type of elements. However, if non-parametric elements are employed in the
discretization then we need to allocate and initialize a BasisFuncGrid explicitly
for each scalar eld (components of velocity vector in our case).
LinEqAdmFE : This deals with the linear system information only.
DegFreeFE : It acts as the link between grid/eld objects and linear system objects
by exchanging information on ordering of unknowns.
FieldsFEatItgPt : The class oers representation of derivatives of nite element
elds, computed at optimal (or nodal) locations in each element. The locations
are dictated by an ElmItgRules object, which means that the points must
coincide with those of a supported integration rule. Usually, the class is used to
sample derivatives of nite element elds at the reduced Gauss points. The class
is integrated with class FEM for computing smooth elds based on the scattered
point values in each element.
Finite volume implementation in Dipack uses following important classes:
FieldFV : This class implements a scalar eld suited for nite volume and dierence
methods. It accesses GridFV objects to retrieve information on grid geometry,
basis function nodes and interpolation functions. It also has an array containing
the point values at the grid points.
GridFV : This is the counterpart of GridFE class created for nite volume methodol-
ogy. As expected, it provides functionality and data structures to store, operate
and exchange information on geometric setting, physical mapping and connec-
tivity to degree of freedoms.
C.4 Important Functionalities
These matrix-vector components are computed at element level within appropriate
functions (over domain) which are then subjected to essential boundary conditions.
APPENDIX C. RELEVANT DIFFPACK ROUTINES 145
For boundary conditions applied over multiple elements (e.g. lateral traction on sides
of the grid) integrands4side() functions computes the additional contribution at
element level which then updates the residual. Assembly of the element matrix-vector
terms within the global counterparts A and b or S and R are performed by Dipacks
in-built routine once the matrix and vectors are initialized properly and in accordance
with degree of freedoms present on the actual grid, which is not necessarily a trivial
task especially within a hybrid scheme of mixed nite element and standard Galerkin
nite element discretizations.
Field Unknowns : Primary unknowns are FieldsFE (velocity and displacement
vector elds) and FieldFE (scalar pressure eld) objects where FieldsFE ob-
ject is just an array of handles to FieldFE objects for each component in the
vector eld. All the FieldFE functionality is therefore immediately available
for FieldsFE objects. To treat more than one unknown at a node in case of
a vector eld such as displacement we control the interaction between the vec-
tor eld (FieldsFE) and the unknowns in the linear system carefully. We use
vec2eld and eld2vec functionality of the DegFreeFE object which takes care
of the relation between degrees of freedom in a eld representation (here a set
of FieldsFE and FieldFE objects) and the ordering of the equations and un-
knowns in the linear system. Same ordering prevails at element level and is
therefor instrumental in coding the integrands function.
PDE coecients : Coecients of the PDE which vary in the space (e.g. permeabil-
ity, porosity, compressibility etc.) are implemented using exible FieldFormat
and Handle(Field) tools available from Dipack.
Boundary conditions : Traction-free boundaries appear as natural boundary con-
ditions in the present problem. Essential boundary conditions (v
i
and/or p
and/or u
j
known at a node) are incorporated in the matrix system by sub-
stituting the equation corresponding to the actual degree of freedom by the
boundary condition. While doing so, we sincerely attempt to preserve the sym-
metry of matrix S. The surface integral over is implemented for normal
tractions only.
APPENDIX C. RELEVANT DIFFPACK ROUTINES 146
Stress Computation : We evaluate and smooth the derivatives of displacement
elds using the functionality oered by FieldsFEatItgPt class of Dipack (also
see Subsection 5.2.9 in Chapter 5).
C.5 Code Structure
C.5.1 Header and Source Files
Denition of a class, its member functions and member variables (data structures)
involves generating problem-specic header les as a rst step which inherits most
of its functionality and character from a group of pre-compiled parent classes avail-
able with Dipack libraries. These header les are then modied to include all the
necessary data structures needed to solve the problem. Below is a section from the
simulator header le demonstrating main functionality of the class. It only shows the
most important members of the class for easy reference in the forthcoming discussion.
Program C.1: The Header File
1 class PoissonBlocks : public MxFEM , public NonLinEqSolverUDC
2
3
4 /* ***************** Member Functions ****************** */
5
6
7 // general scanning routine from input data file for all
parameters , calls scangrid ()
8 scan()
9 // read the grid file or prepare a grid file
10 scanGrid ()
11 // set boundary conditions by calling following 3 functions
12 fillEssBC ()
13 // set velocity boundary conditions using degree of freedom
object
14 fillEssBC4V ()
15 // set pressure boundary conditions using degree of freedom
object
16 fillEssBC4P ()
APPENDIX C. RELEVANT DIFFPACK ROUTINES 147
17 // set displacement boundary conditions using degree of freedom
object
18 fillEssBC4Q ()
19 // save converged solutions , field maps , plots
20 saveResults ()
21 // computes and smooths stress (invariants , von -Mises)
22 calcDerivedQuantities ()
23 // initialize the field data structures
24 initFieldsEtc ()
25 // initilaize the PDE coefficient functions , e.g. permeability
26 initFunctors ()
27 // initialize degree of freedom object , prepares local global
vectors
28 initDofs ()
29 // velocity field initialization , called by initFieldsEtc ()
30 initUFields ()
31 // displacement field initialization , called by initFieldsEtc ()
32 initQFields ()
33 // pressure field initialization , called by initFieldsEtc ()
34 initPFields ()
35 // calls initBlocks () and timeLoop ()
36 solveProblem ()
37 // runs the time loop for simulation , calls setIC , saves time -
series or evolution points
38 timeLoop ()
39 // sets initial conditions (u, p and q fields at time zero)
40 setIC()
41 // initialize the block matrix/vector structure of Jacobian and
Residual , calls makeBlockSystemMx ()
42 initBlocks ()
43 // enforces essential BC on element matrix -vector , using
integration rule performs linear system assembly
44 makeBlockSystemMx ()
45 // solving the linear system at given time step , calls
makeAndSolveLinearSystem (), manipulates time step size
46 solveAtThisTimeStep ()
47 // prepares (assembles) the global Ax=b system to solve
48 makeAndSolveLinearSystem ()
49 // applies or integrates traction boundary conditions
APPENDIX C. RELEVANT DIFFPACK ROUTINES 148
50 integrands4sideMx ()
51 // computes total stress in a mixed finite element
52 calcTotalSigma ()
53 // computes strain in a mixed finite element
54 calcEps ()
55 // computes displacement boundary condition values from data
input file
56 displacementBC ()
57 // computes traction boundary condition values from data input
file
58 tractionBC ()
59 // reporting and outputing routine
60 resultReport ()
61
62
63
64 /* ***************** Member Variables ****************** */
65
66
67 // scalar fields e.g. pressure , permeability etc.
68 Handle(FieldFE)
69 // vector fields e.g. displacement , velocity , flux
70 Handle(FieldsFE)
71 // object pointer to degree of freedom structure
72 Handle(DegFreeFE)
73 // required for non -isoparametric mixed elements variables e.g.
pressure and velocity
74 Handle(BasisFuncGrid)
75 // finite element grid storing all dimensions and geometrical
informations
76 Handle(GridFE)
77 // linear system vector of unknwons e.g x in Ax=b
78 // complete Ax=b system with block definitions and preconditioner
readyHandle(LinEqVector)
79 Handle(LinEqSystemBlockPrec)
80 // Pointer to element matrix -vector object
81 Handle(ElmMatVecCalculator)
82 // enumerator for specifying plane_strain , plane_stress or
axisymmetric defromation
APPENDIX C. RELEVANT DIFFPACK ROUTINES 149
83 Elasticity_type {}
84 // declares an integrand object which links to all the integrand
blocks of the Jacobian
85 MatSimplest(Handle(MxIntegrandCalc))
Class declaration is used by the C++ source le (also called cpp le) which actually
denes the structure of the declared functions and initializes (binds) the member
variables or data structures. This certainly involves memory allocation for most of
these class members. Below in C.2, we look at a section of the source le from the
simulator program to crystallize the ideas presented here.
Program C.2: The Source File
1 PoissonBlocks :: scan (){
2
3 /*scan the menu for input parameters of system e.g. number of
space dimensions ,\break absolute permeability field ,
porosity , fluid density , fluid viscosity ,\break fluid
compressibility (modeled as field), grain density , number
of wells \break in field , well pressures , traction and
normal stress boundary conditions , \break displacement
boundary conditions , Young

Ss modulus , Biot constant ,


Poisson \break ratio. Elasticity problem type (PLANE -
STRAIN , PLANE -STRESS etc.) Data \break structure for
storing and manipulating variables such as stress , strain
\break vectors , linear and non -linear solver
4 administrators.*/
5 }
6
7 PoissonBlocks :: solveProblem (){
8 initBlocks ();
9 timeLoop ();
10 } PoissonBlocks :: timeLoop (){
11 initTimeLoop ();
12 setIC ();
13 } PoissonBlocks :: solveAtThisTimeStep (){ fillEssBC (); }
APPENDIX C. RELEVANT DIFFPACK ROUTINES 150
C.5.2 Input Data File
The simulator needs a input data le which is quite common these days in almost
any kind of simulator programs. The data le supplies all the necessary numbers and
values for system parameters, properties, dimensions, type of problem being solved,
structure and capabilities of the solver routine etc. In our simulator, data input le
is read and scanned at the beginning of the program to set up various data structures
necessary for dening the system boundaries, type of problem, material properties
and storing and manipulation of variables. An example data le is given below in
C.3.
Program C.3: An example data deck
1 set purpose = Undrained Split version of iteratively coupled
scheme for poromechanics
2 set tolerance = 1.0e-4
3 set max no of outer iterations = 4
4 set strategy = Gauss -Seidel
5 set gridfile = P=PreproBox | d=2 [0.0 ,3000.0]x[0.0 ,800.0] | d=2 e
=ElmT3n2D div =[30 ,60] [1,1]
6 set time_integration_parameters = dt=1 t in [0 ,500]
7 set theta = 1.0
8
9 set momentum initial stress=-1e7
10 set momentum nu format =CONSTANT =0.35
11 set momentum E format =CONSTANT =1e7
12 set momentum alpha format = CONSTANT =0.9
13 set momentum rho format = CONSTANT =2200
14 set momentum M format=CONSTANT = 1e7
15 set momentum q0_field format = FUNCTOR=qinitial
16 set momentum elasticity type = PLANE_STRAIN
17 set momentum normal stress 1 = 0
18 set momentum normal stress 2 = -1e7
19 set momentum prescribed displacement = 0 0
20 set momentum deformed grid magnification = 1.0
21
22 sub momentum ElmItgRules
23 set momentum integration point type = GAUSS_POINTS
APPENDIX C. RELEVANT DIFFPACK ROUTINES 151
24 set momentum relative quadrature order = 0
25 set momentum smoothing average type = ARITHMETIC
26 ok
27
28 sub momentum #1 NonLinEqSolver_prm ! nonlinear solver in
momentum eq.
29 set momentum #1 nonlinear iteration method = NewtonRaphson !
30 set momentum #1 max nonlinear iterations = 10
31 set momentum #1 max estimated nonlinear error = 1.0e-8
32 set momentum #1 nonlinear iteration stopping criterion = 1
33 ok
34 set flow top_depth = 3000
35 set flow top_pressure = 1e7
36 set flow gravity_vector = 0.0 -1.0
37 set flow fluid_density = 800
38 set flow fluid_viscosity = 1e-2
39 set flow permeability_field format = FUNCTOR=permfunction
40 set flow porosity_field format = CONSTANT =0.25
41 set flow p0_field format = FUNCTOR=pinitial
42 set flow dpdx integration by parts = true
43 set flow p element = ElmT3gn1bn2D
44 set flow u_x element = ElmT3gn3bn2Du
45 set flow u_y element = ElmT3gn3bn2Dv
46 set flow no_wells = 2
47 set flow well_pressures = 2e7 2e7
48
49 sub flow ElmItgRules
50 set flow integration point type = GAUSS_POINTS
51 set flow relative quadrature order = 0
52 set flow smoothing average type = ARITHMETIC
53 ok
54
55 sub flow #1 NonLinEqSolver_prm
56 set flow #1 nonlinear iteration method = NewtonRaphson
57 set flow #1 max nonlinear iterations = 10
58 set flow #1 max estimated nonlinear error = 1.0e-8
59 set flow #1 nonlinear iteration stopping criterion = 1
60 ok
61
APPENDIX C. RELEVANT DIFFPACK ROUTINES 152
62 sub flow LinEqAdmFE
63 sub flow Matrix_prm
64 set flow matrix type = MatSparse
65 ok
66 sub flow LinEqSolver_prm
67 set flow basic method = ConjGrad
68 set flow max iterations = 100000
69 set flow no of search vectors = 100
70 set flow restart = true
71 ok
72 sub flow Precond_prm
73 set flow preconditioning type = PrecNone
74 ok
75 ok
76 !set streamline velocity field = SIMULATION(u1.0)
77 set streamline compute vorticity at centroid = false
78 set streamline lower streamline = 0.0
79 set streamline upper streamline = 1.0
80
81 ! **** linear solvers (same system/solver used for both PDEs)
****
82 sub LinEqAdmFE
83 sub Matrix_prm ! submenu for matrix
parameters
84 !set matrix type = MatBand ! matrix format , here:
banded matrix
85 set matrix type = MatSparse
86 ok
87 sub LinEqSolver_prm ! submenu for linear
solvers
88 !set basic method = GaussElim ! Gaussian elimination is
safe ...
89 set basic method = ConjGrad
90 set max iterations = 100000
91 ok
92 sub Precond_prm ! submenu for
preconditioning
93 set preconditioning type = PrecNone ! no preconditioning , RILU:
PrecRILU
APPENDIX C. RELEVANT DIFFPACK ROUTINES 153
94 set RILU relaxation parameter = 0.0 ! =0 gives ILU , =1 gives
MILU etc
95 ok
96
97 sub ConvMonitorList_prm ! termination criteria for
linear solvers
98 sub Define ConvMonitor #1 ! criterion #1
99 set #1: convergence tolerance = 1.0e-4 ! set eps_r in ||r|| <
eps_r||b||
100 ok
101 ok
102 ok
103
104 sub SaveSimRes ! storage for visualization/
plotting
105 set time points for plot = 500 ! dump data at all time
levels
106 set line1: start = (300 ,0) ! plot unknowns along a line
107 set line1: stop = (300 ,800) ! from (0.5 ,0) to (0.5 ,1)
108 set line1: resolution = 200 ! no of sampling points
along the line\
109 set time series points = d=2 n=2 (1500 ,300) (1500 ,600) ! or NONE
or ALL
110 ok
111 set time points for report field plot = [1:500 ,200]
112 set redefine displacement boundary indicators = nb=8 names= P1 P2
T1 T2 q1=0 q2=0 q1=q1_0 q2=q2_0 1=() 2=(2) 3=() 4=() 5=(1)
6=() 7=(3) 8=(4)
113 set streamline redefine boundary indicators = nb=3 names= fixed -
wall moving -wall symmetry -plane 1=(1 2 3 4) 2=() 3=()
114 set redefine velocity boundary indicators = nb=7 names=inlet
outlet u0 v0 w0 psi_1 psi_2 1=() 2=() 3=() 4=() 5=() 6=(1 2 3
4) 7=()
115 set redefine pressure boundary indicators = nb=2 names=inj prod
1=(3 4) 2=(1 2)
116 continue ! intermediate prompt in menu system
117 ok
APPENDIX C. RELEVANT DIFFPACK ROUTINES 154
C.5.3 Output File
Simulation results can be output in various ways depending on the data being output
and the purpose of the output. Even though we have placed this section on out-
put at the very end, it is one of the most important topic for obvious reasons. It
provides the value of performing simulation and prediction exercises over numerical
models by allowing us to visualize the various scalar and vector elds generated from
the obscure representation of degrees of freedom. Once again, here we make use of
Dipacks in-built result and reporting routines besides using some third-party o-
the-shelf softwares for postprocessing. We declare and dene the virtual members
of output classes in our version of the simulator class and then postprocess the data
objects to generate plots, maps and contours in two as well as three dimensions. The
result class is discussed in the beginning of Appendix C. For the purpose of this re-
port we resorted to visualization applications (besides the Dipack supported GUI)
available over the web such as ParaView and GNUPlot. We also utilized the vast
capabilities of MATLAB graphical routines to generate some of our plots in EPS
format.

También podría gustarte