development of automated neuro-simulation protocols for

214
The Pennsylvania State University The Graduate School Department of Energy and Mineral Engineering DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR PRESSURE AND RATE TRANSIENT ANALYSIS APPLICATIONS A Dissertation in Energy and Mineral Engineering by Jian Zhang Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy December 2017

Upload: others

Post on 13-Apr-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

The Pennsylvania State University

The Graduate School

Department of Energy and Mineral Engineering

DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS

FOR PRESSURE AND RATE TRANSIENT ANALYSIS APPLICATIONS

A Dissertation in

Energy and Mineral Engineering

by

Jian Zhang

Submitted in Partial Fulfillment

of the Requirements

for the Degree of

Doctor of Philosophy

December 2017

Page 2: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

ii

The dissertation of Jian Zhang was reviewed and approved* by the following:

Turgay Ertekin

Professor of Petroleum and Natural Gas Engineering

George E. Trimble Chair in Earth and Mineral Sciences

Dissertation Adviser

Chair of Committee

Sanjay Srinivasan

Head, John and Willie Leone Family Department of Energy and Mineral Engineering

Professor of Petroleum and Natural Gas Engineering

John and Willie Leone Family Chair in Energy and Mineral Engineering

Li Li

Associate professor in the Department of Civil & Environmental Engineering

Kultegin Aydin

Department Head and Professor of Electrical Engineering

School of Electrical Engineering and Computer Science

Luis F. Ayala H.

Professor of Petroleum and Natural Gas Engineering;

Associate Department Head for Graduate Education

*Signatures are on file in the Graduate School.

Page 3: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

iii

Abstract

Traditional rate and pressure transient analysis apply simplified analytical models to calculate the

reservoir characteristics. The analytical models are based on ideal assumptions which are hardly

satisfied in practice, and the analysis process also relies on well-trained human experts and their

valuable experiences. The traditional rate and pressure transient analysis approaches demand

extensive resources in terms of personnel and time.

Instead of relying on analytical models and human experts, Artificial Neural Network (ANN) tools,

as an analog of the neural systems in human brains, are developed for rate and pressure transient

analysis. The ANN tools developed are proved successful in processing complex problems with

much less cost.

Different from analytical models, however, each ANN tool developed is only applicable in

analyzing problems of certain types of reservoir and well conditions. If the problem is not within

the specification or range of the parameters of the existing ANN tools, a new ANN tool is required

to be developed from the scratch. The development process of the ANN tools is called the “Neuro-

Simulation” protocol. It applies numerical reservoir simulators to generate randomly distributed

data sets and train an ANN to analyze the transient data. This protocol relies on well trained and

experienced researchers and commercial numerical reservoir simulator and ANN development

software.

In this study, an automated Neuro-Simulation protocol is developed to assist and accelerate the

development process of ANN tools for rate and pressure transient analysis. The protocol has the

capability of automating the major processes in the Neuro-Simulation protocol. The protocol is

implemented into a comprehensive toolkit. In this toolkit, a comprehensive and generalized in-

house numerical reservoir simulator is implemented. The rectangular and radial-cylindrical grid

Page 4: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

iv

systems are implemented based on the framework, and the black oil, compositional and naturally

fractured system fluid flow models are developed into the simulator. An ANN development tool is

developed with multiple built-in activation functions and learning algorithms. The automated

Neuro-Simulation protocol based on the communication and cooperation between the in-house

numerical reservoir simulator and ANN development tool is established. The toolkit also contains

a user-friendly GUI and mini PC to provide convenience. The toolkit is designed to be general,

flexible and independent. A tight gas reservoir system with dual-lateral horizontal well is studied

to illustrate the capability of the protocol and toolkit.

Page 5: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

v

TABLE OF CONTENTS

LIST OF FIGURES ...................................................................................................................... viii

LIST OF TABLES ........................................................................................................................ xii

NOMENCLATURE ..................................................................................................................... xiv

ACKNOWLEDGEMENTS ......................................................................................................... xix

Chapter 1 Introduction and Literature Review ................................................................................ 1

1.1 Numerical Reservoir Simulation ............................................................................. 1 1.1.1 Black oil model.................................................................................................... 2 1.1.2 Compositional model ........................................................................................... 3 1.1.3 Naturally Fractured System ................................................................................. 4

1.2 Artificial Neural Network ........................................................................................ 5 1.3 Pressure Transient Analysis and Neuro-simulation ................................................. 5 1.4 Rate Transient Analysis and Neuro-Simulation ...................................................... 7

Chapter 2 Problem Statement .......................................................................................................... 8

Chapter 3 Generalized Reservoir Simulation framework .............................................................. 11

3.1 Grid System ........................................................................................................... 13 3.2 Fluid Flow Model and Finite Difference ............................................................... 17 3.3 Generalized Newton-Raphson method and Automatic Differentiation ................. 18 3.4 Linear System and Solver ...................................................................................... 21 3.5 Simulation Control ................................................................................................ 23

Chapter 4 Black Oil Model............................................................................................................ 25

4.1 Model description .................................................................................................. 25 4.2 Phase behavior ....................................................................................................... 30 4.3 Validation .............................................................................................................. 32

4.3.1 Rectangular grid system .................................................................................... 36 4.3.2 Radial-Cylindrical grid system .......................................................................... 48

Chapter 5 Compositional Model ................................................................................................... 60

5.1 Model description .................................................................................................. 60 5.2 Phase behavior and Flash Calculation ................................................................... 63

5.2.1 Generalized VnLE flash calculation framework ............................................... 63

Page 6: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

vi

5.2.2 Equation of State ............................................................................................... 69 5.2.3 VLE flash........................................................................................................... 70 5.2.4 VLLE flash ........................................................................................................ 72 5.2.5 Negative flash and Stability test ........................................................................ 75 5.2.6 Phase properties ................................................................................................. 77

5.3 Validation .............................................................................................................. 80 5.3.1 Rectangular grid system .................................................................................... 80 5.3.2 Radial-cylindrical grid system ........................................................................... 89

Chapter 6 Naturally Fractured Reservoir System ........................................................................ 100

6.1 Fluid flow mechanism in naturally fractured system .......................................... 100 6.2 Sorption rate calculation ...................................................................................... 103 6.3 Diffusion rate calculation .................................................................................... 104 6.4 Validation ............................................................................................................ 106

6.4.1 Rectangular grid system .................................................................................. 106 6.4.2 Radial-cylindrical grid system ......................................................................... 110

Chapter 7 Artificial Neural Network ........................................................................................... 113

7.1 Forward and Inverse problem .............................................................................. 115 7.2 Fully connected network ..................................................................................... 116 7.3 Activation Functions ........................................................................................... 117 7.4 Learning Algorithms ........................................................................................... 119

7.4.1 Error Back-propagation ................................................................................... 119 7.4.2 Gradient Descent ............................................................................................. 121 7.4.3 Resilient Back-propagation ............................................................................. 122 7.4.4 Scaled Conjugate Gradient .............................................................................. 123 7.4.5 Levenberg-Marquardt ...................................................................................... 126

7.5 Overfitting and Regularization ............................................................................ 128 7.6 Validation ............................................................................................................ 129

Chapter 8 Automated Neuro-Simulation Protocol for PTA and RTA ........................................ 131

8.1 Automated Neuro-Simulation Protocol ............................................................... 132 8.2 Reservoir Model Establishment........................................................................... 133 8.3 Automated Monte Carlo Simulation.................................................................... 134

8.3.1 Data Generation ............................................................................................... 135 8.3.2 Data Process .................................................................................................... 136 8.3.3 Data Visualization ........................................................................................... 137

8.4 Automated Neural Network Construction ........................................................... 137 8.4.1 ANN model selection ...................................................................................... 138 8.4.2 Forward ANN .................................................................................................. 139 8.4.3 Inverse ANN .................................................................................................... 140 8.4.4 Characterization ............................................................................................... 140

Chapter 9 Development of Neuro-Simulation tool for Tight Gas System with Dual-Lateral

Horizontal Well ........................................................................................................................... 141

Page 7: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

vii

9.1 Problem description ............................................................................................. 141 9.2 Numerical Reservoir Model ................................................................................ 142 9.3 Development of RTA Neuro-Simulation Tool .................................................... 143

9.3.1 Monte Carlo simulation ................................................................................... 144 9.3.1.1 Data Generation .................................................................................... 144 9.3.1.2 Data Process .......................................................................................... 145 9.3.1.3 Forward ANN development and prediction .......................................... 145 9.3.1.4 Data Visualization and analysis ............................................................ 147

9.3.2 Rate transient analysis ..................................................................................... 151 9.3.2.1 Inverse ANN development.................................................................... 151 9.3.2.2 Characterization results and analysis .................................................... 154

9.4 Development of PTA ANN tool .......................................................................... 158 9.4.1 Monte Carlo simulation ................................................................................... 158

9.4.1.1 Data Generation .................................................................................... 158 9.4.1.2 Data Process .......................................................................................... 159 9.4.1.3 Forward ANN development and prediction .......................................... 160 9.4.1.4 Data Visualization ................................................................................. 162

9.4.2 Pressure transient analysis ............................................................................... 165 9.4.2.1 Inverse ANN development.................................................................... 165 9.4.2.2 Characterization results and analysis .................................................... 168

Chapter 10 Mini PC and Graphical User Interface (GUI) ........................................................... 172

10.1 Mini PC ............................................................................................................... 172 10.2 Infrastructure ....................................................................................................... 173 10.3 Graphic User Interface ........................................................................................ 175

Chapter 11 Conclusions ............................................................................................................... 183

References ................................................................................................................................... 187

Page 8: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

viii

LIST OF FIGURES

Fig 1.1 Illustration of a set of typical type curve (Bourdet, D., et al) .............................................. 6

Fig 3.1 Illustration of simulation framework structure .................................................................. 12

Fig 3.2 Rectangular grid system .................................................................................................... 13

Fig 3.3 Block connection in three dimensions .............................................................................. 14

Fig 3.4 Radial-Cylindrical grid system ......................................................................................... 15

Fig 3.5 Plot of the curve of function 𝑦 = 𝑓(𝑥) ............................................................................. 18

Fig 3.6 Sparse structure of Jacobian matrix .................................................................................. 21

Fig 4.1 𝑅𝑠𝑜 vs po curve shift at bubble point pressure. ................................................................ 30

Fig 4.2 Oil property change when cross the bubble point ............................................................. 31

Fig 4.3 Comparison with analytical model. ................................................................................... 33

Fig 4.4 Relative permeability of gas phase.................................................................................... 35

Fig 4.5 Relative permeability of water phase ................................................................................ 36

Fig 4.6 Water/Oil/Gas three-phase black oil model. ..................................................................... 40

Fig 4.7 Water/Oil two-phase black oil simulation. ........................................................................ 41

Fig 4.8 Water/Gas two-phase black oil simulation. ....................................................................... 43

Fig 4.9 Oil/Gas two-phase black oil simulation. ........................................................................... 44

Fig 4.10 Oil production of single-phase oil black oil simulation. ................................................. 45

Fig 4.11 Gas production of single-phase gas black oil simulation ................................................ 46

Fig 4.12 Water production of single-phase water black oil simulation ......................................... 47

Fig 4.13 Water/Oil/Gas three-phase black oil model. ................................................................... 51

Fig 4.14 Water/Oil two-phase black oil simulation. ...................................................................... 53

Fig 4.15 Water/Gas two-phase black oil simulation. ..................................................................... 54

Fig 4.16 Oil/Gas two-phase black oil simulation. ......................................................................... 56

Fig 4.17 Oil production of single-phase oil black oil simulation .................................................. 57

Page 9: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

ix

Fig 4.18 Gas production of single-phase gas black oil simulation ................................................ 58

Fig 4.19 Water production of single-phase water black oil simulation ......................................... 59

Fig 5.1 VnLE flash calculation framework ................................................................................... 64

Fig 5.2 Water/Oil/Gas simulation with compositional model. ...................................................... 83

Fig 5.3 Water/Oil simulation with compositional model. ............................................................. 84

Fig 5.4 Water/Gas simulation with compositional model. ............................................................ 86

Fig 5.5 Oil/Gas simulation with compositional model. ................................................................. 87

Fig 5.6 Oil phase simulation with compositional model. .............................................................. 88

Fig 5.7 Gas phase simulation with compositional model. ............................................................. 89

Fig 5.8 Water/Oil/Gas simulation with compositional model. ...................................................... 92

Fig 5.9 Water/Oil simulation with compositional model. ............................................................. 94

Fig 5.10 Water/Gas simulation with compositional model. .......................................................... 95

Fig 5.11 Oil/Gas simulation with compositional model. ............................................................... 97

Fig 5.12 Oil phase simulation with compositional model. ............................................................ 98

Fig 5.13 Gas phase simulation with compositional model. ........................................................... 99

Fig 6.1 Illustration of the matrix and fracture system (Warren and Root, 1963) ........................ 101

Fig 6.2 Adsorption and desorption process of the gas molecule in the micropore system .......... 102

Fig 6.3 Diffusion processs between micropore and macropore .................................................. 102

Fig 6.4 Fracture (macropore) system ........................................................................................... 103

Fig 6.5 Simulation with naturally fractured system. ................................................................... 109

Fig 6.6 Simulation with naturally fractured system. ................................................................... 112

Fig 7.1 Structure of a typical biological neuron cell ................................................................... 113

Fig 7.2 Structure of a neuron in artificial neural network ........................................................... 114

Fig 7.3 Illustration of a forward ANN tool .................................................................................. 115

Fig 7.4 Illustration of an inverse ANN tool ................................................................................. 116

Fig 7.5 Structure of a typical fully connected Feedforward Artificial Neuron Network (ANN) 116

Page 10: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

x

Fig 7.6 Comparison of a well fitted and overfitted function. ...................................................... 128

Fig 7.7 Illustration of training and validation loss change with epoch ........................................ 129

Fig 8.1 Data flow between the numerical simulator and ANN of the typical Neuro-Simulation

Protocol ....................................................................................................................................... 132

Fig 8.2 Illustration of the workflow of the Automated Neuro-Simulation Protocol ................... 133

Fig 8.3 Illustration of the workflow of the Monte Carlo simulation module .............................. 135

Fig 8.4 Illustration of the workflow of the automated neural network construction module ...... 138

Fig 9.1 Different fracture growth scenarios studied. ................................................................... 142

Fig 9.2 Numerical Reservoir Models for different scenarios. ..................................................... 143

Fig 9.3 Fitted decline curve for gas production flowrate ............................................................ 145

Fig 9.4 Most optimized ANN structures for forward ANN. ....................................................... 146

Fig 9.5 Testing results from the most optimized forward ANN .................................................. 147

Fig 9.6 Monte Carlo analysis visualization. ................................................................................ 151

Fig 9.7 Most optimized ANN structures for inverse ANN. ......................................................... 153

Fig 9.8 Testing results from most optimized inverse ANN of different types ............................ 154

Fig 9.9 Predicted gas flowrate for each inverse ANN type. ........................................................ 157

Fig 9.10 Fitted curve for pressure transient data ......................................................................... 160

Fig 9.11 Most optimized ANN structures for forward ANN. ..................................................... 160

Fig 9.12 Testing results from most optimized forward ANN ...................................................... 161

Fig 9.13 Monte Carlo analysis visualization. .............................................................................. 165

Fig 9.14 Most optimized ANN structures for inverse ANN. ....................................................... 167

Fig 9.15 Testing results from most optimized inverse ANN of different types .......................... 168

Fig 9.16 Predicted gas flowrate for each inverse ANN type. ...................................................... 171

Fig 10.1 Mini PC – Jetson TK1 development board ................................................................... 173

Fig 10.2 Illustration of system infrastructure. ............................................................................. 174

Fig 10.3 The structure of the working system (hardware)........................................................... 175

Page 11: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xi

Fig 10.4 3D reservoir structure .................................................................................................... 177

Fig 10.5 Reservoir parameter surface map .................................................................................. 178

Fig 10.6 Relative permeability and capillary pressure curves ..................................................... 179

Fig 10.7 PVT curves .................................................................................................................... 180

Fig 10.8 Flow rate curves ............................................................................................................ 181

Fig 10.9 Artificial neural network page....................................................................................... 182

Page 12: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xii

LIST OF TABLES

Table 3.1 Comparison between differentiation schemes ............................................................... 20

Table 4.1 Reservoir properties for analytical model test ............................................................... 32

Table 4.2 Oil PVT data .................................................................................................................. 34

Table 4.3 Gas PVT data................................................................................................................. 34

Table 4.4 Water properties ............................................................................................................ 35

Table 4.5 Reservoir and fluid properties ....................................................................................... 37

Table 4.6 Reservoir and fluid properties ....................................................................................... 48

Table 5.1 coefficient γi .................................................................................................................. 76

Table 6.1 Reservoir and fluid properties ..................................................................................... 107

Table 6.2 Reservoir and fluid properties ..................................................................................... 110

Table 7.1 Activation functions implemented .............................................................................. 118

Table 7.2 ANN structure for validation ....................................................................................... 130

Table 7.3 Testing result comparison ........................................................................................... 130

Table 9.1 Reservoir and fluid properties ..................................................................................... 143

Table 9.2 Reservoir and fluid properties ..................................................................................... 144

Table 9.3 inverse ANN types for different target variable set ..................................................... 152

Table 9.4 Testing error rates of inverse ANN types .................................................................... 153

Table 9.5 Testing results of inverse ANN types .......................................................................... 155

Table 9.6 Testing error rates of inverse ANN types .................................................................... 155

Table 9.7 Reservoir and fluid properties ..................................................................................... 158

Table 9.8 inverse ANN types for different target variable set ..................................................... 166

Table 9.9 Testing error rates of inverse ANN types .................................................................... 167

Table 9.10 Testing results of inverse ANN types ........................................................................ 169

Table 9.11 Testing error rates of inverse ANN types .................................................................. 169

Page 13: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xiii

Table 11.1 Available fluid flow models in the reservoir simulator module ................................ 183

Page 14: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xiv

NOMENCLATURE

Roman

𝐴𝑥 , 𝐴𝑦, 𝐴𝑧 Cross-sectional flow area perpendicular to flow directions in x-, y-

and z-directions

ft2

𝐵𝑏 Formation volume factor of oil at bubble point pressure RB/STB

𝐵𝑔 Formation volume factor of gas phase RB/SCF

𝐵𝑜 Formation volume factor of oil phase RB/STB

𝐵𝑤 Formation volume factor of water phase RB/STB

𝐶𝑀𝐵𝐶𝑖 Cumulative material balance check of component 𝑖

𝐶𝑀𝐵𝐶𝑙 Cumulative material balance check of phase 𝑙

𝐼𝑀𝐵𝐶𝑖 Incremental material balance check of component 𝑖

𝐼𝑀𝐵𝐶𝑙 Incremental material balance check of phase 𝑙

𝑱𝑘 Jacobian matrix at kth iteration

𝑀𝑤𝑙 Molecular weight of phase 𝑙 lb/lb-mole

𝑃𝑐𝑔𝑜 Capillary pressure between oil and gas phase psi

𝑃𝑐𝑖 Critical pressure of ith component psia

𝑃𝑐𝑜𝑤 Capillary pressure between oil and water phase psi

𝑃𝑝𝑐 Pseudo critical pressure psia

𝑅𝑠𝑜 Gas solubility in oil SCF/STB

𝑅𝑠𝑤 Gas solubility in water SCF/STB

𝑅 Residual

𝑆𝑔 Saturation of gas

Page 15: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xv

𝑆𝑙 Saturation of phase 𝑙

𝑆𝑜 Saturation of oil

𝑆𝑤 Saturation of water

𝑆𝑤𝑖𝑟𝑟 Irreducible water saturation

𝑇𝑐𝑖 Critical temperature of ith componet R

𝑇𝑝𝑐 Pseudo critical temperature R

𝑇𝑟, 𝑇𝜃, 𝑇𝑧 Constant transmissibility terms between adjacent grids in r-, 𝜃-

and z-directions

Perms-ft

𝑇𝑟𝑖 Reduced temperature of ith component

𝑇𝑥 , 𝑇𝑦, 𝑇𝑧 Constant transmissibility terms between adjacent grids in x-, y-

and z-directions

Perms-ft

�� Volume velocity ft3/day

𝑉𝑎𝑙 Adsorbed gas of component 𝑙 SCF/lb

𝑉𝑏 Bulk volume ft3

𝑉𝑒𝑙 Adsorption capacity of component 𝑙 SCF/lb

�� 𝑔 Volume velocity of gas phase ft3/day

�� 𝑙 Volume velocity of phase or component 𝑙 ft3/day

�� 𝑜 Volume velocity of oil phase ft3/day

�� 𝑤 Volume velocity of water phase ft3/day

𝑊𝐼 Well index Perms-ft

𝑿𝑘 Unknown vector at kth iteration

𝑋𝑖𝑙 Molar fraction of ith Component in phase 𝑙

𝑍𝑖 Total molar fracture of ith component

𝑍 Gas compressibility factor

Page 16: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xvi

𝑎𝑙𝑔 Constant in calculating logarithmic distance

𝑐𝑜 Compressibility of oil psi-1

𝑐𝜇 Compressibility of oil viscosity psi-1

𝒇𝑿𝒊 Fugacity vector of ith liquid phase

𝒇𝑽 Fugacity vector of vapor phase

𝑔𝑐 Sea level Gravity ft/s2

𝑔 Gravity ft/s2

ℎ Reservoir thickness ft

𝑘𝑟𝑔 Relative permeability of gas phase

𝑘𝑟𝑔𝑜 Relative permeability of oil in oil/gas phase

𝑘𝑟𝑙 Relative permeability of phase 𝑙

𝑘𝑟𝑜 Relative permeability of oil phase

𝑘𝑟𝑜𝑤 Relative permeability of oil in oil/water phase

𝑘𝑟𝑤 Relative permeability of water phase

�� Average permeability Perms

𝑘𝑟 Relative permeability

𝑘𝑟, 𝑘𝜃, 𝑘𝑧 Permeabilities in r-, 𝜃- and z-directions Perms

𝑘𝑥, 𝑘𝑦, 𝑘𝑧 Permeabilities in x-, y- and z-directions Perms

�� Mass flowrate lb/day

��𝑙 Mass flowrate of phase or component 𝑙 lb/day

𝑝𝑏 Bubble point pressure psia

𝑝𝑔 Gas phase pressure psia

𝑝𝑜 Oil phase pressure psia

𝑝𝑠𝑓 Well sandface pressure psia

Page 17: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xvii

𝑝𝑤 Water phase pressure psia

𝑞𝑖 Molar flowrate of component 𝑖 lb-mole

𝑞𝑙 Volume flowrate of phase 𝑙 STB/day

𝑟𝑒 External radius ft

𝑡 Time day

𝑥𝑖,𝑋𝑗 Molar fraction of ith component in 𝑋𝑗 liquid phase

𝑥𝑖 Molar fraction of ith Component

𝑦𝑖 Molar fraction of ith component in vapor phase

𝑧𝑖 Global composition of ith component

Greek

Δ𝑟, Δ𝑧 Grid block dimensions in r- and z-directions ft

Δ𝑡 Timestep size day

Δ𝑥, Δ𝑦, Δ𝑧 Grid block dimensions in x-, y- and z-directions ft

Δ𝜃 Grid block dimensions in 𝜃-direction

𝜌 Density lb/ft3

𝜌𝑏 Density of oil at bubble point pressure lb/ft3

𝜌𝑙 Density of phase 𝑙 lb/ft3

𝜌𝑜 Density of oil phase lb/ft3

𝜌𝑤 Density of water phase lb/ft3

𝜌𝑔 Density of gas phase lb/ft3

Φ𝑙 Potential of phase 𝑙

𝜙 Porosity

𝜙𝑖 Fugacity of ith component

Page 18: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xviii

𝜇 Viscosity cp

𝜇𝑏 Viscosity of oil at bubble point pressure cp

𝜇𝑙 Viscosity of phase 𝑙 cp

𝜆𝑚 Fluid related transmissibility term in direction 𝑚 STB/(cp-RB)

𝜂𝑚 Gravity related term in direction 𝑚 psia/ft

.

Page 19: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

xix

ACKNOWLEDGEMENTS

I would like to express my deep and sincere appreciation to my academic advisor Dr. Turgay

Ertekin. I am indebted to him for his guidance, assistance, patience and encouragement throughout

the development of this work, and also for his advice in many other aspects of my future

professional life. My appreciation is also extended to Dr. Sanjay Srinivasan, Dr. Li Li, and Dr.

Kultegin Aydin for their interest and time in serving as my committee members.

I would also like to express my deep gratitude to my family: my father Chengcong Zhang and my

mother Shufen Yang who have given me their constant and continuous love, encouragement and

support throughout all those years that I have been far away from home.

Page 20: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

1

Chapter 1

Introduction and Literature Review

1.1 Numerical Reservoir Simulation

Reservoir simulation uses numerical computations combined with the help of a computing device

to simulate the static and dynamic fluid flow in porous media. Currently, the oil industry is

expanding while the oil prices are falling quickly. More accurate understanding of the reservoir

dynamics and prediction of its future behavior is vital to keep the entire industry profitable.

Reservoir simulation is one of the most powerful protocols in the arsenal of a reservoir engineer to

fulfil this task. Black oil model, compositional model and naturally fractured system formalisms

are most important categories of fluid flow models in reservoir simulation (Peaceman, 2000) and

have their own specific applications. Nowadays, reservoir simulation is still a hot research topic

and a large variety of personal computers (PC) based simulators have been developed in both

academia and industry. Along with the development of the modern computer system, numbers of

advanced mathematical protocols and programming techniques have been successfully developed

and integrated into the traditional reservoir simulation to make it faster, more robust and more

generalized for large-scale and complex problems, among which two of the most important ones

are automatic differentiation (Zhou et al. 2011 and Li et al. 2014) and GPU parallel computing

(Dogru et al. 2009 and Khaz’ali et al. 2014).

Page 21: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

2

1.1.1 Black oil model

The mathematical representations of the fluid flow were developed prior to the birth of computer.

Back in 1936, Schilthuis proposed the first material balanced equation for aquifer in porous media.

His theory was further developed into the three-phase black oil model (Trangenstein et. al., 1989;

Stone, 1991). It treats the phases under the standard condition as pseudo components and solves

the mass balance of equations in the reservoir. A fully implicit black oil model is consistent with

one mass balance equation for each phase. Along with the techniques of finite difference, it is

powerful to simulate reservoir fluids with arbitrary time steps and grid sizes. Another version of

black oil model is called Implicit Pressure, Explicit Saturation (IMPES) model (Coats, 1999;

Ertekin. et al., 2001). Different from fully implicit model, IMPES uses only pressure as the implicit

unknown. The saturations of other two-phases (normally water and gas) are solved analytically

based on the solved pressures. This model was developed to further enhance the computational

performance of the black oil model for its simpler implementation and less system of equations,

but the time step and grid sizes are limited to ensure its numerical stability. In some cases, as the

numbers of time steps are more than those of the fully implicit model, the computational

performance of IMPES is compromised. One of key issues is the variable bubble point problem.

When the reservoir pressure drops through bubble point from under-saturated region, the free gas

phase appears; when the pressure raises up through bubble from saturated region, the free gas phase

disappears. Furthermore, the bubble point is compositional dependent and it will change along with

the fluid exchanges between reservoir blocks. Ertekin et. al. (1987) proposed an algorithm to solve

this variable bubble point problem. In this study, a fully implicit black oil model with variable

bubble point is implemented to maintain the numerical stability of and flexibility the simulation

process.

Page 22: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

3

1.1.2 Compositional model

Another category of fluid flow models is the compositional models. As mentioned above, although

the black oil model has the advantage of its simplicity and less computational demands, the phase

behavior is not easy to be probed accurately. The compositional model is thus developed to solve

this issue. The compositional model traces the mass flow of real components in fluid flow in porous

media. To simulate the phase behavior accurately, flash calculation algorithm is applied with an

equation of state (EOS). This means more mass balance equations to solve simultaneously than

black oil model (one for each component), and thus requiring more computational power. The

earliest versions of the compositional equations were developed in 1950s (Allen et al., 1950; Jacoby

et al., 1957, 1959) for the tank model. The multi-dimensional partial differential equations in

compositional simulation was further developed in the 1970s with tremendous improvement in the

computational power (Wattenbarger, 1970; Nolen, 1972). Kazemi et. al. (1978) proposed a

compositional model on three-phases and three-dimensional fluid flows with gravity and capillary

pressure terms. It is noteworthy that this work does not use fully implicit scheme but an IMPESC

(Implicit pressure, explicit saturation and composition) method. The procedure solves the pressure

of the oil phase first, and then calculates the saturation and composition of the hydrocarbon

components accordingly. In contrast to the modern compositional simulation, Kazemi and

colleagues used imperial correlations and did not use flash calculation and equation of state to solve

for the compositions. Their work is a milestone and one of the more important foundations of the

modern compositional simulation. In the same year, Kazemi et. al., proposed their compositional

model on three-phases and three-dimensional flows in natural fracture reservoirs. In 1978 and 1979,

Fussell et. al., proposed a method to use flash calculation with equation of the state to compute the

composition of the hydrocarbons. In 1980s, as the computer became more accessible and the

computational power kept increasing, the modern compositional simulation developed. In 1980,

Coats proposed the framework of the fully implicit compositional model (implicit pressure,

saturation and composition), used flash calculations with equation of states, and applied the

Page 23: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

4

Newton-Raphson method to solve for the solutions of the system of mass balance equations. His

following work (1982, 1989 and 1999) further addressed the formula and implementation of such

model. It is noteworthy that as the hydrocarbon components in water is not important in the study,

many compositional simulations are using two-phase flash calculations. Two-phase flash will take

oleic and vapor phases into consideration, leaving the water phase to be handled by black oil model

(Ayala, 2006). It is applicable to most of the cases. In some special cases, however, two-phase flash

is not enough that the compositions in the water phase is needed to be studied, a three-phase flash

calculation algorithm needs to be applied (Zaghloul, 2006; Johns et. al.,2010).

1.1.3 Naturally Fractured System

Due to the huge demand increase in natural gas, shale gas and coalbed methane (CBM) reservoirs

are receiving more and more attention in recent years. Both shale gas and CBM reservoirs are

naturally fractured reservoir systems. The gas stored in a naturally fractured system is mostly in

matrix and adsorbed onto the porous surface. The sorption process and diffusion process between

the matrix and fractures are the major fluid flow mechanism in such system. One of the prominent

analytical models for dual porosity systems is the model of Warren and Root (1963). They

developed analytical models for shape factor calculations in the naturally fractured reservoirs to

describe the fluid diffusion and transportation between matrix and facture. Kazemi et al. (1976)

described a numerical simulation process in a typical naturally fractured reservoir and successfully

simulated its water and oil flow. Nelson (2001) provided a detailed geological analysis of the rock

properties and gas storage and flow mechanisms between matrix and fracture systems in the dual

porosity system. In recent years, multiple numerical simulator for naturally fractured reservoir were

developed (Manik, 1999; Thararoop, 2010).

Page 24: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

5

1.2 Artificial Neural Network

In addition to reservoir simulation, artificial neural network is another important simulation tool.

The ANN research started from the early 1940s (McClulloch and Pitts, 1943). The 1950s and early

1960s, along with the emerging of computer science, witnessed the booming research on ANN

(Rosenblatt et al. 1958). Almost all of those work was about single layer ANN and the boom period

came to an end before the 1970s when it was found to be incapable to deal with non-linearly-

separable problems (Minsky and Papert, 1969). The 1980s witnessed the second golden age of the

ANN boom thanks to the tremendous achievement in the computing power (Hopfield 1982), and

the development of the back-propagation algorithm of multilayer neural networks in this decade

(Rumelhart and McClelland, 1986). The back-propagation algorithm has been widely used in

modern neural networks, based on which numerous new learning algorithms have been developed.

Nowadays, ANN has become one of the most advanced and successful tools in petroleum

engineering field, such as coalbed methane reservoir development and testing (Srinivasan 2008);

hydraulically fractured horizontal wells in tight gas (Burak, 2010); field deployment and

performance prediction (Enyioha and Ertekin, 2014) can be performed successfully. The ANN

approach is increasingly considered as a promising application tool in petroleum engineering area.

1.3 Pressure Transient Analysis and Neuro-simulation

Pressure transient analysis (PTA) is among the earliest approaches to characterize the well and

reservoir properties. PTA has long been implemented in both conventional and unconventional oil

and gas reservoirs (Kazemi, 1969; Ertekin et al. 1989). Traditional pressure transient analysis

heavily relies on graphical constructions and also experiential knowledge of the analysts. A

diagnostic plot is normally drawn and comparisons between type curves are made in determining

the category of the problem and its parameters (Fig 1.1). The typical signatures in early, middle

Page 25: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

6

and late time region are recognized via human experts and corresponding reservoir

characterizations are made via applying analytical tools.

Fig 1.1 Illustration of a set of typical type curve (Bourdet, D., et al)

Along with the development of mathematical tools and computational power, the neuro-simulation

protocol based on reservoir simulation and ANN protocols have been successfully applied to the

PTA field. The pressure transient data can be generated from a hard-computing-based simulator

and can be utilized effectively to train the ANN to achieve the reservoir characterization results.

The result can thus be verified by the simulator. Such an iterative process has been successfully

implemented by a research group at the Pennsylvania State University and numerous tool boxes

have been developed to characterize reservoirs and fluids properties, including partial sealing faults

Page 26: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

7

(Aydinoglu, 2002); dual-porosity reservoirs (Alajmi, 2007); multi-stage hydraulically fractured

horizontal wells in compositional dual-porosity shale gas reservoir (Siripatrachai, 2014), etc.

1.4 Rate Transient Analysis and Neuro-Simulation

Rate transient analysis (RTA) is another important reservoir characterization technique. Instead of

using the bottomhole pressure data, the surface production rate data along with time is monitored

and analyzed. Like pressure transient, rate transient data also contains valuable information. Rate

transient analysis is also called as decline curve analysis. Arps (1945) proposed simple

mathematical curves, i.e. exponential, harmonic or hyperbolic and formed the foundation of decline

curve analysis. His method is proved effective for traditional single-phase fluid flow reservoir with

vertical wells. Later in 1956, Arps introduced dimensionless parameters and successfully

generalized the previous method. Although these methods were developed empirically without a

solid theoretical proof in the background, it still served as the major mathematical tool in RTA and

appropriately describe the rate transient phenomena for reservoirs depletion problems with

boundary dominated flow regimes. Later in 1980s, Fetkovich et al. provided the theoretical

explanation for the Arps decline curves (Fetkovich et al., 1980 and 1987). These methods are all

based analytical mathematical models, which rely heavily on simplified reservoir conditions. In

practice, however, the reservoir condition is rather complex and the simplification process before

applying the analytical models will cause the loss of considerable amount of information. This

makes the traditional analytical models not feasible for complicated problems. Hence ANN is

proposed as an alternative tool for rate transient analysis and proved efficient and successful. As

discussed in PTA, the same Neuro-Simulation protocol was applied in development of the ANNs

by a research group at the Pennsylvania State University, including the study of condensate gas in

naturally fractured reservoirs (Gaw, 2014) and shale gas reservoir with complex well group

(Alqahtani, 2015).

Page 27: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

8

Chapter 2

Problem Statement

Pressure transient analysis is an essential tool to characterize the reservoir. During the well testing,

a pressure gauge is installed to the bottomhole and the pressure data is then collected for the

duration of several production periods. The amount and resolution of the data depends on the time

during testing and the availability of the devices. Nowadays, more and more wells are installed

with permanent downhole gauge to continuously collect pressure data during the entire production

life of the well. Thus, the amount and the resolution of the pressure transient data collected are

growing fast.

Rate transient analysis is another essential tool in reservoir characterization. During the production

period, the well flowrates are recorded. Those time series data can be used to form curves to

visualize the production condition; or can be a valuable source in further studying of the reservoir

and well conditions.

Traditionally, both PTA and RTA are processed by human experts. Based on visualizing data points

on Cartesian, semi-log or log-log plots, and comparing the curve with existing patterns like type

curves, experts will make the judgement of the category of the reservoir problem based on their

years of valuable experience; and simplify the reservoir model and solve the parameters with

corresponding analytical models. After obtaining the parameters, the experts may use them to

simulate the transient curve again and observe the difference and adjust the parameters accordingly.

The simplified analytical model, however, relies on ideal assumptions and the simplification

process itself may lose considerable amount of information. The solutions to the simplified

analytical model is only a rough approximation, let alone the fact that most of the complex problems

Page 28: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

9

in the field are not possible to be simplified to fit a corresponding existing analytical model. The

entire process, on the other hand, heavily relies on the knowledge and experience of human experts,

and the procedure is based on trial and error, which costs a great amount of valuable human

resources and time.

In recent years, researchers have been developing artificial neural networks to mimic the process

that traditionally human experts do in PTA and RTA. The implementation process was to apply

commercial numerical reservoir simulators to establish reservoir model, complete Monte Carlo

Simulation, try different the neural network structures to achieve the best accuracy, and deploy the

ANN for future use. This process has been proved quite successful – the ANNs developed by

researchers have been able to rapidly process the pressure transient data or rate transient data and

predict the reservoir and fluid parameters with small error margin.

It is impossible, however, to have one single ANN to work for all problems. Each ANN developed

is working only for a specific problem. For years, multiple ANNs for different problems with

various reservoir system and fluid flow models were developed. Whenever a new problem arises,

the existing ANNs may not be applicable, hence a new ANN needs to be developed from the

beginning. But the ANN developing process itself is very consuming in time and capital – it can

cost a graduate level researcher months, or even years of work to develop a new ANN; and hence

the commercial licenses for numerical simulator and ANN development tools the researchers relied

on are also expensive.

In this study, an automated Neuro-Simulation protocol is established to accelerate the ANN

developing process, save the overhead time cost of the Monte Carlo simulation and ANN structure

construction, and have the ability to quickly establish a baseline ANN model for a specific problem.

The protocol is based on the concept of numerical reservoir simulation and artificial neural network.

The resulting protocol will form a comprehensive toolkit.

Page 29: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

10

The toolkit developed in this study is independent to commercial software packages. It contains in-

house generalized numerical reservoir simulator and ANN development tool. To make the

automated Neuro-Simulation protocol comprehensive, multiple major reservoir and fluid flow

models are provided in the numerical reservoir simulator. Although coupled deeply into the whole

system, the in-house reservoir simulator and ANN tool can also be used as standalone simulator

for numerical simulation study to keep the generality. The built-in automated Monte Carlo

simulation and automated ANN structure selection modules provide the functionalities of rapidly

establishing, testing and deploying a new ANN model for a given problem. A graphical user

interface is built in to the system to facilitate the user. The developed ANN tool can then be applied

and will also automatically report the comparison between the pressure or rate transient data

generated from predicted parameters and the original data to facilitate the user in further parameter

adjustment.

Page 30: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

11

Chapter 3

Generalized Reservoir Simulation framework

The underlying mathematical models and algorithms of different categories of reservoir simulations

share a series of common features. These common features can be implemented as base modules

and different fluid flow models of reservoir simulation can be developed upon them. This design

has the following advantages:

1. Convenience in model developing. Once the framework is established, it is convenient to

develop different modes on top of it without taking care of the tedious coding work in

dealing with common structures (such as gridding, I/O, differentiation, matrix, solver, etc.).

2. Easy maintenance. If there is any change needed for applying to the entire reservoir

simulator, it will be convenient to change the corresponding module of the underlying

framework instead of change the code of every model built on it. This both saves time and

minimizes the possibility of making errors.

3. Flexibility for extension. It is convenient to add more models to the existing simulator

without building from the beginning.

As one of the essential objectives of this study is to build a comprehensive numerical reservoir

simulation system, it is both necessary and convenient to establish this generalized reservoir

simulation framework.

Page 31: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

12

Fig 3.1 Illustration of simulation framework structure

Fig 3.1 shows the infrastructure of the reservoir simulation framework. It is developed based on

the following major modules:

1. Grid system

2. Fluid flow model and Finite difference (FD)

3. Solution method – Generalized Newton-Raphson protocol (GNR) with Automatic

differentiation

4. Linear system and Solver

5. Simulation control

The grid system, Generalized Newton-Raphson protocol and linear solver modules are all

interacting with the simulation controller. The Fluid flow models are communicating with the

framework via the finite difference fluid flow model interface. This design makes the framework

easy to incorporate different grid system, fluid flow models and solvers into the simulator. This

chapter illustrates the functionality of these modules.

Page 32: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

13

3.1 Grid System

As the reservoir simulation is based on finite difference method, the first step of reservoir

simulation is to discretize the continuous reservoir into grid blocks. This process is so called

gridding. The shape and dimensions of these blocks are determined during the discretization

process. The information of each block will then be input to the reservoir simulator. There are two

grid systems in reservoir simulator developed in this study: Rectangular grids and radial-cylindrical

grids. The two grid systems belong to the category of structured grids.

Both rectangular and radial-cylindrical grid systems can be in one, two or three dimensions.

Rectangular grid (Fig 3.2) is normally used in field scale applications with one or more wells. The

heterogeneity can be in block dimensions or rock properties like permeability and porosity. The

block size can be set into different values as far as there is no overlap or gap between the adjacent

blocks.

(a) (b) (c)

Fig 3.2 Rectangular grid system

(a) one dimension; (b) two dimension; (c) three dimension.

Page 33: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

14

Fig 3.3 Block connection in three dimensions

Each block will be connecting with two blocks in one-dimensional, four blocks in two-dimensional,

and six blocks in three-dimensional reservoirs (Fig 3.3). The grid related transmissibility terms

between two adjacent blocks can be calculated through harmonic averaging of the properties of the

two blocks:

𝑇𝑥|𝑖+1

2,𝑗,𝑘

=2

Δ𝑥𝑖,𝑗,𝑘

𝐴𝑥𝑖,𝑗,𝑘𝑘𝑥𝑖,𝑗,𝑘+

Δ𝑥𝑖+1,𝑗,𝑘

𝐴𝑥𝑖+1,𝑗,𝑘𝑘𝑥𝑖+1,𝑗,𝑘

(3-1a)

𝑇𝑦|𝑖,𝑗+1

2,𝑘

=2

Δ𝑦𝐴𝑦𝑖,𝑗,𝑘

𝑘𝑦𝑖,𝑗,𝑘

+Δ𝑦𝑖,𝑗+1,𝑘

𝐴𝑦𝑖,𝑗+1,𝑘𝑘𝑦𝑖,𝑗+1,𝑘

(3-1b)

𝑇𝑧|𝑖,𝑗,𝑘+

12

=2

Δ𝑧𝑖,𝑗,𝑘

𝐴𝑧𝑖,𝑗,𝑘𝑘𝑧𝑖,𝑗,𝑘+

Δ𝑧𝑖,𝑗,𝑘+1

𝐴𝑧𝑖,𝑗,𝑘+1𝑘𝑧𝑖,𝑗,𝑘+1

(3-1c)

radial-cylindrical grid (Fig 3.4) is normally used in a cylindrical fluid flow regime. This usually

applies to the reservoir with only one well in the center, or a portion of reservoir around a well. The

heterogeneity can be in rock properties like permeability and porosity; and also in block sizes in z

dimension as far as there is no overlap or gap between the adjacent blocks.

Page 34: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

15

(a) (b) (c)

Fig 3.4 Radial-Cylindrical grid system

(a) one dimension; (b) two dimension; (c) three dimension.

In 𝑟 or 𝜃 dimensions, the block sizes are defined in a particular way. This is because there are

certain constrain in these two dimensions: in 𝜃 direction, the total angle should be 360° or 2𝜋

∑Δ𝜃 = 2𝜋 (3-2)

In 𝑟 direction, the size of grid blocks follows the logarithmic spacing rule. This is because the

pressure profile aournd the wellbore is approximately a function of logarithmic of the distance

(Ertekin et. al., 2001). Define constant

𝑎𝑙𝑔 = (𝑟𝑒𝑟𝑤

)

1𝑛𝑟

(3-3)

and the pressure points are distributed as

𝑟𝑖+1 = 𝑎𝑙𝑔𝑟𝑖 (3-4)

where 𝑖 = 1,2, … 𝑛𝑟 − 1.

Page 35: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

16

the block boundaries for inter-block flow are calculated by

𝑟𝑖+

12=

𝑟𝑖+1 − 𝑟𝑖

ln (𝑟𝑖+1𝑟𝑖

)

(3-5)

and the block boundaries for volumetric calculations are defined as

𝑟𝑖+

12

2 =𝑟𝑖+12 − 𝑟𝑖

2

ln (𝑟𝑖+12

𝑟𝑖2 )

(3-6)

The grid related transmissibility terms between two adjacent blocks can be calculated through

harmonic averaging of the corresponding properties:

𝑇𝑟|𝑖+1

2,𝑗,𝑘

=2

Δ𝑟𝑖,𝑗,𝑘𝐴𝑟𝑖,𝑗,𝑘𝑘𝑟𝑖,𝑗,𝑘

+Δ𝑟𝑖+1,𝑗,𝑘

𝐴𝑟𝑖+1,𝑗,𝑘𝑘𝑟𝑖+1,𝑗,𝑘

(3-7a)

𝑇𝜃|𝑖,𝑗+12,𝑘

=2

ri,j,kΔθ𝐴𝜃𝑖,𝑗,𝑘

𝑘𝜃𝑖,𝑗,𝑘+

ri,j,kΔθ𝑖,𝑗+1,𝑘

𝐴𝜃𝑖,𝑗+1,𝑘𝑘𝜃𝑖,𝑗+1,𝑘

(3-7b)

𝑇𝑧|𝑖,𝑗,𝑘+

12=

2

Δ𝑧𝑖,𝑗,𝑘

𝐴𝑧𝑖,𝑗,𝑘𝑘𝑧𝑖,𝑗,𝑘+

Δ𝑧𝑖,𝑗,𝑘+1

𝐴𝑧𝑖,𝑗,𝑘+1𝑘𝑧𝑖,𝑗,𝑘+1

(3-7c)

The well index (𝑊𝐼) depends on the grid system. For rectangular grids, the well index can be

calculated as

𝑊𝐼 =2𝜋ℎ��

𝑙𝑛𝑟𝑒𝑟𝑤

+ 𝑆 (3-8)

where

�� = √𝑘𝑥𝑘𝑦 (3-9)

Page 36: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

17

and Peaceman model (Peaceman, 1977) is hence applied

𝑟𝑒 = 0.28

[(𝑘𝑦

𝑘𝑥)

12(𝛥𝑥)2 + (

𝑘𝑥𝑘𝑦

)

12(𝛥𝑦)2]

12

(𝑘𝑦

𝑘𝑥)

14+ (

𝑘𝑥𝑘𝑦

)

14

(3-10)

For radial-cylindrical model, the well index is the grid dependent transmissibility term

𝑊𝐼 = 𝑇𝑟1 (3-11)

3.2 Fluid Flow Model and Finite Difference

In general, the mass balance equation can be abstracted as

Flux + Source/Sink = Accumulation

For black oil model, the partial differential equation of the mass balance in fluid flow model is like

−𝛻 ∙ (𝜌�� ) + �� = 𝑉𝑏

𝜕(𝜙𝜌)

𝜕𝑡 (3-12)

For compositional model, the mass balance equation becomes

−𝛻 ∙ (𝑥𝑖𝜌�� ) + 𝑥𝑖�� = 𝑉𝑏

𝜕(𝑥𝑖𝜙𝜌)

𝜕𝑡 (3-13)

where 𝑥𝑖 is the composition of 𝑖th component. In this study, finite difference method is applied.

The form of the finite difference equation of the above PDEs are discussed in detail in the following

chapters.

Page 37: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

18

3.3 Generalized Newton-Raphson method and Automatic Differentiation

Modern reservoir simulation uses Generalized Newton-Raphson (GNR) protocol to solve for the

solution of the finite difference form of the PDEs. The Newton-Raphson method is one of the most

widely used algorithms to solve for the non-linear problems. Consider a one-dimensional function

𝑦 = 𝑓(𝑥) with the following curve (Fig 3.5):

Fig 3.5 Plot of the curve of function 𝑦 = 𝑓(𝑥)

Starting from a certain initial guess value 𝑥0, each iteration follows the direction of the gradient to

find the next point closer to the solution:

𝑥𝑘+1 = 𝑥𝑘 −𝑓(𝑥𝑘)

𝑓′(𝑥𝑘) (3-14)

This iterative process is followed step by step until the difference between the solved point and the

true solution is close enough. Similarly, the generalized Newton-Raphson method is to extend this

algorithm to multi-dimensional problems. When applying GNR to the fluid mass balance equations,

the cost function becomes residuals:

Residual = Flux + source/sink − Accumulation

Page 38: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

19

In black oil model, each phase in each block has one residual; in compositional model, the number

of residuals equals to the number of component times number of blocks. Thus, the reservoir

simulation problem is an 𝑁 (number of residuals) dimensional problem, and the GNR becomes

𝑿𝑘+1 = 𝑿𝑘 − 𝑱𝑘−1𝑹𝑘 (3-15)

where X is the solved unknown vector in 𝑁 dimensional space, J is the Jacobian matrix and R is

the residual vector. The Jacobian matrix is a 𝑁 × 𝑁 square matrix of the first order derivatives of

residuals to unknowns:

𝑱 =

[ 𝜕𝑅1

𝜕𝑋1

𝜕𝑅1

𝜕𝑋2⋯

𝜕𝑅1

𝜕𝑋𝑁

𝜕𝑅2

𝜕𝑋1

𝜕𝑅2

𝜕𝑋2⋯

𝜕𝑅2

𝜕𝑋𝑁

⋮ ⋮ ⋱ ⋮𝜕𝑅𝑁

𝜕𝑋1

𝜕𝑅𝑁

𝜕𝑋2⋯

𝜕𝑅𝑁

𝜕𝑋𝑁]

𝑁×𝑁

(3-16)

The computation of the first order derivatives in each entry is the key issue. This process is time

consuming. Typically, there are two popular approaches in derivative calculation:

i) Analytical differentiation. Obtain the residual equation for each phase (or component)

in each block and calculate the formula of the derivative function for each unknown

manually. The formula is then implemented into code. This method has less

computational cost, but the work load in analytical derivation is difficult and tedious.

In addition, it is to make mistakes in both the differentiation and implementation

processes. Furthermore, whenever a new model is to be implemented, the derivation

process is needed to repeat from the beginning.

ii) Numerical differentiation. This is to apply finite difference method to approximate the

derivatives. For instance, using forward finite difference, one should first calculate the

Page 39: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

20

original residual; then for each unknown, add a small incremental value 𝛥𝑋 and

calculate the residual again, and the derivate is calculated by

𝜕𝑅

𝜕𝑋=

𝑅(𝑋 + ΔX) − 𝑅(𝑋)

ΔX (3-17)

This method is easy to implement, and has the flexibility of adapting to all different

residual functions. It has two major disadvantage though: the precision depends on the

non-linearity of the residual function; and the computational cost is high.

Aside from the analytical and numerical differentiation approaches, the Automatic differentiation

(AD) is a programming technique that can avoid disadvantages of the numerical and analytical

differentiation methods. Based on chain rule, automatic differentiation can automatically calculate

the derivatives of a given function. It has the advantage of easy usage and good speed. It is better

than the analytical differentiation approach for its good flexibility and less work load in

implementation; and its precision and computational load is better than that of the numerical

differentiation (Table 3.1).

Table 3.1 Comparison between differentiation schemes

Approach Formula Error Computational

Cost Implementation

Cost Flexible

Analytical

Differentiation

𝜕𝐹

𝜕𝑋= 𝐹′(𝑋) = 𝑔(𝑋)

round off

error Low High No

Numerical

Differentiation

𝜕𝐹

𝜕𝑋=

𝐹(𝑋 + ΔX) − 𝐹(𝑋)

ΔX

round off

error

+Truncation

error

High N/A Yes

Automatic

Differentiation

𝜕𝐹

𝜕𝑋=

𝜕𝐹

𝜕𝑍

𝜕𝑍

𝜕𝑌

𝜕𝑌

𝜕𝑋= 𝑐1𝑐2𝑐3

round off

error Middle N/A Yes

In this study, an automatic differentiation library Adept (Hogen, 2014) is applied to the simulation

framework. The library is choosen for its flexibility, good computational performace and user-

Page 40: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

21

friendly usage. The automatic differentiation will be applied in Jacobian matrix calculation in

processing all different types of finite difference fluid flow models.

3.4 Linear System and Solver

In each Newtonian iteration, after the Jacobian matrix and residual vector are computed, the

updated unknowns need to be calculated

𝑱𝑘Δ𝑿𝑘+1 = 𝑹𝑘 (3-18)

This is to solve an 𝑁 dimensional linear problem. Jacobian matrix will have 𝑁2 entries. For

rectangular and radial-cylindrical grid system, however, the Jacobian matrix will have sparse

structure - most of the entries in Jacobian matrix will be zero (Fig 3.6).

Fig 3.6 Sparse structure of Jacobian matrix

Page 41: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

22

If using dense matrix structure, the storage of Jacobian matrix could be unnecessarily big, and the

computational speed would also be compromised. It is wise to use sparse matrix structure to store

the Jacobian to enhance both storage and computational efficiencies.

As the structure of Jacobian matrix is only dependent on the grid structure, it is possible to have

one uniform Jacobian filling program for all fluid flow models. Each fluid flow model only takes

care of the residual calculation, and leave automatic differentiation algorithm to compute the

derivatives, and then form the Jacobian matrix via grid structure.

Numerous linear solvers have been proved efficient and widely used. Among which the most

popular ones are Conjugate Gradient (CG), Bi-Conjugate Gradient (BiCG) and Generalized

Minimal Residual (GMRES) solver. Conjugate gradient solver is well-known for its speed and

easiness for implementation. The problem is that CG solver can only deal with symmetrical system.

Bi-Conjugate gradient solver is an enhanced version of CG solver, it is normally a little slower than

CG but has the ability to solve unsymmetrical problem. For an unsymmetrical and highly

heterogeneous system, however, BiCG may become slow and sometimes even cannot converge

without the help of a good preconditioner. GMRES solver is the most robust one among the three

mentioned solvers. It has the ability to solve highly heterogeneous system, and its speed can be

enhanced with good preconditioner.

Another aspect of the solver performance is its implementation. As the linear solver will be

handling the matrix manipulation work massively, it occupies a considerable portion of the

computational cost. To enhance the performance of the solver, parallel computing is to be used.

The big matrices will be distributed to multiple cores for computation and then the results are

collected back. The more cores to be used, the higher possibility for the solver to achieve better

performance. A good solver implementation should have the ability to take advantages of CPU and

GPU parallel computing. In this study, Paralution® parallel solver library is used to ensure the

robustness and good performance of the simulator.

Page 42: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

23

3.5 Simulation Control

As the software package developed in this study contains multiple fluid flow models, it is important

to have an uniform simulation control to manage different simulators. To maintain generality, The

I/O are all through text files. The input file contains:

i) Configuration file: Simulation control parameters specified, like type of the simulator,

grid system, fluid information, path and file names of other input files, maximum and

minimum time step sizes, convergence and divergence criteria, boundary conditions,

well specifications, etc. In this work, one difficulty is that different programming

languages are applied to write different functionalities (C++, Python, JavaScript, etc.),

and the data structure is heterogenous. Hence JSON file format is used to make it easier

and uniform to transfer and translate the heterogeneous structured data between

different programming languages and machines.

ii) Data files: Geometric and gridding information, fluid related information like relative

permeability curve, capillary pressure data, etc. These data are normally structured,

like a matrix, an array or a table. In this work, comma separated values (csv) files are

used to read and store matrix data like fluid properties tables and grid properties.

The output files consist of:

i) Log file: Simulation status like library calling, time step sizes, solver iteration and

Newton iteration information, etc. There are two built-in options: i) the simulation log

can be displayed simultaneously along with the simulation process; ii) or it can be

output to a text file and stored in both client and server sides. The former one suites

most for single case simulation, where the simulation time is normally short and the

user can clearly observe the simulation process; the second one, however, suits more

Page 43: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

24

in multiple case simulation (e.g. Monte Carlo simulation), where the simulation time

is rather extensively long and the user can save all the information during the

simulation process and track it back later.

ii) Resulting data file: the result file contains the output resulting data. It includes all

necessary resulting data for further analysis, such as pressures and flow rates in each

block, each time step for each phase (and each component in compositional simulator),

etc. As the data structure is highly heterogenous, the JSON data format is used in store

the resulting data.

Both the input and output data will need to be transferred and translated between client and server

and between the computational core and the graphical user interfaces. The data structure and file

format selected in this study is for obtaining uniform control and high efficiency.

Page 44: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

25

Chapter 4

Black Oil Model

Based on the infrastructure of the generalized reservoir simulation framework, different fluid flow

models are developed. Black oil model is a widely used fluid flow model in porous media. Its basic

idea is to treat the phases (oil, gas and water) under the surface condition as pseudo-component,

and all other calculations regarding fluid dynamics in porous media under the reservoir conditions

are based on the material balance of these pseudo-components. In this study, black oil model for

three-phase, two-phase and single-phase fluid flow are developed.

4.1 Model description

The mass balance equation of the black oil model for phase l is

−𝛻 ∙ (𝜌𝑙�� 𝑙) + ��𝑙 = 𝑉𝑏

𝜕

𝜕𝑡(𝜙𝜌𝑙) (4-1)

where l=w, o. For gas phase, the mass balance equation is written as

−𝛻 ∙ (𝜌𝑔�� 𝑔 + 𝑅𝑠𝑜𝜌𝑜�� 𝑜 + 𝑅𝑠𝑤𝜌𝑤�� 𝑤) + ��𝑔𝑓𝑟𝑒𝑒 + 𝑅𝑠𝑜��𝑜 + 𝑅𝑠𝑤��𝑤

= 𝑉𝑏

𝜕

𝜕𝑡(𝜙𝜌𝑔 + 𝑅𝑠𝑜𝜙𝜌𝑜 + 𝑅𝑠𝑤𝜙𝜌𝑤)

(4-2)

The flux term is coordinate dependent. In rectangular grid system, it can be written as

𝛻 ∙ (𝜌𝑙�� ) =𝜕(𝜌𝑙�� 𝑙𝑥)

𝜕𝑥+

𝜕(𝜌𝑙�� 𝑙𝑦)

𝜕𝑦+

𝜕(𝜌𝑙�� 𝑙𝑧)

𝜕𝑧 (4-3)

where the volume flowrate follows the Darcy's law

Page 45: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

26

�� 𝑙𝑥 = −

𝐴𝑥𝑘𝑥𝑘𝑟𝑙

𝜇𝑙

𝜕Φ𝑙

𝜕𝑥

(4-4a)

�� 𝑙𝑦 = −

𝐴𝑦𝑘𝑦𝑘𝑟𝑙

𝜇𝑙

𝜕Φ𝑙

𝜕𝑦

(4-4b)

�� 𝑙𝑧 = −𝐴𝑧𝑘𝑧𝑘𝑟𝑙

𝜇𝑙

𝜕Φ𝑙

𝜕𝑧 (4-4c)

In radial-cylindrical grid system, it can be written as

𝛻 ∙ (𝜌𝑙�� ) =1

𝑟

𝜕(𝑟𝜌𝑙�� 𝑙𝑟)

𝜕𝑟+

1

𝑟

𝜕(𝜌𝑙�� 𝑙𝜃)

𝜕𝜃+

𝜕(𝜌𝑙�� 𝑙𝑧)

𝜕𝑧 (4-5)

where the volume flowrate follows the Darcy's law

�� 𝑙𝑟 = −

𝐴𝑟𝑘𝑟𝑘𝑟𝑙

𝜇𝑙

𝜕Φ𝑙

𝜕𝑟

(4-6a)

�� 𝑙𝜃 = −

1

r

𝐴𝜃𝑘𝜃𝑘𝑟𝑙

𝜇𝑙

𝜕Φ𝑙

𝜕𝜃

(4-6b)

�� 𝑙𝑧 = −𝐴𝑧𝑘𝑧𝑘𝑟𝑙

𝜇𝑙

𝜕Φ𝑙

𝜕𝑧 (4-6c)

and Φ𝑙 is the phase potential of phase l. It can be calculated as

Φ𝑙 = 𝑝𝑙 −1

144

𝑔

𝑔𝑐𝜌𝑙𝐺 (4-7)

where G is the depth and the positive direction is chosen to be downwards.

𝑘𝑟𝑙 is the relative permeability for phase l. For water and gas phases, the relative permeability

curves are normally given by experimental data from laboratory tests. If the experimental data is

not available, imperial correlations can be applied to compute the 𝑘𝑟 values. Among many

correlations, one of the most widely used is Corey's two-phase model (Brooks and Corey, 1964):

Page 46: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

27

𝑆𝑤𝑛 =𝑆𝑤 − 𝑆𝑖𝑤

1 − Swirr (4-8)

where Sw is the water saturation and 𝑆𝑤𝑖𝑟𝑟 is the irreducible water saturation. then we can compute

𝑘𝑟𝑤 = 𝑆𝑤𝑛

4

(4-9a)

𝑘𝑟𝑤𝑛 = (1 − Swn)2(1 − 𝑆𝑤𝑛

2 ) (4-9b)

where 𝑘𝑟𝑤 is the water permeability and 𝑘𝑟𝑤𝑛 is the non-wetting phase permeability (e.g. oil phase).

For three-phase oil relative permeability, stone's second method can be applied:

𝑘𝑟𝑜 = (𝑘𝑟𝑤 + 𝑘𝑟𝑜𝑤)(𝑘𝑟𝑔 + 𝑘𝑟𝑔𝑜) − (𝑘𝑟𝑤 + 𝑘𝑟𝑔) (4-10)

The finite difference form of flux terms becomes

∑𝑇𝑚+

Δ𝑚2

𝜆𝑚+

Δ𝑚2

[𝑝𝑚+𝛥𝑚 − 𝑝𝑚 − 𝜂𝑚(𝐺𝑚+𝛥𝑚 − 𝐺𝑚 )]

𝑚

(4-11)

where 𝑚 represents the flow directions. In rectangular grids 𝑚 = 𝑥, 𝑦, 𝑧, and in radial-cylindrical

grids 𝑚 = 𝑟, 𝜃, 𝑧 . 𝑇𝑚 is the gridding related transmissibility term in the 𝑚 direction

𝑇𝑚+

Δ𝑚2

=𝐴𝑚𝑘𝑚

Δ𝑚|𝑚+

Δ𝑚2

(4-12)

𝑇𝑚 terms are constants and they represent the harmonic average of the 𝐴𝑚𝑘𝑚

Δ𝑚 values in the two

adjacent blocks. They are computed once the grid information is input into the simulator.

And 𝜆 is the fluid related transmissibility term in m direction

𝜆𝑚+

Δ𝑚2

= 𝑘𝑟𝑙|𝑚+

Δ𝑚2

1

𝜇𝑙𝐵𝑙|𝑚+

Δ𝑚2

(4-13)

𝑘𝑟𝑙|𝑚+

Δ𝑚

2

is calculated via one point up stream weighing method

Page 47: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

28

𝑘𝑟𝑙|𝑚+

Δ𝑚2

= {𝑘𝑟𝑙

|𝑚, Φ𝑙|𝑚 ≥ Φ𝑙|𝑚+Δ𝑚

𝑘𝑟𝑙|𝑚+Δ𝑚

, Φ𝑙|𝑚 < Φ𝑙|𝑚+Δ𝑚

(4-14)

the 1

𝜇𝑙𝐵𝑙|𝑚+

Δ𝑚

2

term is calculated as the arithmetic average that of the two connecting blocks

1

𝜇𝑙𝐵𝑙|𝑚+

Δ𝑚2

=

1𝜇𝑙𝐵𝑙

|𝑚

+1

𝜇𝑙𝐵𝑙|𝑚+Δ𝑚

2 (4-15)

and 𝜂 is the gravity related term in m direction

𝜂𝑚 =1

144

𝑔

𝑔𝑐𝜌𝑙|𝑚+

Δ𝑚2

(4-16)

and the density term is also calculated as the arithmetic average of that of the connecting two blocks

𝜌𝑙|𝑚+Δ𝑚2

=𝜌𝑙|𝑚 + 𝜌𝑙|𝑚+Δ𝑚

2 (4-17)

the source/sink term has different representations. If the flow rates are specified, the value can be

directly put into the equation; if the sandface pressure is specified, the flow rate should be calculated

via the following equation

𝑞𝑙 = 𝑊𝐼 ∙ 𝜆𝑙(𝑝𝑙 − 𝑝𝑤𝑓) (4-18)

where 𝑊𝐼 represents the well index.

The accumulation term is calculated as

𝑉𝑏

5.615Δ𝑡[(

𝜙𝑆𝑙

𝐵𝑙)𝑛+1

− (𝜙𝑆𝑙

𝐵𝑙)𝑛

] (4-19)

In single-phase black oil model, there is only one mass balance equation for each block, so 𝑝𝑙 is

the only primary unknown, where 𝑙 = 𝑤, 𝑜, 𝑔.

Page 48: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

29

In two-phase black oil model, there are two mass balance equations for each block, so there are two

primary unknowns. One is the pressure for wetting phase, and the other is the saturation for non-

wetting phase. For instance, in water/oil black oil model, the primary unknowns are 𝑝𝑤 and So.

In three-phase black oil model, as there are three mass balance for each block, the three primary

unknowns are 𝑝𝑜, 𝑆𝑤, 𝑆𝑔.

In two and three-phase black oil model, the capillary pressures is normally taken in to consideration:

𝑝𝑐𝑜𝑤 = 𝑝𝑜 − 𝑝𝑤 (4-20)

𝑝𝑐𝑔𝑜 = 𝑝𝑔 − 𝑝𝑜 (4-21)

and the sum of saturations equals to one

So + 𝑆𝑤 + 𝑆𝑔 = 1 (4-22)

once 𝑝𝑜, 𝑆𝑤 and 𝑆𝑔 are computed, the secondary unknowns like 𝑝𝑤 , 𝑝𝑔 and So can be calculated.

After each time step, the material balance of the reservoir is to be checked to ensure the system of

equations are solved correctly. An incremental material balance check (IMBC) is to check the

material balance during each time step computations; and cumulative material balance check

(CMBC) checks the material balance during the entire simulation from the beginning (up to the

current time step).

IMBC𝑙n+1 =

∑ ∑ ∑ (𝑉𝑏𝜙𝑆𝑙

𝐵𝑙)𝑖,𝑗,𝑘

𝑛+1

𝑘𝑗𝑖 − ∑ ∑ ∑ (𝑉𝑏𝜙𝑆𝑙

𝐵𝑙)𝑖,𝑗,𝑘

𝑛

𝑘𝑗𝑖

∑ 𝑞𝑠𝑐𝑙𝑚𝑚 𝑑𝑡

(4-23)

CMBC𝑙n+1 =

∑ ∑ ∑ (𝑉𝑏𝜙𝑆𝑙

𝐵𝑙)𝑖,𝑗,𝑘

𝑛+1

𝑘𝑗𝑖 − ∑ ∑ ∑ (𝑉𝑏𝜙𝑆𝑙

𝐵𝑙)𝑖,𝑗,𝑘

𝑖𝑛𝑖𝑡𝑖𝑎𝑙

𝑘𝑗𝑖

∑ ∑ 𝑞𝑠𝑐𝑙𝑚,𝑡𝑚 𝑑𝑡𝑡

(4-24)

Page 49: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

30

4.2 Phase behavior

In black oil model, the phase behavior is captured by monitoring the saturations and pressure

changes. The most important concept in determining the phase behavior is the bubble point pressure

for oil phase. The gas phase will resolve to oil phase under pressure. The PVT data provided from

library tests are under the experiments with excessive amount of gas. In fluid flow under the

reservoir condition, however, the amount of gas is infinite. There is a certain pressure that the free

gas phase will disappear. This pressure is what we call bubble point pressure. If the pressure is

dropped below the bubble point, the gas phase will start to come out of oil phase, and the oil phase

becomes saturated. If the pressure is raised above the bubble point, the free gas phase will disappear

and the oil phase becomes under-saturated. It is necessary to capture these phase transient behaviors

accurately and efficiently. Here challenge is when the gas phase disappears, the gas saturation is

equal to zero, and the 𝑅𝑠𝑜 values will thus stay constant instead of following the original curve (Fig

4.1).

Fig 4.1 𝑅𝑠𝑜 vs po curve shift at bubble point pressure.

Page 50: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

31

Variable bubble point method is designed to solve this problem. The key feature of variable bubble

point method is to change the primary unknown for gas phase. When the gas phase disappears, the

primary unknown for the gas phase will switch form S𝑔 to Rso. When the gas phase reappears, the

primary unknown for gas phase will switch back.

(a) (b) (c)

Fig 4.2 Oil property change when cross the bubble point

(a) formation volume factor; (b) viscosity; (c) density.

The PVT will behave in different ways for saturated and under-saturated oil (Fig 4.2). For instance,

for under-saturated oil, its density will increase along with pressure, but act in an opposite way for

saturated oil. The viscosity and density will have an inverse behavior. Normally, the PVT of the

saturated oil phase is provided by lab experiments. But when the pressure is increased above the

bubble point, the PVT variables will be calculated by following equations

ρo = 𝜌𝑏[1 + 𝑐𝑜(𝑝𝑜 − 𝑝𝑏)] (4-25)

μo = 𝜇𝑏/[1 − 𝑐𝜇(𝑝𝑜 − 𝑝𝑏)] (4-26)

Bo = 𝐵𝑏/[1 + 𝑐𝑜(𝑝𝑜 − 𝑝𝑏)] (4-27)

When the free gas exists, Sw is monitored: if Sw < 0, the free gas phase disappears; When there is

no free gas, Rso is monitored: if Rso > 𝑅𝑠𝑜(𝑃), the free gas reappears. It is noteworthy that when

Page 51: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

32

the free gas phase reappears, it is good to start the next iteration with an initial guess of the gas

saturation (10-5 ~ 10-3) instead of starting with Sg = 0.

4.3 Validation

The black oil fluid flow models are tested in this section. The test results are shown below. The

validation is done between reservoir simulation in this study and IMEX model in a commercial

simulation software developed by Computer Modeling Group (CMG®).

First, a comparison with analytical model, the in-house model and the IMEX model for a radial-

cylindrical reservoir with single phase oil fluid flow is presented as following. The parameters are

shown in Table 4.1.

Table 4.1 Reservoir properties for analytical model test

Reservoir Outer boundary radius (ft) 5000

Reservoir Thickness (ft) 50

Porosity 0.16

Permeability (md) 12

Total Compressibility (psia-1) 5 × 10−6

Well Radius (ft) 0.25

Formation Volume Factor (RB/STB) 1.15

Viscosity (cp) 1.43

Flowrate (STB/D) 50

Initial Pressure (psia) 2500

Time (hr) 500

The pressure distribution in the reservoir at the end of the simulation is shown in Fig 4.3a. The

sandface pressure change with time is displayed in Fig 4.3b. The result simulated via the in-house

simulator is a little lower than the analytical solution, whereas the results from IMEX is a little

Page 52: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

33

higher. The differences are small though, and it is showing a good agreement between the result of

the in-house simulator with the analytical solution.

(a)

(b)

Fig 4.3 Comparison with analytical model.

(a) Reservoir pressure; (b) Sandface pressure.

Page 53: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

34

The following tests are between built-in black oil fluid models and corresponding CMG® (IMEX)

models. The tests are subject to two groups, one is for rectangular grid and one for radial-cylindrical

grid. The time step size is 10 days and the test is for 1 year (approximated to 360 days). The fluids

tested share the same properties. The PVT tables of oil and gas phases are given in Table 4.2 and

Table 4.3, and the water properties are given in Table 4.4. Relative permeability of gas and water

phases are given in Fig 4.4 and Fig 4.5, respectively. The oil relative permeability is calculated

through stone's II model.

Table 4.2 Oil PVT data

p (psia) Density (lb/ft3) B (RB/STB) Viscosity (cp) Rs (SCF/STB)

14.7 45.36 1 1.04 1

270 44.08 1.15 0.975 90.5

520 42.93 1.207 0.91 180

1015 41 1.295 0.83 371

2015 39.04 1.435 0.695 636

2515 38 1.5 0.641 775

3015 37.55 1.565 0.594 930

4015 36.81 1.695 0.51 1270

5015 36.05 1.827 0.449 1618

9015 34.4 2.357 0.203 2984

Table 4.3 Gas PVT data

p (psia) Density (lb/ft3) B (RB/STB) Viscosity (cp)

14.7 0.0647 0.166666 0.008

270 0.8916 0.012093 0.0096

520 1.7185 0.006274 0.0112

1015 3.3727 0.003197 0.014

2015 6.6806 0.001614 0.0189

2515 8.3326 0.001294 0.0208

3015 9.9837 0.00108 0.0228

4015 13.2952 0.000811 0.0268

5015 16.6139 0.000649 0.0309

9015 27.9483 0.000386 0.047

Page 54: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

35

Table 4.4 Water properties

Parameter Unit

Water compressibililty (psia-1) 1 × 10−6

Water density (SC) (lb/ft3) 62.24

Water viscosity (SC) (cp) 0.52

Fig 4.4 Relative permeability of gas phase

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.2 0.4 0.6 0.8 1

krg

krgo

Sg

Relative permeability (Gas)

krgo

krg

Page 55: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

36

Fig 4.5 Relative permeability of water phase

4.3.1 Rectangular grid system

The first testing series is for rectangular grid system. A homogeneous reservoir is used to test the

fluid flow models. There is one well with open hole completion in the center from the top to the

bottom layers of the reservoir. All tests are subject to the same reservoir. Six cases are tested from

three-phases (water/oil/gas) to single-phase oil or gas system. The validation results are shown

below (Table 4.5).

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.2 0.4 0.6 0.8 1

krg

krgo

Sg

Relative permeability (Water)

krwo

krw

Page 56: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

37

Table 4.5 Reservoir and fluid properties

Reservoir Model (x-y-z) 11-11-3

Reservoir dimension in x and y (ft) 1000

Reservoir Thickness (ft) 60

Porosity 0.3

Permeability in x and y (md) 10

Permeability in z (md) 1

Rock compressibility (psia-1) 1 × 10−9

Water compressibility (psia-1) 1 × 10−6

Water density (standard condition) (lb/ft3) 62.24

Well radius (ft) 0.25

Water viscosity (cp) 0.52

Reservoir Temperature (F) 150

i) Three-phase Water/Oil/Gas

Fig 4.6 compares the results of three-phase model with variable bubble point between the in-house

simulator developed in this study and IMEX model in CMG. The simulation started with the initial

pressure 3000 psia, Psf=1000 psia, and Sw = 0.5. The bubble point is set to be 1600 psia. The result

shows that the production rate curves are close to each other for all phases (Fig 4.6a, b, c). The time

that the gas phase starts to appear in the well block is shown in Fig 4.6d. There is a small

discrepancy between the data generated. This discrepancy, however, is easy to occur due to the

lower gas saturation and has very little influence to the fluid flow in the reservoir. The well block

pressure is also in good agreement (Fig 4.6e).

Page 57: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

38

(a)

(b)

0

50

100

150

200

250

300

350

400

450

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Oil_SC(bbl/d)

In house Oil_SC(bbl/d)

0

10

20

30

40

50

60

70

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Water_SC(bbl/d)

In house Water_SC(bbl/d)

Page 58: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

39

(c)

(d)

0.00E+00

5.00E+04

1.00E+05

1.50E+05

2.00E+05

2.50E+05

0 50 100 150 200 250 300 350

scf/

d

day

Production rate (SC)

CMG Gas_SC(SCF/d)

In house Gas_SC(scf/d)

0

0.002

0.004

0.006

0.008

0.01

0.012

0.014

0.016

0.018

0.486

0.488

0.49

0.492

0.494

0.496

0.498

0.5

0.502

0.504

0 50 100 150 200 250 300 350

Sg

So/S

w

Time (day)

Well block saturation

So - CMG

Sw - CMG

So - In house

Sw - In house

Sg - In house

Sg - CMG

Page 59: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

40

(e)

Fig 4.6 Water/Oil/Gas three-phase black oil model.

(a) Oil production rate; (b) Water production rate; (c) Gas production rate;

(d) Well block Saturations; (e) Well block pressure.

ii) Two-phase Water/Oil

Fig 4.7 compares the results between two-phase model (Water/Oil) the in-house simulator and

IMEX model in CMG. The initial pressure is 3000 psia, Psf =1000 psia, and Sw = 0.5 . The

reservoir fluids that exist in this test is water/oil phase. The result shows that the curves are close

to each other.

1000

1500

2000

2500

3000

3500

0 50 100 150 200 250 300 350

Pre

ssu

re (

psi

a)

Time (day)

Well block Pressure

Po-In house

Po-CMG

Page 60: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

41

(a)

(b)

Fig 4.7 Water/Oil two-phase black oil simulation.

(a) Oil production; (b) water production.

0

50

100

150

200

250

300

350

400

450

500

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Oil_SC(bbl/d)

In house Oil_SC(bbl/d)

0

10

20

30

40

50

60

70

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Water_SC(bbl/d)

In house Water_SC(bbl/d)

Page 61: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

42

iii) Two-phase Water/Gas

Fig 4.8 compares the results of the two-phase model (Water/Gas) between the in-house simulator

and IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and Sw = 0.5. The

reservoir fluids that exist in this test is water and gas. The difference in water and gas phase

flowrates gradually decreases and curves are in good agreement.

(a)

0.00E+00

2.00E+06

4.00E+06

6.00E+06

8.00E+06

1.00E+07

1.20E+07

1.40E+07

1.60E+07

0 50 100 150 200 250 300 350

scf/

d

day

Production rate (SC)

CMG Gas_SC(SCF/d)

In house Gas_SC(scf/d)

Page 62: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

43

(b)

Fig 4.8 Water/Gas two-phase black oil simulation.

(a) Gas production; (b) Water production.

iv) Two-phase Oil/Gas

Fig 4.9 compares the results of two-phase model (Oil/Gas) of the in-house simulator and IMEX

model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and So = 0.5. The reservoir fluids

exist in this test is oil and gas. The differences of oil and gas flow rate between the two models are

small.

0

10

20

30

40

50

60

70

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Water_SC(bbl/d)

In house Water_SC(bbl/d)

Page 63: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

44

(a)

(b)

Fig 4.9 Oil/Gas two-phase black oil simulation.

(a) Oil production; (b) Gas production.

0

5

10

15

20

25

30

35

40

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Oil_SC(bbl/d)

In house Oil_SC(bbl/d)

0.00E+00

2.00E+06

4.00E+06

6.00E+06

8.00E+06

1.00E+07

1.20E+07

1.40E+07

1.60E+07

1.80E+07

0 50 100 150 200 250 300 350

scf/

d

day

Production rate (SC)

CMG Gas_SC(SCF/d)

In house Gas_SC(scf/d)

Page 64: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

45

v) Single-phase Oil

Fig 4.10 compares the results of single-phase model (Oil) between the in-house simulator and

IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and Sw = 𝑆𝑔 = 0. The

reservoir fluids that exist in this test is single-phase oil. The production rates are in good agreement.

Fig 4.10 Oil production of single-phase oil black oil simulation.

vi) Single-phase Gas

Fig 4.11 compares the results of single-phase model (Gas) between the in-house simulator and

IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and 𝑆𝑤 = 𝑆𝑜 = 0. The

reservoir fluids that exist in this test is single-phase gas. The difference is very small.

0

200

400

600

800

1000

1200

1400

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Oil_SC(bbl/d)

In house Oil_SC(bbl/d)

Page 65: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

46

Fig 4.11 Gas production of single-phase gas black oil simulation

vii) Single-phase Water

Fig 4.12 compares the results between single-phase model (Water) of the in-house simulator and

IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and 𝑆𝑜 = 𝑆𝑔 = 0. The

reservoir fluids that exist in this test is single-phase water model. As the compressibility of water

is very small, the system depletes fast. The difference in water flow rate is negligible.

0.00E+00

5.00E+06

1.00E+07

1.50E+07

2.00E+07

2.50E+07

3.00E+07

3.50E+07

4.00E+07

0 50 100 150 200 250 300 350

scf/

d

day

Production rate (SC)

In house Gas_SC(scf/d)

CMG Gas_SC(SCF/d)

Page 66: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

47

Fig 4.12 Water production of single-phase water black oil simulation

0

100

200

300

400

500

600

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

CMG Water_SC(bbl/d)

In house Water_SC(bbl/d)

Page 67: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

48

4.3.2 Radial-Cylindrical grid system

The first testing series is for radial-cylindrical grid system. A homogeneous 6x3x3 (r, θ, z) reservoir

is used to test the fluid flow models. All tests are subject to the reservoir properties shown in Table

4.6. The rock and fluid properties are the same as those used in rectangular grid system.

Table 4.6 Reservoir and fluid properties

Reservoir Model (r-𝜃-z) 11-3-3

Resrvoir Outer boundary radius (ft) 565

Reservoir Thickness (ft) 60

Porosity 0.3

Permeability in r and 𝜃 (md) 10

Permeability in z (md) 1

Rock compressibility (psia-1) 1 × 10−9

Water compressibility (psia-1) 1 × 10−6

Water density (standard condition) (lb/ft3) 62.24

Well radius (ft) 0.25

Water viscosity (cp) 0.52

Reservoir Temperature (F) 150

i) Three-phase Water/Oil/Gas

Fig 4.13 compares the results of three-phase model with variable bubble point between the in-house

simulator and IMEX model in CMG. The simulation started with the initial pressure 3000 psia,

Psf=950 psia, and Sw = 0.5. The Bubble point is set to be 1150 psia. The result shows that the

production rate curves are close to each other for all phases (Fig 4.13a, b and c). The gas phase

starts to appear in the well block during the production (Fig 4.13d). There are small differences

between the appearance point of the results of the two models. This difference, like appeared in the

rectangular gird system, is easy to occur due to the lower gas saturation and has very little influence

Page 68: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

49

to the fluid flow in the reservoir. In addition, the gridding approach and implementation of the in-

house simulator is different than CMG. The well block pressure is in good agreement (Fig 4.13e).

(a)

0

50

100

150

200

250

300

350

400

450

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

In house Oil_SC(bbl/d)

CMG Oil_SC(bbl/d)

Page 69: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

50

(b)

(c)

0

10

20

30

40

50

60

70

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

In house Water_SC(bbl/d)

CMG Water_SC(bbl/d)

0.00E+00

2.00E+04

4.00E+04

6.00E+04

8.00E+04

1.00E+05

1.20E+05

1.40E+05

1.60E+05

1.80E+05

0 50 100 150 200 250 300 350

scf/

d

day

Production rate (SC)

In house Gas_SC(scf/d)

CMG Gas_SC(SCF/d)

Page 70: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

51

(d)

(e)

Fig 4.13 Water/Oil/Gas three-phase black oil model.

(a) Oil production rate; (b) Water production rate; (c) Gas production rate;

(d) Well block Saturations; (e) Well block pressure.

0

0.001

0.002

0.003

0.004

0.005

0.006

0.007

0.008

0.009

0.49

0.492

0.494

0.496

0.498

0.5

0.502

0.504

0.506

0 50 100 150 200 250 300 350

Sg

So/S

w

Time (day)

Well block saturation

So - In house

Sw - In house

So - CMG

Sw - CMG

Sg - CMG

Sg - In house

1000

1500

2000

2500

3000

3500

0 100 200 300

Pre

ssu

re (

psi

a)

Time (day)

Well block Pressure

Po-Inhouse

Page 71: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

52

ii) Two-phase Water/Oil

Fig 4.14 compares the results of two-phase model (Water/Oil) between the in-house simulator built

in this study and IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and Sw =

0.5. The reservoir fluids that exist in this test is two-phase water/oil model. The result shows that

the curves are close to each other.

(a)

0

10

20

30

40

50

60

70

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

In house Water_SC(bbl/d)

CMG Water_SC(bbl/d)

Page 72: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

53

(b)

Fig 4.14 Water/Oil two-phase black oil simulation.

(a) Water production rate; (b) Oil production rate.

iii) Two-phase Water/Gas

Fig 4.15 compares the results of two-phase model (Water/Gas) between the in-house simulator built

in this study and IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and Sw =

0.5. The reservoir fluids that exist in this test is water and gas phases. The water and gas flowrate

difference between the two models is less than 1%.

0

50

100

150

200

250

300

350

400

450

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

In house Oil_SC(bbl/d)

CMG Oil_SC(bbl/d)

Page 73: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

54

(a)

(b)

Fig 4.15 Water/Gas two-phase black oil simulation.

(a) Oil production rate; (b) Gas production rate.

0

5

10

15

20

25

30

35

40

45

50

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

In house Water_SC(bbl/d)

CMG Water_SC(bbl/d)

0.00E+00

2.00E+06

4.00E+06

6.00E+06

8.00E+06

1.00E+07

1.20E+07

1.40E+07

1.60E+07

0 50 100 150 200 250 300 350

scf/

d

day

Production rate (SC)

In house Gas_SC(scf/d)

CMG Gas_SC(SCF/d)

Page 74: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

55

iv) Two-phase Oil/Gas

Fig 4.16 compares the results of two-phase model (Oil/Gas) between the in-house simulator built

in this study and IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and So =

0.5. The reservoir fluids that exist in this test is oil and gas. The difference of oil and gas flow rate

is small.

(a)

0

5

10

15

20

25

30

35

0 50 100 150 200 250 300 350

bb

l/d

day

Production rate (SC)

In house Oil_SC(bbl/d)

CMG Oil_SC(bbl/d)

Page 75: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

56

(b)

Fig 4.16 Oil/Gas two-phase black oil simulation.

(a) Oil production rate; (b) Gas production rate.

v) Single-phase Oil

Fig 4.17 compares the results of single-phase model (Oil) between the in-house simulator and

IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and 𝑆𝑤 = 𝑆𝑔 = 0. The

reservoir fluids that exist in this test is single-phase oil. The curves are in good agreement.

0.00E+00

2.00E+06

4.00E+06

6.00E+06

8.00E+06

1.00E+07

1.20E+07

1.40E+07

1.60E+07

1.80E+07

0 50 100 150 200 250 300 350

scf/

d

day

Production rate (SC)

In house Gas_SC(scf/d)

CMG Gas_SC(SCF/d)

Page 76: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

57

Fig 4.17 Oil production of single-phase oil black oil simulation

vi) Single-phase Gas

Fig 4.18 compares the results of single-phase model (Oil) between the in-house simulator and

IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and Sw = 𝑆𝑜 = 0. The

reservoir fluids that exist in this test is single-phase gas. The curves are close to each other.

0

200

400

600

800

1000

1200

1400

0 100 200 300

bb

l/d

day

Production rate (SC)

CMG Oil_SC(bbl/d)

In house Oil_SC(bbl/d)

Page 77: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

58

Fig 4.18 Gas production of single-phase gas black oil simulation

vii) Single-phase Water

Fig 4.19 compares the results of single-phase model (Water) between the in-house simulator and

IMEX model in CMG. The initial pressure is 3000 psia, Psf=1000 psia, and So = 𝑆𝑔 = 0. The

reservoir fluids that exist in this test is single-phase. As the compressibility of water is very small,

the water system depletes very fast and the production rate reaches 0 before 2 months of production.

Comparing with the results with the commercial simulator, the water flow rate in the single-phase

model in this study is in good agreement.

0.00E+00

5.00E+06

1.00E+07

1.50E+07

2.00E+07

2.50E+07

3.00E+07

3.50E+07

4.00E+07

0 100 200 300

scf/

d

day

Production rate (SC)

In house Gas_SC(scf/d)

CMG Gas_SC(SCF/d)

Page 78: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

59

Fig 4.19 Water production of single-phase water black oil simulation

0

100

200

300

400

500

600

0 100 200 300

bb

l/d

day

Production rate (SC)

CMG Water_SC(bbl/d)

In house Water_SC(bbl/d)

Page 79: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

60

Chapter 5

Compositional Model

The compositional models are derived from the general reservoir simulation framework. The

compositional model can be treated as a more sophisticated version of black oil model. It takes

chemical component into considerations in mass balance (for heavy components like C7+, they

would normally be combined together and considered as one pseudo component). Therefore, the

model will be able to capture more details but the process leads to more computational cost. The

most important and difficult portion in developing compositional model is the flash calculation.

The compositional models developed in current study consists of the one with two-phase flash

calculation and three-phase flash calculation.

5.1 Model description

As in black oil model, the mass balance equations are the primary system of equations

−𝛻 ∙ (𝑥𝑖𝜌�� ) + 𝑥𝑖�� = 𝑉𝑏

𝜕(𝑥𝑖𝜙𝜌)

𝜕𝑡 (5-1)

where �� is the volumetric flux of each phase and xi is the mass fraction of the 𝑖th component. It

can be written as

∑𝛻 ∙ (𝑋𝑖𝜌𝑙�� 𝑙𝑀𝑤𝑙

)

𝑙

+ ∑𝑋𝑖𝑄𝑙

𝑙

= ∑𝑉𝑏

𝜕

𝜕𝑡(𝑋𝑖𝜙𝜌𝑙𝑆𝑙

𝑀𝑤𝑙)

𝑙

(5-2)

where 𝑋𝑖 is the mole faction, 𝑄𝑙 is the molar flow rate and 𝑀𝑤𝑙 is the molecular weight of phase 𝑙.

The finite difference form of flux becomes

Page 80: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

61

∑𝑇𝑚+

Δ𝑚2

𝜆𝑚+

Δ𝑚2

[𝑝𝑚+𝛥𝑚 − 𝑝𝑚 − 𝜂𝑚(𝐺𝑚+𝛥𝑚 − 𝐺𝑚 )]

𝑚

(5-3)

where m is the directions. 𝑇𝑚 terms are constants. It is defined as the same as that in black oil model

and are computed once the grids information is input into the simulator.

𝜆 is the fluid related transmissibility term in 𝑚 direction

𝜆𝑖,𝑚+

Δ𝑚2

= 𝑋𝑖𝑙𝑘𝑟𝑙|𝑚+

Δ𝑚2

𝜌𝑙

𝑀𝑤𝑙𝜇𝑙

|𝑚+

Δ𝑚2

(5-4)

𝑘𝑟𝑙|𝑚+

Δ𝑚

2

is calculated via one point up stream weighing method

𝑘𝑟𝑙|𝑚+

Δ𝑚2

= {𝑘𝑟𝑙

|𝑚, Φ𝑙|𝑚 ≥ Φ𝑙|𝑚+Δ𝑚

𝑘𝑟𝑙|𝑚+Δ𝑚

, Φ𝑙|𝑚 < Φ𝑙|𝑚+Δ𝑚

(5-5)

The 𝜌𝑙

𝑀𝑤𝑙𝜇𝑙|𝑚+

Δ𝑚

2

term is calculated as the arithmetic average that of the two connecting blocks

𝜌𝑙

𝑀𝑤𝑙𝜇𝑙

|𝑚+

Δ𝑚2

=

𝜌𝑙𝑀𝑤𝑙

𝜇𝑙|𝑚

+𝜌𝑙

𝑀𝑤𝑙𝜇𝑙

|𝑚+Δ𝑚

2 (5-6)

and 𝜂 is the gravity related term in 𝑚 direction

𝜂𝑚 =1

144

𝑔

𝑔𝑐𝜌𝑙|𝑚+

𝛥𝑚2

(5-7)

and the density term is also calculated as the arithmetic average of that of the connecting two blocks

𝜌𝑙|𝑚+Δ𝑚2

=𝜌𝑙|𝑚 + 𝜌𝑙|𝑚+Δ𝑚

2 (5-8)

Page 81: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

62

The source/sink term has different representations. If the flow rates are specified, the value can be

directly put into the equation; if the sandface pressure is specified, the flow rate should be calculated

via the following equation

𝑞𝑖 = ∑𝑊𝐼 ∙ 𝜆𝑖𝑙(𝑝𝑙 − 𝑝𝑤𝑓)

𝑙

(5-9)

where 𝑞𝑖 is the molar flow rate for 𝑖th component, 𝑊𝐼 is the well index, and

𝜆𝑖𝑙 = 𝑋𝑖𝑙𝑘𝑟𝑙𝜌𝑙

𝑀𝑤𝑙𝜇𝑙

(5-10)

the accumulation term is calculated as

𝑉𝑏

5.615𝛥𝑡[∑(

𝑋𝑖𝑙𝜌𝑙𝜙𝑆𝑙

𝑀𝑤𝑙

)

𝑛+1

𝑙

− ∑(𝑋𝑖𝑙𝜌𝑙𝜙𝑆𝑙

𝑀𝑤𝑙

)

𝑛

𝑙

] (5-11)

and the molar fraction has the relation

∑𝑍𝑖

𝑛

𝑖

= 1 (5-12)

where n is the number of the components, and Zi is the total mole fraction

Zi = 𝑋𝑖𝑜 + 𝑋𝑖𝑔 + 𝑋𝑖𝑤 (5-13)

note that if using two-phase flash calculation, we assume Xiw = 0.

The phase relations are the same as black oil model. For compositional model with two-phase flash

calculation, the water phase is treated the same way as in black oil model. Thus, the primary

unknowns are Po, Z1, Z2, … 𝑍𝑛−1, and Sw . For compositional model with three-phase flash

calculation, the primary unknowns are Po, Z1, Z2, … 𝑍𝑛−1 . The material balance check are for

components instead of phases:

Page 82: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

63

IMBC𝑖

n+1 =

∑ ∑ ∑ ∑ (𝑋𝑖𝑙𝑉𝑏𝜙𝑆𝑙𝜌𝑙

𝑀𝑤𝑙)𝑙𝑖,𝑗,𝑘

𝑛+1

𝑘𝑗𝑖 − ∑ ∑ ∑ ∑ (𝑋𝑖𝑙𝑉𝑏𝜙𝑆𝑙𝜌𝑙

𝑀𝑤𝑙)𝑙𝑖,𝑗,𝑘

𝑛

𝑘𝑗𝑖

∑ 𝑞𝑖𝑚𝑚 𝑑𝑡

(5-14a)

CMBC𝑖

n+1 =

∑ ∑ ∑ ∑ (𝑋𝑖𝑙𝑉𝑏𝜙𝑆𝑙𝜌𝑙

𝑀𝑤𝑙)𝑙𝑖,𝑗,𝑘

𝑛+1

𝑘𝑗𝑖 − ∑ ∑ ∑ ∑ (𝑋𝑖𝑙𝑉𝑏𝜙𝑆𝑙𝜌𝑙

𝑀𝑤𝑙)𝑙𝑖,𝑗,𝑘

𝑖𝑛𝑖𝑡𝑖𝑎𝑙

𝑘𝑗𝑖

∑ ∑ 𝑞𝑖𝑚,𝑡𝑚 𝑑𝑡𝑡

(5-14b)

In compositional model, the same method is used for phase relative permeability and capillary

pressures. And the flash calculation algorithm is applied to calculate phase mole fraction, saturation

calculations and PVT properties.

5.2 Phase behavior and Flash Calculation

In black oil models, the phase properties are computed via correlations or PVT curves tested from

the laboratory. In compositional model, in order to capture or predict the phase behaviors of the

existing phases under various conditions numerically, the algorithms of flash calculation are

required. Flash calculation is to use the theories for phase equilibrium to solve for the phase

behavior. It should be noted that the flash calculation in the compositional model of this study are

carried out under isothermal condition.

5.2.1 Generalized VnLE flash calculation framework

The component distribution and phase behavior are determined by flash calculation. In this study,

two kinds of flash calculations are required: two-phase flash (VLE, oleic/vapor) and three-phase

flash (VLLE, oleic/vapor/aqueous). To make it convenient to implement and manage, a

Generalized VnLE (Gas + multi-liquid phase equilibrium) multicomponent flash calculation

framework is implemented. This framework has the common features of the two flash models and

can serve as a good foundation for two and three-phase implementations. Several VnLE algorithms

Page 83: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

64

are proposed (Nghiem, 1984; Michelen, 1993), and the common features and derivations are

implemented. It can serve as the foundation for the development of two-phase (VLE) and three-

phase (VLLE) flash calculation.

The work flow of the generalized flash calculation algorithm is illustrated as following (Fig 5.1):

Fig 5.1 VnLE flash calculation framework

Suppose we have 𝑁 liquid phases and one gas phase in the system and the total number of

components is 𝑛:

Page 84: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

65

1. Data inputs. The data required for flash calculation is temperature, pressure, and the mole

fractions of the components. As this model is focusing on the isothermal problem,

temperature is specified at the beginning of the program and will be kept as constant

through the simulation. On the other hand, the pressure data and n-1 molar fractions are

kept changing each time the flash calculation is needed.

2. A good initial guess of the K values are vital to the solution process of the flash calculation.

Different initial guesses will be discussed for VLE and VLLE flash calculations in the

following paragraphs.

3. Check the phase splitting status. This can be done by applying negative flash. If the total

phase number is less, jump to 8. Else go to 4.

4. Calculate the molar fractions of all of the existing phases based on the presented K values.

Generalized Newton-Raphson Method is applied.

We have

𝑦𝑖 =𝑧𝑖

𝐷𝑖 (5-15a)

𝑥𝑖,𝑋𝑗=

𝑧𝑖

𝐷𝑖

1

𝐾𝑖,𝑋𝑗

(5-15b)

where 𝑋𝑗 is the 𝑗th liquid phase, and

𝐷𝑖 = 1 + ∑𝛽𝑖,𝑋𝑗𝐿𝑋𝑗

𝑗

(5-16a)

𝛽𝑖,𝑋𝑗= (

1

𝐾𝑖,𝑋𝑗

− 1) (5-16b)

for each phase we have

∑𝑦𝑖

𝑛

𝑖=1

= 1 (5-17a)

∑𝑥𝑖,𝑋𝑗

𝑛

𝑖=1

= 1 (5-17b)

Page 85: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

66

where 𝑋𝑗 is the 𝑗th liquid phase. Only N equations are needed to solve 𝐿𝐴 and 𝐿𝐵

𝐹𝑗 = ∑𝑥𝑖,𝑋𝑗

𝑛

𝑖=1

− ∑𝑦𝑖

𝑛

𝑖=1

= ∑𝑧𝑖𝛽𝑖,𝑋𝑗

𝐷𝑖

𝑛

𝑖=1

(5-18)

and its derivatives can be defined as:

𝜕𝐹𝑗

𝜕𝐿𝑋𝑗

= ∑−𝑧𝑖𝛽𝑖,𝑋𝑗

2

𝐷𝑖2

𝑛

𝑖=1

(5-19a)

𝜕𝐹𝑗

𝜕𝐿𝑋𝑚

= ∑−𝑧𝑖𝛽𝑖,𝑋𝑗

𝛽𝑖,𝑋𝑚

𝐷𝑖2

𝑛

𝑖=1

(5-19b)

then one can solve the following linear equation to obtain ΔLXj:

[ 𝜕𝐹1

𝜕𝐿𝑋1

⋯𝜕𝐹1

𝜕𝐿𝑋𝑁

⋮ ⋱ ⋮𝜕𝐹𝑁

𝜕𝐿𝑋1

⋯𝜕𝐹𝑁

𝜕𝐿𝑋𝑁]

[

𝛥𝐿𝑋1

⋮𝛥𝐿𝑋𝑁

] = − [𝐹1

⋮𝐹𝑁

] (5-20)

or, re-written in matrix form:

𝜕𝑭

𝜕𝑳𝛥𝑳 = −𝑭 (5-21)

then, update the liquid molar fractions by

𝑳 = 𝑳 + 𝛥𝑳 (5-22)

any of the following convergence criteria can be applied:

|𝑭| < 10−9

|𝛥𝑳| < 10−9

Page 86: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

67

|𝑳k+1

𝑳k− 1| < 10−9

5. Fugacity calculation. Equation of state combining with different mixing rules are applied

for VLE and VLLE flash calculations. This will be discussed later.

6. The flash calculation is converged if the fugacities are all equal, i.e.

𝒇V = 𝒇𝑋1= ⋯ = 𝒇𝑋𝑁

(5-23)

where 𝒇 is the fugacity vector:

𝒇 = [𝑓1⋮𝑓𝑛

] (5-24)

in practice, the following criteria is used to determine the convergence:

|𝒇𝑉

𝑘+1

𝒇𝑋𝑗

𝑘 − 1| < 10−9

If the flash calculation is converged then finish the routine and output the results; else go

to 7.

7. If the flash calculation is not converged, then update the K values and go back to 3. There

are two major updating algorithms available to update K values:

1) Successive substitution (SS) method. It is the easiest updating algorithm:

𝐾𝑖,𝑋𝑗= 𝐾𝑖,𝑋𝑗

𝑓𝑖,𝑋𝑗

𝑘

𝑓𝑖,𝑋𝑗

𝑘−1 (5-25)

Successive substitution method is also robust. With a reasonable initial guess, the

convergence is guaranteed. Its speed sometimes is slow though, especially when near

the critical point, it may take thousands of iterations to get converge.

Page 87: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

68

2) Newton-Raphson method. As the fugacity of each component is the function of all K

values, we have

𝐹𝑖(𝑲) = 𝑓𝑢𝑔𝑉𝑖(𝑲) − 𝑓𝑢𝑔𝐿𝑚𝑖

(𝑲) = 0 (5-26)

where V is for vapor phase, Lm is for mth liquid, and i = 1,2,3,… , nth component.

the Jacobian matrix can be written as

𝐉 =

[ 𝜕𝐹1

𝜕𝑋1

𝜕𝐹1

𝜕𝑋2⋯

𝜕𝐹1

𝜕𝑋𝑛

𝜕𝐹2

𝜕𝑋1

𝜕𝐹2

𝜕𝑋2⋯

𝜕𝐹2

𝜕𝑋𝑛

⋮ ⋮ ⋱ ⋮𝜕𝐹𝑛𝜕𝑋1

𝜕𝐹𝑛𝜕𝑋2

⋯𝜕𝐹𝑛𝜕𝑋𝑛]

n×n

(5-27)

and the K values can be updated as

𝐾𝑘+1 = 𝐾𝑘 − 𝑱−1𝑭 (5-28)

The Newton-Raphson method is faster than the successive substitution method, but it

is easy to end up with divergence.

In this study, the two methods are combined together. For initial several iterations, the

successive substitution method is to be used, and then, switch to Newton-Raphson method

takes place to accelerate the solving process.

8. The flash calculation is handled in the lower level of flash calculation. The stability analysis

will be applied on the reduced phases. The stability analysis is discussed later.

Page 88: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

69

5.2.2 Equation of State

In this study, the Peng-Robinson equation of state (EOS) is applied:

p =RT

𝑉 − 𝑏𝑚𝑖𝑥 −

(𝑎α)mix

𝑉2 − 2𝑏𝑚𝑖𝑥𝑉 − 𝑏𝑚𝑖𝑥2 (5-29)

where p is pressure, V is molar volume of the mixture, T is the absolute temperature, R is the gas

constant, (𝑎α)mix is the mixture attraction parameter, and 𝑏𝑚𝑖𝑥 is the mixture co-volume. To better

solve this equation, it can be written as cubic polynomial form of Z factor:

Z3 + 𝑎𝑍2 + 𝑏𝑍 + 𝑐 = 0 (5-30)

where

𝑎 = −(1 − B) (5-31a)

b = A − 3B2 − 2𝐵 (5-31b)

c = −(AB − B2 − 𝐵3) (5-31c)

and

𝐴 =(𝑎𝛼)𝑚𝑖𝑥𝑝

𝑅2𝑇2 (5-32a)

𝐵 =𝑏𝑚𝑖𝑥𝑝

𝑅𝑇 (5-32b)

The mixture parameters (𝑎𝛼)𝑚𝑖𝑥 and 𝑏𝑚𝑖𝑥 are calculated through mixing rules. Different mixing

rule are applied for two-phase flash and three-phase flash. We will discuss them later.

Page 89: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

70

5.2.3 VLE flash

VLE flash means Vapor and Oleic phase equilibrium without H2O component. In two-phase flash

calculation, only oleic and vapor phases are considered. The two-phases are all hydrocarbon phases

and are subject to high solubility. The phase merge and split may happen often during

compositional reservoir simulation. The hydrocarbon components are exchanged frequently and in

considerable amount between the oleic and vapor phases. The difference of the ratios between the

molar fractions of the hydrocarbon components (K values) is normally within a relatively small

range. The Newton's method applied in molar fraction iteration collapses to one dimensional case,

which makes the iteration process faster.

i) Initial guess of K values

To start flash calculation, a good initial guess for 𝐾 values is vital. Wilson’s correlation (Wilson,

1968) can be applied as a good starting point of 𝐾 values for hydrocarbon components:

𝐾𝑖 =1

𝑃𝑟𝑖exp [5.37(1 + 𝜔𝑖) (1 −

1

𝑇𝑟𝑖)] (5-33)

ii) Mixing rule

The mixing rule is

(𝑎𝛼)𝑚𝑖𝑥 = ∑∑𝑧𝑖𝑧𝑗√(𝑎𝛼)𝑖(𝑎𝛼)𝑗(1 − 𝛿𝑖𝑗)

𝑛𝑐

𝑗

𝑛𝑐

𝑖

(5-34a)

𝑏𝑚𝑖𝑥 = ∑ 𝑧𝑗𝑏𝑗𝑛𝑐𝑗 (5-34b)

where nc is the number of components, 𝑧𝑗 is the total mole fraction in the mixture of 𝑗th component,

and 𝛿𝑖𝑗 is the binary interaction coefficient between component i and j and we have

Page 90: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

71

𝛿𝑖𝑗 = 𝛿𝑗𝑖 (5-35)

The attraction parameter and co-volume of the pure component can be calculated as

(𝑎𝛼)𝑖 = 𝛺𝑎𝑖

𝑅2𝑇𝑐𝑖2

𝑝𝑐𝑖[1 + 𝜂𝑖 (1 − 𝑇

𝑟𝑖

12)]

2

(5-36a)

𝑏𝑖 = 𝛺𝑏𝑖𝑅𝑇𝑐𝑖

𝑝𝑐𝑖 (5-36b)

where

Ω𝑎𝑖 = 0.45724 (5-37a)

Ω𝑏𝑖 = 0.07780 (5-37b)

Tri =𝑇

𝑇𝑐𝑖 (5-37c)

η𝑖 = {0.374640 + 1.54226𝜔𝑖 − 0.26992𝜔𝑖

2, 𝜔𝑖 ≤ 0.49

0.379642 + 1.48503𝜔𝑖 − 0.164423𝜔𝑖2 + 0.0166666𝜔𝑖

3, 𝜔𝑖 > 0.49 (5-37d)

iii) Fugacity calculation

The fugacity 𝑓𝑖 is needed to calculate the equilibrium of the hydrocarbon phase. The fugacity

calculation of two-phase flash is

ln𝜙𝑖 = (BB)𝑖(𝑍 − 1) − ln(𝑍 − 𝐵) −𝐴

2√2[(𝐴𝐴)𝑖 − (𝐵𝐵)𝑖] ln [

𝑍 + (√2 + 1)𝐵

𝑍 − (√2 − 1)𝐵] (5-38)

where

𝜙𝑖 =𝑓𝑖

𝑧𝑖𝑝 (5-39a)

(BB)i =𝑏𝑖

𝑏𝑚𝑖𝑥 (5-39b)

(AA)i = 2(𝑎𝛼)𝑖

0.5

(𝑎𝛼)𝑚𝑖𝑥[∑𝑧𝑗

𝑛𝑐

𝑗

(𝑎𝛼)𝑖0.5(1 − 𝛿𝑖𝑗)] (5-39c)

Page 91: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

72

5.2.4 VLLE flash

Instead of flashing for only vapor and oleic phase, VLLE flash means Vapor, Oleic and Aqueous

phase equilibrium with H2O component.

i) Initial guess of K values

For non-H2O component in vapor and oleic phases, Wilson’s correlation is still a good initial guess

in three-phase flash. For aqueous phase, however, Wilson’s correlation will be too far from the

solution. Instead, we can use the following empirical equation (Peng & Robinson, 1976b):

KAqueous,i = 106 (𝑃𝑟𝑖

𝑇𝑟𝑖) (5-40)

The initial guess for the 𝐾 value of the H2O component needs to be specially taken care of:

KAqueous,H2O = 10−6 (𝑇𝑟𝐻2𝑂

𝑃𝑟𝐻2𝑂

) (5-41)

ii) Mixing rule

As water phase is a polar system, the mixing rule of the three-phase flash calculation is different

from that of the two-phase flash. Among many mixing rules, Huron-Vidal mixing rule (Huron and

Vidal, 1979) is one of the most commonly used one. One of the most important advantages of the

Huron-Vidal mixing rule is that it will collapse back to classical mixing rule if no polar component

is presented in the system. In Huron-Vidal mixing rule the attraction parameter and co-volume is

calculated by

𝑏𝑚𝑖𝑥 = ∑𝑧𝑖𝑏𝑖

𝑛𝑐

𝑖=1

(5-42a)

Page 92: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

73

𝑎𝑚𝑖𝑥 = 𝑏𝑚𝑖𝑥 [∑𝑧𝑖

(𝑎𝛼)𝑖𝑏𝑖

𝑛𝑐

𝑖=1

+√2𝐺∞

𝐸

ln(√2 − 1)] (5-42b)

where

G∞

E

RT= ∑

𝐴𝑖

𝐵𝑖𝑖

(5-43)

where

Ai = ∑𝑧𝑖𝐶𝑖𝑗𝜏𝑖𝑗

𝑗

(5-44a)

Bi = ∑𝑧𝑖𝐶𝑖𝑗

𝑗

(5-44b)

Cij = 𝑏𝑖 exp(−𝛽𝑖𝑗𝜏𝑖𝑗) (5-44c)

τij =𝑔𝑖𝑗 − 𝑔𝑖𝑖

𝑅𝑇 (5-44d)

and when no polar components are presented in the system, the β and g terms are to be defined as

βij = 0 (5-45a)

gii =ln(√2 − 1)

√2

(𝑎𝛼)𝑖bi

(5-45b)

gij = −2√𝑏𝑖𝑏𝑗

𝑏𝑖 + 𝑏𝑗√𝑔𝑖𝑖𝑔𝑗𝑗(1 − 𝛿𝑖𝑗) (5-45c)

thus, this mixing rule will collapse back to the classical mixing rule.

iii) Fugacity calculation

The fugacity is calculated by

Page 93: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

74

ln𝜙𝑖 =𝑏𝑖

𝑏𝑚

(𝑍 − 1) − ln(𝑍 − 𝐵) −1

2√2[(𝑎𝛼)𝑖𝑏𝑖𝑅𝑇

−ln 𝛾𝑖∞

0.62323] ln [

𝑍 + (√2 + 1)𝐵

𝑍 − (√2 − 1)𝐵] (5-46)

where

ln 𝛾𝑖∞ =1

𝑅𝑇[𝐺∞

𝐸 + ∑𝜕G∞

E

𝜕𝑐𝑗(𝛿𝑖𝑗 − 𝑐𝑗)

𝑗

] (5-47)

where 𝛿 is Kronecker delta. To facilitate computation, this equation can be re-written as

ln 𝛾𝑖∞ = Φ +1

𝑅𝑇

𝜕G∞E

𝜕𝑐𝑖 (5-48)

where

Φ =1

𝑅𝑇[𝐺∞

𝐸 − ∑𝑐𝑗𝜕G∞

E

𝜕𝑐𝑗𝑗

] (5-49)

and

1

RT

𝜕G∞E

𝜕𝑐𝑗= ∑𝑐𝑖

(𝜏𝑖𝑗Bi − 𝐴𝑖)𝐶𝑖𝑗

𝐵𝑖2

𝑖

+𝐴𝑗

𝐵𝑗 (5-50)

where

Ai = ∑𝑧𝑖𝐶𝑖𝑗𝜏𝑖𝑗

𝑗

(5-51a)

Bi = ∑𝑧𝑖𝐶𝑖𝑗

𝑗

(5-51b)

Cij = 𝑏𝑖 exp(−𝛽𝑖𝑗𝜏𝑖𝑗) (5-51c)

Page 94: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

75

5.2.5 Negative flash and Stability test

When the pressure increased above bubble point, the two hydrocarbon phases may be combined

together; when the pressure drops below bubble point, one hydrocarbon phase splits into two. The

number of phases thus changes. In flash calculation, the negative flash algorithm is used to

determine when the phases split or merge, and the stability test algorithm is applied to check if such

phase transformation is stable.

Negative flash

Negative flash (Whitson and Michael 1989) is here to determine if such switching is to happen.

The sum of the molar fractions of all phases is subject to

∑𝑓𝑛 = 1 (5-52)

This relation is physically sound. But in the mathematical representation in flash calculation, it is

possible to have the computed phase molar fraction to be negative or bigger than 1. When this

happens, the phases will merge together.

𝑓𝑛 < 0, nth phase disappears

𝑓𝑛 > 1, nth phase is the only phase

The algorithm will start to assume that the maximum number of phases exist, and along with the

iterations the 𝑓𝑛 values are monitored. Once the phase merge criteria is satisfied, the flash

calculation process is stopped and passes the existing reduced phases to lower level flash

calculation.

Stability test

Page 95: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

76

After the phase merge happens, the stability test is applied to make sure the merged phase is stable.

The algorithm can be summarized as following:

1. Obtain the initial guess of the K values.

2. Create a new phase with the composition of

ci =𝑧𝑖𝛾𝑖

𝑆 (5-53)

where

𝑆 = ∑𝑧𝑖𝛾𝑖

𝑛

𝑖=1

(5-54)

and the coefficient γi is listed below (Table 5.1):

Table 5.1 coefficient γi

Phase tested/Against Vapor Oleic Aqueous

Vapor -- 1

𝐾𝐴𝑖

1

𝐾𝐵𝑖

Oleic 𝐾𝐴𝑖 -- 𝐾𝐴𝑖

𝐾𝐵𝑖

Aqueous 𝐾𝐵𝑖 𝐾𝐵𝑖

𝐾𝐴𝑖 --

3. Calculate fugacity of both phases, and update the coefficient γi by:

(𝛾𝑖 )𝑘+1 = (𝛾𝑖 )

𝑘(𝑅𝑖)𝑘 (5-55)

where

Ri =𝑓𝑐𝑖𝑓𝑧𝑖

𝑆 (5-56)

Page 96: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

77

4. Convergence is achieved when

∑(𝑅𝑖 − 1)2𝑛

𝑖=1

< 10−10

5. Trivial solution is achieved when

∑(ln𝛾𝑖)2

𝑛

𝑖=1

< 10−4

6. If not converged, back to step 2; if converged or trivial, stop the iteration.

If all test has converged with S ≤ 1, the phase being tested is stable; otherwise a phase split by

adding the new phase with the calculated distribution coefficient should be determined.

5.2.6 Phase properties

i) Pseudocritical properties

Pseudocritical properties can be calculated as the weighted average of the critical properties of each

component:

𝑇𝑝𝑐 = ∑𝑐𝑖𝑇𝑐𝑖

𝑛𝑐

𝑖=1

(5-57a)

𝑃𝑝𝑐 = ∑𝑐𝑖𝑃𝑐𝑖

𝑛𝑐

𝑖=1

(5-57b)

𝑉𝑝𝑐 = ∑𝑐𝑖𝑉𝑐𝑖

𝑛𝑐

𝑖=1

(5-57c)

ii) Molecular Weight

Page 97: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

78

The molecular weight (𝑀𝑤) for each phase shares the same formula. It is simply the weighted

average of the molecular weights of the components:

𝑀𝑤𝑙 = ∑𝑐𝑖𝑀𝑤𝑖

𝑛𝑐

𝑖=1

(5-58)

iii) Density and Formation Volume Factor

The molar density of phase l can be calculated as

��𝑙 =𝑝

𝑅𝑇𝑍𝑙 (5-59)

and the mass density is to multiply the mole density with molecular weight of phase l:

𝜌𝑙 = ��𝑙𝑀𝑤𝑙 (5-60)

then, we calculate the formation volume factor by

𝐵𝑙 =𝜌𝑙𝑠𝑐

𝜌𝑙 (5-61)

iv) Viscosity

The gas viscosity is calculated by the correlation proposed by Lee, Gonzalez and Eakin (1966):

𝜇𝑔 = 1 × 10−4𝐾 exp [𝑋 (𝜌𝑔

62.4)𝑌

] (5-62)

where

𝐾 =(9.4 + 0.02𝑀𝑤𝑔)𝑇1.5

209 + 19𝑀𝑤𝑔 + 𝑇 (5-63a)

𝑌 = 2.4 − 0.2𝑋 (5-63b)

𝑋 = 3.5 +986

𝑇+ 0.01𝑀𝑤𝑔 (5-63c)

Page 98: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

79

The oil viscosity is calculated by the correlation proposed by Lohrenz, Bray and Clark (1964):

μ = μ∗ + 𝜉𝑚−1[(0.1023 + 0.023364𝜌𝑟 + 0.058533𝜌𝑟

2 − 0.040758𝜌𝑟3

+ 0.0093724𝜌𝑟4)4 − 1 × 10−4]

(5-64)

where μ∗ is the viscosity of the mixture at atmosphere pressure:

μ∗ =∑ 𝑥𝑖𝜇𝑖

∗√𝑀𝑤𝑖𝑖

∑ 𝑥𝑖√𝑀𝑤𝑖𝑖

(5-65)

where xi is the mole fraction of the 𝑖 th component in the mixture, and μi∗ is the low pressure

viscosity of 𝑖th component:

μi∗ =

{

34 × 10−5𝑇𝑟𝑖

0.94

𝜉𝑖, 𝑇𝑟𝑖 ≤ 1.5

17.78 × 10−5(4.58𝑇𝑟𝑖 − 1.67)0.625

𝜉𝑖, 𝑇𝑟𝑖 > 1.5

(5-66)

where Tri is the reduced temperature of the 𝑖th component:

Tri =𝑇

𝑇𝑐𝑖 (5-67)

and ξi and ξm are calcualted by

ξi =5.4402𝑇𝑐𝑖

1/6

√𝑀𝑤𝑖𝑃𝑐𝑖2/3

(5-68a)

ξm =5.4402𝑇𝑝𝑐

1/6

√𝑀𝑤𝑚𝑃𝑝𝑐2/3

(5-68b)

and the reduced density is calculated as

Page 99: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

80

𝜌𝑟 =𝜌𝑙

𝜌𝑝𝑐=

𝜌𝑙𝑉𝑝𝑐

𝑀𝑤𝑙 (5-69)

5.3 Validation

The Compositional fluid flow models are tested in this section. The components and initial molar

fractions are CH4 (36%), C2H6 (15%), C3H8 (10%), nC5 (19%), nC10 (10%) and nC16 (10%). The

test case scenarios and results are shown below. The validation is between the results generated

using the in-house reservoir simulation developed in this study and GEM model in commercial

simulation software Computer Modeling Group CMG®.

5.3.1 Rectangular grid system

The same rectangular reservoir as the one used in the black oil validation is tested. Cases are tested

from three-phase (water/oil/gas) to single-phase oil or gas system. The validation results are shown

below.

i) Three-phase Water/Oil/Gas

Fig 5.2 compares the results of three-phase model between the in-house simulator and GEM model

in CMG. The initial pressure is 1500 psia, Psf=1000 psia, and Sw = 0.5. The production rates are

in good agreement (Fig 5.2a, b and e). The oleic phase saturation gradually reduced along with the

production; the gas phase behaves in the opposite manner (Fig 5.2d). The well block pressure in

this study drops slightly faster than GEM model (Fig 5.2e). The average difference of production

rates, well block pressure and saturation results are in good agreement.

Page 100: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

81

(a)

(b)

150

170

190

210

230

250

270

290

310

330

350

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

10

11

12

13

14

15

16

17

18

19

20

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Water VLE

In house Water VLLE

CMG Water_SC(bbl/d)

Page 101: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

82

(c)

(d)

5.00E+05

5.50E+05

6.00E+05

6.50E+05

7.00E+05

7.50E+05

8.00E+05

0 5 10 15 20 25 30 35

scf/

d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.41

0.42

0.43

0.44

0.45

0.46

0.47

0.48

0.49

0.5

0.51

0 5 10 15 20 25 30 35

Sg

So/S

w

Time (day)

Well block saturation

So - In house VLESw - In house VLE

Sw - In house VLLESo - In house VLLE

So - CMGSw - CMG

Sg - CMG

Sg - In house VLESg - In house VLLE

Page 102: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

83

(e)

Fig 5.2 Water/Oil/Gas simulation with compositional model.

(a) oil production; (b) water production; (c) gas production;

(d) well block saturation; (e) well block pressure

ii) Two-phase Water/Oil

Fig 5.3 compares the results of two-phase model (Water/Oil) between the in-house simulator and

GEM model in CMG. The initial pressure is 4000 psia, Psf=3500 psia, and Sw = 0.5. The reservoir

fluid flow in this test is water/oil phase. The result shows that the curves are close to each other.

The difference of oil flowrate is rapidly reduced to less than 1%. The difference of water flow is

small.

1300

1320

1340

1360

1380

1400

1420

1440

1460

1480

1500

1520

0 5 10 15 20 25 30 35

Pre

ssu

re (

psi

a)

Time (day)

Well block Pressure

In house VLE

In house VLE

CMG

Page 103: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

84

(a)

(b)

Fig 5.3 Water/Oil simulation with compositional model.

(a) oil production; (b) water production.

0

50

100

150

200

250

300

350

400

450

500

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

0

2

4

6

8

10

12

14

16

18

20

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Water VLE

In house Water VLLE

CMG Water_SC(bbl/d)

Page 104: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

85

iii) Two-phase Water/Gas

Fig 5.4 compares the results of two-phase model (Water/Gas) between the in-house simulator and

GEM model in CMG. The initial pressure is 1000 psia, Psf=100 psia, and Sw = 0.4. The reservoir

fluids that exist in this test is water/gas phase. The result shows that the curves are close to each

other.

(a)

4

4.5

5

5.5

6

6.5

7

7.5

8

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Water VLE

In house Water VLLE

CMG Water_SC(bbl/d)

Page 105: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

86

(b)

Fig 5.4 Water/Gas simulation with compositional model.

(a) water production; (b) gas production.

iv) Two-phase Oil/Gas

Fig 5.5 compares the results of two-phase model (Oil/Gas) between the in-house simulator and

GEM model in CMG. The initial pressure is 1500 psia, Psf=1000 psia to let the hydrocarbon phases

stay split, and Sw = 0.2 < Swirr to prevent the water from flowing (qw = 0). Thus in this scenario

the fluid flow in porous media is staying in two-phase oil/gas. The result shows that the curves are

close to each other.

1.50E+06

1.70E+06

1.90E+06

2.10E+06

2.30E+06

2.50E+06

2.70E+06

2.90E+06

3.10E+06

3.30E+06

3.50E+06

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

Page 106: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

87

(a)

(b)

Fig 5.5 Oil/Gas simulation with compositional model.

(a) oil production; (b) gas production.

500

550

600

650

700

750

800

850

900

950

1000

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

1.00E+06

1.10E+06

1.20E+06

1.30E+06

1.40E+06

1.50E+06

1.60E+06

1.70E+06

1.80E+06

1.90E+06

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

Page 107: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

88

v) Single-phase Oil

Fig 5.6 compares the results of single-phase model (Oil) between the in-house simulator and GEM

model in CMG. The initial pressure is 4000 psia, Psf=3500 psia to let the hydrocarbon phases in

oil phase (qg = 0), and Sw = 0.2 < Swirr to prevent the water from flowing (qw = 0). Thus in this

scenario the fluid flow in porous media is in only oil phase in the reservoir. The result shows that

the curves are close to each other. The difference of oil flow and gas flowrates are small.

Fig 5.6 Oil phase simulation with compositional model.

vi) Single-phase Gas

Fig 5.7 compares the results of single-phase model (Gas) between the in-house simulator and GEM

model in CMG. The initial pressure is 600 psia, Psf=100 psia to let the hydrocarbon phases stay in

gas phase (qo = 0), and Sw = 0.2 < Swirr to prevent the water from flowing (qw = 0). Thus in

0

200

400

600

800

1000

1200

1400

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

Page 108: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

89

this scenario the fluid in porous media is in only gas phase flowing in the reservoir. The result

shows that the curves are close to each other.

Fig 5.7 Gas phase simulation with compositional model.

5.3.2 Radial-cylindrical grid system

The same radial-cylindrical reservoir as mentioned in validation part of black oil fluid flow model

is tested. Cases are tested from three-phase (water/oil/gas) to single-phase oil or gas system. The

validation results are shown below.

i) Three-phase Water/Oil/Gas

Fig 5.8 compares the results of three-phase model between the in-house simulator and GEM model

in CMG. The initial pressure is 1500 psia, Psf=1000 psia, and Sw = 0.5. The result shows that the

1.50E+06

1.70E+06

1.90E+06

2.10E+06

2.30E+06

2.50E+06

2.70E+06

2.90E+06

3.10E+06

0 5 10 15 20 25 30 35

scf/

d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

Page 109: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

90

curves are close to each other. The hydrocarbon flow rate is shown with some differences (Fig 5.8a,

b, c). To be mentioned is that the first several time steps are unstable in GEM. The same oscillation

also happens in well block saturation (Fig 5.8d). No such oscillation is observed in the in-house

simulator. The model developed in this study shows better numerical stability than GEM model.

The well block pressure difference gradually drops and in a good agreement to each other in the

later time (Fig 5.8e).

(a)

150

170

190

210

230

250

270

290

310

330

350

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

Page 110: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

91

(b)

(c)

10

11

12

13

14

15

16

17

18

19

20

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Water VLE

In house Water VLLE

CMG Water_SC(bbl/d)

5.00E+05

5.50E+05

6.00E+05

6.50E+05

7.00E+05

7.50E+05

8.00E+05

0 5 10 15 20 25 30 35

scf/

d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

Page 111: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

92

(d)

(e)

Fig 5.8 Water/Oil/Gas simulation with compositional model.

(a) oil production; (b) water production; (c) gas production;

(d) well block saturation; (e) well block pressure

0.03

0.05

0.07

0.09

0.11

0.13

0.15

0.35

0.4

0.45

0.5

0.55

0.6

0 5 10 15 20 25 30 35

Sg

So/S

w

Time (day)

Well block saturation

So - In house VLLE So - CMGSw - CMG So - In house VLESw - In house VLE Sw - In house VLLESg - In house VLE Sg - In house VLLESg - CMG

1000

1100

1200

1300

1400

1500

1600

0 5 10 15 20 25 30 35

Pre

ssu

re (

psi

a)

Time (day)

Well block Pressure

In house VLE

In house VLE

CMG

Page 112: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

93

ii) Two-phase Water/Oil

Fig 5.9 compares the results of two-phase model (Water/Oil) between the in-house simulator built

in this study and GEM model in CMG. The initial pressure is 4000 psia, Psf=3500 psia, and Sw =

0.5. The reservoir fluids that exist in this test is water/oil phase. The result shows that the curves

are close to each other. The difference between the oil flowrates is gradually decreasing. The water

flow is in good agreement to the result of CMG.

(a)

0

50

100

150

200

250

300

350

400

450

500

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

Page 113: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

94

(b)

Fig 5.9 Water/Oil simulation with compositional model.

(a) oil production; (b) water production.

iii) Two-phase Water/Gas

Fig 5.10 compares the results of two-phase model (Water/Gas) between the in-house simulator and

GEM model in CMG. The initial pressure is 1000 psia, Psf=100 psia, and Sw = 0.4. The reservoir

fluids that exist in this test is water/gas phase. The result shows that the curves are close to each

other.

0

2

4

6

8

10

12

14

16

18

20

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Water VLE

In house Water VLLE

CMG Water_SC(bbl/d)

Page 114: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

95

(a)

(b)

Fig 5.10 Water/Gas simulation with compositional model.

(a) water production; (b) gas production.

0

1

2

3

4

5

6

7

8

9

10

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Water VLE

In house Water VLLE

CMG Water_SC(bbl/d)

1.00E+06

1.20E+06

1.40E+06

1.60E+06

1.80E+06

2.00E+06

2.20E+06

2.40E+06

2.60E+06

2.80E+06

3.00E+06

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

Page 115: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

96

iv) Two-phase Oil/Gas

Fig 5.11 compares the results of two-phase model (Oil/Gas) between the in-house simulator built

in this study and GEM model in CMG. The initial pressure is 1500 psia, Psf=1000 psia to let the

hydrocarbon phases stay split, and Sw = 0.2 < Swirr to prevent the water from flowing (qw = 0).

Thus in this scenario the fluid flow in porous media is in two-phase oil/gas. Like the three-phase

case, the model in this study shows better numerical stability.

(a)

400

450

500

550

600

650

700

750

800

850

900

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

Page 116: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

97

(b)

Fig 5.11 Oil/Gas simulation with compositional model.

(a) oil production; (b) gas production.

v) Single-phase Oil

Fig 5.12 compares the results of single-phase model (Oil) between the in-house simulator built in

this study and GEM model in CMG. The initial pressure is 4000 psia, Psf=3500 psia to let the

hydrocarbon phases in oil phase (qg = 0), and Sw = 0.2 < Swirr to prevent the water from flowing

(qw = 0). Thus in this scenario the fluid flow in porous media is in only oil phase under the

reservoir condition. The result shows that the curves are close to each other.

1.10E+06

1.20E+06

1.30E+06

1.40E+06

1.50E+06

1.60E+06

1.70E+06

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

Page 117: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

98

Fig 5.12 Oil phase simulation with compositional model.

vi) Single-phase Gas

Fig 5.13 compares the results of single-phase model (Gas) between the in-house simulator built in

this study and GEM model in CMG. The initial pressure is 600 psia, Psf=100 psia to let the

hydrocarbon phases stay in gas phase (qo = 0), and Sw = 0.2 < Swirr to prevent the water from

flowing (qw = 0). Thus in this scenario the fluid flow in porous media is in only gas phase flow

appears under the reservoir condition. The result shows that the curves are in good agreement.

0

200

400

600

800

1000

1200

1400

0 5 10 15 20 25 30 35

bb

l/d

day

Production rate (SC)

In house Oil VLE

In house Oil VLLE

CMG Oil_SC(bbl/d)

Page 118: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

99

Fig 5.13 Gas phase simulation with compositional model.

1.40E+06

1.60E+06

1.80E+06

2.00E+06

2.20E+06

2.40E+06

2.60E+06

2.80E+06

0 5 10 15 20 25 30 35

scf/

d

day

Production rate (SC)

In house Gas VLE

In house Gas VLLE

CMG Gas_SC(SCF/d)

Page 119: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

100

Chapter 6

Naturally Fractured Reservoir System

Another important fluid flow model developed in this project is the naturally fractured reservoir

system. Due to the breakthrough of hydraulic fracturing technique in recent years, the research and

investment in shale gas and coalbed methane (CBM) system is trending fast in natural gas industry.

Nowadays, both shale gas and CBM have become the most important natural gas resources. As

both of them are naturally fractured reservoir system, they share common fluid flow mechanisms.

In this study, a model is developed specifically for studying the compositional fluid flow process

within the naturally fractured reservoir system.

6.1 Fluid flow mechanism in naturally fractured system

As naturally fractured, coal seams have two different sets of porosity systems - the micropore

(matrix) system and macropore (fracture) system. The micropore system stores most of the gas and

normally less amount of water; while the macropore system, on the contrary, contains most of the

water and normally much less amount of gas (Fig 6.1).

Page 120: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

101

Fig 6.1 Illustration of the matrix and fracture system (Warren and Root, 1963)

The transport of gas between the surface of the micropores and the wellbore is described by three

different processes: i) adsorption/desorption process; ii) diffusion process; iii) convection process

(Remner et. al.).

As the pore size is quite small, the gas in the micropore system is not only stored inside of the pore

space – actually, due to the huge surface area, most of the gas is adsorbed on the surface of the

micropores. Hence, the mechanism adsorption/desorption process dominates the gas flow

mechanism inside of the micropore. When the system pressure increases, more gas “adheres” onto

the surface and join other gas molecules together to form a layer of gas molecules like a film, this

process is called adsorption. When the system pressure decreases, on the other hand, the gas

molecules start to “fall off” from the micropore surface and join other “free” gas molecules inside

of the micropore and are able to flow, and this process is called desorption (Fig 6.2).

Page 121: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

102

Fig 6.2 Adsorption and desorption process of the gas molecule in the micropore system

The desorbed gas from the surface of the micropores will be able to diffuse into macropore system.

This diffusion process depends on the pressure difference between the two porous systems: when

the pressure of the micropore system is larger than the pressure of the macropore system, the gas

molecules are diffusing from the micropore to the macropore; when the pressure of the macropore

system is higher, on the contrary, the gas molecules will diffuse from the macropore back to

micropore (Fig 6.3).

Fig 6.3 Diffusion processs between micropore and macropore

The macropores resembles a highway system - the fractures are connected and the pore sizes are

bigger, which facilitates the fluid flow (both gas and water). This convective flow will finally arrive

in the wellbore (Fig 6.4).

Page 122: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

103

Fig 6.4 Fracture (macropore) system

6.2 Sorption rate calculation

As mentioned above, the adsorption/desorption is the dominant gas storage/release mechanism

inside of the matrix system. It is sensitive to pressure changes, along with rock and gas properties.

In numerical simulation, the gas adsorption/desorption term will appear as a source/sink term in

the fluid flow equation of the matrix.

The gas adsorption/desorption rate is computed using non-equilibrium equation as following (King

et. al.):

𝑑𝑉𝑎𝑙

𝑑𝑡=

1

𝜏(𝑉𝑎𝑙

− 𝑉𝑒𝑙) (6-1)

where 𝑉𝑎𝑙 is the amount of gas adsorbed for component 𝑙, and 𝑉𝑒𝑙

is the adsorption capacity for

component 𝑙. 𝜏 is sorption time constant which is related to the time lag. It describes the time lag

caused by diffusion process inside of the micropore system. Rearranging the above equation, one

can have

𝑑𝑉𝑎𝑙

(𝑉𝑎𝑙− 𝑉𝑒𝑙

)=

𝑑𝑡

𝜏 (6-2)

Page 123: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

104

integrating both left- and right-hand sides of the equation from time 𝑡𝑛 to 𝑡𝑛+1 (time step size Δ𝑡 =

𝑡𝑛+1 − 𝑡𝑛):

∫𝑑𝑉𝑎𝑙

(𝑉𝑎𝑙− 𝑉𝑒𝑙

)

𝑉𝑎𝑙𝑛+1

𝑉𝑎𝑙𝑛

= ∫𝑑𝑡

𝜏

𝑡+1

𝑡

(6-3)

assuming that the adsorption/desorption capacity 𝑉𝑒𝑙 is keep as constant during one timestep, the

above integration becomes (Manik, 1999)

𝑉𝑎𝑙|𝑖,𝑗,𝑘

𝑛+1= 𝑉𝑎𝑙

|𝑖,𝑗,𝑘

𝑛exp (−

Δ𝑡

𝜏) + 𝑉𝑒𝑙

|𝑖,𝑗,𝑘

𝑛+1[1 − exp (−

Δ𝑡

𝜏)] (6-4)

and when the sorption time becomes zero (𝜏 = 0), the sorption process becomes instantaneous,

thus, the above equation becomes:

𝑉𝑎𝑙|𝑖,𝑗,𝑘

𝑛+1= 𝑉𝑒𝑙

|𝑖,𝑗,𝑘

𝑛+1 (6-5)

One thing to be mentioned is that the integration process is not within one single timestep, but

continues throughout the entire simulation. The equation derived above for each time step is a good

approximation to the whole simulation period. Hence during each timestep, the gas

adsorption/desorption rates for each component can be approximated as following (Manik, 1999):

𝑞𝑙|𝑖,𝑗,𝑘𝑛+1 =

𝑉𝑎𝑙|𝑖,𝑗,𝑘

𝑛+1− 𝑉𝑎𝑙

|𝑖,𝑗,𝑘

𝑛

Δ𝑡

(6-6)

6.3 Diffusion rate calculation

When the gas is released into the matrix pore structure, the gas molecules will start to diffuse

between the matrix pores and fractures. This mechanism can be simulated by introducing the

Page 124: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

105

transmissibility terms in each component flow equations of the matrix and fracture system. The

transmissibility terms in the flow equation from matrix to fracture can be calculated as follows

(Chawathe et al. 1996):

𝑇𝑙,𝑔,𝑚|𝑖,𝑗,𝑘

𝑛+1= 𝜎𝑉𝑏𝑘𝑚

|𝑖,𝑗,𝑘

(𝑇𝑠𝑐

𝑇𝑝𝑠𝑐

) [𝑥𝑙,𝑢𝑝|𝑖,𝑗,𝑘

𝑛+1𝑘𝑟𝑔,𝑢𝑝|𝑖,𝑗,𝑘

𝑛+1

𝜇𝑔 |𝑖,𝑗,𝑘

𝑛+1��|𝑖,𝑗,𝑘

𝑛+1] [

(𝑝𝑔,𝑚|𝑖,𝑗,𝑘

𝑛+1)2

− (𝑝𝑔,𝑓|𝑖,𝑗,𝑘𝑛+1

)2

2] (6-7)

where 𝑇𝑙,𝑔,𝑚|𝑖,𝑗,𝑘

𝑛+1 is the transmissibility term, 𝑝𝑔,𝑚|

𝑖,𝑗,𝑘

𝑛+1 is the pressure in matrix and 𝑝𝑔,𝑓|𝑖,𝑗,𝑘

𝑛+1 is the

pressue in fracture. 𝑥𝑙,𝑢𝑝|𝑖,𝑗,𝑘𝑛+1

uses upstream weighting:

𝑥𝑙,𝑢𝑝|𝑖,𝑗,𝑘𝑛+1

= {𝑥𝑙,𝑚|

𝑖,𝑗,𝑘

𝑛+1, Φ𝑔,𝑚|

𝑖,𝑗,𝑘

𝑛+1> Φ𝑔,𝑓|𝑖,𝑗,𝑘

𝑛+1

𝑥𝑙,𝑓|𝑖,𝑗,𝑘𝑛+1

, Φ𝑔,𝑚|𝑖,𝑗,𝑘

𝑛+1< Φ𝑔,𝑓|𝑖,𝑗,𝑘

𝑛+1 (6-8)

and the same to 𝑘𝑟𝑔,𝑢𝑝|𝑖,𝑗,𝑘𝑛+1

term:

𝑘𝑟𝑔,𝑢𝑝|𝑖,𝑗,𝑘𝑛+1

= {𝑘𝑟𝑔,𝑚|

𝑖,𝑗,𝑘

𝑛+1, Φ𝑔,𝑚|

𝑖,𝑗,𝑘

𝑛+1> Φ𝑔,𝑓|𝑖,𝑗,𝑘

𝑛+1

𝑘𝑟𝑔,𝑓|𝑖,𝑗,𝑘𝑛+1

, Φ𝑔,𝑚|𝑖,𝑗,𝑘

𝑛+1< Φ𝑔,𝑓|𝑖,𝑗,𝑘

𝑛+1 (6-9)

𝑘𝑚 |

𝑖,𝑗,𝑘 is the average matrix permeability and it can be calculated as

𝑘𝑚 |

𝑖,𝑗,𝑘= (𝑘𝑥𝑘𝑦𝑘𝑧)

1/3 (6-10)

𝜎 is the shape factor. In this study, the shape factor equation developed by Warren and Root is

applied (Warren and Root, 1963)

𝜎 =4𝑁(𝑁 + 2)

𝐿2 (6-11)

where

Page 125: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

106

𝐿 =

{

𝐿 = 𝐿𝑥 , 𝑁 = 1

𝐿 =2𝐿𝑥𝐿𝑦

𝐿𝑥 + 𝐿𝑦, 𝑁 = 2

𝐿 =3𝐿𝑥𝐿𝑦𝐿𝑧

(𝐿𝑥 + 𝐿𝑦 + 𝐿𝑧), 𝑁 = 3

(6-12)

and for water phase

𝑇𝑤,𝑚|𝑖,𝑗,𝑘

𝑛+1= 𝜎𝑉𝑏𝑘𝑚

|𝑖,𝑗,𝑘

[𝑘𝑟𝑤,𝑢𝑝|𝑖,𝑗,𝑘

𝑛+1

𝜇𝑤 |𝑖,𝑗,𝑘𝑛+1𝐵𝑤

|𝑖,𝑗,𝑘𝑛+1] [𝑝𝑤,𝑚|

𝑖,𝑗,𝑘

𝑛+1− 𝑝𝑤,𝑓|𝑖,𝑗,𝑘

𝑛+1] (6-13)

The transmissibility term in fracture equation is the negative value of the ones from matrix equation:

𝑇𝑙,𝑔,𝑓|𝑖,𝑗,𝑘𝑛+1

= −𝑇𝑙,𝑔,𝑚|𝑖,𝑗,𝑘

𝑛+1 (6-14a)

𝑇𝑤,𝑚|𝑖,𝑗,𝑘

𝑛+1= −𝑇𝑤,𝑓|𝑖,𝑗,𝑘

𝑛+1 (6-14b)

6.4 Validation

A naturally fractured system is under testing. The components and their initial molar fractions are

CH4 (90%) and CO2 (10%). The test case scenario and results are shown below. The validation is

between the in-house reservoir simulator developed in this study and GEM model in commercial

simulation software Computer Modeling Group CMG®.

6.4.1 Rectangular grid system

A rectangular reservoir with a well in the center is designed for testing under the naturally fracture

reservoir model. The reservoir and fluid properties are shown in Table 6.1.

Page 126: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

107

Table 6.1 Reservoir and fluid properties

Reservoir Model (x-y-z) 11-11-3

Reservoir dimension in x and y (ft) 1500

Reservoir Thickness (ft) 50

Porosity – Matrix 0.3

Porosity – Fracture 0.01

Permeability – Fracture in x and y (md) 5

Permeability – Fracture in z (md) 1

Permeability – Matrix (md) 0.0001

Rock compressibility (psia-1) 1 × 10−9

Water compressibility (psia-1) 1 × 10−6

Water density (standard condition) (lb/ft3) 62.24

Well radius (ft) 0.25

Water viscosity (cp) 0.52

Reservoir Temperature (F) 100

Langmuir Volume (SCF/ton) 800

Langmuir Pressure (psia) 300

Sorption Time Constant (day) 3

Rock Density (lb/ft3) 84

Initial Pressure (psia) 3000

Sandface Pressure (psia) 200

Initial Water Saturation – Matrix 0.3

Initial Water Saturation – Fracture 1

Fig 6.5 shows the comparison of the results of between the in-house simulator and GEM module

in CMG. The production rate is shown in Fig 6.5a, b. The well block pressure in this study drops

faster than GEM model (Fig 6.5c). The wellblock saturation curves are in good agreement (Fig

6.5d). Although in this test the in-house simulator is forced to mimic the configurations of the

commercial simulator, it is impossible to obtain exact same values. The differences are caused via

different fluid flow model and their implementation techniques.

Page 127: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

108

(a)

(b)

0

1

2

3

4

5

6

7

8

0 50 100 150 200 250 300 350

Flo

wra

te (

MM

SCF/

D)

time (day)

Production

inhouse

CMG

0

200

400

600

800

1000

1200

0 50 100 150 200 250 300 350

Flo

wra

te (

STB

/D)

time (day)

Production

inhouse

CMG

Page 128: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

109

(c)

(d)

Fig 6.5 Simulation with naturally fractured system.

(a) gas production; (b) water production; (c) wellblock pressure (d) wellblock saturation

1500

1700

1900

2100

2300

2500

2700

2900

3100

0 50 100 150 200 250 300 350

Pre

ssu

re (

psi

a)

time (day)

Wellblock Pressure

inhouse Matrix Pressure

CMG Matrix Pressure

inhouse Fracture Pressure

CMG Fracture Pressure

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0

0.2

0.4

0.6

0.8

1

1.2

0 50 100 150 200 250 300 350

Satu

rati

on

-M

atri

x

Satu

rati

on

-Fr

actu

re

time (day)

Saturation

inhouse Water Fracture SaturationCMG Water Fracture Saturationinhouse Water Matrix SaturationCMG Water Matrix Saturationinhouse Gas Matrix SaturationCMG Gas Matrix Saturationinhouse Gas Fracture SaturationCMG Gas Fracture Saturation

Page 129: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

110

6.4.2 Radial-cylindrical grid system

A radial-cylindrical reservoir with a well in the center is designed for testing under the CBM model.

The reservoir and fluid properties are shown in Table 6.2.

Table 6.2 Reservoir and fluid properties

Reservoir Model (x-y-z) 11-3-3

Resrvoir Outer boundary radius (ft) 565

Reservoir Thickness (ft) 50

Porosity – Matrix 0.3

Porosity – Fracture 0.01

Permeability – Fracture in r and 𝜃 (md) 5

Permeability – Fracture in z (md) 1

Permeability – Matrix (md) 0.0001

Rock compressibility (psia-1) 1 × 10−9

Water compressibility (psia-1) 1 × 10−6

Water density (standard condition) (lb/ft3) 62.24

Well radius (ft) 0.25

Water viscosity (cp) 0.52

Reservoir Temperature (F) 100

Langmuir Volume (SCF/ton) 800

Langmuir Pressure (psia) 300

Sorption Time Constant (day) 3

Rock Density (lb/ft3) 84

Initial Pressure (psia) 3000

Sandface Pressure (psia) 200

Initial Water Saturation – Matrix 0.3

Initial Water Saturation – Fracture 1

Fig 6.6 shows the comparison of the results of between the in-house simulator and GEM module

in CMG. The production rate is shown in Fig 6.6a, b. The well block pressure in this study drops

faster than GEM model (Fig 6.6c). The wellblock saturation is in good agreement (Fig 6.6d).

Although in this test the in-house simulator is forced to mimic the configurations of the commercial

simulator, it is impossible to obtain exact same values. The differences are caused via different

Page 130: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

111

fluid flow model and their implementation techniques, also the differences in the different gridding

approach.

(a)

(b)

0

1

2

3

4

5

6

7

0 50 100 150 200 250 300 350

Flo

wra

te (

MM

SCF/

D)

time (day)

Production

inhouse

CMG

0

500

1000

1500

2000

2500

0 50 100 150 200 250 300 350

Flo

wra

te (

STB

/D)

time (day)

Production

inhouse

CMG

Page 131: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

112

(c)

(d)

Fig 6.6 Simulation with naturally fractured system.

(a) gas production; (b) water production; (c) well block pressure (d) wellblock saturation

1000

1500

2000

2500

3000

3500

0 50 100 150 200 250 300 350

Pre

ssu

re (

psi

a)

time (day)

Wellblock Pressure

inhouse Matrix Pressure

CMG Matrix Pressure

inhouse Fracture Pressure

CMG Fracture Pressure

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0

0.2

0.4

0.6

0.8

1

1.2

0 50 100 150 200 250 300 350

Satu

rati

on

-M

atri

x

Satu

rati

on

-Fr

actu

re

time (day)

Saturation

inhouse Water Fracture SaturationCMG Water Fracture SaturationCMG Gas Fracture Saturationinhouse Water Matrix SaturationCMG Water Matrix Saturationinhouse Gas Matrix SaturationCMG Gas Matrix Saturationinhouse Gas Fracture Saturation

Page 132: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

113

Chapter 7

Artificial Neural Network

The brains of human beings are slow in complex mathematical computation and logical calculation,

and this is the reason why such jobs are often left to computers. But our brains are fast in some

particular jobs such as recognizing things, clustering objects into categories and predicting the trend

of the movement. In other words, we are good at pattern recognition and curve fitting. Such tasks,

however, are often hard for computers. To realize artificial intelligence on computer systems, it is

wise to learn from the knowledge achieved in biological studies of our neural systems. Artificial

neural network is one of the most important achievements amongst all categories of artificial

intelligence schemes.

A typical biological neuron cell is consisting of nucleus, dendrites and an axon (Fig 7.1):

Fig 7.1 Structure of a typical biological neuron cell

Electrical signals are passed through neuron cells. The electrical inputs are collected by dendrites.

The neuron cell sums all of these inputs from the dendrites together. After this simple "calculation",

Page 133: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

114

the resulting signal strength is evaluated. The neuron fires an output signal only if it is greater than

its threshold. The output signal is electrical impulse. The impulse is transduced through the neuron's

axon to its terminal. The terminal of the axon will then connect to the next neuron cells through a

gap called synapses. The synapses will limit the amplitude of the signal into a range to protect the

neuron cells. A biological neural network system consists of numerous neuron cells connected with

each other.

Inspired by biological nervous systems, artificial neural network is invented to mimic the

information transferring and processing mechanism of human brain. A signal receiver, processor,

activation part and output are implemented to behave like a neuron cell (Fig 7.2):

Fig 7.2 Structure of a neuron in artificial neural network

Similar to biological neuron cells, an artificial neuron will firstly receive the signal (input values)

from other neurons with an amplification of the weights of each receiver, then sums the values

together, and feeds this value into an amplitude and threshold control function (activation function).

The output value is then computed and is passed to the next artificial neuron. Numerous artificial

neuron structures of the kind are networked together one by one and layer by layer to form an

artificial neural network.

Page 134: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

115

7.1 Forward and Inverse problem

In this study, two basic types of prediction problem are to be solved via applying neural networks:

i) forward problem and ii) inverse problem. The ANNs developed for forward problem is like the

functionality of the numerical reservoir simulator. The input variables of a forward ANN are all the

known reservoir and fluid properties and all simulation related parameters, and the output variables

are the production related data such as the production rates of all phases, the sandface pressures of

wells, etc. Such a prediction task done by forward ANN will be much faster (~1000 times) than

those by numerical simulation, which makes it a great tool for quickly responding forecasting or

implementation of Monte Carlo Simulation.

Fig 7.3 Illustration of a forward ANN tool

The inverse problem, however, refers to the problems which only some of the reservoir and fluid

properties are known, and with the assumption that the production related data such as flowrates or

sandface pressures are available; the target is to predict those unknown properties or parameters

(reservoir characteristics or project design related parameters). The ANNs developed for inverse

problems are more suitable for tasks like performing history matching or reservoir characterization.

The process is like the way that human experts thinking based on their knowledge background and

experiences.

Page 135: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

116

Fig 7.4 Illustration of an inverse ANN tool

ANNs for both types of the problems are necessary and valuable. In this study, protocols for

constructing and utilizing of both of the types of the networks are developed.

7.2 Fully connected network

As mentioned before, the artificial neural network is formed by layers of neurons. A feed forward

neural network is a kind of artificial neural network that in which the signals are only allowed to

be passed forward from input layer through the hidden layers and to the output layer. There will

not be any recurrent structure: the signal will not have the chance to be passed back from the output

layer to any hidden layer or input layer; there is not any connection between the neurons within the

same layer or skip a layer. A fully connected feed forward network is the kind of feed forward

neural network that all neurons in one layer will all connect to the neurons of the next layer (Fig

7.5).

Fig 7.5 Structure of a typical fully connected Feedforward Artificial Neuron Network (ANN)

Page 136: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

117

The fully connected feed forward neural network is one of the most widely used artificial neural

network structures. The back-propagation algorithm along with many other advanced learning

algorithms were developed for it. The current study will be based on fully connected feed forward

neural networks.

7.3 Activation Functions

In a single hidden layer fully connected feed forward network without bias terms, the input signal

is propagated forward by the following rule:

𝑥𝑖 = 𝑓(𝑛𝑒𝑡𝑖) = 𝑓 ( ∑ 𝑤𝑘𝑖𝑖𝑛𝑝𝑢𝑡𝑘

𝑛ℎ𝑖𝑑𝑑𝑒𝑛

𝑘

) (7-1)

where 𝑥𝑖 is the ith neuron output value in the hidden layer, and 𝑓 is the activation function. The

activation function was introduced into artificial neural network for the following two reasons:

i) The activation function can mimic the way the biological neural networks. In a biological

neural network, when the signal is transferred from one neuron to the next of, the signal is

not necessary to ignited. The next neuron will only fire the signal when the signal from last

neuron is strong enough to meet a certain threshold value.

ii) The activation function can introduce non-linearity into the artificial neural network.

Without non-linear activation function, the whole computation from input layer to output

layer is basically linear matrix calculation, and it will be impossible for the neural network

to fit for any non-linear function, let alone mimic biological behaviors.

It is important to select the right activation functions for each layer. There are multiple forms of

activation functions. The major activation functions have been implemented in this study and their

properties are listed as following (Table 7.1):

Page 137: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

118

Table 7.1 Activation functions implemented

function Equation Derivation Range

Linear 𝑓(𝑥) = 𝑥 𝑓′(𝑥) = 1 (−∞,+∞)

Step 𝑓(𝑥) = {0, 𝑥 < 01, 𝑥 ≥ 0

𝑓(𝑥) = {0, 𝑥 ≠ 0∞, 𝑥 = 0

(0,1)

Sigmoid 𝑓(𝑥) =1

1 + 𝑒−𝑥 𝑓′(𝑥) = 𝑓(𝑥)[1 − 𝑓(𝑥)] (−1,+1)

tanh 𝑓(𝑥) =2

1 + 𝑒−2𝑥− 1 𝑓′(𝑥) = 1 − [𝑓(𝑥)]2 (−1,+1)

arctan 𝑓(𝑥) = tan−1(𝑥) 𝑓(𝑥) =1

1 + 𝑥2 (−

𝜋

2,+

𝜋

2)

Rectified

linear unit

(ReLU) (AL

Mass, et al.,

2013)

𝑓(𝑥) = {0, 𝑥 < 0𝑥, 𝑥 ≥ 0

𝑓(𝑥) = {0, 𝑥 < 01, 𝑥 ≥ 0

[0, +∞)

Scaled

exponential

linear unit

(SELU)

(Klambauer

et al., 2017)

𝑓(𝑥) = 𝜆 {𝛼(𝑒𝑥 − 1), 𝑥 < 0𝑥, 𝑥 ≥ 0

where 𝜆 = 1.0507, 𝛼 = 1.67326

𝑓′(𝑥) = 𝜆 {𝑓(𝑥) + 𝛼, 𝑥 < 01, 𝑥 ≥ 0

(−𝛼,+∞)

Softplus

(Glorot et

al., 2011)

𝑓(𝑥) = ln(1 + 𝑒𝑥) 𝑓′(𝑥) =1

1 + 𝑒−𝑥 (0, +∞)

Page 138: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

119

7.4 Learning Algorithms

Since the original back-propagation algorithm was established, variant versions of learning

algorithms have been developed. Different learning algorithms have their own special features and

can be applied to different cases of scenarios. Among the most widely used learning algorithms,

there are three major categories: back-propagation, conjugate gradient, and Newton's method. In

this study, three typical methods are implemented to empower the artificial neural network module.

7.4.1 Error Back-propagation

Artificial neural network is a supervised learning system. It needs inputs and outputs to train its

weights. The whole training process needs to be done automatically. The key to realize it is the

algorithm of the calculation of the error derivatives. To compute the derivatives, finite difference

method was proposed. It has the advantage of simplicity in implementation, but is computationally

expensive. The error back-propagation method was then proposed to obtain the computational

performance via derivatizing the error analytically. The basic idea in this algorithm is to use chain

rule. As mentioned above, the input signal is propagated forward by the following rule:

𝑥𝑖 = 𝑓(𝑛𝑒𝑡𝑖) = 𝑓 ( ∑ 𝑤𝑘𝑖𝑖𝑛𝑝𝑢𝑡𝑘

𝑛ℎ𝑖𝑑𝑑𝑒𝑛

𝑘

) (7-2)

where 𝑥𝑖 is the ith neuron output value in the hidden layer, and 𝑓 is the activation function. Also

for the output layer:

𝑜𝑗 = 𝑓(𝑛𝑒𝑡𝑗) = 𝑓 ( ∑ 𝑤𝑖𝑗𝑥𝑖

𝑛ℎ𝑖𝑑𝑑𝑒𝑛

𝑖

) (7-3)

the total error can be defined as

Page 139: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

120

𝐸 =1

2∑ (𝑜𝑗 − 𝑡𝑗)

2

𝑛𝑜𝑢𝑡𝑝𝑢𝑡

𝑗

=1

2∑ 𝑒𝑗

2

𝑛𝑜𝑢𝑡𝑝𝑢𝑡

𝑗

(7-4)

where 𝑜𝑗 is the jth output, and 𝑡𝑗 is the jth target value and 𝑒𝑗 is the jth error. The error minimization

problem thus becomes a least square problem. For each weight in the output layer, one can derive

the following equation from chain rule:

𝜕𝐸

𝜕𝑤𝑖𝑗= ∑

𝜕𝐸

𝜕𝑜𝑗

𝜕𝑜𝑗

𝜕𝑛𝑒𝑡𝑖𝑗

𝜕𝑛𝑒𝑡𝑖𝑗

𝜕𝑤𝑖𝑗

𝑛𝑜𝑢𝑡𝑝𝑢𝑡

𝑗

= ∑ 𝑓′(𝑛𝑒𝑡𝑗)𝑥𝑖 𝑒𝑗

𝑛𝑜𝑢𝑡𝑝𝑢𝑡

𝑗

(7-5)

Thus, the error back-propagation algorithm can compute the derivative with low computational

consumption.

When implementing the error back-propagation algorithm, it is wise to use a matrix form instead

of calculating the derivatives one by one for each neuron. Not only it can make the implementation

clearer and easier, but also enhance the computational performance using catch in CPU. It also has

the potential to take advantage of the power of parallel computing in CPUs and GPUs for large

network if coupled with good libraries.

The matrix form of error back-propagation is shown below. In feed forward stage, we have

𝐍h = 𝐈𝐖𝐢−𝐡 (7-6a)

𝐗 = 𝑓(𝐍h) (7-6b)

𝐍𝐨 = 𝐗𝐖𝐡−𝐨 (7-6c)

𝐎 = 𝑓(𝐍𝐨) (7-6d)

where I is the input vector, Wi-h is the weight matrix between the input and hidden layer, and Wh-o

is the weight matrix between the hidden and output layer. In back-propagation stage, one can obtain

𝚫o = 𝑓′(𝐍𝐨) (7-7a)

Page 140: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

121

𝐃𝐡−𝐨 = 𝚫o𝑿𝑻 (7-7b)

𝚫ℎ = 𝑓′(𝐍𝐡) ∗ 𝑾ℎ−𝑜𝚫o (7-7c)

𝐃i−o = 𝚫h𝑰𝑻 (7-7d)

and the weights can be updated as

𝑾ℎ−𝑜|k+1

= 𝑾ℎ−𝑜|k− η𝐃𝐡−𝐨 (7-8a)

𝑾𝑖−ℎ|k+1

= 𝑾𝑖−ℎ|k− η𝐃𝐢−𝐡 (7-8b)

The above calculation will be done for each iteration until the sum of square error reaches some

certain criteria. The back-propagation algorithm enables the learning of multilayer neural network.

The idea of analytically calculating the first order derivative is the foundation of most of the

advanced learning algorithms nowadays.

7.4.2 Gradient Descent

The weights of the network can be updated by

𝒘𝑘+1 = 𝒘𝑘 − 𝜂𝜕𝐸

𝜕𝒘 (7-9)

where 𝜂 is a scalar factor, 𝐸 is the error (or any loss function), and w is the weight array. The first

order derivatives of the error to weights play a key role in this equation. The gradient decent

algorithm is one of the earliest learning algorithms and it has been proved very successful. It has

the advantages of easy implementation and low memory consumption. The CPU load of each epoch

of training is also very efficient. The disadvantage, however, is that this algorithm relies on a fixed

learning rate. When the learning rate is small, the convergence will be too low and this learning

algorithm will become inefficient; when the learning rate is too big, on the contrary, the algorithm

Page 141: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

122

may face convergence problem. This will happen especially when the error surface extremely

complex or non-linear, which is, unfortunately, often the case in artificial neural network

construction. Nowadays, this algorithm is still one of the most famous learning algorithms and

widely used in both academia and industry.

7.4.3 Resilient Back-propagation

Resilient Back-propagation algorithm (Riedmiller et. al., 1993) is one of the most popular and

important learning algorithms in training the neural network. As a variation of the original gradient

descent, it not only inherited the basic concepts and implementations of the simplicity of the

conventional gradient descent algorithm, but also developed new features. The advantages of this

method can be summarized in the following aspects:

i) It does not require any manually specification of the parameters, on the opposite the

conventional back-propagation algorithm needs a fixed learning rate to be assigned

prior to the beginning of learning.

ii) The parameters in controlling the learning process of this method will adapt itself

automatically according to the development of the learning error, on the other hand the

conventional back-propagation algorithm will only be able to use fixed learning

parameters.

iii) The last but the most important aspect is that its training process is faster than training

with conventional back-propagation without sacrificing more memory resources. It is

worth mentioning that using less memory resources is very important in dealing with

big datasets or complex network structures. Number of learning algorithms succeeds

in speed but were limited by fast growing consumption of memories. We will address

this issue when we introduce other learning algorithms in the following sections.

Page 142: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

123

The trade-offs of the above advantages is the increased complexity in implementation. The major

problem this algorithm aims to solve in conventional back-propagation is the adaptive learning rate.

The algorithm chooses the learning rate by using local gradient information. The update values of

the weights can be expressed as following:

For all weights and biases:

Δij𝑘 =

{

𝜂+Δij

𝑘−1,𝜕𝐸

𝜕𝑤𝑖𝑗

𝑘 𝜕𝐸

𝜕𝑤𝑖𝑗

𝑘−1

> 0

𝜂−Δij𝑘−1,

𝜕𝐸

𝜕𝑤𝑖𝑗

𝑘 𝜕𝐸

𝜕𝑤𝑖𝑗

𝑘−1

< 0

Δij𝑘−1, 𝑒𝑙𝑠𝑒

where 0 < 𝜂− < 1 < 𝜂+

(7-10)

and the weights are updated by

Δ𝑤ij

𝑘 =

{

−Δij

𝑘 ,𝜕𝐸

𝜕𝑤𝑖𝑗

𝑘

> 0

+Δij𝑘 ,

𝜕𝐸

𝜕𝑤𝑖𝑗

𝑘

< 0

0, 𝑒𝑙𝑠𝑒

and 𝑤ij𝑘 = 𝑤ij

𝑘−1 + Δ𝑤ij𝑘

(7-11)

7.4.4 Scaled Conjugate Gradient

Conjugate gradient algorithm is a class of algorithms which has been widely used to search for the

solutions in a linear system. Its basic idea is to find out the conjugate base vectors for the space of

the hyperplane of the provided problem and the solution can be expressed as a linear combination

of these base vectors. In each iteration, the conjugate gradient method will try to find out one base

vector and its linear coefficient accordingly. Theoretically the solution can be found with the

number of iterations the same as the number of the dimensions of the space. One problem, however,

Page 143: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

124

is that the original conjugate gradient algorithm requires storage of all base vectors. This will result

in considerable memory consumption.

Scaled conjugate gradient algorithm (Møller et. al., 1993) is one of the most important variations

among conjugate gradient algorithms. This algorithm was initially developed specifically for

artificial neural network learning process. The algorithm inherited the basic idea of original version

of conjugate gradient method and its speed, but reduced the memory usage. It has been widely

applied to the learning process of artificial neural networks. The main idea behind this algorithm is

to use the information in both first order and the second order derivatives to find the appropriate

searching directions and step sizes. Furthermore, the algorithm optimizes its performance by

applying finite difference in calculating the second order derivatives. The scaled conjugate gradient

algorithm is shown as following:

1) Initialize weight vector w1. Calculate vector 𝑝1 = 𝑟1 = −𝐸′(𝑤1);

Initialize scalar parameters:

{

σ > 0λ1 > 0

λ1 > 0𝑘 = 1

𝑠𝑢𝑐𝑐𝑒𝑠𝑠 = 𝑡𝑟𝑢𝑒

2) For each iteration k, if success = true:

σk =𝜎

|𝑝𝑘| (7-12a)

sk =𝐸′(𝑤𝑘 + 𝜎𝑘𝑝𝑘) − 𝐸′(𝑤𝑘)

𝜎𝑘 (7-12b)

δk = 𝑝𝑘𝑇𝑠𝑘 (7-12c)

3) Scale sk

sk = 𝑠𝑘 + (𝜆𝑘 − ��𝑘)𝑝𝑘 (7-13a)

Page 144: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

125

δk = 𝛿𝑘 + (𝜆𝑘 − ��𝑘)|𝑝𝑘|2 (7-13b)

4) If δk ≤ 0

sk = 𝑠𝑘 + (𝜆𝑘 −2𝛿𝑘

|𝑝𝑘|2) 𝑝𝑘 (7-14a)

��𝑘 = 2(𝜆𝑘 −𝛿𝑘

|𝑝𝑘|2) (7-14b)

δk = −𝛿𝑘 + 𝜆𝑘|𝑝𝑘|2 (7-14c)

𝜆𝑘 = ��𝑘 (7-14d)

5) Find step size

μk = 𝑝𝑘𝑇𝑟𝑘 (7-15a)

αk =𝜇𝑘

𝛿𝑘 (7-15b)

6) Test and update parameters:

i) Calculate Δk

Δk =

2𝛿𝑘(𝐸(𝑤𝑘) − 𝐸(𝑤𝑘 + 𝛼𝑘𝑝𝑘))

𝜇𝑘2

(7-16)

ii) if Δk ≥ 0

wk+1 = 𝑤𝑘 + 𝛼𝑘𝑝𝑘 (7-17a)

rk+1 = −𝐸′(𝑤𝑘+1) (7-17b)

λ𝑘 = 0 (7-17b)

success = true (7-17b)

a) if k mod N = 0, restart algorithm with pk+1 = 𝑟𝑘+1;

Page 145: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

126

else

βk =𝑟𝑘+1𝑇 (𝑟𝑘+1 − 𝑟𝑘)

𝜇𝑘 (7-18a)

pk+1 = 𝑟𝑘+1 + 𝛽𝑘𝑝𝑘 (7-18b)

b) if Δk <3

4 then λk =

1

2𝜆𝑘

iii) if Δk <1

4, λk = 4λk

7) Converged when rk < tolerance, and output wk as weights.

7.4.5 Levenberg-Marquardt

The training process in artificial neural network is to find the "solution" with lowest error. This

process is the same as to find the lowest point in the error surface. The back-propagation algorithm

is one kind of gradient decent method, which uses the first order derivative to trace the downside

direction in each iteration until it reaches the lowest point:

Δ𝐰 = −η∂𝐄

∂𝐰= −η𝐉𝐓𝐞 (7-19)

where J is the Jacobian matrix and 𝐞 = (𝐨 − 𝐭).

Gauss-Newton method is another class of algorithms. It uses the second order derivative – Hessian

matrix. Thus we have

𝐇𝚫𝐰 = 𝐉𝐓𝐞 (7-20)

But the Hessian matrix is highly computational consuming. As the problem, we are going to solve

is a least square problem, it is possible to approximate the Hessian matrix in such a way

Page 146: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

127

𝐇 = 𝐉𝐓𝐉 (7-21)

thus, the Newton method becomes

𝐉𝐓𝐉𝚫𝐰 = −𝐉𝐓𝐞 (7-22)

or

𝚫𝐰 = −(𝐉𝐓𝐉)−𝟏

𝐉𝐓𝐞 (7-23)

This method can achieve the solution much faster than gradient decent method. But because of the

nature of Newton method, it is possible to be trapped in the local minimum, thus its robustness is

not guaranteed.

Levenberg (1944) and Marquardt (1963) proposed an algorithm to take advantage of the speed of

Newton method and the robustness of gradient decent method. This algorithm is called Levenberg-

Marquardt algorithm (Moré, Jorge J, 1978). The basic idea is to combine the two methods together:

𝐰k+1 = 𝐰k − (𝐉T𝐉 + μ𝐈)−1

𝐉T𝐞 (7-24)

where I is the identity matrix and μ factor is a scalar. The μ factor plays an important role in this

algorithm. It represents the step size in the gradient decent method, and thus been used as a leverage

between the Newton method and gradient decent method. When the iteration is within a "flat" area

of the error surface, μ factor is reduced to speed up the convergence; when the iteration is in a local

minimum, the μ factor is increased to slow down the searching process and try to find the right

direction. The algorithm can be described as following:

1) Choose an initial μ value.

2) For each iteration, evaluate the error.

Page 147: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

128

i) if the error increases, reset the weights to that of the last iteration and increase μ

factor by 10 times*.

ii) if the error decreases, update the weights from that of the last iteration and decrease

μ factor by 10 times*.

*The increase and decrease rate of μ factor can also be other values.

7.5 Overfitting and Regularization

Overfitting means the ANN trained is only working well for the specific training data. Overfitting

is a common issue influencing the prediction accuracy. As ANN is an analog to biological neural

network, overfitting can be seen as the network started to memorize the specific data points in the

training set instead of finding the principles under them (Fig 7.6).

Fig 7.6 Comparison of a well fitted and overfitted function.

left: well fitted function; right: overfitted function.

One of the method is early stopping. A randomly selected validation set is tested and its test result

is monitored along with the training process. During the training process, the error of the training

set normally will monotonically dropping. The actual test error, however, may stop decreasing or

increase after a certain epoch. It means that from this moment on, overfitting may start (Fig 7.7).

The best epoch is the one with the best validation accuracy instead of the training accuracy.

Page 148: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

129

Fig 7.7 Illustration of training and validation loss change with epoch

Mathematically, the overfitting is happening because that the number of parameters (weights) to fit

is too many, which means the dimension of the assigned parameter space is too high than the actual

parameter space, hence the projection from the variable space will be distorted. Regularization

methods such as L1/L2 regularization and dropout can be applied in reducing either the number of

ANN parameters or the magnitude of the values of the parameters.

7.6 Validation

The in-house ANN development tool developed in this study is validated against Google

Tensorflow. Tensorflow is one of the most famous and widely used ANN package. In the toolkit

both in-house ANN development tool and Tensorflow backends are supported to provide user more

flexibility. The in-house ANN development tool is validated with Tensorflow as following. A data

set with 1000 cases and 17 variables as input and 1 variable as output is prepared. The Training,

Page 149: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

130

validation and testing sets are randomly shuffled and split into 800, 100 and 100 cases, respectively.

The neural network structure is shown in Table 7.2.

Table 7.2 ANN structure for validation

Hidden Layer structure 50, 30, 10

Activation function tanh, sigmoid, relu, linear

Different learning algorithms are tested. The best epoch is selected via the best validation data set

result. The mean square error (MSE) of the testing set is compared (Table 7.3). From the

comparison, one can see that the in-house ANN development tool is well functioned and able to

generate reasonable results.

Table 7.3 Testing result comparison

Tool Learning Algorithm MSE

in-house Gradient Descent 13.31%

Resilient BP 15.23%

Scaled Conjugate Gradient 12.59%

Levenberg-Marquardt 12.81%

Tensorflow Stochastic Gradient Descent 12.15%

Page 150: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

131

Chapter 8

Automated Neuro-Simulation Protocol for PTA and RTA

ANN tools for pressure and rate transient analysis have been proved successful in generating results

with good accuracy and efficient in lowering human resources, time and capital costs. The ANNs

developed, however, are only applicable to the specific problem it was developed for. When facing

a new problem, a new ANN tool is required. The ANN development process hence is very

important. Traditionally, the ANNs for PTA and RTA are developed via typical Neuro-Simulation

protocol. The automated Neuro-Simulation Protocol is inspired by the typical Neuro-Simulation

Protocol. In typical Neuro-Simulation Protocol, the main concept is to incorporate the numerical

reservoir simulator and artificial neural network. In the ANN development stage, the data are

simulated from the commercial numerical reservoir simulator (Monte Carlo simulation), and then

fed into the commercial ANN development tool to train. In the reservoir characterization stage, the

input transient curve and known parameters are fed into the trained ANN and the predicted

parameters are hence generated (Fig 8.1). As stated in previous chapters, such protocol It requires

well trained human experts and researchers with good experiences to manually code and operate

the commercial numerical reservoir simulator and ANN development tools to perform Monte Carlo

simulation and operating the development tool to find the best ANNs. This trial-and-error process

is both time consuming and expensive.

Page 151: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

132

Fig 8.1 Data flow between the numerical simulator and ANN of the typical Neuro-Simulation Protocol

In this study, a Neuro-Simulation protocol is built to establish a work flow to process PTA and

RTA automatically. Instead of handling the trial-and-error process mentioned above to human

experts, the system can automate important stages of the ANN development and dramatically

reduce the ANN development work load and time.

8.1 Automated Neuro-Simulation Protocol

The automated Neuro-Simulation protocol in this study contains an automated Monte Carlo

simulation module and an automated ANN development module. The user input is the

configurations for the reservoir model and data ranges, the module will first generate multiple cases

Page 152: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

133

of data through the reservoir simulator built in this study, and the protocol will process the data to

generate the ANNs by itself. The developed ANN will be stored into the database of the toolkit.

The work flow of the Neuro-Simulation protocol developed in this study can be summarized as Fig

8.2.

Fig 8.2 Illustration of the workflow of the Automated Neuro-Simulation Protocol

After the ANN is developed, it is ready to work for the PTA or RTA tasks. The pressure or rate

transient data and the known parameters will be fed into the corresponding ANN tool and it will

predict the reservoir characteristics accordingly. The Monte Carlo simulation results and the ANN

prediction results will then be reported to the user for further analysis or potential performance

improvement.

8.2 Reservoir Model Establishment

When a new problem raises, the first thing one need to consider is how to establish a good reservoir

model to represent the problem via approximate it numerically. This procedure contains two major

Page 153: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

134

parts: the reservoir grid system and the fluid flow model building. In PTA and RTA, when we need

to study the reservoir characteristics around the wellbore, a radial-cylindrical grid system is

normally suitable to apply. If the flow region expands to a much larger area or even touched the

reservoir boundaries, the shape of the fluid flow region may be irregular and the rectangular grid

system is probably more applicable to approximate it. The fluid flow models are depending on

mostly the problem we are trying to solve. For example, if the components and composition

information are important, the compositional models are the best choices; otherwise, black oil

models may be more desirable because it will concentrate on phases flow and are much less

computationally expensive. If the problem one wants to solve is related to shale gas or coalbed

methane, then the naturally fractured models are good choices.

8.3 Automated Monte Carlo Simulation

Monte Carlo simulation can be an essential component in a typical Neuro-Simulation protocol.

Monte Carlo simulation is to use simulation techniques to generate multiple cases in similar

scenario but with different randomly distributed input variables. It consists of model establishment,

random data generation and results collection. The collected output results of the simulation of each

case will be analyzed. The data set of both input random variables and output resulting variables

will be prepared for further analysis or ANN training. A good Monte Carlo simulation is hence

vital for the entire Neuro-Simulation protocol. If the data generated is not following a certain

reasonable pattern or the distribution of the random variables does not uniformly cover the whole

interested feature spaces, the following analysis and ANN construction results will be biased and

thus misleading. Traditionally, the Monte Carlo simulation process was done manually via well

trained and experienced researchers, and hence time consuming.

Page 154: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

135

Fig 8.3 Illustration of the workflow of the Monte Carlo simulation module

In this study, the automated Monte Carlo simulation module is developed to accelerate the process

(Fig 8.3). The GUI and configuration files provided are able to save users precious time and the

reports with visualizations of the data will be automatically generated to facilitate the users for

further analysis.

8.3.1 Data Generation

After inputting all data variable ranges and number of cases the Monte Carlo simulation module,

the Monte Carlo simulation will automatically generate the random values for each variable and

assign it to each reservoir model configuration file. After the configuration files for all cases are

generated the program will automatically call the simulator to simulate all cases based on the

configuration parameters. The simulator will itself determine the model and specifications based

on the parameter combinations in each configuration file. Each case can be seen as an independent

simulation and the results generated from each simulation will be also independent to each other.

Page 155: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

136

This process takes the most of the time because of the high CPU consumptions of the numerical

computations. The more cases are generated, the higher probability to facilitate the ANN training

process to achieve lower error and thus better accuracy. The disadvantage of the generating more

cases is that it may be extensively computationally expensive and hence not feasible to do so. The

optional solution provided via this project is to train a forward ANN based on a relatively small

amount of cases, and then simulation more results via the well trained forward ANN. The details

will be discussed in the following sections of this chapter.

8.3.2 Data Process

After the data for all cases is obtained, the program will automatically load an analysis subroutine.

This subroutine will first extract the necessary data from all configuration files and their

corresponding result files from several data frames. In this study, the resulting pressure transient

data or rate transient data are all time series data. To extract features from the time series data, one

can choose to use all data points as input features. This method, however, may not be a good choice

because of the following problems: i) The dimension of the feature space can be too large, and

cause a heavy burden for following data process and neural network training. ii) the time series

curve may have arbitrary number of points (depends on time step size and total simulation time);

iii) The actual data from the field always contains noises – the curve may highly possibly show

high frequency fluctuations.

Fortunately, the shape of the curves of the pressure transient or rate transient in a particular well-

defined problem follows a certain pattern. In order to keep the generality and avoid the possible

problems caused by the influence of the high frequency fluctuations, it is wise to fit the data points

into a parameterized function, and then use the parameters obtained to describe the decline curve.

One of the important features of the program is the fitting subroutine. Several built-in fitting

Page 156: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

137

functions such as exponential, polynomial, and hyperbolic etc. are provided for user to select. User-

defined functions are also supported.

The rate and pressure transient curve has a common feature: the early time transient rate is much

higher than that of the late time. Thus the logarithmic of time is normally applicable in feature

extraction instead of the original time scale.

8.3.3 Data Visualization

The information extracted from the data generation results will be displayed in both numerical and

visualized manners. Those analysis results will then be output as report. The reporting analysis of

Monte Carlo simulation consists of the following plots for users to understand and analysis the

relationship between the variables, and the possible pattern existing in the data.

i) histogram and density curves for each resulting variable.

ii) Correlation coefficient heatmap

iii) Scatter matrices

8.4 Automated Neural Network Construction

After data set is prepared, next step is to train and test a new neural network. The automated neural

network construction module provided in this project can quickly establish a baseline ANN model

based on the data set provided via Monte Carlo simulation. After the baseline model is established,

users can edit the model structure, adding or deleting features, or change the targeting parameters

to obtain better performance or serve for different predicting tasks. Different ANNs tools are

provided and the final ANN model will be saved to ANN database for future use (Fig 8.4).

Page 157: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

138

Fig 8.4 Illustration of the workflow of the automated neural network construction module

8.4.1 ANN model selection

The ANN model selection subroutine provides user the flexibility to tune all neural network

parameters such as number of layers, number of neurons per layer, activation functions for each

layer, regularization methods, learning algorithms, etc. For users with professional neural network

training experiences it will be easy and fast for them to try and test their ideal structures and

parameters. For users with less experience or just want to do a quick test, the subroutine provide

grid search method to automatically select the best ANN model or just to quickly establish a

baseline ANN model. The inputs are all variable ranges that the users want to specify, and the

subroutine will:

i) Form a ANN parameter pool (e.g. number of layers, number of neurons, activation

functions, etc.);

ii) Select each combination from the pool for training and testing and record the results;

iii) Select the model with the lowest mean square error as the best model and save it to file.

The saved best model will be ready to use in the following prediction or regression tasks.

Page 158: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

139

8.4.2 Forward ANN

As mentioned above, the data generation process in Monte Carlo simulation is the most time-

consuming process in the whole Neuro-Simulation protocol – it normally occupies 70% ~ 90% of

the entire process. As being said, the more cases are generated for training phase, the higher

potential to obtain a better backward ANN model; however, this may become unfeasible if the data

generation process spends days or even weeks. The solution in this study is providing an option for

users to train a forward ANN to analog the numerical simulation and use it to generate data from

more cases. The process is described as following:

i) Choose percentage of the total number of cases to start with (e.g. 20%);

ii) Call numerical simulator to generate the data for the chosen cases;

iii) Collect data and form feature and target data set;

iv) Obtain the best forward neural network through data ANN model selection subroutine;

v) Generate the data of rest of the cases

The subroutine will then combine the data generated from the numerical simulator and the forward

ANN together to form a uniform data set for Monte Carlo analysis and backward ANN training. It

is to be mentioned that it would be impossible for the obtained forward ANN to generate exact

same results from the numerical simulator. However, the error rate is easily controlled below 10%;

and such a low error can be treated as normal background noises and will not be able to lower the

inverse inference results. The data generating process from the forward ANN is much faster than

that of the numerical simulation (> 1000 times), and thus able to dramatically reduce the

computation time in data generation phase from hours to seconds. Hence this subroutine will be

able accelerate the entire Neuro-Simulation process; and within the same period of time, more data

can be generated, and potentially increase the accuracy of the prediction results of the backward

ANN.

Page 159: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

140

8.4.3 Inverse ANN

Backward ANN is the core of the parameter predicting for both PTA and RTA. Based on the data

generated in Monte Carlo simulation, the data set is separated into feature variables (knowns) and

target variables (unknowns). The data splitting ratio is user-defined and the default value is 90%

for training, 10% for validation and testing, respectively. The data will be fed into the neural

network selection subroutine. The subroutine will read user-defined configurations for the grid

search approach, such as number of layers, number of neuron per layer, activation functions,

regularization methods and learning algorithms, etc. The subroutine will train the ANNs with each

possible combination according to the configuration. The validation and test results will be

recorded. The one with the best testing accuracy will be automatically saved to file. The saved file

contains the neural network structure parameters and optimized weights. Once the most optimized

network is obtained, it is ready for applying for rate or pressure transient analysis.

8.4.4 Characterization

The input of the characterization module is the rate or pressure transient curve and the known

parameters. The output of the characterization module is the characterized parameters and the

simulated curve generated via applying the built-in in-house numerical reservoir simulator with the

input and characterized parameters. The simulated curve will be plotted together with the original

curve and hence provide the user a good visual comparison to make further decision on whether

the parameter adjustment is needed.

Page 160: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

141

Chapter 9

Development of Neuro-Simulation tool for

Tight Gas System with Dual-Lateral Horizontal Well

With the development of hydraulic fracturing technique, shale gas is becoming one of the most

important natural gas resources nowadays. A huge amount of shale gas wells is drilled and fractured

each year. In this chapter, a tight shale gas reservoir with horizontal well drilled and hydraulic

fractured is studied via applying the Neuro-Simulation protocol developed in this study.

9.1 Problem description

A dual-lateral horizontal well is drilled in a shale gas reservoir. The shale is very tight so that the

permeability before fracturing is very low. The well has been put on production for 10 months. The

rate is monitored at the surface facilities, and a downhole gauge is installed to monitor the

bottomhole pressure. Both rate transient data and pressure transient data are recorded. The

horizontal well has been hydraulically fractured (Fig 9.1). Both rate and pressure transient analysis

tools are developed.

Page 161: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

142

Fig 9.1 Different fracture growth scenarios studied.

9.2 Numerical Reservoir Model

Based on the problem description, the numerical reservoir models are built corresponding to each

scenario (Fig 9.2). The reservoir is homogeneous and isotropic in permeability within the fracture

and matrix. The porosity and thickness distributions are also homogeneous. The well head is

located in the center of the reservoir. The two laterals of the horizontal well share the same length.

The reservoir constant parameters are presented in Table 9.1.

Page 162: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

143

Fig 9.2 Numerical Reservoir Models for different scenarios.

Table 9.1 Reservoir and fluid properties

Reservoir Model (x-y-z) 11-11-1

Rock compressibility (psia-1) 1 × 10−10

Water compressibility (psia-1) 1 × 10−6

Water density (standard condition) (lb/ft3) 62.24

Water viscosity (cp) 0.52

9.3 Development of RTA Neuro-Simulation Tool

In rate transient analysis, the well has been put on production with constant bottomhole pressure

specified. The gas flowrate data is recorded and analyzed to achieve the characterization of certain

reservoir parameters.

Page 163: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

144

9.3.1 Monte Carlo simulation

9.3.1.1 Data Generation

In this example, cases are generated with the random variables and their ranges are given in Table

9.2. A total of 1,000 cases are generated, among which 20% (200) cases are generated via numerical

reservoir simulator, whereas the other 80% (800) are generated via forward ANN.

Table 9.2 Reservoir and fluid properties

Parameter Lower limit Upper limit

Area (acre) 500 1,000

Thickness (ft) 40 100

Porosity – Natural fracture 0.001 0.005

Porosity – Hydraulic fracture 0.005 0.01

Porosity – Matrix 0.1 0.3

Permeability – Natural fracture (md) 0.1 0.5

Permeability – Hydraulic fracture (md) 5 10

Permeability – Matrix (md) 10-5 10-4

Reservoir Temperature (F) 60 120

Well Radius (ft) 0.25 0.5

Langmuir Volume (SCF/ton) 100 200

Langmuir Pressure (psia) 1000 2000

Sorption Time Constant (day) 0 10

Reservoir Rock Density (lb/ft3) 80 90

Initial Reservoir Pressure (psia) 3000 4000

Initial Matrix Water Saturation 0.3 0.5

Irreducible Water Saturation 0.1 0.2

Well Sandface Pressure (psia) 100 300

First, 200 configuration files for numerical reservoir simulation are generated. The module calls

the numerical simulator and the output files are generated. The output files are collected for the

following data process subroutine.

Page 164: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

145

9.3.1.2 Data Process

The flowrates generated via numerical reservoir simulator for each case are collected from each

output file and the data will be firstly transformed in logarithmic scale and then fitted to the

following mathematic model:

𝑞 = 𝑎4[log(𝑡)]4 + 𝑎3[log(𝑡)]

3 + 𝑎2[log(𝑡)]2 + 𝑎1[log(𝑡)] + 𝑎0

where 𝑡 is the production time, and 𝑞 is the gas flowrate and 𝑎𝑛 are the coefficients to fit.

Fig 9.3 shows an example of the comparison between the original data points and the fitted curve.

From this figure one can see that the fitted curve can accurately describe the original decline curves.

Fig 9.3 Fitted decline curve for gas production flowrate

9.3.1.3 Forward ANN development and prediction

As discussed, to speed up the data generation process, the remaining 80% of the cases are generated

via forward ANN. The data set generated via numerical simulator is fed into the ANN training

Page 165: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

146

subroutine. After grid search the most optimized ANN model is selected as shown in Fig 9.4. The

mean error percentage is 8.24%. The comparison between the test target and predicted values are

shown in Fig 9.5. The forward ANN is applied to generate the data for another 800 cases.

Fig 9.4 Most optimized ANN structures for forward ANN.

60

neu

ron

s - relu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

70

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

30

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

All in

pu

t rando

m v

ariables

Fitted

param

eters + cu

mu

lative

pro

du

ction

Page 166: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

147

Fig 9.5 Testing results from the most optimized forward ANN

9.3.1.4 Data Visualization and analysis

Data for all 1,000 cases are combined together and statistical analysis are applied to the data set.

The data set is visualized in Fig 9.6. Fig 9.6a shows the histogram and density curve of the resulting

variables including the fitted parameters and cumulative production. From the histogram plots one

Page 167: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

148

can see that the results are not heavily biased. From Fig 9.6b one can see that the fracture porosity,

thickness and fracture permeability in stimulated zone appear to have higher correlation coefficient

values to the resulting variables than other input parameters. This, however, doesn’t mean that these

variables are straightly correlated with the resulting parameters; but it does imply that these

variables are more likely to have closer relationships with the resulting parameters. From Fig 9.6c

one can see that thickness, porosity in fracture, drainage area and fracture permeability in

stimulated zone showed clearer patterns with the resulting parameters.

Page 168: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

149

(a)

Page 169: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

150

(b)

Page 170: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

151

(c)

Fig 9.6 Monte Carlo analysis visualization.

(a) Histogram; (b) Correlation matrix; (c) Scatter matrix.

9.3.2 Rate transient analysis

9.3.2.1 Inverse ANN development

The inverse ANN is the core of rate transient analysis in this study. As the reservoir characteristics

are all predicted via the inverse ANN, its prediction performance determines the quality of the

analysis. The data set generated via numerical simulator and the forward ANN are mixed together

Page 171: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

152

and fed into the ANN training subroutine. In this study, inverse ANNs for different targeted variable

set are developed (Table 9.3).

Table 9.3 inverse ANN types for different target variable set

Type I Type II Type III

Permeability – Hydraulic fracture √ √

Porosity – Hydraulic fracture √ √

Langmuir Volume √ √

Langmuir Pressure √ √

After grid search the most optimized ANN models are selected for each type of problem as shown

in Fig 9.7. The mean error percentage for each predicted variable is shown in Table 9.4. The

comparison between the test target and predicted values are shown in Fig 9.15.

Type I

Type II

60

neu

ron

s - sigm

oid

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

55

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

45

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

All o

ther v

ariables

Permeability

– Hydraulic

fracture

Porosity –

Hydraulic

fracture

90

neu

ron

s - tanh

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

75

neu

ron

s - tanh

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

25

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

All o

ther v

ariables

Langmuir

Volume

Langmuir

Pressure

Page 172: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

153

Type III

Fig 9.7 Most optimized ANN structures for inverse ANN.

Table 9.4 Testing error rates of inverse ANN types

Type I Type II Type III

Permeability – Hydraulic fracture 7.44% 8.39%

Porosity – Hydraulic fracture 13.91% 15.46%

Langmuir Volume 16.31% 17.66%

Langmuir Pressure 18.43% 19.34%

Type I

65

neu

ron

s - relu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

80

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

40

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

All o

ther v

ariables

Permeability

– Hydraulic

fracture

Porosity –

Hydraulic

fracture

Langmuir

Volume

Langmuir

Pressure

Page 173: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

154

Type II

Type III

Fig 9.8 Testing results from most optimized inverse ANN of different types

9.3.2.2 Characterization results and analysis

The ANNs developed for rate transient analysis are subjected to test. Three gas production curves

are randomly generated and fed into the developed Neuro-Simulation tool with each type of the

Page 174: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

155

inverse ANN. The characterized parameter values are shown in Table 9.7. The predicted values are

within the range of the training set. The comparison of the error rates is shown in Table 9.6. The

error rates are all close to the average error rates of the inverse ANNs. The re-generated curves are

plotted together and it is clear that the curves simulated via inverse ANN characterized parameters

are very close to the original input curves (Fig 9.9).

Table 9.5 Testing results of inverse ANN types

Type I Type II Type III

Permeability – Hydraulic fracture 7.81 5.93

Porosity – Hydraulic fracture 0.00694 0.00885

Langmuir Volume 154.95 126.83

Langmuir Pressure 3886.61 3652.47

Table 9.6 Testing error rates of inverse ANN types

Type I Type II Type III

Permeability – Hydraulic fracture 8.34% 9.54%

Porosity – Hydraulic fracture 14.22% 15.88%

Langmuir Volume 14.24% 18.29%

Langmuir Pressure 17.56% 17.46%

Page 175: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

156

Type I

Type II

Page 176: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

157

Type III

Fig 9.9 Predicted gas flowrate for each inverse ANN type.

Page 177: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

158

9.4 Development of PTA ANN tool

In rate transient analysis, the well is put on production with constant gas flowrate specified. The

pressure transient data is monitored and analyzed to achieve the characterization of certain reservoir

parameters.

9.4.1 Monte Carlo simulation

9.4.1.1 Data Generation

In this example, cases are generated with the random variables and their ranges are given in Table

9.7. A total of 1000 cases are generated, among which 20% (200) cases are generated via numerical

reservoir simulator, whereas the other 80% (800) are generated via forward ANN.

Table 9.7 Reservoir and fluid properties

Parameter Lower limit Upper limit

Area (acre) 500 1000

Thickness (ft) 40 100

Porosity – Natural fracture 0.001 0.005

Porosity – Hydraulic fracture 0.005 0.01

Porosity – Matrix 0.1 0.3

Permeability – Natural fracture (md) 0.1 0.5

Permeability – Hydraulic fracture (md) 5 10

Permeability – Matrix (md) 10-5 10-4

Reservoir Temperature (F) 60 120

Well Radius (ft) 0.25 0.5

Langmuir Volume (SCF/ton) 100 200

Langmuir Pressure (psia) 1000 2000

Sorption Time Constant (day) 0 10

Reservoir Rock Density (lb/ft3) 80 90

Initial Reservoir Pressure (psia)

3000 4000

Initial Matrix Water Saturation 0.3 0.5

Irreducible Water Saturation 0.1 0.2

Gas Flowrate (MSCF) 500 1000

Page 178: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

159

First, 200 configuration files for numerical reservoir simulation are generated. The subroutine calls

the numerical simulator and the output files are generated. The output files are collected for

following data process subroutine.

9.4.1.2 Data Process

The flowrates generated via numerical reservoir simulator for each case are collected from each

output file. The following mathematical model is fitted to represent the feature of the pressure

transient curve:

Δ𝑝 = 𝑎1 exp(𝑎2log (𝑡)) + 𝑎0

𝑑Δ𝑝

𝑑𝑡= 𝑎4[log(𝑡)]

4 + 𝑎3[log(𝑡)]3 + 𝑎2[log(𝑡)]

2 + 𝑎1[log(𝑡)] + 𝑎0

where Δ𝑝𝑠𝑓 = 𝑝𝑖 − 𝑝𝑠𝑓, 𝑡 is the production time, and 𝑞 is the gas flow rate. 𝑎𝑛 are the coefficients

to fit. Fig 9.10 shows an example of the comparison between the original data points and the fitted

curve. From the figures one can see that the fitted curve can accurately describe the original

pressure transient curve.

Page 179: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

160

Fig 9.10 Fitted curve for pressure transient data

9.4.1.3 Forward ANN development and prediction

As discussed, to speed up the data generation process, the remaining 80% of the cases are generated

via forward ANN. The data set generated via numerical simulator is fed into the ANN training

subroutine. After grid search the most optimized ANN models is selected as shown in Fig 9.11.

The mean error percentage is 7.69%. The comparison between the test target and predicted values

are shown in Fig 9.12. The forward ANN is applied to generate the data for another 800 cases.

Fig 9.11 Most optimized ANN structures for forward ANN.

90

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

55

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

45

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

All in

pu

t rando

m v

ariables

Fitted

param

eters

Page 180: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

161

Fig 9.12 Testing results from most optimized forward ANN

Page 181: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

162

9.4.1.4 Data Visualization

Data for all 1000 cases are aassembled together and statistical analyses are applied to the data set.

The data set is visualized in Fig 9.13. Fig 9.13a shows the histogram and density curve of the

resulting variables including the fitted parameters and cumulative production. From the histogram

plots one can see that the results are not heavily biased. From Fig 9.13b one can see that the matrix

porosity, thickness, gas flowrate and permeability in natural fracture and hydraulic fracture appear

to have higher correlation coefficient values to the resulting parameters than other input variables.

From Fig 9.13c one can see that matrix porosity, thickness, gas flowrate and permeability in natural

fracture and hydraulic fracture and drainage area showed clearer pattern with the resulting

parameters.

Page 182: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

163

(a)

Page 183: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

164

(b)

Page 184: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

165

(c)

Fig 9.13 Monte Carlo analysis visualization.

(a) Histogram; (b) Correlation matrix; (c) Scatter matrix.

9.4.2 Pressure transient analysis

9.4.2.1 Inverse ANN development

The inverse ANN is the core of rate transient analysis in this study. As the reservoir characteristics

are all predicted via the inverse ANN, its prediction performance determines the quality of the

analysis results. The data set generated via numerical simulator and the forward ANN are mixed

Page 185: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

166

together and fed into the ANN training subroutine. In this study, inverse ANNs for different

targeted variable set are developed (Table 9.8).

Table 9.8 inverse ANN types for different target variable set

Type I Type II Type III

Permeability – Hydraulic fracture √ √

Porosity – Hydraulic fracture √ √

Langmuir Volume √ √

Langmuir Pressure √ √

After grid search the most optimized ANN models are selected for each type of problem as shown

in Fig 9.14. The mean error percentage for each predicted variable is shown in Table 9.9. The

comparison between the test target and predicted values are shown in Fig 9.15.

Type I

Type II

80

neu

ron

s - sigm

oid

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

65

neu

ron

s - sigm

oid

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

35

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

All o

ther v

ariables

Permeability

– Hydraulic

fracture

Porosity –

Hydraulic

fracture

10

0 n

euro

ns - relu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

70

neu

ron

s - tanh

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

50

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

All o

ther v

ariables

Langmuir

Volume

Langmuir

Pressure

Page 186: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

167

Type III

Fig 9.14 Most optimized ANN structures for inverse ANN.

Table 9.9 Testing error rates of inverse ANN types

Type I Type II Type III

Permeability – Hydraulic fracture 7.82% 8.03%

Porosity – Hydraulic fracture 16.54% 18.22%

Langmuir Volume 18.87% 19.44%

Langmuir Pressure 19.14% 19.38%

Type I

75

neu

ron

s - sigm

oid

Batch

No

rmalizatio

n

Dro

pou

t (0.1

)

85

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

45

neu

ron

s - selu

Batch

No

rmalizatio

n

Dro

pou

t (0.2

)

All o

ther v

ariables

Permeability

– Hydraulic

fracture

Porosity –

Hydraulic

fracture

Langmuir

Volume

Langmuir

Pressure

Page 187: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

168

Type II

Type III

Fig 9.15 Testing results from most optimized inverse ANN of different types

9.4.2.2 Characterization results and analysis

The ANNs developed for pressure transient analysis are subjected to test. Three pressure transient

curves are simulated via random parameter set. After inputting into the developed Neuro-

Page 188: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

169

Simulation tool with each type of the inverse ANN, the resulting characterization values are shown

in Table 9.10. The characterized values are all within the range of the training set. The error rate

is shown in Table 9.11. The error rate is close to the average error rates of the inverse ANN. The

comparison is plotted and it is clear that the curves simulated via inverse ANN characterized

parameters are very close to the original input curves (Fig 9.16).

Table 9.10 Testing results of inverse ANN types

Type I Type II Type III

Permeability – Hydraulic fracture 6.87 8.89

Porosity – Hydraulic fracture 0.00882 0.00654

Langmuir Volume 181.24 130.16

Langmuir Pressure 3384.59 3842.65

Table 9.11 Testing error rates of inverse ANN types

Type I Type II Type III

Permeability – Hydraulic fracture 8.87% 7.11%

Porosity – Hydraulic fracture 14.76% 19.49%

Langmuir Volume 17.33% 20.41%

Langmuir Pressure 20.51% 18.65%

Page 189: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

170

Type I

Type II

Page 190: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

171

Type III

Fig 9.16 Predicted gas flowrate for each inverse ANN type.

Page 191: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

172

Chapter 10

Mini PC and Graphical User Interface (GUI)

Typically, traditional simulation jobs are run on PCs. The acquisition of the advanced hardware

and its maintenance can be expensive and the process in setting up the working environment for

the PCs in an organization would be both laborious and tedious. In recent years, a technical

breakthrough referred here as “Mini PC” provides a possible substitution. This device, with much

less size, expense and energy costs, has almost full functionality as that of normal PC. This tool

has been trending dramatically in recent years and has an immense potential in substituting PC. A

good GUI is also needed for providing user better control and visualization of the toolkit. In this

study, a user-friendly GUI is developed and the toolkit is built onto the Mini PC to create an

instantly available working environment with both high performance and low maintenance cost for

the users.

10.1 Mini PC

The NVIDIA Jetson TK1 Development board is selected for the current stage. It is equipped with

the Tegra K1 Processor with DDR3 memory and interfaces (Figure 6.3c). The processor contains

a 4 core 2.3 GHz ARM RISC CPU and a 192 core 1.5GHz Kepler server class GPU along with all

necessary I/O control units (Fig 10.1a and b). Furthermore, the GPU and CPU are sharing the

memory, which saves a considerable amount of time for the memory copying loads. The onboard

operating system is Linux. The mini PC platform provides good portability and energy efficiency.

Page 192: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

173

(a) (b)

(c)

Fig 10.1 Mini PC – Jetson TK1 development board

(a) Hardware structure of the Tegra K1 CPU; (b) Functionalities of Tegra K1 CPU; (c) Jetson TK1

development board.

10.2 Infrastructure

The infrastructure is assembled and equipped with software and hardware. It consists of Integrated,

hard and soft computing engines, a control unit, and Graphic User Interface (GUI) (Fig 10.2).

Page 193: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

174

Fig 10.2 Illustration of system infrastructure.

The hard computing engine here represents the comprehensive in-house numerical reservoir

simulator, where the soft computing engine represents the ANN development tool. The control unit

is designed to control the entire process of the system. Its major roles include data exchange

between computing engines, communication between terminal and server, general process

management, etc. An enriched GUI is designed to establish a powerful and user-friendly

communication tool to help users to control and exchange information with the expert system and

it will trigger the control unit in the background. The GUI is designed to be compatible and

consistent with Windows and Linux operating systems. Windows system is limited to PC. Linux

systems are widely used operating system on all kinds of machines.

The hardware is also comprised of two parts: terminal and server (Fig 10.3). The terminal is the

Mini PC. This special device contains reduced instruction set computing (RISC) CPU. Different

from traditional x86 CPUs, it consumes much less power and has much less physical size. These

advantages enable the RISC CPU to run a much smaller, cheaper and energy efficient computer

system. Coupling with the modern chip technologies, a cell phone sized Mini PC has been marketed.

A Linux operating system is built onto it, with the adjustment to achieve the best control and

performance of the device. The GUI interface of the software package is then built on the top of

this operating system. For the server, an individual PC with high performance CPU and good GPUs

Page 194: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

175

will be good enough, although a cluster would have been better. The cost of the former is far less

than that of the latter. This design will make the system much more efficient in both setting up and

future maintenance than that of the traditional ones.

Fig 10.3 The structure of the working system (hardware)

The storage capacity and the computational power are the two major concerns of the Mini PC

system. To relieve this concern, two storage and computing options will be provided: client side or

server side. The former one means all of the data will be processed on the Mini PC itself. This

option has the advantages of local data Input/Output (I/O) and process. It is more suitable for small

data sets processing. While the latter option is far faster in computational power, it is good for large

data set processing.

10.3 Graphic User Interface

A graphic user interface is designed and implemented to provide users a better control and

visualization of the model. It contains the abilities of data file selection, model configurations,

Page 195: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

176

software running control, visualizations, etc. In sum, the GUI should have the ability to offer the

full control of the model to the user.

The GUI is built via HTML5, CSS and JavaScript. The framework is Electron and node.js. These

languages are working together. The HTML5 is to provide the web elements and build the

framework of the pages. CSS here is to support the display styles. The JavaScript is the core of the

GUI. It is to read and write files, graphical displays, and model running controls.

(a)

Page 196: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

177

(b)

Fig 10.4 3D reservoir structure

Fig 10.4a shows the output page of the 3D structure for rectangular reservoir. It is implemented by

applying three.js library. The graph in the middle is the 3D structure of an example reservoir. It

supports the rotation, pan and slicing work. The well locations and labels are also shown in the

graph. Fig 10.4b shows the slice of the reservoir block. The adjustment of slice direction and

location and transparency are all supported. Fig 10.5 shows the 3D surface plot of the reservoir

properties. The parameter values are displayed as the height and color. It also supports rotation and

pan movements.

Page 197: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

178

Fig 10.5 Reservoir parameter surface map

The fluid properties like relative permeability and capillary pressures between phases are shown

(Fig 10.6). The same applies to the PVT curves (if available) (Fig 10.7). The curve display is

implemented by applying Highcharts.js library.

Page 198: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

179

Fig 10.6 Relative permeability and capillary pressure curves

Page 199: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

180

Fig 10.7 PVT curves

The results are shown in both tables and curves (Fig 10.8). To compare the flowrates between

phases, the flowrates of all phases are shown in the same plot. As the units for phases may be

different, a plot with double y axis is displayed. The left axis is the for liquid phases (bbl/d) and

right axis is for vapor phase (scf/d).

Page 200: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

181

Fig 10.8 Flow rate curves

The artificial neural network page contains the configuration parameters. Fig 10.9 shows the

visualization of the training and validation results. In sum, the GUI developed in this toolkit makes

the client side extensively user friendly and convenient.

Page 201: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

182

Fig 10.9 Artificial neural network page.

Page 202: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

183

Chapter 11

Conclusions

In this study, a generalized reservoir simulation framework has been established. The 1D, 2D and

3D rectangular and cylindrical grid systems are supported. The black oil models with variable

bubble point have been implemented and validated. The compositional models have been

developed and validated. The naturally fractured reservoir system model is developed and has the

capability to process both shale gas and CBM reservoirs. The supported fluid flow models are

summarized in Table 11.1.

Table 11.1 Available fluid flow models in the reservoir simulator module

Models Grid Rectangular Cylindrical

1D 2D 3D 1D 2D 3D

Bla

ck O

il

Single-phase

Water √ √ √ √ √ √

Oil √ √ √ √ √ √

Gas √ √ √ √ √ √

Two-phases

Water/Oil √ √ √ √ √ √

Oil/Gas √ √ √ √ √ √

Water/Gas √ √ √ √ √ √

Three-phases Water/Oil/Gas √ √ √ √ √ √

Co

mp

osi

tio

na

l

VL

E &

VL

LE

Single-phase Oil √ √ √ √ √ √

Gas √ √ √ √ √ √

Two-phases

Water/Oil √ √ √ √ √ √

Oil/Gas √ √ √ √ √ √

Water/Gas √ √ √ √ √ √

Three-phases Water/Oil/Gas √ √ √ √ √ √

Nat

ura

lly

Fra

ctu

red

Sy

stem

Two-phases Water/Gas √ √ √ √ √ √

Page 203: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

184

An ANN development tool is structured. Different network structures, activation functions and

learning algorithms are supported. The tool is validated with Tensorflow. The tool is equipped with

the same interface with both in-house and Tensorflow backends and providing the toolkit good

flexibility.

An automated Neuro-Simulation Protocol is established. The protocol contains the automated

Monte Carlo simulation module and automated ANN development module. As an example

application, a tight shale gas reservoir with dual-lateral horizontal well is studied and proving the

capability of the automated Neuro-Simulation protocol. In the tight gas problem three different

types of characterization problems are studied. Both rate and pressure transient analysis Neuro-

Simulation tools are developed via this toolkit. The Monte Carlo simulation results are collected

for each analysis tool and all scenarios. The forward and backward ANNs are developed for both

rate and pressure transient analysis tools. The inverse ANNs are developed via the automated ANN

development module. The results for the ANNs developed are achieved and analyzed.

The conclusions drawn from the study are as follows:

1) The generalized reservoir simulation framework is proved working. The 1D, 2D and 3D

rectangular and radial-cylindrical reservoir geometry grid systems are independent to the

reservoir fluid flow models. This design brings the framework flexibility of extending with

different gridding geometry and fluid flow models.

2) The fluid flow models are all developed on the top of the generalized reservoir simulation

framework. The validation against commercial numerical reservoir simulator proved the

accuracy of the fluid flow models in the in-house numerical reservoir simulator. The

differences between the validation results are caused by the different fluid flow mechanism

and their implementations.

Page 204: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

185

3) An artificial neural network development tool is implemented. The in-house ANN

development tool is validated with Tensorflow. Both in-house and Tensorflow are

supported as the backend of this development tool.

4) Both the in-house numerical reservoir simulator and the ANN development tool are

independent to commercial software.

5) The automated Neuro-Simulation protocol is established. The protocol is implemented into

the toolkit. The automated Monte Carlo simulation module and the automated ANN

development module are implemented and proved the efficient handshaking between the

numerical simulator and artificial neural network is successful and efficiently working.

6) The automated Neuro-Simulation protocol can process the problems of both rate and

pressure transient analyses.

7) The problem of tight gas reservoir with dual-lateral horizontal well is studied via applying

the automated Neuro-Simulation protocol. The results proved the proposed capability of

the automated Neuro-Simulation protocol developed in this study in efficiently establishing

a new ANN tool for complex problems.

8) The use of forward ANN is easier to achieve better accuracy. This is potentially caused by

the fact that there is direct correlation between the reservoir parameters and the resulting

curve related coefficients. The inverse ANN, however, is more difficult to obtain good

accuracy because the lack of direct correlations between the randomly generated known

and unknown variables.

9) The ANNs established in this toolkit are baseline models. Further improvement can be

achieved via feature engineering and/or refining the network structure.

Page 205: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

186

Future work:

1) The artificial neural networks developed in the previous works are to be implanted into the

toolkit. The corresponding numerical reservoir models are to be established for each of the

neural networks and the interface between the existing neural network and the in-house

numerical reservoir simulator are to be established.

2) The reservoir model selection currently relies on the operation of the users. A supervisor

module is to be developed into the protocol and toolkit. Multiple built-in reservoir systems

need to be established in to the database. The unique signatures of the pressure or rate

transient curves of the reservoir systems in the database will be recorded. A pattern

recognition subroutine is to be developed to obtain the ability in automatically classifying

the input transient data into the corresponding category among the existing reservoir

system models. The supervisor module should have the ability of automatically selecting

feature extraction mode of each type of the reservoir system.

Page 206: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

187

References

Alajmi, Mohammad Naser, and Turgay Ertekin. The development of an artificial neural network

as a pressure transient analysis tool for applications in double-porosity reservoirs. Asia Pacific

Oil and Gas Conference and Exhibition. Society of Petroleum Engineers, 2007.

Allen, F. H., and Roe, R. P.: Performance Characteristics of a Volumetric Condensate Reservoir,

Trans. AIME, v. 189, p. 83-90, 1950.

Alqahtani, Mari. Shale gas reservoirs development strategies via advanced well architectures. The

Pennsylvania State University, 2015.

Arps, Jan J. "Analysis of decline curves." Transactions of the AIME 160.01 (1945): 228-247.

Arps, Jan J. "Estimation of primary oil reserves." (1956).

Ayala, H L. Compositional modeling of naturally-fractured gas-condensate reservoirs in multi-

mechanistic flow domains, Dissertation, 2004

Aydinoglu, G., M. Bhat, and T. Ertekin. Characterization of Partially Sealing Faults from Pressure

Transient Data: An Artificial Neural Network Approach. SPE Eastern Regional Meeting. Society

of Petroleum Engineers, 2002.

Bourdet, D., et al. "A new set of type curves simplifies well test analysis." World oil 196.6 (1983):

95-106.

Brooks, R. H., and T. Corey. Hydraulic properties of porous media. (1964).

Page 207: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

188

Chawathe, A., Ertekin, T. and Grader A.: Numerical Simulation of Multimechanism Gas-Water

Flow in Fractured Reservoirs, paper SPE Paper 35186 presented at the Permian Basin

Oil and Gas Conference, Midland, Texas, U.S.A, 27-29 March 1996a.

Chawathe, A., Ertekin, T. and Grader A.: Understanding Multimechanistic Gas-Water Flow in

Fractured Reservoirs: Mapping of the Multimechanistic Flow Domain, paper SPE 36738

presented at the SPE Annual Technical Conference and Exhibition, Denver, Colorado,

U.S.A., 6-9 October 1996b.

Coats, K. H.: A Note on IMPES and Some IMPES-Based Simulation Models, SPE Paper 49774

prepared for presentation at the SPE Reservoir Simulation Symposium held in Houston, TX, Feb.

14-17, 1999

Coats, K. H.: A Note on IMPES and Some IMPES-Based Simulation Models, SPE Paper 49774

prepared for presentation at the SPE Reservoir Simulation Symposium held in Houston, TX, Feb.

14-17, 1999.

Coats, K. H.: An Equation of State Compositional Model, SPE Paper 8284, SPE Journal, p. 533-

554, December 1980. 180

Coats, K. H.: Implicit Compositional Simulation of Single-Porosity and Dual-Porosity Reservoirs,

SPE Paper 18427 presented at the SPE Symposium on Reservoir Simulation in Houston, TX,

February 6-8, 1989.

Coats, K. H.: Reservoir Simulation: State of the Art, SPE Papers 10020, 11927, and 12290, Journal

of Petroleum Technology, p. 1633-1642, August 1982.

Dogru, Ali H., et al. A next-generation parallel reservoir simulator for giant

reservoirs. SPE/EAGE Reservoir Characterization & Simulation Conference. 2009.

Page 208: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

189

Enyioha, Chukwuka, and Turgay Ertekin. Advanced Well Structures: An Artificial Intelligence

Approach to Field Deployment and Performance Prediction. SPE Intelligent Energy Conference

& Exhibition. Society of Petroleum Engineers, 2014.

Ertekin, T., Abou-Kassem, J. H., King, G. R.: Basic Applied Reservoir Simulation, SPE Textbook

Series volume 7, Henry L. Doherty Memorial Fund of AIME, Richardson, TX, ISBN 1-55563-089-

8, 2001.

Ertekin, T., and W. Sung. Pressure transient analysis of coal seams in the presence of multi-

mechanistic flow and sorption phenomena. SPE Gas Technology Symposium. Society of

Petroleum Engineers, 1989.

Farnstrom, K. L., and T. Ertekin. A versatile, fully implicit, black oil simulator with variable

bubble-point option. SPE California Regional Meeting. Society of Petroleum Engineers, 1987.

Fetkovich, M. J., et al. "Decline curve analysis using type curves: case histories." SPE Formation

Evaluation 2.04 (1987): 637-656.

Fetkovich, Michael J. "Decline curve analysis using type curves." Journal of Petroleum

Technology 32.06 (1980): 1-065.

Fussell, D. D., and Yanosik, J. L.: An Iterative Sequence for Phase Equilibrium Calculations

Incorporating the Redlich-Kwong Equation of State, SPE Paper 6050, SPE Journal, p. 173-182,

June 1978.

Fussell, L. T., and Fussell, D. D.: An Iterative Technique for Compositional Reservoir Models, SPE

Paper 6891, SPE Journal, p. 211-220, August 1979.

Gaw, Hussain. "Development of an Artificial Neural Network for Pressure and Rate Transient

Analysis of Horizontal Wells Completed in Dry, Wet and Condensate Gas Reservoirs of Naturally

Fractured Formations." Master thesis, the Pennsylvania State University, 2014.

Page 209: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

190

Glorot, Xavier, Antoine Bordes, and Yoshua Bengio. "Deep sparse rectifier neural networks."

Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics.

2011.

Heidemann, Robert A. Three‐phase equilibria using equations of state, AIChE Journal 20.5 (1974):

847-855.

Hogan, Robin J. Fast Reverse-Mode Automatic Differentiation using Expression Templates in

C&plus; &plus. ACM Transactions on Mathematical Software (TOMS) 40.4 (2014): 26.

Hopfield J. J. (1982). Neural networks and physical systems with emergent collective

computational abilities. Proc. Natl. Acad. Sci. U.S.A. 79, 2554–2558 10.1073/pnas.79.8.2554

Huron, Marie-José, and Jean Vidal. New mixing rules in simple equations of state for representing

vapour-liquid equilibria of strongly non-ideal mixtures.Fluid Phase Equilibria 3.4 (1979): 255-271.

Jacoby, R. H., and Berry, V. J. Jr.: A Method for Predicting Depletion Performance of a Reservoir

Producing Volatile Crude Oil, Trans. AIME, v. 210, p. 27-33, 1957.

Jacoby, R. H., Koeller, R. C., and Berry, V. J.: Effect of Composition and Temperature on Phase

Behavior and Depletion Performance of Rich Gas-Condensate Systems, Trans. AIME, v. 215, p.

406, 1959.

Kazemi, H., et al. "Numerical simulation of water-oil flow in naturally fractured

reservoirs." Society of Petroleum Engineers Journal 16.06 (1976): 317-326.

Kazemi, H., et al. Numerical simulation of water-oil flow in naturally fractured reservoirs. Society

of Petroleum Engineers Journal 16.06 (1976): 317-326.

Kazemi, H., Vestal, C. R., and Shank, G.D.: An Efficient Multi-component Numerical Simulator,

SPE Paper 6890, SPE Journal, p. 355-368, Oct. 1978.

Page 210: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

191

Kazemi, Hossein. Pressure transient analysis of naturally fractured reservoirs with uniform

fracture distribution. Society of petroleum engineers Journal 9.04 (1969): 451-462.

Khaz’ali, Ali Reza, Mohammad Reza Rasaei, and Jamshid Moghadasi. Mixed precision parallel

preconditioner and linear solver for compositional reservoir simulation. Computational

Geosciences (2014): 1-18.

Klambauer, Günter, et al. "Self-Normalizing Neural Networks." arXiv preprint arXiv:1706.02515

(2017).

Kulga, Ihsan Burak. Development of an Artificial Neural Network for hydraulically fractured

horizontal wells in tight gas sands. Diss. The Pennsylvania State University, 2010.

Lee, A., Gonzalez, M., Eakin, B. (1966), The Viscosity of Natural Gases, SPE Paper 1340, Journal

of Petroleum Technology, vol. 18, p. 997-1000.

Levenberg, Kenneth. A method for the solution of certain non–linear problems in least squares.

(1944): 164-168.

Li, Xiang, and Dongxiao Zhang. A backward automatic differentiation framework for reservoir

simulation. Computational Geosciences (2014): 1-14.

Maas, Andrew L., Awni Y. Hannun, and Andrew Y. Ng. "Rectifier nonlinearities improve neural

network acoustic models." Proc. ICML. Vol. 30. No. 1. 2013.

Manik, Julio. Compositional modeling of enhanced coalbed methane recovery. 1999.

Marquardt, Donald W. An algorithm for least-squares estimation of nonlinear parameters. Journal

of the Society for Industrial & Applied Mathematics 11.2 (1963): 431-441.

McClelland, J. L., Rumelhart, D. E., & Hinton, G. E. (1986). The Appeal of Parallel Distributed

Processing. In D. E. Rumelhart, J. L. McClelland, & the PDP research group (Eds.), Parallel

Page 211: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

192

distributed processing: Explorations in the microstructure of cognition. Volume I. (pp. 3–44).

Cambridge, MA: MIT Press

McCulloch, W. S., & Pitts, W. A. (1943). A logical calculus of the ideas immanent in nervous

activity. Bulletin of Mathematics and Biophysics, 5, 115-133.

Michelsen, M. L. Calculation of multiphase equilibrium. Computers & chemical engineering 18.7

(1994): 545-550.

Minsky M. L., Papert S. A. (1969). Perceptrons. Cambridge, MA: MIT Press

Møller, Martin Fodslette. A scaled conjugate gradient algorithm for fast supervised

learning. Neural networks 6.4 (1993): 525-533.

Moré, Jorge J. The Levenberg-Marquardt algorithm: implementation and theory. Numerical

analysis. Springer Berlin Heidelberg, 1978. 105-116.

Naar, J., and J. H. Henderson. An imbibition model-Its application to flow behavior and the

prediction of oil recovery. Society of Petroleum Engineers Journal 1.02 (1961): 61-70.

Nelson, Ronald. Geologic analysis of naturally fractured reservoirs. Gulf Professional Publishing,

2001.

Nghiem, Long X., and Yau-Kun Li. Computation of multiphase equilibrium phenomena with an

equation of state. Fluid Phase Equilibria 17.1 (1984): 77-95.

Nolen, J. S. and Berry, D. W.: Tests of the Stability and Time-Step Sensitivity of Semi-Implicit

Reservoir Stimulation Techniques, SPE Paper 2981, SPE Journal, p. 253-266, June 1972.

ohrenz, J., Bray, B.G., Clark, C.R. (1964), Calculating Viscosities of Reservoir Fluids from their

compositions, SPE Paper 915, Journal of Petroleum Technology, p. 1171-1176.

Page 212: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

193

Okuno, Ryosuke, Russell T. Johns, and Kamy Sepehrnoori. Three-phase flash in compositional

simulation using a reduced method. SPE Journal 15.03 (2010): 689-703.

Peaceman, Donald W. Fundamentals of numerical reservoir simulation. Elsevier, 2000.

Peaceman, Interpretation of well-block pressures in numerical reservoir simulation, SPE 6893,

52nd Annual Fall Technical Conference and Exhibition, Denver, 1977.

Remner, D.J., Ertekin, T., Sung, W., and King, G.R., “A Parametric Study o f the Effects o f Coal

Seam Properties on Gas Drainage Efficiency" SPE Reservoir Engineering (Nov. 1986), pp. 633-

646

Riedmiller, Martin, and Heinrich Braun. A direct adaptive method for faster backpropagation

learning: The RPROP algorithm. Neural Networks, 1993., IEEE International Conference on.

IEEE, 1993.

Rosenblatt, F. (1958). The perceptron: A probabilisitic model for information storage and

organization in the brain. Psychoana(vtic Review, 65, 386-408.

Schilthuis, Ralph J. Active oil and reservoir energy. Transactions of the AIME 118.01 (1936): 33-

52.

Siripatrachai, Nithiwat, et al. An Effective Coupling of Type Curves and Expert Systems for

Evaluating Multi-stage Hydraulically Fractured Horizontal Wells in Composite Dual-porosity

Shale Gas Reservoirs. SPE Annual Technical Conference and Exhibition. Society of Petroleum

Engineers, 2014.

Srinivasan, Karthik. Development and Testing of an Expert System for Coalbed Methane

Reservoirs Using Artificial Neural Networks. Diss. The Pennsylvania State University, 2008.

Stone, H. L. Rigorous black oil pseudo functions. SPE Symposium on reservoir simulation. Society

of Petroleum Engineers, 1991.

Page 213: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

194

Thararoop, Prob, Zuleima T. Karpyn, and Turgay Ertekin. "Development of a multi-mechanistic,

dual-porosity, dual-permeability, numerical flow model for coalbed methane reservoirs." Journal

of Natural Gas Science and Engineering 8 (2012): 121-131.

Trangenstein, John A., and John B. Bell. Mathematical structure of the black-oil model for

petroleum reservoir simulation. SIAM Journal on Applied Mathematics 49.3 (1989): 749-783.

Warren, J. E., and P. Jj Root. "The behavior of naturally fractured reservoirs." Society of Petroleum

Engineers Journal 3.03 (1963): 245-255.

Wattenbarger, R. A.: Practical Aspects of Compositional Simulation, SPE Paper 2800 presented at

the SPE Symposium on Numerical Simulation of Reservoir Performance, Dallas, February 5-6,

1970.

Whitson, Curtis H., and Michael L. Michelsen. The negative flash. Fluid Phase Equilibria 53 (1989):

51-71.

Wilson, G., A modified Redlich-Kwong equation of state applicable to general physical data

calculations, Paper No15C, 65th AIChE National meeting, May, (1968).

Zaghloul, Jose S. Multiphase Analysis of Three-phase (gas-condensate-water) Flow in Pipes.

Dissertation, 2006.

Zhou, Yifan, Hamdi A. Tchelepi, and Bradley T. Mallison. Automatic differentiation framework

for compositional simulation on unstructured grids with multi-point discretization schemes. SPE

Reservoir Simulation Symposium. Society of Petroleum Engineers, 2011.

Page 214: DEVELOPMENT OF AUTOMATED NEURO-SIMULATION PROTOCOLS FOR

Vita

Jian Zhang was born in Shijiahzuang, Hebei province, China in 1987. He attended Beijing Jiaotong

University for his undergraduate study in Optical Information Science and Technology in

department of Applied physics. After graduated with degree of Bachelor of Science, Mr. Zhang

pursued a degree of Master of Science in Optical Engineering in Beijing Jiaotong University. In

2011, Mr. Zhang attended Miami University in Oxford, Ohio to purse his second degree of Master

of Science in Chemical Engineering. After graduated in 2013, Mr. Zhang attended department of

Mineral and Energy Engineering in the Pennsylvania State University, University Park to pursue

his Ph.D. degree major in Energy and Mineral Engineering, concentrated in Petroleum and Natural

Gas Engineering, with a Ph.D. minor of Computational Science.