Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
AN ISENTHALPIC-BASED COMPOSITIONAL FRAMEWORK
FOR NONLINEAR THERMAL SIMULATION
A DISSERTATION
SUBMITTED TO THE DEPARTMENT OF ENERGY RESOURCES
ENGINEERING
AND THE COMMITTEE ON GRADUATE STUDIES
OF STANFORD UNIVERSITY
IN PARTIAL FULFILLMENT OF THE REQUIREMENTS
FOR THE DEGREE OF
DOCTOR OF PHILOSOPHY
Michael Connolly
March 2018
http://creativecommons.org/licenses/by-nc/3.0/us/
This dissertation is online at: http://purl.stanford.edu/vr209gh5661
© 2018 by Michael Connolly. All Rights Reserved.
Re-distributed by Stanford University under license with the author.
This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.
ii
I certify that I have read this dissertation and that, in my opinion, it is fully adequatein scope and quality as a dissertation for the degree of Doctor of Philosophy.
Hamdi Tchelepi, Primary Adviser
I certify that I have read this dissertation and that, in my opinion, it is fully adequatein scope and quality as a dissertation for the degree of Doctor of Philosophy.
Roland Horne
I certify that I have read this dissertation and that, in my opinion, it is fully adequatein scope and quality as a dissertation for the degree of Doctor of Philosophy.
Huanquan Pan
Approved for the Stanford University Committee on Graduate Studies.
Patricia J. Gumport, Vice Provost for Graduate Education
This signature page was generated electronically upon submission of this dissertation in electronic format. An original signed hard copy of the signature page is on file inUniversity Archives.
iii
Abstract
Thermal enhanced oil recovery (EOR) involves the complex interplay of mass and energy transport
with phase behavior. Hydrocarbon and water components partition across multiple fluid phases
as a function of composition, pressure & temperature. Thermal compositional simulation thus
requires phase-equilibrium calculations for at least three fluid phases: an oleic phase, an aqueous
phase, and a vapor phase. The use of precomputed equilibrium ratios (K-values) remains popular in
industry, where it is justified on the basis of efficiency. However, this method greatly simplifies the
underlying phase behavior and has been shown to lead to incorrect predictions of oil recovery. This
dissertation describes the development of a thermodynamically consistent framework for thermal
simulation using an equation of state (EOS). The mass and energy conservation laws are solved with
a molar variables formulation, in which enthalpy is a primary variable. Isenthalpic flash provides
high integrity coupling of the local thermodynamic constraints to the solution of the equations at
the global level.
Phase equilibrium calculations are well-developed for hydrocarbon fluids in isothermal compo-
sitional simulation. In contrast, EOS representation of phase behavior in thermal recovery has not
received the same attention. In non-isothermal reservoir processes, water is the thermodynamically
dominant species. In this dissertation, we describe a suite of phase equilibrium algorithms devel-
oped for hydrocarbon-water mixtures in thermal simulation. We introduced the steam saturation
curve to guide the initial selection of K-values in phase stability testing. This approach requires far
fewer initial estimates than existing methods. In isothermal flash, the presence of trace components
in the aqueous phase precludes the use of a Newton solver with some conventional formulations.
We implemented a new reduced parameter formulation, for which performance is agnostic to the
presence of near-pure phases. We demonstrated performance of both our stability testing protocol
and reduced phase-split formulation through comprehensive testing across an extensive parameter
space.
iv
Isenthalpic flash is far more challenging than isothermal flash. Temperature is unknown a priori
and the convergence of conventional algorithms is hindered by K-value sensitivity to enthalpy. We
pioneered the extension of reduced variables beyond the isothermal domain with the development
of a reduction method for rapid isenthalpic flash. Through a series of examples we demonstrated
rapid convergence of our novel implementation, even for narrow-boiling point mixtures.
The compositional framework developed in this research was brought to fruition in our imple-
mentation of a thermodynamically consistent thermal simulator. In contrast to conventional thermal
simulation models, we allowed for arbitrary component partitioning across phases. The implementa-
tion uses overall molar composition, pressure and enthalpy as the principal unknowns. Convoluted
derivatives of secondary variables are generated in AD-GPRS using the implicit function theorem.
In this dissertation we use several case studies to show that the molar formulation outperforms the
natural formulation when phase behavior is the principal source of nonlinearity.
v
Acknowledgements
First and foremost, I acknowledge the financial support of Total S.A. and the SUPRI-B Industrial
Affiliates, without which this research would not have been possible.
I wish to thank all of those who provided me with technical support over the course of my studies.
In particular, a special thanks to Ruslan Rin, Yang Wong and Pavel Tomin for all of their help with
AD-GPRS. Thank you to Sara Farshidi for taking the time to teach me about molar variables and
implicit differentiation. I’m grateful to Denis Voskov for the helpful advice in the early stages of
my PhD. Many thanks to Alex Lapene for the guidance on phase behavior and Rustem Zaydullin
for teaching me about thermal simulation. Thank you also to Francois Hamon for the lessons on
nonlinearity in reservoir simulation. I thank all of my colleagues and friends in SUPRI-B for their
support, including Timur Garipov, Kirill Terekhov, Nicola Castelletto, Motonao Imai, Ruixiao Sun,
Moataz O. Abu-Al-Saud and Karine Levonyan. Thank you also to my office mates Charles Kang,
Phil Broderick, Jack Norbeck, Larry Jin, Usua Amanam and Kelly Guan. Amongst great company
I was able to do great research.
I wish to thank my friends at Stanford for their support over the years, especially Amanda Licato,
Shahab Mirjalili, Todd Chapman, Gabriela Badica, Lewis Li, Markus Zechner, Simon Ejdemyr, Scott
McNally, Filip Yabukarski, Sina Javidan-Nejad, Michelle Lyn Kahn, Aslihan Selimbeyoglu, Meital
Gabby, Lin Hung, Hsiao-Tieh Hsu, Zak Stratton, Tom Hellstern, Juliana Nalerio and Cansu Culha.
I am grateful for our shared friendship, but also for the opportunity to study alongside such brilliant
and inspiring people. I must also thank the friends who have encouraged me from afar, including
Wade Boman, Aaron Azzopardi, Marko Kraljevic, Patrick Baer, Shane Hollerich, Rebecca Hott,
Dale Joachim, Siddharth Chitnis, Subs Paven, Ayshnoor Dewji, Amna Ali and Rowley Brown.
A big thank you to all of the staff and faculty at The Department of Energy Resources Engi-
neering. In particular, Joanna Sun, Rachael Madison and Arlene Abucay worked tirelessly to make
my life easier. I thank Professor Lou Durlofsky, Professor Margot Gerritson, Dr. Marco Thiele, Dr.
vi
Birol Dindoruk and Dr. Louis Castanier for sharing so much wisdom with me. I learned a great deal
from your classes. I also wish to thank Professor Russell Johns for teaching me in my early days at
Penn State, and encouraging me to pursue a PhD at Stanford.
I am very grateful to the members of my committee for their contributions to my research.
Thank you to Professor Jian Qin for serving as chairperson and contributing your expertise on
thermodynamics. Thank you also to Professor Roland Horne and Professor Tony Kovscek for your
feedback and suggestions. A most sincere thank you to Dr. Huanquan Pan for mentoring me
throughout my PhD. I will always remember our technical discussions on phase equilibrium, C++
and reservoir simulation. To my advisor, Professor Hamdi Tchelepi: thank you for guiding me
through my research and for believing in my ability to execute. You put a lot of faith in me, and
gave me autonomy over my work. Our time working together allowed me to develop self-confidence
that I will draw upon for the rest of my life.
Finally, I wish to thank my family in Australia. I am grateful to my uncles Paul and Charlie for
their support. Thank you to my grandparents Joe and Mary for teaching me the value of hard work.
Thank you to my sister, Joanna. You have always been my biggest supporter. My deepest gratitude
goes to my parents, Tom and Jenny. It seems like just yesterday we were spending all those days in
the principal’s office. I am grateful to you both for giving Joanna and I the opportunities that you
never had.
vii
Contents
1 Introduction 1
1.1 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Thesis statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.5 Dissertation overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2 Background & Literature Review 7
2.1 Basic principles in thermodynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1.1 Thermodynamic equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2 Isothermal phase equilibrium calculations . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.1 Phase stability analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2.2 Isothermal-isobaric phase-split calculations . . . . . . . . . . . . . . . . . . . 16
2.2.3 Numerical solution of phase equilibrium calculations . . . . . . . . . . . . . . 18
2.2.4 Reduced variables in phase equilibrium calculations . . . . . . . . . . . . . . 20
2.2.5 Phase behavior of hydrocarbon-water mixtures in thermal simulation . . . . . 22
2.3 Isenthalpic flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2.3.1 Nested isothermal flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3.2 Direct substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.3.3 Newton methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.3.4 Narrow boiling point behavior in isenthalpic flash . . . . . . . . . . . . . . . . 28
2.4 Thermal compositional simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4.1 Geothermal reservoir simulation . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.4.2 Thermal reservoir simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
viii
2.4.3 Compositional reservoir simulation . . . . . . . . . . . . . . . . . . . . . . . . 31
2.4.4 Compositional modeling in thermal simulation . . . . . . . . . . . . . . . . . 34
2.4.5 Nonlinearities in thermal reservoir simulation . . . . . . . . . . . . . . . . . . 35
2.5 Closing remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
3 Stability Analysis for Hydrocarbon-Water Mixtures 39
3.1 Stability analysis for thermal simulation . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.2 A strategy for stability testing in thermal simulation . . . . . . . . . . . . . . . . . . 40
3.3 Case studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.3.1 Case 1: Seven-component heavy crude plus water. . . . . . . . . . . . . . . . 44
3.3.2 Case 2: Four-component heavy oil plus water. . . . . . . . . . . . . . . . . . . 47
3.3.3 Case 3: Three-component oil plus water. . . . . . . . . . . . . . . . . . . . . . 47
3.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4 Multiphase Isothermal Flash using Reduced Variables 55
4.1 Phase-split calculations in thermal simulation . . . . . . . . . . . . . . . . . . . . . . 55
4.1.1 Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.1.2 Solution of the phase-split in thermal simulation . . . . . . . . . . . . . . . . 57
4.2 Derivation and implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.3 Case studies in isothermal flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.3.1 Case 1: Four-pseudocomponent crude plus water. . . . . . . . . . . . . . . . . 61
4.3.2 Case 2: SPE-3 nine-component condensate plus water. . . . . . . . . . . . . . 64
4.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5 Reduction Method for Rapid Isenthalpic Flash 70
5.1 Isenthalpic flash for thermal reservoir simulation . . . . . . . . . . . . . . . . . . . . 71
5.2 State-function based flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.3 Application of a reduced method to isenthalpic flash . . . . . . . . . . . . . . . . . . 73
5.3.1 Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.3.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4 Case studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
5.4.1 Case 1: CO2-rich narrow boiling point hydrocarbon fluid . . . . . . . . . . . 75
ix
5.4.2 Case 2: Narrow boiling point pseudocomponent hydrocarbon-water mixture . 79
5.4.3 Case 3: Narrow boiling point heavy oil-water mixture . . . . . . . . . . . . . 80
5.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6 Thermodynamically Rigorous Thermal Simulation 93
6.1 Mathematical basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
6.1.1 Conservation of mass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
6.1.2 Energy balance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
6.2 Overall molar composition formulation . . . . . . . . . . . . . . . . . . . . . . . . . . 96
6.3 Development and implementation in AD-GPRS . . . . . . . . . . . . . . . . . . . . . 98
6.3.1 Computation of derivatives using implicit function theorem . . . . . . . . . . 99
6.4 Case studies in compositional thermal simulation . . . . . . . . . . . . . . . . . . . . 100
6.4.1 Case 1: Steam drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
6.4.2 Case 2: Steam-solvent coinjection . . . . . . . . . . . . . . . . . . . . . . . . . 105
6.4.3 Case 3: Steam flooding for narrow boiling point fluid . . . . . . . . . . . . . . 105
6.4.4 Case 4: Two dimensional steam flood with narrow boiling point . . . . . . . . 113
6.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
6.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
7 Conclusions and Future Research 122
7.1 Summary and conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
7.2 Future research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
7.2.1 Phase equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
7.2.2 Nonlinear formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
7.2.3 Solution of the linearized system . . . . . . . . . . . . . . . . . . . . . . . . . 128
8 Appendix 131
A Flowchart of stability analysis algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 132
B Mathematical development of the reduced method for three-phase isothermal flash . 133
B.1 Development of the reduced variables. . . . . . . . . . . . . . . . . . . . . . . 133
B.2 Solution of the nonlinear equations. . . . . . . . . . . . . . . . . . . . . . . . 135
B.3 Jacobian matrix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
B.4 Partial derivatives constituting the Jacobian matrix elements. . . . . . . . . . 137
x
B.5 Construction of Jacobian elements. . . . . . . . . . . . . . . . . . . . . . . . . 142
C Expression for total molar enthalpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
D The enthalpy departure function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
D.1 Derivation of thermodynamic departure functions . . . . . . . . . . . . . . . . 147
D.2 PR EOS form of the enthalpy departure function . . . . . . . . . . . . . . . . 150
E Derivatives of thermodynamic functions . . . . . . . . . . . . . . . . . . . . . . . . . 152
E.1 Derivative of mixture energetic term . . . . . . . . . . . . . . . . . . . . . . . 152
E.2 Derivative of component energetic term . . . . . . . . . . . . . . . . . . . . . 152
xi
List of Tables
3.1 Properties of seven-component heavy oil plus water mixture, taken from Lapene et
al. [69]. The hydrocarbon components are characteristic of a heavy crude. . . . . . . 45
3.2 Binary interaction parameters for mixture of seven-component heavy crude with wa-
ter, taken from Lapene et al. [69]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.3 Two-phase flash results for heavy oil plus water mixture in Case 1 at 85 bar and 571
K. G = −0.3586201422. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4 Two-phase flash results for the mixture in Case 1. Results are from the second two-
phase split calculation, performed at 85 bar and 571 K. G = −0.3606695361. . . . . 46
3.5 Three-phase phase flash result obtained after testing the stability of the two-phase
system in Table 3.3. Stability testing of the two-phase system in Table 3.4 did not
indicate phase instability. G = −0.360728432276. . . . . . . . . . . . . . . . . . . . . 46
3.6 Properties of the five-component mixture in Case 2. The fluid consists of water in
combination with a heavy oil. The oil is devoid of light hydrocarbon components [13]. 48
3.7 Binary interaction parameters for five-component mixture in Case 2 [13]. The spectral
decomposition of the BIP matrix results in only two non-zero eigenvalues, owing to
the large number of zero interaction coefficients. . . . . . . . . . . . . . . . . . . . . 48
3.8 Two-phase flash results for fluid in Case 2, obtained in first phase-split calculation at
4.5 bar and 415 K. G = −3.592242056 . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.9 Two-phase flash results for fluid in Case 2. Results obtained from second flash result
at 4.5 bar and 415 K. G = −3.591664856 . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.10 Three-phase flash results for fluid in Case 2 at 4.5 bar and 415 K. G = −3.59538192171. 49
3.11 Heat capacity coefficient data for the fluid in Case 2 [13]. . . . . . . . . . . . . . . . 49
3.12 Component properties for four-component hydrocarbon-water system in Case 3 [148].
Compared to Cases 1 and 2 the hydrocarbon components are relatively volatile. . . . 51
xii
3.13 Binary interaction parameters for four-component mixture in Case 3 [148]. . . . . . . 52
4.1 Fluid properties for Case 1, taken from Luo and Barrufet [79]. . . . . . . . . . . . . . 62
4.2 Binary interaction parameters for the water-pseudocomponent oil mixture in Table
4.1 [180, 150]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.3 Component properties for the fluid in Case 2 [66]. . . . . . . . . . . . . . . . . . . . . 64
4.4 Binary interaction parameters for the fluid in Case 2. Hydrocarbon BIP data taken
from Kenyon and Behie [66]. Hydrocarbon-water interaction parameters are estimated. 65
4.5 Three-phase flash results for the fluid in Case 2. Results obtained at P = 200 bar, T
= 290.5 K. The hydrocarbon phases (Phase 1 and Phase 2) are near critical. . . . . 65
5.1 Properties of six-component hydrocarbon-CO2 fluid in Case 1 [178] . . . . . . . . . . 76
5.2 Binary interaction parameters for six-component hydrocarbon-CO2 mixture in Case 1. 76
5.3 Heat capacity coefficient data for Case 1 [178]. . . . . . . . . . . . . . . . . . . . . . 76
5.4 Heat capacity coefficient data for five-component oil-water mixture in Case 2 [180].
Fluid characterization can be found in Table 4.1 and binary interaction parameter
data is listed in Table 4.2 in Chapter 4. . . . . . . . . . . . . . . . . . . . . . . . . . 80
6.1 Properties of initial reservoir fluid in Case 1 [180] . . . . . . . . . . . . . . . . . . . . 101
6.2 Binary interaction parameters for three-component mixture in Case 1. . . . . . . . . 101
6.3 Heat capacity coefficient data for Case 1 [180] . . . . . . . . . . . . . . . . . . . . . . 101
6.4 Properties and composition of initial reservoir fluid for Case 2. . . . . . . . . . . . . 106
6.5 Binary interaction parameters for seven-component system in Case 2. . . . . . . . . 106
6.6 Heat capacity coefficient data for seven-component oil-water mixture in Case 2 [180]. 106
6.7 Comparison of nonlinear performance for Natural variable formulation with and with-
out Appleyard chop [9] for Case 3. Shown here are the metrics for the most refined
test case, for which the dimensionless grid cell size is 0.11. Chopping the saturation
update is a hindrance to Newton’s method. . . . . . . . . . . . . . . . . . . . . . . . 109
6.8 Case 4A comparison of nonlinear performance for the natural variables formulation,
natural variables formulation with Appleyard chop, and the molar variables formula-
tion. The set of molar variables yields superior nonlinear performance. . . . . . . . . 114
xiii
6.9 Case 4A comparison of nonlinear performance for the natural variables formulation,
natural variables formulation with Appleyard chop, and the molar variables. In this
case the grid is refined piecewise (33x15 cells). The set of molar variables yields su-
perior nonlinear performance. Moreover, the molar variables appear to show superior
scaling as the domain is refined piecewise (compare with Table 6.8). . . . . . . . . . 114
6.10 Comparison of nonlinear performance for alternate variable formulations in Case 4B
on the original coarse grid (11x5 cells). Despite the heterogeneity and anisotropy in
the system, the natural variables formulation shows very poor performance. Satura-
tion chopping is detrimental to performance, as for Case 3 (see Table 6.7). . . . . . . 115
6.11 Comparison of nonlinear performance for alternate formulations for refined Case 4B.
The grid is 33x15 cells. Clearly, the set of molar variables yields superior nonlinear
performance which further improves relative to the natural formulation upon piecewise
refinement (compare with Table 6.10). . . . . . . . . . . . . . . . . . . . . . . . . . . 117
xiv
List of Figures
3.1 Partitioning of the pressure-temperature domain using the steam saturation curve.
The aqueous phase does not exist below the steam saturation pressure. Above the
steam saturation pressure an aqueous phase may be present, and three sets of initial
K-values are used for stability analysis, {KWilsoni , 1/KWilson
i ,KH2Oi }. . . . . . . . . 43
3.2 Mixture of 99% water and 1% oil, as described in Table 3.1. Pressure is sampled
in increments of 0.1 bar and temperature is sampled in increments of 0.05 K. The
three-phase region is very narrow in pressure-temperature space. . . . . . . . . . . . 46
3.3 PT-phase diagram for the 50% water/50% oil mixture in Case 2. Component prop-
erties are provided in Table 3.6. Pressure is sampled in increments of 0.1 bar and
temperature is sampled in increments of 0.1 K. The mixture is characterized by a
narrow three-phase region. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.4 Close up of PT-phase diagram shown in Fig. 5.13. Pressure sampled at 0.1 bar
intervals from 2 bar through 20 bar. Temperature sampled at 0.1 K intervals from
380 K to 480 K. Comparison with Fig. 5.15 elucidates the enthalpy change associated
with the abrupt phase transition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.5 Mapping of Fig. 5.14 from the pressure-temperature domain to pressure-enthalpy
space. An ostensibly narrow three-phase region maps to a large region in pressure-
enthalpy space. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.6 Enthalpy contours corresponding to the PT-phase diagram in Fig. 5.14. At the phase
boundary there is an abrupt change in enthalpy. . . . . . . . . . . . . . . . . . . . . 51
3.7 PT-phase diagram for the fluid in Case 3. The system is a mixture of 95% water and
5% oil. Component properties are provided in Table 3.12. Multiple two-phase states
(VW, VL) border the narrow three-phase region. Pressure is sampled in increments
of 0.25 bar and temperature is sampled in increments of 0.25 K. . . . . . . . . . . . . 52
xv
4.1 PT-phase diagram for the fluid in Case 1, taken from Luo and Barrufet [79]. The
mixture comprises 50% water and 50% hydrocarbon. Pressure is sampled every 0.25
bar and temperature is sampled every 0.5 K. . . . . . . . . . . . . . . . . . . . . . . 62
4.2 Condition number computed at the solution in the three-phase region for the PT-
phase diagram in Fig. 4.1. Here, the condition number corresponds to the Jacobian
matrix associated with the log K formulation. . . . . . . . . . . . . . . . . . . . . . . 63
4.3 Condition number computed at the solution in the three-phase region for the PT-
phase diagram in Fig. 4.1. The condition number corresponds to the Jacobian matrix
associated with the reduced variables formulation. The reduced variables yield a far
better conditioned Jacobian. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.4 PT phase diagram for mixture consisting of 10% water and 90% SPE3 condensate
(Case 2). A large three-phase region is present. Pressure is sampled in increments of
0.25 bar and temperature is sampled in increments of 0.25 K. . . . . . . . . . . . . . 66
4.5 Analysis of convergence for a three-phase split calculation at P = 200 bar and T =
290.5 K for the fluid in Case 2. The convergence criterion for the fugacity residual
norm is set to 1e-10. Successive substitution requires 2443 iterations for convergence.
This is attributable to the near criticality of the hydrocarbon phases. If we set the
SS-Newton switch threshold to 0.02, we require 87 successive substitution iterations
to reach the switch residual, and only 5 Newton iterations for convergence. . . . . . 66
5.1 PT-phase diagram for the CO2-rich narrow boiling point hydrocarbon fluid described
in Table 5.1. Pressure is sampled every 0.25 bar from 2 bar to 220 bar. Temperature
is sampled every 0.25 K from 200 K to 550 K. The test condition is indicated at
303.35 K and 77.5 bar. Narrow boiling point behavior has been demonstrated in the
vicinity of the test condition by Zhu and Okuno [178]. . . . . . . . . . . . . . . . . . 77
5.2 Convergence to the solution temperature using Newton’s method for two-phase isen-
thalpic flash, with both reduced and conventional formulations shown. . . . . . . . . 77
5.3 Convergence of the enthalpy constraint residual versus iteration number for two-phase
isenthalpic flash using Newton’s method. Results are shown for both reduced and
conventional formulations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.4 Convergence of the fugacity residual versus iteration number for two-phase isenthalpic
flash using Newton’s method. Results are shown for reduced and conventional formu-
lations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
xvi
5.5 Condition numbers of the Jacobian matrices associated with the conventional and
reduced variables formulations. Condition number was computed at convergence of
the two-phase flash across the entire two-phase region at a pressure of 77.5 bar. . . . 79
5.6 PT phase diagram for the five-component hydrocarbon-water mixture in Table 4.1.
The mixture is 50% water, 50% hydrocarbon. Pressure is sampled every 0.5 bar and
temperature is sampled every 0.25 K. The test condition is at 483.63 K and 30 bar. 81
5.7 PT phase diagram with enthalpy contours for the five-component hydrocarbon-water
mixture in Table 4.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.8 PH phase diagram for the five-component hydrocarbon-water mixture in Table 4.1.
The PH-phase diagram is a mapping of the PT-phase diagram in Fig. 5.6 to the
pressure-enthalpy parameter space. Pressure is sampled every 0.5 bar and enthalpy
is sampled every 0.5 J/g. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.9 PH phase diagram with temperature contours for the five-component hydrocarbon-
water mixture in Table 4.1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.10 Convergence to the solution temperature using the reduced variables implementation
of Newton’s method for three-phase isenthalpic flash. The initial guess for temper-
ature is 450 K, with an upper temperature limit of 550 K. After a few regula falsi
iterations Newton’s method is initiated, and rapid convergence to the solution tem-
perature is attained. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.11 Convergence of reduced variables implementation of Newton’s method for three-phase
isenthalpic flash. A rapid reduction is observed in both the fugacity residual norm
and the residual of the enthalpy constraint. . . . . . . . . . . . . . . . . . . . . . . . 83
5.12 Condition number of the Jacobian matrix of the reduced variables with Newton’s
method. The condition number is computed at convergence for points across the
three-phase region at a fixed pressure of 30 bar. . . . . . . . . . . . . . . . . . . . . . 84
5.13 PT-phase diagram for Case 3, a mixture of 80% water and 20% heavy oil. In the
pressure-temperature space the region of three-phase behavior is very narrow. Pres-
sure is sampled every 0.5 bar and temperature is sampled every 0.25 K. . . . . . . 85
5.14 Enthalpy contours superimposed on the PT-phase diagram for Case 3. Enthalpy
changes abruptly across phase boundaries. . . . . . . . . . . . . . . . . . . . . . . . . 86
xvii
5.15 PH-phase diagram for the fluid in Case 3. Pressure is sampled every 0.25 bar and
enthalpy is sampled every 1 J/g. The three-phase region is prominent in the pressure-
enthalpy parameter space, whereas in the PT-diagram the zone of three-phase behav-
ior is incredibly narrow (Fig. 5.13). . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.16 Temperature contours displayed in pressure-enthalpy space for the five-component
mixture of heavy oil and water in Case 3. The change in temperature is relatively
gradual across the parameter space. . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.17 Change in enthalpy and phase fractions with temperature across the three-phase
region at 25 bar for Case 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.18 Condition number versus temperature across the three-phase region at 25 bar for Case
3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.19 Initial temperature vs. iterations required for convergence. The specified conditions
are P = 25 bar and H = −95 J/g and the solution temperature is T = 489.37 K.
Convergence is attained rapidly, even for initial guesses at the edge of the three-phase
zone. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.20 Residual of the enthalpy constraint at initial guess vs. number of iterations required
for convergence. The test point is P = 25 bar and H = −95 J/g. The reduced
method converges within five iterations even when the initial guess is far from the
solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
6.1 PT phase diagram for initial reservoir fluid in Case 1, consisting of 30% H2O, 42%
C3 and 28% C16. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.2 So vs. xD at end of simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.3 Sg vs. xD at end of simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
6.4 P vs. xD at end of simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.5 T vs. xD at end of simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.6 Time steps required for alternate formulations in Case 2. . . . . . . . . . . . . . . . . 107
6.7 Maximum average CFL number for alternate formulations in Case 2. . . . . . . . . . 107
6.8 Total Newton iterations required for alternate formulations in Case 2. Clearly, con-
duction makes the problem somewhat easier for the nonlinear solver. . . . . . . . . . 108
6.9 Number of time steps vs. dimensionless cell size for alternate formulations in Case 3. 109
6.10 Maximum averaged CFL number vs. dimensionless cell size for alternate formulations
in Case 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
xviii
6.11 Successful Newton iterations vs. dimensionless cell size for alternate formulations in
Case 3 (NB: Does not include wasted Newton iterations). . . . . . . . . . . . . . . . 110
6.12 Linear iterations vs. dimensionless cell size for alternate formulations in Case 3 (NB:
Does not include wasted linear iterations). . . . . . . . . . . . . . . . . . . . . . . . . 111
6.13 Wasted time steps vs. dimensionless cell size for alternate formulations in Case 3. . . 111
6.14 Wasted Newton iterations vs. dimensionless cell size for alternate formulations in
Case 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
6.15 Wasted linear solver iterations vs. dimensionless cell size for alternate formulations
in Case 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
6.16 Gas saturation after 45 days of steam injection into homogeneous reservoir. Grid is
33x15 cells. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6.17 Temperature following 45 days of steam injection on refined grid (33x15 cells). . . . 114
6.18 Map of permeability distribution across the heterogeneous reservoir in Case 4b. The
color bar indicates the natural logarithm of permeability in the x-direction. The
reservoir is anisotropic with ky = 0.2× kx . . . . . . . . . . . . . . . . . . . . . . . . 116
6.19 Map of porosity distribution across the heterogeneous reservoir in Case 4b. The color
bar indicates porosity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.20 Gas saturation after 35 days of steam injection on refined grid. . . . . . . . . . . . . 116
6.21 Temperature after 35 days of steam injection on refined grid. . . . . . . . . . . . . . 117
6.22 Sources of nonlinearity in the saturation flux function (from Wang [160]). . . . . . . 119
xix
Chapter 1
Introduction
Thermal simulation is significantly more difficult than isothermal simulation because of the inclusion
of an extra conservation law, in the form of the energy equation. Temperature has historically been
used as an additional independent variable to solve the system of nonlinear equations. Tempera-
ture is aligned with the energy equation in the global Newton loop; a logical choice when the set
of natural variables is chosen. However, when component mole numbers are selected as primary
variables, an alternative state function such as internal energy or enthalpy must be aligned with the
energy conservation law to accommodate cases of one degree of freedom [14]. The phase equilib-
rium kernel requires isenthalpic flash calculations to find the temperature, phase amounts and phase
compositions, given the pressure, overall composition and enthalpy of the system [6, 30]. However,
isenthalpic flash is a difficult phase equilibrium calculation, and the coupling of local thermodynamic
constraints to the global conservation laws remains a challenge in thermal simulation.
This chapter establishes the context for this research. We identify the problem at hand, and offer
a thesis postulate. The objectives of the research are clearly stated before we conclude the chapter
with an outline of the dissertation.
1.1 Context
Thermal recovery processes involve complex multiphase, multicomponent interactions in porous
media. The phase behavior of these systems involves water and hydrocarbon components that par-
tition across multiple fluid phases as a function of composition, pressure and temperature. Thermal
1
CHAPTER 1. INTRODUCTION 2
enhanced oil recovery is ultimately governed by hydrocarbon-water interactions at elevated tem-
peratures. On this basis, thermal compositional reservoir simulation requires phase equilibrium
calculations for a minimum of three fluid phases: an oleic phase, an aqueous phase, and a vapor
phase which often consists of steam.
The widely accepted industry practice is to use pre-computed equilibrium ratios (K-values) that
are independent of composition to represent the underlying phase behavior of hydrocarbon-water
systems in thermal settings. Compositional independence is a reasonable assumption in the presence
of linear phase boundaries [104]. However, recent EOS-based thermal compositional simulators have
shown that the K-values representation of phase-behavior can result in substantial errors in simulated
oil recovery [149, 53, 173]. K-values lack intrinsic thermodynamic content, and thus do not provide
a rigorous basis from which to compute the properties of fluid phases [14]. For this reason, there
is a growing interest in EOS-based thermal compositional simulation. However, fully compositional
simulation involves nonlinear coupling of local thermodynamic constraints to the global solution of
conservation laws. Practically, this means the coefficients of the governing equations are functions of
the phase compositions. While this is difficult for isothermal problems, the sensitivity of the energy
equation to phase compositions makes thermal compositional simulation far more challenging.
Compositional simulation has traditionally been used for modeling miscible EOR processes, the
success of which is governed by the phase behavior of the hydrocarbon system at near critical con-
ditions [65]. The thermodynamics of petroleum reservoir fluids has been studied extensively in the
context of isothermal miscible recovery processes. Phase behavior is the key determinant of dis-
placement efficiency in gas flooding, and equation of state (EOS) algorithms have been developed
to represent the complex multiphase hydrocarbon behavior of these systems in compositional simu-
lation. In contrast, phase equilibrium calculations have not received the same rigorous treatment in
the simulation of thermal recovery processes. However, there is a growing interest in compositionally
dependent recovery mechanisms in thermal EOR. Phase equilibrium calculations in thermal reservoir
simulation present a set of challenges distinct from those in isothermal compositional simulation.
These challenges include: (i) Highly nonideal behavior of hydrocarbon-water mixtures; (ii) frequent
phase changes; (iii) strong coupling to the energy conservation law.
In most miscible EOR processes, miscibility is achieved in a multicontact displacement in which
compositional routes traverse the critical locus [65]. Although water is always present in petroleum
reservoirs and in contact with hydrocarbon phases, its presence has little impact on the phase
behavior of hydrocarbon fluids in an isothermal setting. For this reason, water is typically treated
CHAPTER 1. INTRODUCTION 3
as an inanimate phase in compositional reservoir simulation. On the other hand, water is the
thermodynamically dominant component in thermal EOR processes such as steam-flooding and
steam-assisted-gravity-drainage (SAGD); driving viscosity reduction of oil through steam latent
heat transfer. However, the presence of the water component at high temperatures also gives rise
to behavior very different to that in miscible systems, including dramatic changes in system energy
across phase boundaries.
Phase transitions in thermal recovery occur frequently and abruptly, owing to both thermal
gradients in the reservoir and the narrow-boiling point behavior of hydrocarbon-water mixtures.
Nonlinearities attributable to phase changes are particularly problematic when the natural variables
are used in the global Newton loop. Phase transitions necessitate variable switching at the global
level. As an alternative, the molar formulation constitutes a persistent set of primary variables.
Enthalpy is used as a primary variable in place of temperature to avoid an indeterminate system
of equations in the limiting case of a single degree of freedom. In the molar variables formulation,
nonlinearities associated with phase changes are shifted to the local level, and are manifest in the
isenthalpic flash calculations performed at each grid cell. The development of efficient algorithms
for isenthalpic flash remains an unresolved issue in thermal compositional simulation.
Convergence of the isenthalpic phase-split is subject to the same iso-fugacity and material balance
constraints as the isothermal phase-split, in addition to the nonlinear enthalpy constraint
Hspec −Np∑j
hjβj = 0. (1.1)
With a few notable exceptions [14, 78, 53], the literature addresses the solution of isenthalpic-isobaric
equilibrium calculations on a standalone basis, outside the specific context of reservoir simulation.
However, the principal application of isenthalpic flash is in the phase behavior kernel of thermal
simulators.
Phase equilibrium calculations can be computationally arduous in compositional reservoir simu-
lation when the number of grid cells is large, especially in three-phase systems. The cost of stability
and flash calculations is particularly costly in the case of the molar variables formulation because
the EOS calculations cannot be skipped. Compositional simulation requires repeated phase-split
calculations to close the system of equations when the molar variables are used in the solution of
global mass and energy conservation laws. Implementations using overall compositions as indepen-
dent variables require closure of local thermodynamic constraints not only at each time step, but at
CHAPTER 1. INTRODUCTION 4
each global nonlinear iteration. This requirement becomes especially difficult in the case of thermal
simulation using the molar variables because of the use of enthalpy as a primary variable. Isen-
thalpic flash is intrinsically more difficult than isothermal flash because temperature is an additional
unknown. The implication is an additional degree of freedom and, more significantly, uncertainty
regarding the phase state. Isenthalpic flash relies heavily on robust underlying isothermal stability
and flash implementations, which may be called repeatedly to bound the temperature.
Several strategies exist to lower the cost of phase equilibrium calculations in compositional simula-
tion. One of the justifications for the use of the K-value method is that full EOS based calculations
are prohibitively costly. Stability testing typically requires multiple initial composition estimates
and associated calculations. Techniques exist to minimize the number of initial guesses required,
although not for hydrocarbon water mixtures at high temperature. Flash calculations are more
expensive than stability testing calculations. Free-water flash can be used to reduce this cost in
thermal simulation. However, this requires simplifying assumptions regarding phase compositions.
The implications for consistency and coupling to the global conservation laws are uncertain. Compo-
sitional space parameterization (CSP) can be used in the EOS kernel, although the application has
been primarily for the natural variables formulation. CSP may lack the rigor required for the molar
variables formulation. Reduced variables methods have been used to decrease the cost of phase
equilibrium calculations, although only for isothermal-isobaric specifications and never in thermal
simulation.
1.2 Problem synthesis
Rigorous quantification of phase behavior modeling is an important element of thermal compositional
simulation in the study of complex recovery mechanisms [173]. The industry-standard K-value
compositional model misrepresents the underlying phase behavior and a full-EOS approach is desired.
The problem at hand can be summarized as follows:
1. EOS-based thermal compositional simulation is rigorous, although prohibitively costly. There
are no efficient techniques specifically for stability testing and isothermal flash in thermal
simulation.
2. Frequent phase changes abound in thermal simulation. Use of the natural variables formula-
tion requires repeated variable switching and reformulation of the system of algebraic nonlinear
CHAPTER 1. INTRODUCTION 5
equations. In addition, temperature and pressure can become interdependent in this formula-
tion.
3. If the molar variables are used as the primary unknowns, either enthalpy or internal energy is
aligned with the energy equation in place of temperature. Isenthalpic flash is required to close
the system of equations, and this is a major overhead.
1.3 Thesis statement
Generalized thermal compositional simulation with an equation of state will enable us to model the
full spectrum of thermal recovery mechanisms. Solution of the coupled mass and energy equations
with the molar variables constitutes an invariant set of primary variables. Variable switching is not
required, and the structure of the linearized system is fixed in size and smaller than in the case
of the natural variables formulation. Phase equilibrium routines specifically designed for thermal
simulation can provide robust coupling to the global conservation laws. The reduction method can
reduce the cost of isenthalpic flash and the underlying isothermal flash. The unique properties of
hydrocarbon-water mixtures can be used to reduce the cost of stability testing.
1.4 Objectives
The aim of this research was to design an isenthalpic framework for thermal compositional simulation.
There are four elements of this overarching objective:
1. Design of a stability analysis procedure tailored to hydrocarbon-water mixtures at high tem-
perature.
2. Development of a reduced variables isothermal flash for rapid two- and three-phase flash cal-
culations involving water.
3. Extension of the reduction method to the isenthalpic-isobaric parameter space for rapid isen-
thalpic flash.
4. Implementation of the molar variables formulation for general-purpose, thermodynamically
rigorous thermal simulation.
CHAPTER 1. INTRODUCTION 6
1.5 Dissertation overview
This dissertation is organized as follows. Chapter 2 provides the reader with background information
and a review of the literature in phase equilibrium calculations and thermal compositional simulation.
Chapter 3 discusses uncertainty regarding the number of phases in thermal simulation, and presents a
new approach to phase stability testing for hydrocarbon-water mixtures. In Chapter 4, we introduce
a reduced variables method for three isothermal phase-split calculations. In Chapter 5 we describe
a novel isenthalpic flash formulated with reduced variables, which simultaneously solves for phase
compositions and temperature. Finally, Chapter 6 presents a simulator for thermodynamically
consistent generalized thermal compositional simulation. In Chapter 7 we draw conclusions and
discuss potential extensions to this research.
Chapter 2
Background & Literature Review
This chapter is intended to provide the reader with a grounding in fluid phase equilibrium and
thermal compositional reservoir simulation. We review key developments in the literature, and
identify limitations of existing approaches as they pertain to this research.
Fully compositional thermal simulation is complex, both in practice and in concept. Thermal
recovery is an inherently high-dimensional, multiphysics process. For clarity, we review the literature
in a bottom-up approach. We begin at the most fundamental thermodynamic level by introducing
the basic laws of thermodynamics, and establishing a theoretical basis for phase equilibrium calcu-
lations in reservoir simulation. Next, we ascend to the level of continuum thermodynamics with an
equation of state. We review the key elements of the phase equilibrium kernel within the context
of compositional simulation. We proceed to discuss specific topics in phase equilibrium calculations
relevant to this research, including reduced variables methods, hydrocarbon-water mixtures, and the
isenthalpic flash. Finally, our review extends to the literature on thermal simulation and a discussion
of the interlinked local fluid property calculations and global solution of mass and energy balances.
2.1 Basic principles in thermodynamics
We begin with the first law of thermodynamics, which states that the change in internal energy in
a closed system is equal to the heat energy added to the system and the work done to the system
dU = δQ+ δW. (2.1)
7
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 8
The second law of thermodynamics states that the heat added to a reversible process is
δQ = TdS. (2.2)
Assuming the work done by the system on its surroundings is reversible pressure-volume work, we
obtain
δW = −PdV. (2.3)
Thus, the change in internal energy becomes
dU = TdS − PdV. (2.4)
Eq. 2.4 is known as the fundamental thermodynamic relation. It is derived here for reversible
processes. Nevertheless, the relation also applies to non-reversible changes in a system of uniform
pressure and temperature at constant composition, because U, V and S are thermodynamic state
functions.
2.1.1 Thermodynamic equilibrium
Fluid phase equilibrium requires three key conditions to be met:
1. Equality of chemical potentials,
2. Conservation of mass,
3. Maximization of entropy.
Equality of chemical potentials across each of the phases present is a necessary requirement for
equilibrium in a multicomponent mixture, i.e.
µji = µpi , for all i = 1, 2, ...nc. (2.5)
The chemical potential of a component is related to the Gibbs free energy
µi =∂G
∂ni≡ Gi. (2.6)
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 9
It is cumbersome to work in terms of component chemical potentials. Instead, fugacity f is used as
the variable of choice. Fugacity is related to Gibbs free energy via
dGi = RTd ln fi. (2.7)
The change in Gibbs free energy from one state to another can be written
δGi = RTd ln
(f0ifi
)(2.8)
Fugacity is derived from the Latin word fuga, meaning to escape. The term was first coined by G. N.
Lewis [72]. The fugacity of a component refers to its potential or tendency to escape [17]. Equality
of component fugacities across phases is thus required for thermodynamic equilibrium,
f ji = fpi . (2.9)
Eq. 2.9 is referred to as the isofugacity constraint, and is equivalent to Eq. 2.5. While necessary,
equality of component fugacities across phases is not a sufficient condition for chemical equilibrium
[12].
In thermodynamics of phase equilibria, the law of conservation of mass is manifest in several
constraint relations. Namely,
Nc∑i
zi = 1, (2.10)
and
Np∑j
nji = Ni. (2.11)
The final criterion for fluid phase equilibrium is the second order condition of maximization
of entropy. In the case of an irreversible process, the change in entropy of the system and its
surroundings is positive,
dS = dSsys + dSsurr ≥ 0. (2.12)
However, in the case of a reversible process the change in entropy of the system and its surroundings
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 10
is zero. For an isolated system there is no exchange of heat, work or mass with the surroundings,
the implication of which is dSsurr = 0. The change in system entropy for the isolated system is thus
equal to the total entropy change, which must be positive. If the system is at equilibrium, there can
be no spontaneous change in the system entropy, which implies it must be at its maximum and so
dS ≥ 0. With entropy maximization as our basis, we can take Eq. 2.4 and write
TdS − PdV − dU ≥ 0. (2.13)
Phase equilibrium problems are typically posed at fixed temperature and volume, or fixed tem-
perature and pressure. In the former case, the isothermal-isochoric conditions motivate the use of
Helmholtz free energy as the state variable of choice. By definition, Helmholtz free energy is
A ≡ U − TS. (2.14)
Taking the total derivative of Helmholtz free energy
dA = dU − TdS − SdT. (2.15)
Now, using Eq. 2.16 in Eq. 2.13 yields,
dA+ PdV + SdT ≤ 0. (2.16)
Given a fixed temperature and volume, we have
dA ≤ 0. (2.17)
For isothermal-isochoric processes, equilibrium requires minimization of Helmholtz free energy. In
other words, at fixed temperature and volume, the phase state must constitute the lowest Helmholtz
free energy with respect to all possible changes in phase compositions.
While Helmholtz free energy is often convenient for surface vessel phase equilibrium calculations,
reservoir simulation always uses pressure as the specified state variable. Gibbs free energy becomes
the thermodynamic state function of choice. By definition, Gibbs free energy is
G ≡ U + PV − TS. (2.18)
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 11
The total derivative of Gibbs free energy is
dG = dU + PdV + V dP − TdS − SdT. (2.19)
Combining Eq. 2.19 and Eq. 2.13 yields
dG− V dP + SdT ≤ 0. (2.20)
Given a constant temperature and pressure, we have
dG ≤ 0. (2.21)
Compositional reservoir simulation using an Equation of State (EOS) seeks the equilibrium phase
state corresponding to the lowest Gibbs free energy. At fixed pressure and temperature, the state of
the system must correspond to the lowest Gibbs free energy with respect to all possible changes in
phase compositions.
In this dissertation we solve the isenthalpic-isobaric flash, in which enthalpy and pressure are
specified. By definition, enthalpy is
H ≡ G+ TS. (2.22)
The total derivative of enthalpy is
dH = dU + PdV + V dP. (2.23)
Combining Eq. 2.23 and Eq. 2.13 yields
dH − V dP − TdS ≤ 0
dS − 1
T(V dP + dH) ≥ 0 (2.24)
At fixed pressure and enthalpy, we have
dS ≥ 0 (2.25)
So for isenthalpic-isobaric conditions, the phase state must constitute the maximum entropy with
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 12
respect to all possible changes in phase compositions and system temperature.
2.2 Isothermal phase equilibrium calculations
The phase equilibrium problem addresses two uncertainties: (i) How many phases are present; (ii)
the composition and amount of each phase present. One of the key challenges in phase equilibrium
calculations is that the number of phases at thermodynamic equilibrium is unknown a priori. There
are two broad approaches to addressing this problem:
I. Preallocate the number of phases, and proceed directly to the phase split calculation
II. Perform stability testing and phase equilibrium calculations in a step-wise procedure
Both of these approaches are used widely in reservoir simulation. The first approach can be advan-
tageous if assumptions can be made as to the phase state based on information at previous time
steps or based on the distinctive behavior of the mixture. If an unphysical solution is obtained
the number of phases can be decreased until a physical solution is found. However, this can be a
precarious procedure. It may suffer from poor initial estimates of equilibrium ratios and be par-
ticularly problematic when phase changes are abrupt and frequently occurring, as in the case of
thermal reservoir simulation. The alternative approach (stepwise stability analysis integrated with
phase split calculations) provides confidence as to the number of phases, as well as providing good
initial estimates for phase-split calculations. In addition, this approach is necessary for initialization
of compositional reservoir simulation models, when knowledge of the phase state from previous time
steps is unavailable. In the case of hydrocarbon-water mixtures, the ubiquitous aqueous phase often
motivates the use of the first method. However, in thermal simulation water may be present in
several phases and stability analysis is the more prudent approach.
2.2.1 Phase stability analysis
Phase stability analysis has largely been developed in an isothermal-isobaric context. The Gibbs free
energy of a mixing surface is used as the basis for stability test calculations. Stability analysis seeks
a lower Gibbs free energy state through the addition of a new phase to the system. The overarching
theme is one of Gibbs free energy minimization at equilibrium, in accordance with Eq. 2.21.
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 13
Theoretical and mathematical development
We begin with the concept of tangent plane distance (TPD), which was introduced by Baker et
al. [12]. For the isothermal-isobaric problem, the number and composition of phases at equilibrium
corresponds to the minimum Gibbs free energy. Instability of a test phase, z, is indicated by a
negative tangent plane distance:
TPD(yi) =
Nc∑i=1
yi
(ln φi(yi) + ln yi − ln φi(zi)− ln zi
), (2.26)
where φi refers to the fugacity coefficient of component i. Fugacity coefficient is a measure of non-
ideality, and is defined as the ratio of fugacity to its value at the ideal state φi = fi/(yiP ). Note
that y is the vector of mole fractions of a trial phase emanating from the test phase. The tangent
plane distance is based upon the introduction of an infinitesimal quantity of this new trial phase.
Michelsen [83] showed that the necessary and sufficient condition for determining phase stability is:
F (y) =
Nc∑i=1
yi (µi(y)− µi(z)) ≥ 0 (2.27)
where F (y) is the distance between the Gibbs free energy of a mixing surface, ∆Gm(y), and the
tangent-plane (or hyper-plane) at the test (or feed) composition z, ∆GTm(z):
F (y) = ∆Gm(y)−∆GTm(z) (2.28)
We refer to F (y) as the TPD function. Baker [12] introduced the TPD criterion to detect phase
instability and illustrated this for simple binary systems. If the inequality in Eq. 2.27 holds for
F (y) then it holds for all y. Stability analysis rests on the premise that if all stationary points of
the TPD function are located, the global minimum will be located. In practice, this is very difficult
because the Gibbs free energy surface is inherently non-convex and practical solution methods are
locally convergent. The stationary condition is obtained by differentiating with respect to the Nc−1
independent mole fractions:
µi(y)− µi(z) = K (2.29)
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 14
Working in terms of fugacity coefficients, the criterion is given by
TPD = ln φi(yi) + ln yi − ln φi(zi)− ln zi. (2.30)
The stationary criterion is
ln φi(yi) + ln yi − ln φi(zi)− ln zi = 0. (2.31)
Michelsen [83] introduced a new set of primary variables, Yi = yi × exp(µi(z) − µi(y)) (µ the
chemical potential). The new independent variables Yi, are formally mole numbers, with the corre-
sponding mole fractions given by yi = Yi/∑j Yj . The stationary condition can be written as
ln(Yi) + ln φi(Yi)− ln φi(zi)− ln zi = 0. (2.32)
Stationary points correspond to solutions of Eq. 2.32. Stability is verified, provided that at all sta-
tionary points TPD ≥ 0, which is equivalently,∑Nci Yi ≤ 1. Michelsen [83] suggested an equivalent,
unconstrained version of the minimization problem as follows:
TPD∗(Yi) = 1 +
Nc∑i=1
Yi
(ln φi(Yi) + lnYi − ln φi(zi)− ln zi − 1
). (2.33)
Here, Yi > 0 is the only restriction. The same stationary points with the same sign are identified
with TPD and TPD∗.
Solution strategy
Stability analysis is always performed as a test for instability of a single phase, regardless of the
number of phases present. Multiphase stability analysis is performed through a stepwise approach
of a single phase stability test, followed by two-phase flash, followed by single-phase stability testing
of one of the two equilibrium phases. The two-phase stability test is thermodynamically equivalent
to single-phase stability testing.
Stability analysis calculations are performed either by locating stationary points of the TPD
function [83], or by attempting to locate the global minimum of the TPD function [147]. The first
approach simply locates stationary points and tests the TPD criterion. Any negative TPD value
indicates phase instability. The second approach also uses the TPD criterion, although does so by
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 15
minimizing the TPD function in composition space subject to the material balance constraint
Nc∑i
yi = 1 (2.34)
where yi ≥ 0. If the global minimum of the TPD function is negative, then the phase is unstable.
Otherwise it is stable. In practice, both methods often converge to a trivial solution.
Stability analysis is, at face value, easier than phase-split calculations because the stability test
calculation solves only for the composition of the trial phase. Material balance constraints pertaining
to phase amounts do not apply, unlike in phase-split calculations. However, in practice it is difficult
to converge to all stationary points of the TPD function and hence to locate its global minimum.
If follows that detection of phase instability is not guaranteed when using minimization or the
stationary point method. For this reason, existing phase-stability methods require multiple initial
estimates.
The common approach in two-phase compositional simulation is to obtain initial estimates for
the trial phase composition using the Wilson correlation and its inverse. In three-phase systems,
standard approaches use initial guesses for the K-values based on the Wilson correlation, the inverse-
Wilson correlation, several guesses in between and each pure component in the mixture. In the
case of Nc components, Li and Firoozabadi [77] suggest using Nc + 4 phase-stability tests to fully
determine the number and identity of the fluid phases. In the case of hydrocarbon-water mixtures,
it is possible to reduce the number of initial guesses required, owing to the fact that these systems
are characterized by immiscibility. This is often done using just three guesses, corresponding to the
heaviest component, the ideal gas and a correlation for water solubility in the hydrocarbon phase
[36, 111]. A recently developed algorithm for hydrocarbon-water mixtures used nested two-phase
flash calculations and stability tests, including an LV stability test assuming no water was present
in the system [130]. However, this method used Henry’s Law and was concerned specifically with
CO2 rich systems at moderate temperatures.
In compositional reservoir simulation, phase equilibrium computations are performed across many
thousands of grid blocks at each time step, and (in some formulations) at each iteration. Stability
analysis becomes a significant computational burden, particularly for multiphase systems. In this
research we use the characteristic behavior of hydrocarbon water mixtures to develop an efficient
and reliable strategy for phase stability testing across a range of pressures and temperatures.
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 16
2.2.2 Isothermal-isobaric phase-split calculations
The phase-split calculation answers the second key question in the study of phase equilibrium: What
are the compositions and amounts of the phases present?
Mathematical basis
The phase-split calculation must satisfy the aforementioned first-order conditions of isofugacity and
conservation of mass, as well as the second-order condition of Gibbs free energy minimization. For
brevity, we exclude the development of the two-phase split problem here and focus on the three-phase
system. For a three-phase hydrocarbon-water system, the isofugacity constraints are expressed as:
fVi − fLi = 0, (2.35)
fWi − fLi = 0. (2.36)
The equality of component fugacities is often expressed using the logarithm of the equilibrium
ratios and phase fugacity coefficients [52]:
lnKVi = ln φ(xi)− ln φ(yi), (2.37)
lnKWi = ln φ(xi)− ln φ(wi). (2.38)
Rearranging these equations yields the definition of the equilibrium ratios (K-values) in terms of
fugacity coefficients:
KVi =
φ(xi)
φ(yi), (2.39)
KWi =
φ(xi)
φ(wi). (2.40)
The fugacity coefficients are computed as a function of pressure, temperature and composition,
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 17
using the cubic EOS. In addition to the isofugacity constraints, the component material balance
constraints must be satisfied. Mole balance constraints are easily expressed in terms of the Rachford-
Rice objective functions [122]:
Nc∑i
zi(KVi − 1)
1 + V (KVi − 1) +W (KW
i − 1)= 0, (2.41)
Nc∑i
zi(KWi − 1)
1 + V (KVi − 1) +W (KW
i − 1)= 0. (2.42)
where zi is the mole fraction of component i in the feed composition, and V and W are the mole
fractions of the vapor and aqueous phases, respectively. Here we take the oleic (liquid hydrocarbon)
phase as the reference phase. Eqs. 2.41 and 2.42 yield phase amounts upon convergence. Component
mole fractions of the reference oleic phase are then computed as a function of the phase equilibrium
ratios and phase amounts:
xi =zi
1 + V (KVi − 1) +W (KW
i − 1). (2.43)
Compositions of the remaining phases are subsequently found through connection to the reference
phase by way of the relevant equilibrium ratios:
yi = KVi xi, (2.44)
wi = KWi xi. (2.45)
Solution of Eq. 2.41 and Eq. 2.42 is commonly referred to as a constant-K-value flash [101].
Solution of the two-phase RR equation is relatively straightforward. However, solving the pair of
coupled RR equations in three-phase flash calculations can be challenging, owing to the nonlinearity
of the objective functions. This inherent nonlinearity can lead to divergence of Newton’s method.
Solution of the three-phase RR equations is the subject of several papers in the literature. Leibovici
and Neoschil [71] adjusted the step length in each Newton iteration. Yan and Stenby [169] used
higher order methods to solve the Rachford-Rice equations. Haugen, Li and Firoozabadi [52] and Li
and Firoozabadi [77] developed two-dimensional bisection methods. Okuno et al. [102] developed a
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 18
robust approach by recasting the RR equations into an optimization problem in which a line search
algorithm solves a convex objective function. Estimation of phase amounts was obtained via traversal
of the convex polyhedron formed by the K-value linear constraint equations. A rapid and robust
RR solver is an essential kernel of any multiphase flash package, which almost invariably requires
successive substitution iteration when the initial guess is far from the solution. We now review the
numerical solution of phase-split calculations, in addition to stability analysis calculations.
2.2.3 Numerical solution of phase equilibrium calculations
Numerical solution of both stability testing and flash calculations usually requires a sequential im-
plementation of algorithms, wherein successive substitution (SS) is paired with a more rapidly con-
vergent Newton or minimization method. Both stability testing and flash calculations are initiated
through SS iteration because this enables a rapid reduction in the magnitude of the residual norm at
the beginning of the calculation when the starting point is generally far away from the solution [84].
The SS iterations always advance the result in the direction of the solution. However, SS becomes
slow when the iteration is close to the solution. Newtons method is then typically used. The New-
ton method generally converges rapidly to the solution, albeit with the caveat of a limited radius of
convergence. The starting point must be sufficiently close to the solution or the Newton solver will
diverge. Combination of SS and Newton leverages the relative advantages of each method.
The combined SS-Newton algorithm first uses SS before switching to Newton. The sequential
protocol is generally very efficient, and rapidly converges to the solution in the vast majority of
cases. However, the SS-Newton algorithm encounters difficulties when applied to both stability
testing and flash calculations. In the case of stability testing, problems occur along the stability test
limit locus (STLL) where the tangent plane distance (TPD) is discontinuous [57] and a saddle point
is encountered [98]. In the solution of multi-phase flash calculations, an infeasible set of K-values
will cause failure of the SS iteration in the solution of the Rachford-Rice equations (Eqs. 2.41 and
2.42). In addition, convergence of the phase-split becomes difficult in the near critical region. The
SS-Newton method becomes extremely slow when used in these challenging scenarios. If the switch
from SS to Newtons method occurs too early, the Newton solver fails and the algorithm must return
to advancing the solution using SS iterations. In some cases, back-and-forth SS-Newton switches
occur repeatedly and a large number of SS iterations are required before Newton‘s method is feasible.
Several authors have proposed global Newton optimization methods for phase equilibrium cal-
culations. The algorithms used fall into two broad families: (i) Line-search (LS); (ii) trust-region
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 19
(TR). Efficient implementation of these algorithms in stability or flash algorithms is not straightfor-
ward. Aside from algorithm complexity, there are questions of efficiency, owing to the overhead of
these methods. The SS-Newton algorithm is far more appropriate when applicable for both stability
testing and flash calculations.
Global minimization algorithms include simulated annealing and generic algorithms. These
derivative-free methods find the global minimum of the underlying function. The advantage of
the algorithms is location of the global minimum of the TPD function in stability testing or the
minimum Gibbs free energy in the case of multiphase flash calculations. Pan and Firoozabadi
[108] used simulated annealing for stability testing and three-phase flash calculations. McKinnon
and Mongeau [81] adopted the generic algorithm for calculation of chemical and phase equilibrium.
However, derivative-free global optimization methods are prohibitively slow and thus impractical for
use in reservoir simulation. Nevertheless, derivative-free methods can be useful to verify the results
from the locally convergent algorithms discussed in this research.
A review of numerical methods in phase equilibrium calculations would be incomplete without
discussion of Quasi-Newton methods, which have found widespread application in the EOS kernels
of reservoir simulators. Quasi-Newton algorithms represent an alternative to full Newton methods,
exhibiting super-linear performance in both stability testing and multiphase flash calculations [94,
95, 30, 57, 77, 100]. Nevertheless, for the most difficult stability testing and flash problems the
performance of quasi-Newton formulations is inadequate, with failure to converge in the critical
region observed after thousands of iterations [57].
In the case of phase-split calculations, the choice of numerical method is influenced by the
selection of independent variables. Popular choices are component mole numbers, equilibrium ratios
and the logarithm of equilibrium ratios. When the K-values or the natural logarithm of the K-values
are used, the nonlinear equations are solved via Newton‘s method. In this case, phase amounts may
be decoupled from the other primary variables, or solved using a common Jacobian matrix. In the
case of component mole numbers, the nonlinear equations may be solved via the Newton method
or the problem may be formulated for minimization of Gibbs free energy [147]. The logarithm of
K-values is often preferred for two reasons [52]: (i) Mole fractions may create an ill-defined Jacobian
close to the phase boundaries; (ii) The natural logarithm stabilizes the Newton method when the
equilibrium ratios span several orders of magnitude. Each of the aforementioned sets of variables
constitute conventional iteration parameters; that is, parameters derived from physical quantities of
component concentrations or ratios of concentrations across phases. An alternative approach involves
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 20
a set of independent variables derived from the constituent parameters of the cubic equation of state.
2.2.4 Reduced variables in phase equilibrium calculations
Quantification of phase behavior can be particularly arduous in reservoir simulation at industrial-
scale, especially for fluid systems exhibiting three-phase behavior. One potential solution is the use
of reduced order models for phase equilibrium calculations. Reduced order models (herein referred
to as reduced variables methods) involve recasting an underlying problem using an alternate, often
smaller, set of independent variables. The underlying problem is then solved on a reduced manifold,
rather than in the full-dimensional parameter space. A wide variety of phase equilibrium problems
are amenable to a reduced approach. Applications to date include phase-split calculations, stability
analysis [43], the location of critical points [89] and the delineation of phase boundaries [97].
The reduced variables were first proposed for flash calculations in which all binary interaction
parameters (BIPs) are zero [85]. In the particular case of all zero BIPs phase equilibrium problems
can be solved using only three independent variables with the conventional Van Der Waals mixing
rules. The motivation for a reduced set of parameters begins with the expression for fugacity
coefficient of a component i,
lnφi =BiB
(Z − 1)− ln (Z −B)−(∑
j xjAij√B
− ABi
2√
2BB
)ln
[Z +B
(1 +√
2)
Z +B(1−√
2)] . (2.46)
Equality of chemical potentials holds at phase equilibrium, which equates to equality of component
fugacities across phases. In the particular case of all-zero BIPs the expression for the energetic
parameter A simplifies:
A =
Nc∑i
Nc∑j
xixj√AiAj (1− σi,j) , (2.47)
A =
(Nc∑i
xi√Ai
)2
. (2.48)
In a cubic equation of state fugacity is a function of the energetic and co-volume terms. The
simplified energetic term in Eq. 2.48 is a scalar expression. Michelsen [85] used this scalar expression
for the energetic parameter as an independent variable, in addition to the co-volume term and phase
mole fraction. In total, with the simplifying assumption of zero BIPs, there are three equations in
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 21
three unknowns:
∑i
(yi − xi) = 0, (2.49)
∑i
(xi√Ai
)−√A = 0, (2.50)
∑i
(xibi)−B = 0. (2.51)
Jensen and Fredenslund [64] later extended Michelsen’s method for the case in which one compo-
nent has nonzero binary interactions with the other components. The reduced variable formulation,
involving simplified mixing rules, enabled solution of phase-split calculations using only 5 indepen-
dent variables. Pioneering efforts in the use of reduced variables were limited in applicability because
of the omission of binary interaction parameters. In most reservoir fluid phase equilibria problems
of interest the binary interaction parameters are nonzero, and contribute significantly to the phase
behavior characteristics of the system.
A generalized eigenvalue method was introduced by Hendriks [56]. The concept involves retaining
only the dominant eigenvalues, based on a spectral decomposition of the BIP matrix. The approach
was later applied to flash computations using Newton’s method [55]. Variations of the generalized
reduced variables have since been used by several researchers for phase-split calculations [109, 99].
The advantage of the generalized dominant eigenvalue formulation is that an arbitrary number of
binary interaction parameters are accommodated. We provide a full description of the theory of the
reduction method in Chapter 4, including a derivation of the generalized reduced variables.
Recently, several comparison studies have been made between reduced variables methods and the
conventional method for flash calculations [51, 82, 47, 118]. Michelsen et al. [82] astutely observe that
performance is highly implementation dependent, and an objective comparison is further complicated
by the fact that some reduced variables formulations solve the problem using a reduced basis, thereby
solving what is a different problem from the outset.
Comparison studies notwithstanding, solution of phase equilibrium problems on a reduced man-
ifold carries advantages over conventional methods. Reduced methods yield a system of linearized
equations which scales with the rank of the BIP matrix, rather than with the number of compo-
nents. In addition, order reduction acts as a low-pass filter on the high-dimensional problem. Most
significantly for this research, the reduced basis is intrinsically full-rank. In the case of conventional
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 22
variables, numerical difficulties arise in the fully coupled solution of hydrocarbon-water flash calcula-
tions because fugacity derivatives involving trace concentrations lead to degeneracy of the Jacobian
matrix. On the other hand, reduced variables enable the use of Newton’s method without tedious
accounting for trace components.
The use of reduced variables formulations in phase equilibrium calculations has been restricted
almost exclusively to hydrocarbon mixtures. Mohebbinia et al. [91] used a reduced method to
perform four phase flash calculations, accounting for CO2 solubility in water. To date, this is the
only published study on the use of a reduced variables method for hydrocarbon-water systems.
However, Mohebbinia et al. [91] performed phase equilibrium calculations in an isothermal setting,
without allowing for all components to exist in all phases. In addition, the foundational mixing
rules used in the equation of state were modified. Use of reduced variables has not been studied for
hydrocarbon-water mixtures in which trace components appear or for high temperature settings in
which steam appears. Despite the ubiquity of reduced formulations, there is only one implementation
of a two-phase reduced variables method in a commercial reservoir simulator [129, 136].
2.2.5 Phase behavior of hydrocarbon-water mixtures in thermal simula-
tion
Phase behavior in thermal EOR processes is complicated by phenomena uncommon in isothermal
reservoir processes. Thermal recovery of heavy oils may involve precipitation of waxes or asphaltenes.
Characterization of heavy oils may be difficult due to the large fraction of complex heavy components.
However, the fluid phase behavior that is of most relevance in thermal simulation is that which is
controlled by water at high temperatures.
In reservoir simulation, the cubic EOS of choice is typically the Peng-Robinson (PR) EOS
[115, 126] or Soave-Redlich-Kwong (SRK) EOS [142]. Cubic EOS phase equilibrium computations
are well-developed for nonpolar hydrocarbon mixtures. However, representation of hydrocarbon-
water mixtures using an EOS remains challenging due to the polarity of the water molecule. The
strong hydrogen-bonding gives rise to distinctive, non-ideal behavior. Several authors have focused
on modifications to cubic EOS models for improved representation of hydrocarbon-water systems
[35, 168]. In order of increasing complexity, these modifications include the use of dual sets of bi-
nary interaction coefficients, asymmetric mixing rules, and cubic-plus equations of state. Changes
to the underlying cubic EOS provide for more accurate representation of phase behavior, and have
found some limited application in research compositional simulators [93]. However, in practice they
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 23
are seldom implemented in commercial reservoir simulation models. Separate sets of interaction
coefficients can be used without the need for additional parameters in the EOS [42]. Asymmetric
mixing rules require dual sets of binary interaction parameters, and typically introduce a different
temperature dependent energetic term for the aqueous phase [116, 127, 143]. However, different sets
of temperature dependent interaction parameters for different phases is thermodynamically inconsis-
tent [127]. The cubic-plus models greatly increase the complexity of the underlying EOS, owing to
the association term used to describe the aggregation of water molecules due to hydrogen bonding.
The cubic-plus models use higher order polynomials to express the compressibility factor, which is
comprised of physical interaction and chemical association terms [76, 138, 137]. The resulting so-
lution of the EOS becomes arduous, and prohibitively expensive for large scale reservoir simulation
models.
Additional complexities arise on account of hydrocarbon-water interactions at high temperature,
including narrow boiling point behavior and negative compressibility. We discuss the challenges and
implications of these phenomena in Section 2.3 and Section 2.4.
2.3 Isenthalpic flash
Thermal simulation in which enthalpy is a principal unknown necessitates isenthalpic flash. Pro-
cedures for isenthalpic flash are significantly slower and more complex than for isothermal flash.
Temperature is unknown a priori, the implication of which is uncertainty regarding the number and
identity of equilibrium phases. There are three broad strategies for isenthalpic phase-split calcula-
tions:
1. Perform a series of nested isothermal flash calculations, with temperature updated in an outer
loop.
2. Direct substitution, assuming ideality.
3. Newton methods, formulated either for the solution of nonlinear equations or for entropy
maximization.
A discussion of each approach is provided herein.
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 24
2.3.1 Nested isothermal flash
One of the most rudimentary isenthalpic flash algorithms involves solution of a series of isothermal
flash calculations and subsequent temperature updates. This is commonly achieved via bisection or
the regula falsi method. The regula falsi (false position) method attempts to solve the isenthalpic
phase-split by seeking solution of the isothermal flash problem at a test or ‘false’ temperature. Each
iterate prior to convergence is a converged isothermal phase-split, only at an incorrect temperature.
Regula falsi brackets the solution, much like bisection. Linearity of the underlying function is
assumed. There have been several proposed improvements to the regular falsi method, which enable
superlinear convergence. Two particular versions that have been used extensively are the Anderson
and Bjork implementation and the Illinois algorithm [34, 7]. These improved methods down-weight
the endpoints of the bracketed interval, thereby modifying the selection of the next false position.
The weighting is guided by the relative size of the residual at each of the endpoints. This amounts to
a weighted estimate for the subsequent guess. Improvements to regula falsi do not perform well when
multiple roots exist in the underlying function [44]. However, the relationship between temperature
and enthalpy is monotonic at fixed pressure and overall mixture composition. In all but the most
extreme cases there exists a single root of the enthalpy constraint in enthalpy-temperature space,
making solution of the isenthalpic flash possible via regula falsi.
Solution of the isenthalpic flash via a series of isothermal flash calculations was investigated by
Agarwal et al. [6]. The isothermal flash calculations were nested in an inner loop while temperature
was updated through solution of the energy equation using a secant method. The regula falsi method
was used as a back up. Decoupling the energy equation is a valid approach, except in the limiting
case of a single degree of freedom. A single degree of freedom in the Gibbs phase rule precludes
solution via any method that decouples the enthalpy constraint, as enthalpy is multivalued at a
given temperature. Isenthalpic problems with a single degree of freedom constitute narrow boiling
point behavior in its most pure form. Narrow boiling point behavior refers to situations in which
mixture enthalpy is sensitive to temperature [179].
Whitson and Michelsen [163] originally suggested that negative flash could be used for decoupled
isenthalpic flash algorithms by yielding continuous derivatives for enthalpy at phase boundaries.
Heidari et al. [54] developed an isenthalpic flash procedure that circumvents the need for stability
analysis. A modified Rachford-Rice objective function and the negative flash algorithm were used
for phase distribution and phase identification. The negative flash procedure of Lapene et al. [69]
was used, which assumes water is the only component present in the aqueous phase. Recently, Li and
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 25
Li [74] proposed an isenthalpic flash algorithm in which a free-water isothermal flash is performed
in an inner loop, and a secant method is used to update temperature.
2.3.2 Direct substitution
Nested isothermal flash with a decoupled temperature solution is slow and impractical for large
scale reservoir simulation. The most common solution to isenthalpic flash in reservoir simulation is
the direct substitution (DS) algorithm, originally proposed by Michelsen [86]. Direct substitution
is analogous to successive substitution, which is used extensively in isothermal phase-split calcula-
tions. In successive substitution, the solution of phase amounts is decoupled from the solution of
phase compositions. The Rachford-Rice objective functions are solved to update phase amounts,
and phase equilibrium ratios are subsequently updated. The implicit assumption of successive sub-
stitution is ideal behavior in the fluid phases; an assumption shared by direct substitution [86]. The
DS algorithm requires the solution of a set of nonlinear equations consisting of the Rachford-Rice
equations coupled with the enthalpy constraint ( Eq. 1.1). For a three-phase system the Rachford-
Rice equations are given by Eqs. 2.41 and 2.42. For a system consisting of Np phases, the Rachford
Rice equations may be written in generalized form as
gj =
Nc∑i
zi
(Kji − 1
)1 +
[∑Np−1j βj
(Kji − 1
)] . (2.52)
In direct substitution the Np − 1 independent phase amounts are aligned with the Rachford-Rice
equations in Eq. 2.52 and temperature is aligned with Eq. 1.1. The solution of the Np equations is
attained via the Newton method
gβ gT
Hβ HT
∆β
∆T
= −
g
(H −Hspec)/R
. (2.53)
Direct substitution assumes that fugacity coefficients depend only upon temperature. Following
solution of the system in Eq. 2.53, phase equilibrium ratios are updated via
lnKj,ni = lnKj,n−1
i +∂ lnKj
i
∂T∆T (2.54)
Michelsen [86] noted that the majority of two phase problems and many multiphase problems
could be readily solved using direct substitution accelerated by means of the General Dominant
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 26
Eigenvalue Method (GDEM) [33]. He observed quadratic convergence for ideal mixtures and linear
convergence for non-ideal mixtures. Argawal [6] extended the DS algorithm, and proposed bounding
temperature by performing several iterations of a nested isothermal flash algorithm, followed by an
iteration of the DS method. The DS algorithm was observed to oscillate in the case of a single-phase
fluid near a two-phase boundary or a two-phase fluid near a three-phase boundary. Michelsen [86]
used strong oscillations in temperature to identify the need for a phase-split. He suggested splitting
a phase into two phases of initially equal amount and composition. Selection of the compressibility
factor (Z-factor) is complicated in this scenario; the high density root of the compressibility equation
is selected for one phase and the low density root is selected for the other phase. This differs from
the isothermal phase-split, in which the lower Gibbs free energy root is always selected.
The DS algorithm suffers from several shortcomings. Michelsen [86] noted that the DS algorithm
was not well suited to near-critical mixtures or those consisting of multiple liquid phases that are not
strictly immiscible. In addition, convergence is only linear for non-ideal mixtures. Most significantly,
narrow boiling point fluids lead to a degenerate system of equations in the coupled solution of
temperature and independent phase mole fractions via Eq. 2.53 [179]. This is attributable to the
differing levels of non-linearity exhibited by the material balance and enthalpy equations with respect
to the iteration variables in temperature space. Recently, Zhu and Okuno [178, 180, 181] developed
a more robust DS algorithm that addresses the issue of degeneracy. The improved DS algorithm
detects narrow boiling point behavior via reference to the condition number of the DS Jacobian
matrix. A condition number of 106 is used as a criterion to decouple temperature from the other
variables, and solve the isenthalpic flash using a bisection algorithm. Although it is an excellent
means of bounding the solution, the linearly convergent bisection algorithm is infeasible for large
scale simulation because convergence to a tight tolerance is very slow. The molar variables requires
the solution of phase-split calculations to a very tight tolerance.
2.3.3 Newton methods
Newton’s method offers the possibility of rapid convergence, by solving the isenthalpic phase-split as
a fully coupled problem. In marked contrast to the DS algorithm, a fully coupled Newton approach
does not assume compositional independence of fugacity. The key drawback of Newton’s method is
that convergence cannot be guaranteed from arbitrary initial estimates. However, this limitation may
be addressed by formulating the isenthalpic flash as a minimization problem. For a closed isothermal-
isobaric system, the total Gibbs free energy is minimized at equilibrium. In an isobaric-isenthalpic
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 27
system, minimization of Gibbs free energy is not the indication for thermodynamic equilibrium.
The condition of thermodynamic equilibrium becomes one of entropy maximization, subject to the
enthalpy constraint (Eq. 1.1), as described by Eq. 2.25. The primary advantage a minimization
formulation is that the value of the objective function can be used to assess progress during the
course of the iterative solution [86]. In the familiar isothermal phase-split, component mole numbers
are typically used as independent variables and the problem is an unconstrained minimization of
Gibbs free energy. In contrast, the isenthalpic phase-split is a constrained minimization problem.
The constraint must be satisfied to evaluate the objective function.
Saville and Szcepanski [133] were amongst the first to formulate the isenthalpic phase-split as a
minimization problem. Using variable metric projection, a series of quadratic approximations to the
underlying objective function are constructed and used to step toward the minimum. Composition
and temperature derivatives of the objective and constraint functions are required for the variable
metric projection, which amounts to a quasi-Newton method. The authors noted major scaling
problems attributable to the mixed-type of the gradients and variables in the formulation of the
isenthalpic flash. Re-scaling of constitutive functions and variables yielded an order of magnitude
improvement in convergence [133].
Michelsen [86] proposed solving the isenthalpic phase-split via minimization of a modified nega-
tive entropy function. He transformed the constrained minimization problem into an unconstrained
minimization problem by augmenting the objective function min -S subject to the constraint in Eq.
1.1 [86, 112, 113]
Q = −S +H −Hspec
T. (2.55)
A stationary point of the augmented function Q satisfies both the enthalpy constraint and the iso-
fugacity constraint, which is required for thermodynamic equilibrium. However, Q is not a minimum
at the stationary point, as the Hessian is not positive definite:
∂Q
∂T stationary=
2
T 3(H −Hspec)−
CpT 2
= − CpT 2
< 0. (2.56)
Michelsen used a second order penalty function to impose positive-definiteness.
Brantferger [13] introduced a generalized reduced gradient method to eliminate the linear equality
constraints and enforce the enthalpy constraint. Nonlinearity of the constraint made it difficult to
ensure robust entropy maximization. Michelsen [88] developed an objective function for which the
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 28
solution existed at a saddle point of the problem. However, it was known to fail in the case narrow-
boiling point behavior.
Sun et al. [144] recently presented a new algorithm for entropy maximization. Individual phase
enthalpies were used as independent variables, along with phase mole numbers nij . Temperature was
taken as a dependent variable and different temperatures were permitted for different phases. The
isenthalpic flash algorithm was tested on a series of fluids, none of which contained water. An earlier
paper noted that the implementation was not applicable to systems in which water partitioned into
the vapor phase [19].
2.3.4 Narrow boiling point behavior in isenthalpic flash
Narrow boiling point is the most challenging issue in isenthalpic flash calculations of practical inter-
est, and warrants some discussion. Broadly defined, a narrow boiling point fluid exhibits significant
enthalpy sensitivity to temperature [86, 6, 178]. Marked sensitivity of enthalpy to temperature may
be associated with transitions or manifest within a given phase state, far from phase boundaries.
It is of particular importance in thermal reservoir simulation, because water is the protagonist in
this context. Water is by far the dominant component on a molar basis [6]. Argawal et al. [6]
noted several examples of narrow boiling point behavior. The quintessential example is when water
is present as a single component, in both the steam and aqueous state. Another pure example is a
two-component mixture present in a three phase state. In these specific cases the number of phases
exceeds the number of components, Np = Nc + 1. Via the Gibbs Phase rule [46], there is only a
single degree of thermodynamic freedom remaining in the specification of intensive variables:
F = Nc −Np + 2 (2.57)
Intensive variables such as temperature and pressure become dependent in the limiting case of a
single degree of freedom. Enthalpy, on the other hand, is an extensive variable. Thus, in the case of
pure narrow-boiling point behavior, temperature is invariant and enthalpy is multivalued. Ostensibly,
a single degree of freedom is unlikely to manifest in compositional reservoir simulation, as the large
number of components present in reservoir oil afford the system additional degrees of thermodynamic
freedom. However, even complex multicomponent mixtures exhibit narrow boiling point behavior,
owing to near pure-component behavior of complex mixtures. For instance, a heavy oil composed
almost entirely of non-distillable components acts as a single component in the reservoir. In steam
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 29
EOR of a heavy crude oil, the steam-water-oil system is essentially a two-component mixture that
exhibits three-phase behavior. Zhu and Okuno provide a rigorous analysis of narrow boiling point
behavior [179, 181].
2.4 Thermal compositional simulation
The preceding discussion addressed local thermodynamic constraints encountered in compositional
and thermal compositional simulation. We now focus on the solution of the mass and energy con-
servation laws at the global level. We begin with a review of the literature on thermal simulation
before discussing alternate compositional formulations. We then review the limited work on thermal
compositional simulation. Finally, we discuss some of the nonlinearities in reservoir simulation, in
the context of this research. In the interests of brevity this chapter discusses the literature at the
conceptual level. The governing equations for thermal compositional simulation are presented in
Chapter 6.
2.4.1 Geothermal reservoir simulation
A review of the literature on thermal simulation must include a discussion of geothermal simulation.
Several of the challenges encountered in thermal simulation are embodied in the single-component
geothermal problem. Early development of geothermal simulators focused on single-phase systems.
One of the first two-phase models was developed by Toronyi and Farouq Ali [146]. This fully implicit
model used saturation and pressure as primary variables, which limits applicability to the two-phase
region. Throughput ratios were used to gauge the stability of the model. Lower dimensionless
throughput was observed at higher liquid saturations. Coats used pressure and either temperature or
saturation as principal unknowns. Steam-flashing in the vicinity of production wells was observed to
be a major restriction on time step size. Coats points out that the energy balance is often erroneously
written as (net flow rate of internal energy into the grid block = rate of gain of internal energy in
the grid block)[22]. In other words, the pressure-work term is ignored when using internal energy in
place of enthalpy. Garg and Pritchett showed that the pressure-work term in the energy equation
is often negligible in single-phase liquid and two-phase geothermal reservoirs[45]. They argued that
viscous dissipation is at least as important as pressure-work in single-phase steam reservoirs, and
inclusion of one of these terms necessitates the inclusion of the other. Garg and Pritchett used fluid
density and internal energy as principal unknowns [15]. This is a persistent set of primary variables.
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 30
Pressure and enthalpy have also been used as primary variables in geothermal reservoir simulation
by several authors [59, 40]. Faust and Mercer provide extensive details of this approach, in which
saturation becomes a function of enthalpy and density [39]. Pinder provides an excellent overview
of these early models [119]. The Stanford Code Comparison study compared many of these early
simulators across a series of one and two-phase test problems. The models were found to give quite
similar results [92, 106].
Geothermal simulators have been developed in parallel to the reservoir simulators developed in
the oil industry. Geothermal reservoir simulation has since advanced to incorporate multicomponent
systems, fractured reservoirs and complex geology. In particular, advanced capability of geothermal
simulators is important for studies of enhanced geothermal systems (EGS). Simulators commonly
used for geothermal reservoir simulation include TOUGH2 and TETRAD [139, 121]. O’Sullivan et
al. [105] provide a good overview of the advances in geothermal reservoir simulation. In spite of the
advances in geothermal simulation, there are still difficulties associated with phase transitions.
Wong [166] recently developed a fully implicit geothermal simulator. Partial derivatives were
generated using automatic differentiation. Geothermal simulation involves long polynomial expres-
sions of steam table functions, which may present a source of human error when partial derivatives
are taken by hand. Wong [166] used both a pressure-saturation-temperature formulation [22], and
a pressure-enthalpy formulation [39]. A comparison of nonlinear performance with the alternate
formulations showed superior performance of the natural variables for single-cell problems [167].
However, superior nonlinear performance was observed with the pressure-enthlapy formulation for
more complex multi-dimensional, heterogeneous problems. Wong et al. [167] speculated this was
because the natural formulation always treats phase appearance with the introduction of an epsilon
quantity. On the other hand, the pressure-enthalpy formulation computes saturation as a secondary
variable.
2.4.2 Thermal reservoir simulation
Steam-based thermal recovery is the most widely employed tertiary recovery method in the oil and
gas industry. The efficacy of thermal EOR processes has motivated the development of thermal
reservoir simulators. Thermal capabilities were first introduced in to reservoir simulators with the
work of Shutler [140]. This simulator was a simple, one-dimensional thermal model for simulating
steam flooding, that was later extended to two dimensions [141]. Both conduction and convection
were included. Temperature and gas composition were assumed constant within a time-step as
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 31
pressure and saturation were solved for simultaneously. The energy equation was then solved using an
ADI method (Alternating Direction Implicit). Abdalla and Coats [2] developed a thermal simulator
for steam flooding which used the IMPES solution technique. The hydrocarbon vapor phase was
neglected. The water component was permitted in the vapor and aqueous phases. Steam flowing
into blocks not containing steam was assumed to condense. The temperature was calculated from
the saturated steam pressure. Interphase mass-transfer (i.e. condensation) was computed upon
iteration. Coats et al. [28] developed an improved model which eliminated the need for iteration
on the condensation term. Mass and energy equations were solved simultaneously to calculate
pressure, temperature and saturations. Transmissibility of water was treated implicitly. In both
of these models the oil was assumed to be dead oil and mutual solubility of water and oil was
ignored. Vinsome [151] developed an IMPES thermal simulator. He noted severe stability limits
and aberrant spikes in the computed pressure. Large mobility ratios and the presence of the second
order conduction term generally prevent the use of explicit time discretization in thermal simulation.
Coats [21] developed the first sequential thermal compositional simulator to capture distillation
effects. Mole fractions of hydrocarbon in the gas and oil phase were related by K-values. Raoult’s
Law was used to compute the mole fraction of water in the vapor phase. This is a common ide-
alization in thermal compositional simulators. Material balance errors were present in this early
sequential implicit model. Coats [23] later developed a fully implicit steam flooding simulator,
which eliminated many of the stability issues. Variable substitution was used, whereby either sat-
uration or temperature was used as a primary variable. Ferrer and Farouq-Ali [41] developed a
2-D, three-phase compositional simulator. Heat of vaporization was used in the calculation of vapor
phase enthalpy. Internal energy was not distinguished from enthalpy in this model.
Crookston et al. [32] developed a thermal compositional simulator with reaction terms for model-
ing in-situ combustion problems. Relative permeability was treated implicitly, but enthalpy, temper-
ature and density were treated explicitly. Rather than using variable substitution this formulation
maintains a very small fraction of each phase in each grid block. This pseudo-equilibrium ratio
approach was extended by Abou-Kassem and Aziz [3]. The use of pseudo-equilibrium ratios showed
improved convergence over the variable-substitution method.
2.4.3 Compositional reservoir simulation
Compositional simulators are required for scenarios in which the reservoir phase behavior has a large
bearing on recovery. Specific applications include simulation of recovery from retrograde condensate
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 32
reservoirs and modeling of miscible enhanced oil recovery. Representation of the multicomponent
multi-phase flow in compositional simulation remains a significant challenge and industrial simulation
models typically approximate three-phase behavior using only two phases [136]. In compositional
reservoir simulation the number of equations is far larger than in black-oil models. The number of
model equations grows with the number of component species used to characterize the fluid system.
The nonlinearity of the governing equations increases significantly, as the coefficients of the governing
equations are functions of species compositions.
An important choice in the construction of a general purpose compositional model is with regards
to the primary and secondary equations and unknowns. Mathematically, the conservation laws,
saturation constraint, thermodynamic relations, phase constraints and capillary pressure relations
are all implicitly coupled. Mass conservation equations are always chosen as the primary equations
because it is these conservation laws that govern flux between grid blocks. Choosing the conservation
laws as primary equations also facilitates the decoupling of secondary constraints at a local (i.e. grid-
block) level. In addition, primary equations in the form of mass conservation laws lead to a mass
residual so that errors in the solution of the equations are mass balance errors.
The choice of primary variables to solve the governing equations is far less straightforward than
the choice of primary equations. Historically, there are two broad classes of primary variables:
the natural variables set [25], and the molar variables set [4]. Excellent reviews of the various
formulations are provided by Wong and Aziz [164] and Voskov and Tchelepi [156]. A brief overview
of these approaches is provided herein.
The natural variables
The natural variables consist of pressure, saturations and phase mole fractions. The conservation
equations, thermodynamic relations and phase constraints are assembled for each cell that is identi-
fied in the multiphase state. If a phase disappears one of the saturation variables and the requisite
phase mole fractions are removed from the set of primary variables and the set of equations is re-
duced. The need for variable substitution makes implementation complex. In addition, stability
analysis is required to determine whether the phase state is stable. The advantage is that flash
calculations may not be required as the phase equilibrium requirement (i.e. equality of component
fugacities across phases) can be satisfied by converging the Global Newton loop. A major limitation
of the natural variables set is that there is a mass balance error when variable switching is performed
across phase-transitions [37].
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 33
In compositional models posed in the natural variables, component fugacity equations are coupled
with mass conservations laws when more than one phase is present. Flash calculations are avoided,
but fluid properties are thermodynamically inconsistent until convergence of the nonlinear flow
equations [37]. In other words, the choice of primary variables irrevocably links solution of the
conservation laws to fluid property calculations.
The molar variables
The molar variables formulation is the main alternative to the natural formulation. However, in
practice there are several variants of the molar variables formulation. Young and Stephenson [170]
used overall compositions as primary variables for the single phase state, and an additional gas frac-
tion in the case of a two-phase state. Chien et al. [20] used equilibrium K-values as thermodynamic
constraints. It is also possible to use the logarithm of equilibrium K-ratios [159]. A major disad-
vantage of these formulations is that variable substitution is required at phase transitions, as with
the natural variables formulation. However, Acs et al. [4] developed a molar variables formulation
using the overall composition of each component. The overall compositional formulation does not
require variable substitution. However, flash calculations are required at every grid block and at
every iteration to close the system of equations. The overall molar composition formulation later
used by Watts [162] employs a volume balance to obtain the pressure equation. This uses the fact
that the pore volume of a grid block should be equal to the sum of the fluid volumes in that grid
block. Wong et al. [165] later showed that the pressure equation of the volume balance technique
results from elimination of other constraints and of the molar-conservation equations from the satu-
ration constraint. The volume-balance correction term is equivalent to the residual of the saturation
constraint [164, 165].
The principal advantage of the overall compositional formulation is that this set of primary vari-
ables is invariant, and applicable to fluid systems with any number of phases [37]. Fluid calculations
can be completely isolated from the flow calculations. The formulation was originally proposed for
an IMPES framework and pioneering implementations used explicit discretization of the transport
equations [4, 18] or a sequential implicit implementation [162]. The calculation of the transmissibility
derivatives is highly convoluted in the case of fully implicit implementations.
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 34
2.4.4 Compositional modeling in thermal simulation
Compositional modeling remains a major challenge in thermal reservoir simulation. Mass conser-
vation laws are coupled with thermodynamic relations and constraints, as in isothermal models.
However, solution of the energy conservation law is also required, as temperature is an additional
unknown. Most thermal simulators that account for compositional effects do so by means of K-values
that are pressure and temperature dependent only. Phase properties including density, viscosity and
internal energy are calculated with the assumption of ideal mixing. CMG STARS[29] is an example
of a K-value compositional thermal simulator that uses the natural variables set. Using K-values
and steam tables is a computationally efficient means of performing compositional thermal simula-
tion, and in many cases, sufficiently representative of reservoir processes. However, in cases where
compositional effects are important, the K-value method is inadequate [173].
One of the first EOS-based thermal compositional simulators was a fully implicit model devel-
oped by Ishimoto et al. [62]. Temperature, pressure and the mass fraction of components were
used as primary variables. Steam quality was used as a primary variable when in saturated condi-
tions. Brantferger et al. [14] developed the first general-purpose thermal-compositional simulator to
abandon assumptions of ideality in the treatment of phase behavior. This simulator used pressure,
enthalpy and component numbers as a persistent set of primary variables. The model extended the
approach of Faust and Mercer [39] to compositional simulation. At each iteration, local thermody-
namic equilibrium was computed via isenthalpic flash. However, some restrictions were placed on
phase compositions.
Until recently, mutual solubility of oil and water were ignored in compositional thermal simu-
lators. This is a good assumption at low to moderate temperatures only. Varavei [148] developed
a fully implicit EOS-based thermal simulator that accounts for mutual solubility of oil and water.
Component mole numbers, pressure, log K-values and temperature were used as primary variables.
There is also an option to use enthalpy as a primary variable, although details of this option are
not provided. Recently, Heidari [53] developed an EOS-based thermal simulator using enthalpy as
a primary variable. A free water flash was used in the EOS-kernel. Recently Huang et al. [58]
developed a fully implicit thermal compositional simulator which used an equation line-up approach
to avoid zero pivots associated with phase appearances/reappearances.
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 35
2.4.5 Nonlinearities in thermal reservoir simulation
Simulation of multiphase flow requires the solution of large systems of tightly coupled nonlinear
partial differential equations across multiple time and length scales. Mixed implicit methods such
as IMPES and AIM-methods are only conditionally stable. Modeling multiphase flow in complex,
heterogeneous reservoirs with high resolution grids results in prohibitively small time step sizes
when these methods are used. The fully implicit method (FIM) is thus the only practical method
of choice because of the unconditional stability that it offers. However, FIM requires iteration,
using a nonlinear solver, which is usually Newton’s method. At each iteration, the solution of a
large linearized system is required. The linear solve is the most computationally arduous kernel
in reservoir simulation. However, the FIM approach permits large time steps to be taken. The
drawback of larger time steps is that the nonlinear solver is placed under stress.
The industry has developed techniques to improve convergence of Newton’s method in fully
implicit simulation. Historically, heuristics have been very successfully used [9, 8]. For instance, the
Appleyard Chop [9] is a damping strategy which prevents large jumps in saturation close to relative
permeability end-points. Global-damping is also popular in fully implicit simulators to limit the
maximum change in saturation that may be realized from iteration to iteration within a grid block.
Typically, a max ∆S equal to 0.2 may be set. Ordering of the equations based on flow potential has
also been used to accelerate convergence [8]. The aforementioned efforts to improve convergence of
Newton’s method have been broadly implemented in commercial simulators.
Transport nonlinearities
Peaceman [114] investigated the convergence of the fully implicit method for two-phase flow and
concluded that the stability limit of FIM did not depend on the local CFL number, but was in fact
dependent on the change in saturation in time . More recently, efforts have been made to characterize
the nonlinearities associated with these phase fluxes. In addition, purpose-built nonlinear solvers
have been designed to improve the performance of Newton’s method.
Kwok and Tchelepi [68] showed that monotone implicit schemes used in reservoir simulation
are well-defined. The non-linear Gauss-Seidel and Jacobi processes converge to a unique solution
whenever the initial guess is bounded. They concluded that convergence (for any CFL number)
follows from the properties of the flux functions. Jenny and Tchelepi[63] showed that Newton’s
method achieves convergence for any time step size if the flux function is convex, concave or linear.
However, the physics associated with multiphase flow in porous media can create inflection points,
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 36
and an s-shaped flux function. This greatly impacts the performance of the nonlinear solver. Jenny
and Tchelepi showed that setting the starting value of saturation to the value at the inflection point
of the flux function allowed unconditional convergence [63]. This work was extended by Wang and
Tchelepi [161]. They looked at problems involving countercurrent flow owing to capillarity and
buoyancy. A trust-region Newton solver was developed that showed marked improvement over the
Appleyard chop. More recently, Li and Tchelepi [73] studied the nonlinearities associated with coun-
tercurrent flow. They identified the inflection lines and non-differentiable kinks as key impediments
to nonlinear convergence. They treated a simulation grid as a series of interfaces, each consisting
simply as the interaction of two cells. The nonlinear solver was designed to partition the nonlinear
solution space into trust-regions based on the location of kinks and inflection lines. Younis et al.
[171] used a different approach, employing a numerical continuation method to globalize Newton’s
method.
Phase changes
Existing research has focused on nonlinearities associated with phase fluxes. The source of the
nonlinearity in the flux function is complicated transport physics such as capillarity and gravity.
However, in non-isothermal settings there are additional sources of nonlinearity in the form of
condensation and phase changes.
In thermal problems involving water, condensation of steam constitutes highly nonlinear behav-
ior. Coats [25] used this example to prove that implicit discretization is not always unconditionally
convergent. He showed that for a thermal problem involving water, there is a negative compress-
ibility effect that is created when cold water flows into a grid block containing steam. This is a
complicated phenomenon that creates a pressure drop in the grid block. As the grid block is in a
saturated state the drop in pressure is accompanied by a drop in temperature:
∆T = ∆PdP
dT(2.58)
The temperature drop actually causes heat to be released from the rock, and the aqueous phase
[49]. Saturated steam enthalpy changes very little with temperature. The heat given off by the rock
has the effect of heating and boiling some water.
Several authors have noted that negative compressibility effects hinder the performance of iter-
ative linear solvers for steam flooding simulators [23, 145, 158]. At the nonlinear level, the negative
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 37
compressibility effect can cause Newton’s method to converge to an incorrect solution. A nonlinear
solution strategy has not been developed to address this physical phenomenon.
The natural variables (pressure, temperature and saturation) are often the primary variables
of choice in reservoir simulation. However, in thermal problems the frequent phase appearances
and disappearances make the use of this method difficult. Historically, either variable substitution
or pseudo-equilibrium ratios have been used to navigate abrupt phase changes in thermal settings.
Using variable substitution may result in non-convergence whereby consecutive iterations of the
Newton loop may yield back and forth switching of the primary variables. Pseudo equilibrium ratios
may increase the total number of iterations required as mass is not strictly conserved. With both
approaches, nonlinear convergence is compromised and severe time-step cuts may be necessary for
the simulation to proceed.
Variable switching can also be avoided through special strategies to reformulate the phase tran-
sitions. For instance, Lauser et al. [70] formulated the conditions for phase existence as a set of
Krush-Kuhn-Tucker (KKT) conditions. The KKT conditions are reformulated as a nonlinear com-
plementarity function (NCP). Superlinear convergence was obtained across phase boundaries using
this method. Another alternative is the negative saturation approach [131]. This was originally
proposed by Abadpour and Paniflov [1] for isothermal problems, but has since been extended by
Salimi to thermal problems [131]. However, there are problems with this method. The two-phase
regions outside the 3-phase region have linear boundaries. This is a good assumption for most steam
injection processes at low pressure. However, addition of a hydrocarbon solvent will make the as-
sumption invalid. In addition, this method requires the three-phase region to exist in the plane that
intersects a given composition with pressure and temperature fixed. This is not general purpose and
is not valid for higher pressures and temperatures.
Rather than using the natural variables formulation, enthalpy may be used as a primary variable,
along with pressure and overall composition. This circumvents the need for variable switching, but
necessitates complex isenthalpic flash.
2.5 Closing remarks
This chapter established a theoretical basis for the research in this dissertation. We identified
several key challenges to rigorous and computationally efficient thermal compositional simulation.
The molar variables offers a thermodynamically consistent approach to compositional simulation
of thermal enhanced oil recovery, albeit with the often impractical cost of performing isenthalpic
CHAPTER 2. BACKGROUND & LITERATURE REVIEW 38
flash calculations and obtaining partial derivatives with respect to species compositions. In the
proceeding chapters we present a framework for resolving these difficulties and others inherent to an
overall compositional formulation. We begin in Chapter 3 at the level of the local thermodynamic
constraints; addressing uncertainty surrounding the number and identity of equilibrium phases.
Chapter 3
Stability Analysis for
Hydrocarbon-Water Mixtures
In compositional reservoir simulation, phase equilibrium computations are performed across many
thousands of grid blocks at each time step, and in some formulations at each iteration. Phase
stability analysis becomes a significant computational burden in large models.
We present a stability testing procedure specifically tailored to hydrocarbon-water mixtures in
thermal simulation. The stability-testing method described herein is an essential component of our
isenthalpic framework for thermal compositional simulation. To be clear, we perform stability anal-
ysis in sequence with isothermal phase-split calculations, as suggested by Michelsen [84]. Stability
analysis and phase-split calculations are inherently interlinked and it is difficult to discuss phase
stability in isolation, particularly for multiphase systems. For this reason, we include some flash
results in this chapter to facilitate our discussion of stability testing. However, full details of the
phase-split are reserved for Chapter 4.
This chapter is organized as follows. We begin with a description of our phase stability testing
algorithm. We then show the results of phase stability testing for several fluids. We conclude with
a brief discussion of the role of phase stability testing in thermal compositional simulation and its
connection to phase-split calculations.
39
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 40
3.1 Stability analysis for thermal simulation
Ostensibly, stability testing is straightforward for hydrocarbon-water mixtures. The dichotomy of
the polar-non-polar components often leads to the formation of a near-pure aqueous phase in combi-
nation with hydrocarbon phases. In creating a stability testing procedure for thermal compositional
simulation it is important to note that elevated temperatures give rise to more complex hydrocarbon-
water phase behavior. First, significant mutual solubility of hydrocarbon and water components may
be encountered at high temperatures. This mutual solubility motivates the development of a general
purpose phase equilibrium package that accounts for all components in all phases. Second, narrow
regions of three-phase behavior arise in thermal simulation, and may be difficult to resolve. This
pertains to our desire for consistent resolution of phase boundaries.
Our objective in this chapter then, is to develop a strategy for stability testing specifically for
simulation of thermal recovery processes. The stability testing procedure should be general purpose
and lead to consistent resolution of phase boundaries, whilst also factoring in the unique behavior
of hydrocarbon-water mixtures. In sum, the distinctive behavior of the system should guide the
initial estimates of K-values in selection of the trial phase, but without sacrificing the generality of
the model.
3.2 A strategy for stability testing in thermal simulation
Here, we propose a scheme that employs a maximum of three sets of initial guesses for single-phase
stability testing: Wilson, inverse-Wilson, and near-pure H2O:
{Kinitiali } = {KWilson
i , 1/KWilsoni ,KH2O
i }, (3.1)
where KH2Oi = 0.999/ztesti for i = H2O, and KH2O
i = 0.001/ztesti otherwise. Our rationale is
that the appearance of a trial phase predominantly comprised of hydrocarbons will be detected by
stability tests initiated with the Wilson correlation or its inverse. On the other hand, the evolution
of an aqueous or near-pure steam trial phase will be detected by stability tests initiated using KH2Oi .
In a thermal setting, a key insight is that the saturated-steam curve can be used to guide the
selection of trial phases for stability testing. Such an approach is sensitive to the distinct behaviors
of hydrocarbon-water mixtures. We begin by partitioning the pressure-temperature domain, as
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 41
illustrated in Fig. 3.1. We calculate the steam saturation pressure P sat using a correlation [132]:
P sat = 10× Pc × exp
[TcT
(−7.85823 + 1.83991τ1.5 − 11.7811τ3
+ 22.6705τ3.5 − 15.9393τ4 + 1.77516τ7.5)],
(3.2)
where τ = (1 − T/Tc). If pressure is below the pressure of saturated steam, only the Wilson and
inverse-Wilson correlations are used to initiate stability-analysis. If pressure is greater than the
saturation pressure of steam, KH2Oi is used as an additional initial guess. The physical reasoning
underpinning this strategy is that the aqueous phase may exist only at pressures above the steam
saturation pressure. If phase instability is detected, two-phase flash calculations are performed. A
simple correlation for water solubility in oil [36] is used to initiate the two-phase split calculation
when instability of the mixture is detected above steam saturation pressure:
ln(xw) = −21.2632 + 5.9473× 10−2T − 4.0785× 10−5T 2, (3.3)
where xw is the mole fraction of water in the oleic phase and T is the temperature in Kelvin.
A second two-phase split calculation is performed using the set of K-values obtained from the
stability test corresponding to the stationary point with the lowest negative TPD. The stability of
the two-phase mixture is then assessed. The two-phase split result yielding the lowest Gibbs energy
is first selected for stability analysis. The phase state of the two-phase system guides the choice of
the next set of K-values. If the aqueous phase is present after the two-phase split calculation we use
the Wilson correlation and its inverse to detect instability of the hydrocarbon phase. If no aqueous
phase is present the higher molecular weight phase is tested for stability using KH2O as the starting
set of K-values. A flowchart of the approach to stability analysis is included in Appendix A, and a
stepwise description is provided below.
• Step 1: Specify P , T and zi, in addition to thermodynamic parameters for each feed component
including molecular weight, Tc, Pc, ω and binary interaction terms.
• Step 2: Calculate the steam saturation pressure, P sat at the specified temperature.
• Step 3: If P < P sat, the aqueous phase cannot be present. Perform stability analysis using the
Wilson correlation and its inverse and proceed to Step 4. If P > P sat, the aqueous phase may
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 42
be present. Perform stability analysis using three sets of K-values {KWilson, 1/KWilson,KH2O}
and proceed to step 5.
• Step 4: (a) If a nontrivial negative TPD is found, perform a two-phase flash. Initiate flash
with the set of K-values from stability testing that yields the minimum negative TPD. Stop
upon convergence of two-phase flash.
(b) If no negative TPD is found, the system is single phase. Stop.
• Step 5: (a) If a nontrivial negative TPD is found, perform two separate two-phase flash
calculations. For the first flash, use the correlation in Eq. 3.3 to estimate KH2O. For the
second flash, use the set of K-values from the stability test corresponding to the minimum
negative TPD. Proceed to step 6. (b) If no negative TPD is found, the system is single phase.
Stop.
• Step 6: If the two-phase flash results are identical and more than one negative TPD was
detected in stability analysis, perform an additional two-phase flash using the set of K-values
yielding the next lowest TPD. Select the two-phase flash result with the lowest Gibbs energy
and proceed to Step 7.
• Step 7: Test for stability of the two-phase state.
(a) If the aqueous phase is present, test the stability of the hydrocarbon phase using the Wilson
correlation and its inverse.
(b) If the aqueous phase is not present, test for the appearance of an aqueous phase using the
phase with higher molecular weight.
• Step 8: (a) If instability is detected, perform three-phase flash. To initialize the flash, use the
K-values from two-phase flash and the K-values from the stability test in Step 7.
(b) If instability is not detected and an additional unique two-phase flash result is available,
select this two-phase flash result and go back to step 7. Otherwise, the system is two-phase.
The stability-analysis strategy has two direct benefits. First, the number of trial phases required
for stability testing is pre-determined based on the system pressure and temperature. Second, the
reliability of the phase-stability tests and the proceeding phase-split calculations is greatly improved.
Location of TPD function (Eq. 2.33) stationary points is the overarching difficulty in stability
analysis, and so the focus of our algorithm is strategic rather than numeric. We use the same
calculation procedure with reduced variables as outlined in Firoozabadi and Pan [43]. Recall that
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 43
Figure 3.1: Partitioning of the pressure-temperature domain using the steam saturation curve. Theaqueous phase does not exist below the steam saturation pressure. Above the steam saturationpressure an aqueous phase may be present, and three sets of initial K-values are used for stabilityanalysis, {KWilson
i , 1/KWilsoni ,KH2O
i }.
the stability test calculation is far simpler than the solution of the phase split problem, because
stability testing is not subject to the same material balance constraints and only one of the phases
is of unknown composition.
The equilibrium state corresponds to the global minimum Gibbs free energy. Again, we reserve
discussion of the phase-split for Chapter 4. However, in the following section we compute the Gibbs
free energy after two- and three-phase split calculations. For a two-phase mixture, the Gibbs free
energy is:
G = G/RT =
Nc∑i
(nLi ln fLi + nVi ln fVi
). (3.4)
By extension, for a three-phase system:
G =
Nc∑i
(nLi ln fLi + nVi ln fVi + nWi ln fWi
). (3.5)
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 44
3.3 Case studies
In this section we showcase the performance of our stability analysis strategy. We focus on the
performance of the stability analysis algorithm in delineating phase boundaries for hydrocarbon
fluids in the presence of water at elevated temperatures and pressures.
We tested our approach across a large parameter space. Compositional variation was achieved
by varying the fraction of H2O combined with the hydrocarbon mixtures. We altered the fraction
of water in the mixture from 1% to 99%, with consistent resolution of phase boundaries observed
across the compositional spectrum. Here we only show the most material test cases to demonstrate
the efficacy of our approach.
Our analysis shows that the stability testing strategy reliably identifies phase instability and
leads to consistent resolution of the equilibrium phase state.
3.3.1 Case 1: Seven-component heavy crude plus water.
Case 1 is taken from Lapene et al. [69]. The oil is a heavy Venezuelan crude from a thermal recovery
project. The composition is provided in Table 3.1, with binary interaction parameters listed in Ta-
ble 3.2. This is a complex hydrocarbon fluid, that has been lumped into seven pseudocomponents.
A very small fraction (less than 2%) of the crude is comprised of intermediate hydrocarbon com-
ponents, represented by a single pseudocomponent (C2 − C11 ). Characterization with a practical
number of pseudocomponents is challenging for heavy oils.
This case is an example of the difficulty in identifying a narrow three-phase state. Fig. 3.2
shows the narrow three-phase region in pressure-temperature space. We use the phase equilibrium
calculation at 85 bar and 571 K as an example. This point is above the steam saturation curve and
stability analysis yields a negative TPD, indicating instability of the mixture. Table 3.3 shows the
results of a two-phase flash calculation initiated with K-values predicted using Eq. 3.3 and assuming
an almost pure aqueous phase in combination with a liquid hydrocarbon phase. Table 3.4 shows the
results of an alternative two-phase split calculation, initiated using K-values predicted by stability
analysis. Gibbs free energy is calculated using Eq. 3.4 for two-phase systems. The two-phase system
in Table 3.4 has a lower Gibbs free energy than the two-phase system in Table 3.3. However, stability
testing of the two-phase mixture in Table 3.4 does not indicate the appearance of a third phase.
Stability testing of the hydrocarbon phase in Table 3.3 does yield a negative TPD, and the results
of the ensuing three-phase split calculation are displayed in Table 3.5. For three-phase systems we
compute Gibbs free energy using Eq. 3.5.
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 45
Table 3.1: Properties of seven-component heavy oil plus water mixture, taken from Lapene et al.[69]. The hydrocarbon components are characteristic of a heavy crude.
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
H2O 0.99 18.015 647.37 221.20 0.344
C2 − C11 0.0001807 143.66 635.64 24.11 0.4645
C12 − C16 0.0018070 193.82 701.24 19.25 0.6087
C17 − C21 0.0015660 263.40 772.05 15.10 0.788
C22 − C27 0.0013850 336.29 826.30 12.29 0.9467
C28 − C35 0.0011450 430.48 879.55 9.94 1.1042
C36 − C49 0.0010240 573.05 936.97 7.79 1.273
C50+ 0.0028923 1033.96 1260.0 6.00 1.65
Table 3.2: Binary interaction parameters for mixture of seven-component heavy crude with water,taken from Lapene et al. [69].
BIP H2O C2−C11 C12 −C16
C17 −C21
C22 −C27
C28 −C35
C36 −C49
C50+
H2O 0
C2−C11 0.0952 0
C12 −C16
-0.48 0 0
C17 −C21
-0.48 0 0 0
C22 −C27
0.45 0.13 0.05 0 0
C28 −C35
0.53 0.135 0.08 0 0 0
C36 −C49
0.50 0.1277 0.1002 0.09281 0 0 0
C50+ 0.50 0.1 0.1 0.130663 0.006 0.006 0 0
Table 3.3: Two-phase flash results for heavy oil plus water mixture in Case 1 at 85 bar and 571 K.G = −0.3586201422.
Component Phase 1 Phase 2
H2O 1 0.244793
C2 − C11 2.41968e-09 0.0136464
C12 − C16 1.05679e-10 0.136466
C17 − C21 3.18043e-14 0.118265
C22 − C27 4.32222e-18 0.104596
C28 − C35 3.09172e-23 0.0864712
C36 − C49 6.48657e-31 0.0773332
C50+ 4.21787e-51 0.218429
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 46
Table 3.4: Two-phase flash results for the mixture in Case 1. Results are from the second two-phasesplit calculation, performed at 85 bar and 571 K. G = −0.3606695361.
Component Phase 1 Phase 2
H2O 0.996479 0.236495
C2 − C11 0.000172941 0.00108307
C12 − C16 0.00160261 0.025577
C17 − C21 0.00105735 0.0607212
C22 − C27 0.000517883 0.10223
C28 − C35 0.000144512 0.117501
C36 − C49 2.56697e-005 0.117129
C50+ 1.06639e-009 0.339264
Table 3.5: Three-phase phase flash result obtained after testing the stability of the two-phase systemin Table 3.3. Stability testing of the two-phase system in Table 3.4 did not indicate phase instability.G = −0.360728432276.
Component Phase 1 Phase 2 Phase 3
H2O 0.995912 0.237088 1
C2 − C11 0.000214512 0.00133969 2.39218e-010
C12 − C16 0.00194683 0.030944 2.40812e-011
C17 − C21 0.00120972 0.0690683 1.86274e-014
C22 − C27 0.000547622 0.107303 4.44569e-018
C28 − C35 0.000144005 0.116028 4.16862e-023
C36 − C49 2.50245e-005 0.112949 9.59619e-031
C50+ 1.05125e-009 0.32528 6.03852e-051
Figure 3.2: Mixture of 99% water and 1% oil, as described in Table 3.1. Pressure is sampled inincrements of 0.1 bar and temperature is sampled in increments of 0.05 K. The three-phase regionis very narrow in pressure-temperature space.
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 47
3.3.2 Case 2: Four-component heavy oil plus water.
Case 2 is taken from the dissertation of Brantferger [13]. This case is used to demonstrate the
efficacy of the stability testing protocol in narrow regions of immiscibility. Table 3.6 lists properties
of the four-component heavy oil and water. Binary interaction parameters are listed in Table 3.7.
The spectral decomposition of the BIP matrix yields only two non-zero eigenvalues.
Fig. 3.3 shows that as temperature is increased the equilibrium state changes from two-phase
liquid-aqueous (VW), to three-phase vapor-liquid-aqueous (VLW), and finally to two-phase vapor-
liquid (VL). Delineation of the three-phase region is difficult, and ordinary stability testing protocols
are inadequate. Single phase stability analysis yields two negative TPD results. Given that the
mixture is unstable we perform two-phase flash using the K-values predicted via Eq. 3.3, and those
generated from the stability test yielding the lowest negative TPD. In this case, both starting sets
of K-values yield the same flash result (shown in Table 3.8). Given that there are two identical two-
phase flash results, we perform an additional two-phase split calculation using the set of K-values
corresponding to the next lowest TPD obtained in stability analysis. Using this set of K-values
we obtain the two-phase flash result in Table 3.9. The first flash result (Table 3.8) has a lower
Gibbs free energy, so we perform stability analysis on the heavier (hydrocarbon) phase using the
Wilson correlation and its inverse. However, phase instability is not detected. We then perform
stability analysis using the second two-phase flash result (in Table 3.9). A negative TPD is detected
and we proceed to a three-phase flash calculation. The system is at thermodynamic equilibrium at
three-phases (Table 3.10).
Fig. 3.4 is a close up of the PT-phase diagram in Fig. 3.3, for temperatures between 380 K to
480 K and pressures between 2 bar and 20 bar. Fig. 3.5 displays the system depicted in Fig. 3.3 in
pressure-enthalpy space. Here, a very small three-phase region in the PT phase diagram corresponds
to a large region in PH space. Meticulous resolution of phase boundaries and quantification of phase
fractions is important for the fidelity of the coupling to the energy and material balance equations
in reservoir simulation. Fig. 3.6 clearly shows the sharp change in enthalpy at the phase boundary.
3.3.3 Case 3: Three-component oil plus water.
Case 3 is taken from Varavei [148]. This case study introduces an entirely different fluid system from
the heavy crude oils of the first two case studies. The full spectrum of two-phase states (LW, VW,
VL) is present in Fig. 3.7. The vapor-liquid region (in yellow) extends above the steam saturation
curve, in spite of the high concentration of water in the system. Correct identification of the phase
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 48
Table 3.6: Properties of the five-component mixture in Case 2. The fluid consists of water incombination with a heavy oil. The oil is devoid of light hydrocarbon components [13].
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
H2O 0.50 18.015 647.37 221.20 0.344
C8 0.2227 116.00 575.78 34.82 0.400
C13 0.1402 183.00 698.00 23.37 0.840
C24 0.1016 337.00 821.30 12.07 1.070
C61+ 0.0355 858.00 1010.056 7.79 1.330
Table 3.7: Binary interaction parameters for five-component mixture in Case 2 [13]. The spectraldecomposition of the BIP matrix results in only two non-zero eigenvalues, owing to the large numberof zero interaction coefficients.
BIP H2O C8 C13 C24 C61+
H2O 0
C8 0.5 0
C13 0.5 0 0
C24 0.5 0 0 0
C61+ 0.5 0 0 0 0
Table 3.8: Two-phase flash results for fluid in Case 2, obtained in first phase-split calculation at 4.5bar and 415 K. G = −3.592242056
Component Phase 1 Phase 2
H2O 1 0.0197557
C8 2.82299e-12 0.436601
C13 6.91014e-21 0.27486
C24 2.33339e-46 0.199186
C61+ 1.55318e-87 0.0695973
Table 3.9: Two-phase flash results for fluid in Case 2. Results obtained from second flash result at4.5 bar and 415 K. G = −3.591664856
Component Phase 1 Phase 2
H2O 0.854075 0.0202781
C8 0.144064 0.329241
C13 0.00185734 0.327635
C24 3.76758e-06 0.239249
C61+ 4.16967e-11 0.0835975
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 49
Table 3.10: Three-phase flash results for fluid in Case 2 at 4.5 bar and 415 K. G = −3.59538192171.
Component Phase 1 Phase 2 Phase 3
H2O 1 0.0197411 0.830585
C2 − C11 2.47634e-12 0.382221 0.167691
C12 − C16 7.61808e-21 0.301861 0.00171985
C17 − C21 2.56085e-46 0.219485 3.52649e-006
C50+ 1.68599e-87 0.076691 3.99451e-011
Table 3.11: Heat capacity coefficient data for the fluid in Case 2 [13].
Component C0P1 J/(mol K) C0
P2 J/(mol K) C0P3 J/(mol K) C0
P4 J/(mol K)
H2O 32.200000 0.001924 1.055E-05 -3.596e-09
C8 -1.23e+01 6.65e-01 -2.52e-04 0.0
C13 -5.080000 9.97e-01 -4.14e-04 0.0
C24 -5.690000 1.840000 -7.64e-04 0.0
C61+ 0.1230000 4.750000 -1.95e-03 0.0
Figure 3.3: PT-phase diagram for the 50% water/50% oil mixture in Case 2. Component propertiesare provided in Table 3.6. Pressure is sampled in increments of 0.1 bar and temperature is sampledin increments of 0.1 K. The mixture is characterized by a narrow three-phase region.
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 50
Figure 3.4: Close up of PT-phase diagram shown in Fig. 5.13. Pressure sampled at 0.1 bar intervalsfrom 2 bar through 20 bar. Temperature sampled at 0.1 K intervals from 380 K to 480 K. Comparisonwith Fig. 5.15 elucidates the enthalpy change associated with the abrupt phase transition.
Figure 3.5: Mapping of Fig. 5.14 from the pressure-temperature domain to pressure-enthalpy space.An ostensibly narrow three-phase region maps to a large region in pressure-enthalpy space.
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 51
Figure 3.6: Enthalpy contours corresponding to the PT-phase diagram in Fig. 5.14. At the phaseboundary there is an abrupt change in enthalpy.
Table 3.12: Component properties for four-component hydrocarbon-water system in Case 3 [148].Compared to Cases 1 and 2 the hydrocarbon components are relatively volatile.
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
H2O 0.950 18.015 647.3 220.4732 0.344000
C6 0.005 86.178 507.5 32.88847 0.275040
C10 0.015 134.00 622.1 25.34013 0.443774
C15 0.030 206.00 718.6 18.49090 0.651235
state is not straightforward because variations in pressure, temperature and composition cause phase
transitions across several two-phase and three-phase states {LW,LV, V W, V LW}. Resolving the
two-phase vapor-aqueous region (VW) is particularly challenging, as the water component is present
in high concentrations in the vapor phase. The oft-used approach of initiating flash computations
assuming a two-phase oleic-aqueous (LW) system is inappropriate for this system, particularly at
temperatures close to steam saturation temperature. The three-phase region in Fig. 3.7 is narrow,
as observed in the first two case studies. We emphasize that the uncertainty regarding phase state
is at pressures above the steam saturation curve. At pressures below the steam saturation curve
the Wilson correlation and its inverse are sufficient to detect the instability of the mixture. A
vapor-liquid state is the only possible two-phase state at pressures below steam saturation pressure.
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 52
Table 3.13: Binary interaction parameters for four-component mixture in Case 3 [148].
BIP H2O C6 C10 C15
H2O 0
C6 0.48 0
C10 0.48 0.002866 0
C15 0.48 0.010970 0.002657 0
Figure 3.7: PT-phase diagram for the fluid in Case 3. The system is a mixture of 95% water and 5%oil. Component properties are provided in Table 3.12. Multiple two-phase states (VW, VL) borderthe narrow three-phase region. Pressure is sampled in increments of 0.25 bar and temperature issampled in increments of 0.25 K.
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 53
3.4 Discussion
Strongly nonideal behavior is characteristic of hydrocarbon-water systems, and is particularly ap-
parent in mixtures comprising a liquid hydrocarbon phase and an aqueous phase [84]. Michelsen [84]
noted that phase-split calculations for these systems converge relatively quickly. In an isothermal
setting, immiscibility of oil and water is a presupposition. A priori knowledge of this water-oil
immiscibility motivates preallocation of the phase state in lieu of performing stability analysis.
Furthermore, phase-split calculations are particularly amenable to successive substitution in this
context, as the K-values span several orders of magnitude. However, in the simulation of thermal
recovery processes a wide range of operating conditions may be encountered, yielding several pos-
sible phase states. In addition, the high temperatures give rise to mutual solubility of water and
hydrocarbons. In this chapter we have presented a strategy for reliable stability analysis across the
pressure-temperature parameter space.
Stability analysis carries the advantage of providing an initial estimate for compositions in phase-
split calculations. Michelsen [84] noted that this estimate is particularly accurate close to the phase
boundary, where convergence of the phase-split calculation is generally most challenging. One of the
key difficulties in stability analysis is the number of initial estimates required. Standard practices
used to estimate K-values for hydrocarbon systems do not work for hydrocarbon-water mixtures. Our
approach to partitioning the domain using the steam saturation curve allows us to identify how many
initial K-value estimates are required a priori. The use of multiple two-phase flash calculations above
the steam saturation pressure enables us to reliably identify the correct phase state, and provide a
good initial estimate for ensuing flash calculations. Our solution strategy addresses the difficulties
encountered with narrow regions of three-phase behavior and multiple two-phase states. Cases 1
and 2 show that in these scenarios, the presence of a three-phase state may not be predicted by
performing stability analysis using the minimum Gibbs free energy two-phase flash result. Initiating
phase-split calculations in reservoir simulation without prior stability analysis may be particularly
error prone for fluids characterized by capricious regions of three phase behavior, as in Cases 1, 2
and 3.
Both Pershke [117] and Li and Firoozabadi [77] noted that selection of the test phase is immaterial
in two-phase stability testing. The reasoning stems from the equality ln(xi) − lnφi(xi) = ln(yi) −
lnφi(yi) emanating from the converged two-phase flash result that satisfies iso-fugacity and material
balance constraints. However, Pan et al. [107] noted that the assumption of test phase equivalence
is invalidated by the use of a locally convergent algorithm.
CHAPTER 3. STABILITY ANALYSIS FOR HYDROCARBON-WATER MIXTURES 54
Michelsen [84] noted that difficult hydrocarbon-water systems are those which exhibit fairly
narrow regions of immiscibility. Vigilant resolution of phase boundaries is rarely discussed in the
literature, despite the potential implications of incorrect phase identification in reservoir simulation.
Consistent navigation of phase boundaries is particularly important in thermal reservoir simulation
in which the energy equation is tightly coupled to the phase state. Seemingly insignificant regions
of immiscibility may be extremely important in this context. This can be seen in comparison of
Fig. 5.14 and Fig. 5.15. Failure to resolve the three phase state in pressure-temperature space is
likely to result in a large error in the calculation of thermal properties, such as enthalpy or internal
energy.
3.5 Summary
In this chapter we presented a new approach to stability analysis for hydrocarbon-water systems.
We used the steam saturation curve to partition the pressure temperature domain, and we employed
a maximum of three sets of initial K-value estimates to initiate each stability test. Our approach
involves the use of multiple two-phase flash calculations to consistently resolve phase boundaries.
The strategy is sensitive to the distinctive properties of hydrocarbon-water mixtures. In particular,
the steam saturation curve serves as a guide to the selection of initial K-value estimates. We have
verified that this approach is robust through rigorous testing of a variety of fluids from the literature.
To the best of our knowledge, the steam-saturation curve has not previously been used to guide the
initial estimate of K-values in stability testing.
We now proceed to describe the numerical solution of the three phase-split calculation.
Chapter 4
Multiphase Isothermal Flash using
Reduced Variables
In compositional simulation, the phase-split calculation addresses the uncertainty regarding the
composition and amount of each of the phases present. The focus of this chapter is a general
purpose methodology for isothermal phase-split calculations involving hydrocarbon water mixtures
in thermal reservoir simulation. The key contribution here is the development and implementation
of a three-phase reduced variables method for phase-split calculations involving water.
This chapter proceeds as follows. We begin by discussing the need for an equation-of-state
based approach to thermal simulation. We then proceed to describe our three-phase reduced flash
formulation. We present the results of our approach in the form of phase diagrams spanning a wide
range of pressures and temperatures. Finally, we discuss the performance of the reduced variables
approach for hydrocarbon-water mixtures.
4.1 Phase-split calculations in thermal simulation
4.1.1 Context
Although there is a large body of research dedicated to the resolution of phase behavior in hydrocarbon-
water systems, the K-value approximation of phase behavior has persisted in the reservoir simulation
community for several decades [11]. Recently however, there has been an increased interest in more
accurately quantifying phase behavior in thermal recovery processes. One development is the use of
55
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 56
free-water flash approximations of phase behavior [69, 54]. Another approach involves parameteriza-
tion of compositional space [60]. Both free-water flash and compositional space parameterization are
improvements upon the legacy K-value approximation. Nevertheless, these recent advancements still
constitute approximations of the underlying phase behavior. Such engineering approximations may
fail to consistently quantify the phase state, compromising the convergence of the global Newton
loop in thermal reservoir simulation. The free-water flash makes simplifying assumptions regarding
phase compositions. In the case of compositional space parameterization, the integrity of the pa-
rameterization is contingent on robust underlying phase equilibrium calculations with an equation
of state. As a final point, any attempt to speed up fluid property calculations in reservoir simula-
tion should be benchmarked against a model based on thermodynamically rigorous quantification of
phase behavior. Clearly, there is a need for EOS-based representation of hydrocarbon-water phase
behavior in thermal reservoir simulation.
Michelsen [84, 87] noted that the most troublesome elements of any isothermal flash algorithm
are the initial estimate of K-values and attaining convergence in the near critical region. In the
context of reservoir simulation, good initial estimates of phase equilibrium ratios may be obtained
from previous time steps, or the previous iteration. With small CFL numbers (for instance, in
IMPES implementations) or far from displacement fronts, initial estimates from prior time steps
may be an excellent starting point for the phase-split calculation. However, phase changes may
occur very frequently in reservoir simulation, such as in the vicinity of displacement fronts, or when
large time steps are taken in fully implicit implementations. In thermal reservoir simulation these
phase changes are also driven by temperature gradients. In this research the K-values from stability
analysis provides initial estimates for phase-split calculations.
Convergence in the critical region is an important problem to address in the case of hydrocarbon
mixtures, particularly in the study of phase equilibria of miscible displacements. Indeed, miscibility
often develops in the vicinity of the critical point after multiple contacts of the vapor and liquid
phases. In the case of thermal recovery processes, the operating conditions are generally quite far
from criticality. Nevertheless, bicritical points may still be encountered, wherein two hydrocarbon
phases approach criticality while the water component exists in a near pure aqueous phase. Con-
vergence in the critical region has not been addressed specifically for hydrocarbon-water mixtures,
to the best of our knowledge. Hydrocarbon-water mixtures are highly immiscible at low tempera-
tures. However, in thermal EOR processes mutual solubility does arise in response to high reservoir
temperatures.
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 57
4.1.2 Solution of the phase-split in thermal simulation
Strongly non-ideal behavior of systems involving liquid hydrocarbon and liquid water phases gen-
erally leads to convergence of successive substitution within a few iterations [84]. Aqueous-liquid
phase co-existence occurs in the vast majority of phase-split calculations at low temperatures, as in
isothermal simulation. In a thermal setting, multiple phase states are possible and preallocation of
phase compositions is inappropriate. Successive substitution is ill-suited to the solution of phase-
split calculations in the critical region. Convergence of successive substitution becomes prohibitively
slow as the critical point is approached. Either the Newton method (for root-finding or Gibbs energy
minimization) or a quasi-Newton method is required to reach the solution in a reasonable number
of iterations.
The K-value method has long been justified in thermal compositional simulation based on ar-
guments related to physics and numerics. In terms of physics, the primary EOR mechanism for
thermal recovery of heavy oils is viscosity reduction[120, 16]. From a numerical standpoint, it is
difficult to justify the additional cost of full-EOS calculations in thermal models, given that thermal
simulation is already computationally arduous. Numerical simulation of thermal recovery processes
such as SAGD may require high resolution grids to resolve the underlying physics. Phase equilibrium
calculations can be particularly expensive when the number of grid cells becomes large, especially
for three-phase systems. Compositional simulation of thermal recovery requires phase equilibrium
calculations for at least three fluid phases. In isothermal compositional simulation it is common
practice to represent two hydrocarbon liquid phases as a single oleic phase. This approach is justi-
fied on the basis of efficiency, because hydrocarbon liquid phases have similar properties (viscosity,
density, etc), and because three-phase hydrocarbon behavior is often encountered in only a few cells
during a given time step. This is not appropriate for thermal compositional simulation, because the
phases have distinct properties and three-phase behavior is very frequently encountered. Further,
the large number of components in heavy oil may require detailed characterization, involving many
psuedocomponents. Reduced method flash calculations are a potential solution.
4.2 Derivation and implementation
There are many possible reduced variables formulations. We choose to use a generalized eigen-
value formulation because it does not require modification of the mixing rules in the PR EOS, nor
does it place restrictions on the number of nonzero component binary interaction parameters. The
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 58
fluid characterization and EOS parameters of a conventional flash algorithm can be used without
modification.
We now present our extension of Pan and Firoozabadi’s formulation [109] to three phases. Our
description begins with the the Peng Robinson EOS [115, 126]:
P =RT
v − b− a(T )
v2 + 2bv − b2. (4.1)
The crux of reduced variables methods lies in the decomposition of the energetic parameter, a,
which for a cubic model such as the PR EOS is given by:
a =
Nc∑i=1
Nc∑j=1
xixj√aiaj (1− σij) , (4.2)
where the binary interaction parameter (BIP) matrix is βββ = (1− σij). Given that the BIP matrix
is a square, symmetric matrix, the eigenvalue decomposition yields orthogonal basis vectors:
AAA = QQQΛQ−1Q−1Q−1 = QQQΛQTQTQT , (4.3)
where QQQ is an orthogonal matrix, with column vectors corresponding to the eigenvectors of βββ:
QQQ = {q′(1), q
′(2).....q′(Nc)}, (4.4)
and Λ is a diagonal matrix with entries corresponding to the eigenvalues of βββ:
Λ =
λ1
. . .
λNc
. (4.5)
Each eigenvector may be written q′(i) = (q′i1, q′i2...q
′iNc
)T . By extension,
βββ =
Nc∑k=1
λkq′kiq′kj . (4.6)
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 59
Combining equation 4.2 and 4.6 yields
a =
Nc∑k=1
λk
Nc∑i=1
xiq′ki
√ai
Nc∑j=1
xjq′kj√aj . (4.7)
Now, letting qki = q′ki√ai and defining Qk =
∑Nci=1 xiqki we can rewrite a in reduced form:
a =
Nc∑k=1
λkQ2k (4.8)
In a cubic EOS the compressibility factor and fugacity coefficient can be written as a function of
the energy and co-volume terms:
Z = Z(Q1, Q2..., QNc , b), (4.9)
φi = φi(Q1, Q2..., QNc , b). (4.10)
However, for many characterized hydrocarbon fluids, zero binary interaction terms create sparsity
in the BIP matrix. This in turn yields eigenvalues that are close to zero or insignificant, and both
Z and φi become functions of a reduced set of parameters:
Z = Z(Q1, Q2..., Qm, b), (4.11)
φi = φi(Q1, Q2..., Qm, b), (4.12)
where m < Nc. In a three phase setting, the set of reduced variables is {QQQV ,QQQW , bV , bW , V,W}.
The reduced variables method acts as a low pass filter. This ensures a full-rank linear system, and
the Newton method can be used.
A stepwise description of the three-phase flash procedure is provided here for clarity. A descrip-
tion of the two-phase flash is available in Pan & Firoozabadi [109]. The successive substitution
iteration is as follows:
• Step 1: Initialize the reduced variables {QQQV ,QQQW , bV , bW , V,W}.
• Step 2: Calculate {QQQL, bL, L}.
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 60
• Step 3: Calculate fugacity coefficients, φLi , φVi , φWi and the equilibrium ratios KVi = φLi /φ
Vi
and KWi = φLi /φ
Wi .
• Step 4: Calculate the independent phase amounts V and W, by solving the three-phase
Rachford-Rice equations (Eqs. 2.41 and 2.42). Update phase compositions xi, yi, wi via Eqs. 2.43,
2.44 and 2.45.
• Step 5: Check the fugacity residual ||f Lf LfL − f Vf VfV || + ||f Lf LfL − fWfWfW ||. If the residual is smaller than
the tolerance in the convergence criterion, stop. If the residual is smaller than the switching
criterion tolerance, proceed to the Newton procedure. Otherwise, update the reduced variables
{QQQV ,QQQW , bV , bW , V,W} and go back to step 2.
The Newton procedure is as follows:
• Step 1: Initialize the reduced variables {QQQV ,QQQW , bV , bW , V,W}
• Step 2: Calculate {QQQL, bL, L}.
• Step 3: Calculate fugacity coefficients, φLi , φVi , φWi and the equilibrium ratios KVi = φLi /φ
Vi
and KWi = φLi /φ
Wi .
• Step 4: Calculate phase compositions xi, yi, wi using Eqs. 2.43, 2.44 and 2.45.
• Step 5: Check the fugacity residual ||f Lf LfL − f Vf VfV || + ||f Lf LfL − fWfWfW ||. If the residual is smaller than
the tolerance in the convergence criterion, stop. Otherwise, proceed to Step 6.
• Step 6: If convergence is not achieved, construct and solve the linear system:
J ·∆X = −R (4.13)
• Step 7: Update the reduced variables and go back to Step 2.
The full development of the nonlinear equations and their derivatives is provided in Appendix
B. The derivation and implementation of analytical derivatives is challenging and error prone. To
verify the integrity of our implementation we have compared the partial derivatives of the Jacobian
matrix with those generated using the Stanford Automatically Differentiable Expression Templates
Library (ADETL) [172, 177].
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 61
4.3 Case studies in isothermal flash
In this section we examine the performance of the reduced-variables formulation for two- and three-
phase split calculations.
We tested our method across a large parameter space. Compositional variation was achieved by
varying the fraction of H2O combined with the hydrocarbon mixtures. We altered the fraction of
water in the mixture from 1% to 99%, with robust quantification of phase compositions observed
across the compositional spectrum. Here we only show the most material test cases to demonstrate
the efficacy of our approach.
The reduced variables method performs consistently in solving the phase-split problem.
4.3.1 Case 1: Four-pseudocomponent crude plus water.
Case 1 consists of the five component hydrocarbon-water mixture in Luo and Barrufet [79]. Fluid
parameters are summarized in Table 4.1. This is a pseudocomponent heavy crude. Binary interaction
parameters provided by Zhu and Okuno [180] are listed in Table 4.2. For this fluid there are only
2 significant eigenvalues, as the BIP matrix consists primarily of zeros. Fig. 4.1 shows the phase
diagram for a mixture of 50% water and 50% oil. The three-phase region is very large for this
system, particularly in comparison to the previous case studies in Chapter 3.
We selected this case study to determine the suitability of our reduced formulation for the solution
of phase-split problems in which the presence of trace components adversely impacts the performance
of Newton methods when using conventional variables. We performed phase-split calculations across
the three-phase region using the logarithm of K-values as primary variables (see Haugen et al. [52]
for details). We computed the condition number of the Jacobian matrix at convergence for both the
conventional log K variables and the set of reduced variables. The condition number is the ratio of
the largest to smallest singular value, resulting from the singular value decomposition of a matrix:
κ(JJJ) =σmax(JJJ)
σmin(JJJ). (4.14)
In our implementation we computed the condition number using the Eigen library [50]. A
comparison of Figs. Fig.4.2 and 4.3 show that the reduced method yields a linear system that is far
better conditioned. This superior conditioning is attributable to the orthogonal basis constructed
from the BIP matrix, which prevents spuriously large off-diagonal derivatives materializing in the
linearized system.
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 62
Table 4.1: Fluid properties for Case 1, taken from Luo and Barrufet [79].
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
H2O 0.50 18.015 647.3 220.8900 0.344
PC1 0.15 30.00 305.556 48.82 0.098
PC2 0.10 156.00 638.889 19.65 0.535
PC3 0.10 310.00 788.889 10.20 0.891
PC4 0.15 400.00 838.889 7.72 1.085
Table 4.2: Binary interaction parameters for the water-pseudocomponent oil mixture in Table 4.1[180, 150].
BIP H2O PC1 PC2 PC3 PC4
H2O 0
PC1 0.71918 0
PC2 0.45996 0 0
PC3 0.26773 0 0 0
PC4 0.24166 0 0 0 0
Figure 4.1: PT-phase diagram for the fluid in Case 1, taken from Luo and Barrufet [79]. The mixturecomprises 50% water and 50% hydrocarbon. Pressure is sampled every 0.25 bar and temperature issampled every 0.5 K.
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 63
Figure 4.2: Condition number computed at the solution in the three-phase region for the PT-phasediagram in Fig. 4.1. Here, the condition number corresponds to the Jacobian matrix associated withthe log K formulation.
Figure 4.3: Condition number computed at the solution in the three-phase region for the PT-phasediagram in Fig. 4.1. The condition number corresponds to the Jacobian matrix associated with thereduced variables formulation. The reduced variables yield a far better conditioned Jacobian.
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 64
Table 4.3: Component properties for the fluid in Case 2 [66].
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
H2O 0.10000 18.015 647.3 220.8900 0.344
CO2 0.01089 44.01 304.7 73.86796 0.225
N2 0.01746 28.013 126.2 33.94563 0.04
C1 0.0.59391 16.043 190.6 46.04085 0.013
C2 0.07821 30.07 305.43 48.83673 0.0986
C3 0.05319 44.097 369.8 42.65743 0.1524
C4 − C6 0.08703 66.86942 448.08 35.50565 0.21575
PC1 0.042705 107.77943 465.62 28.32348 0.3123
PC2 0.013635 198.56203 587.8 17.06905 0.5567
PC3 0.00297 335.1979 717.72 11.06196 0.91692
4.3.2 Case 2: SPE-3 nine-component condensate plus water.
Case 2 combines water with the nine-component condensate from the SPE third comparative solution
project [66]. Fluid properties are provided in Table 4.3. Binary interaction parameters with water
are estimated (see Table 4.4). For this fluid the spectral decomposition of the BIP matrix yields
eight non-zero eigenvalues. Here we focus on convergence to the solution of the phase-split problem.
The fluid comprises a mixture of 10% water and 90% hydrocarbon. A large three-phase region
is present in the PT phase diagram (Fig. 4.4). Fig. 4.5 shows numerical convergence to the
equilibrium solution at P = 200 bar, T = 290.5 K. In this example, successive substitution takes
2443 iterations to converge to the equilibrium result. On the other hand, the combined SS-Newton
algorithm requires only five Newton iterations to converge. The switch criterion tolerance is 0.02,
and 87 successive substitution iterations are used prior to switching to Newton. Results of the
three-phase split are summarized in Table 4.5.
4.4 Discussion
In compositional reservoir simulation there exists a nonlinear coupling of the local thermodynamic
constraints to the global solution of conservation laws . In thermal compositional simulation the
energy equation exhibits extreme sensitivity to phase behavior at each grid block. For this reason,
the accurate solution of phase-split problems is important to the fidelity of the global Newton loop.
This is especially the case when the overall molar compositions are used as primary variables in the
solution of the conservation laws. In this case, convergence of local thermodynamic constraints at
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 65
BIP H2O CO2 N2 C1 C2 C3 C4 −C6
PC1 PC2 PC3
H2O 0
CO2 0.0952 0
N2 -0.48 0 0
C1 -0.48 0 0 0
C2 0.45 0.13 0.05 0 0
C3 0.53 0.135 0.08 0 0 0
C4 −C6
0.50 0.1277 0.1002 0.09281 0 0 0
PC1 0.50 0.1 0.1 0.130663 0.006 0.006 0 0
PC2 0.50 0.1 0.1 0.130663 0.006 0.006 0 0 0
PC3 0.50 0.1 0.1 0.130663 0.006 0.006 0 0 0 0
Table 4.4: Binary interaction parameters for the fluid in Case 2. Hydrocarbon BIP data taken fromKenyon and Behie [66]. Hydrocarbon-water interaction parameters are estimated.
Component Phase 1 Phase 2 Phase 3
H2O 0.000271381 0.000273447 0.999972
CO2 0.0121475 0.0120496 1.24411e-05
N2 0.0181017 0.0205266 1.48698e-05
C1 0.630346 0.685507 3.65133e-07
C2 0.0889628 0.0850454 2.49001e-10
C3 0.0624378 0.0561403 2.59097e-14
C4 − C6 0.108759 0.0860664 1.11805e-18
PC1 0.0547045 0.0410583 3.89899e-24
PC2 0.0193717 0.0114367 8.29673e-49
PC3 0.00489795 0.00189572 2.76806e-90
Table 4.5: Three-phase flash results for the fluid in Case 2. Results obtained at P = 200 bar, T =290.5 K. The hydrocarbon phases (Phase 1 and Phase 2) are near critical.
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 66
Figure 4.4: PT phase diagram for mixture consisting of 10% water and 90% SPE3 condensate(Case 2). A large three-phase region is present. Pressure is sampled in increments of 0.25 bar andtemperature is sampled in increments of 0.25 K.
Figure 4.5: Analysis of convergence for a three-phase split calculation at P = 200 bar and T = 290.5K for the fluid in Case 2. The convergence criterion for the fugacity residual norm is set to 1e-10.Successive substitution requires 2443 iterations for convergence. This is attributable to the nearcriticality of the hydrocarbon phases. If we set the SS-Newton switch threshold to 0.02, we require87 successive substitution iterations to reach the switch residual, and only 5 Newton iterations forconvergence.
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 67
the grid block level is required to close the system of equations [4]. This cannot always be achieved
using successive substitution alone, and a second order method is required. Case 2 is a relevant
example. In a three-phase-split calculation the vapor and liquid hydrocarbon phases may approach
critical behavior. Fig. 4.5 clearly shows that as bicritical behavior is approached for a hydrocarbon-
water mixture, successive substitution does not converge to the required tolerance in a reasonable
number of iterations.
The literature on phase equilibrium calculations contains a great deal of conjecture regarding the
efficacy of reduced-variables formulations for the solution of phase-split calculations [51, 82, 47]. It
is not the purpose of this dissertation to provide a comprehensive comparison of conventional and
reduced formulations for phase-split calculations. Such an analysis is difficult for two key reasons, as
noted by Michelsen et al. [82]. First, an objective comparison of performance is made complicated
by implementation differences. Second, reduced-variables formulations may result in the solution
of a system that differs from the underlying full dimensional problem. Certain reduced-variables
formulations may create such differences via modification of the underlying mixing rules [75, 103, 48].
Our formulation uses a linear combination of eigenvalues and eigenvectors of the energetic term of the
BIP matrix. We retain all significant eigenvalues to ensure we faithfully represent the underlying
physical system, with a cut-off absolute value of 1E-14. In addition, we assess convergence by
computing the residual of the fugacity norm, rather than the norm of a residual in the reduced
parameter space. Finally, our formulation includes no modification of the mixing rules used in the
PR EOS. We use the Van Der Waals mixing rules with a single set of binary interaction parameters,
as is standard practice in the reservoir simulation community.
Hydrocarbon-water mixtures are characterized by the presence of trace components, which lead
to ill-conditioned linear systems when Newton methods are used to solve the phase-split problem.
The conventional approach to solving phase-split calculations consists of using independent variables
such as component mole numbers, the logarithm of phase equilibrium ratios or simply the equilibrium
ratios themselves [96]. In the case of component mole numbers, fugacity derivatives involving trace
components lead to rank deficiency of the linear system. A solution is to alter material balances to
exclude certain components from certain phases [90]. This is cumbersome, and may also be unphys-
ical. In addition, this is inappropriate in thermal reservoir simulation, in which high temperatures
and pressures lead to mutual solubility of hydrocarbons and water. Using the logarithm of K-values
as primary variables avoids the problem of rank deficiency, but results in a poorly conditioned linear
system as derivatives of the fugacity equations (Eq. 2.37 and Eq. 2.38) may be very large with
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 68
respect to small changes in the logarithm of a phase equilibrium ratio involving a trace component.
The result of this poor conditioning is clearly shown in Fig. 4.2. In contrast, our reduced-variables
formulation results in a condition number that is three to four orders of magnitude smaller than that
of the log K formulation in Fig. 4.3. Matrices are small and dense in phase equilibrium calculations,
and the linear systems are solved with direct solvers. If matrices are particularly well-conditioned,
solution with an iterative solver may be viable. Given that each iteration with a Krylov solver is
only O(n2), a few GMRES or BICGSTAB iterations could be quicker than solution with a direct
solver, which is O(n3).
The reduced-variables formulation introduced in this chapter is particularly well-suited to hydrocarbon-
water systems. The advantage of constructing a parameter space using a spectral decomposition of
the BIP matrix is twofold: (i) The resulting linear system is full rank, by-construction; (ii) the size
of the linear system may be substantially reduced, provided there are a significant number of zero
values in the BIP matrix. In regards to the first point, the set of reduced-variables acts as a low-pass
filter on the underlying physics of the component interactions manifest in the BIP matrix. The
reduced basis is unequivocally full rank, even in the case of trace components. As a result of this,
the standard SSI-Newton solution protocol can be used with confidence for phase-split calculations.
The linearized system can be reduced in size because most hydrocarbon-water mixtures consist of a
large number of zero BIP terms. For this reason, the reduced-variables method can be used to solve
phase-split calculations for complex heavy oils with a relatively small system. The size of the linear
system scales with the rank of the BIP matrix. As a result, the reduced basis facilitates more detailed
fluid characterization, in which components are lumped into a larger number of pseudocomponents.
In turn, improved fluid characterization may enable more faithful representation of complex thermal
recovery mechanisms in thermal EOR techniques such as SAGD and enhanced-SAGD.
4.5 Summary
In this chapter we developed and implemented a reduced three-phase flash formulation, and demon-
strated applicability to hydrocarbon water mixtures. The generalized eigenvalue approach uses a
cubic EOS without modification of the Van Der Waals mixing rules. Arbitrary partitioning of com-
ponents across phases is permitted, and there are no restrictions on the number of non-zero binary
interaction parameters.
The reduced-variables formulation addresses shortcomings with existing phase-split calculations
for hydrocarbon-water mixtures. We observed excellent performance of the reduced formulation for
CHAPTER 4. MULTIPHASE ISOTHERMAL FLASH USING REDUCED VARIABLES 69
hydrocarbon water mixtures. The set of reduced-variables yields a full-rank linear system when New-
ton methods are used to solve the phase-split problem. The reduced method circumvents difficulties
caused by trace components when conventional variables are used.
The developments in this chapter serve as an important step toward strengthening the coupling
of phase-equilibrium calculations and the transport equations in thermal compositional simulation.
In the next chapter we discuss solution of the challenging isenthalpic-isobaric flash, which builds
upon the isothermal flash.
Chapter 5
Reduction Method for Rapid
Isenthalpic Flash
Thermal compositional simulation involves a set of challenges distinct from those present in isother-
mal compositional simulation. Phase changes occur frequently owing to the steep thermal gradients
across the reservoir. Narrow boiling point behavior occurs as mixtures rich in water undergo large
changes in energy across phase boundaries. For this reason, the global solution of conservation laws
exhibits extreme sensitivity to phase behavior at the local level. The phase-behavior challenges
create difficulties for both the linear and non-linear solver. A potential solution is the use of overall
compositional variables along with enthalpy or internal energy. This formulation constitutes a per-
sistent set of primary variables and retains validity in the limiting case of a single degree of freedom.
However, isenthalpic flash is required when enthalpy or internal energy is used as a primary variable.
In this chapter we present a reduced method for isenthalpic flash in reservoir simulation. First,
we explain the reservoir simulation context and state our objectives for an isenthalpic flash kernel.
We proceed to establish a mathematical basis for our research, with reference to the isothermal flash
formulation. With this as a foundation, we extend the application of reduced variables to isenthalpic
flash. We then demonstrate the performance of our novel implementation using three fluids from the
literature, all of which exhibit narrow boiling point behavior. A discussion of the reduced isenthalpic
formulation is provided, before we summarize and draw conclusions.
70
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 71
5.1 Isenthalpic flash for thermal reservoir simulation
A high fidelity phase equilibrium kernel is imperative for robust solution of the conservation laws
when using the overall component compositions as primary variables. For the natural variables, sta-
bility testing without flash is often sufficient, because convergence of component fugacity constraints
can be achieved at the global level. On the other hand, the overall molar formulation relies upon
convergence of local thermodynamic constraints to close the system of equations [157].
Compositional simulation is computationally arduous, and the addition of the energy equation
makes thermal compositional simulation imperative. Because the molar formulation relies so heavily
on the phase equilibrium kernel, the need for efficient flash calculations becomes even more pressing.
In light of this, we can establish a set of objectives for the design of an isenthalpic flash algorithm.
First and foremost, we must satisfy iso-fugacity, material balance and enthalpy constraints to a tight
tolerance in order to close the system of equations for the overall molar formulation. In addition,
for efficiency we require an isenthalpic flash algorithm that exhibits quadratic convergence, even for
narrow boiling point fluids. Finally, we desire a general-purpose formulation that accounts for all
components in all phases (including trace quantities).
Drawing on our experiences with hydrocarbon water mixtures we seek an isenthalpic flash for-
mulation based on the reduced variables, which are particularly amenable to water-oil mixtures and
can improve the speed of flash calculations.
5.2 State-function based flash
The development of our reduced variables approach to isenthalpic flash was inspired by the state-
function based flash formulation introduced by Michelsen [88]. The system of equations used to
solve the familiar isothermal-isobaric flash is used as a starting point, with the component mole
numbers taken as independent variables. The generalized framework involves augmentation of the
isothermal-isobaric formulation with additional constraints to account for arbitrary state-function
flash specifications. Following Michelsen [88], the general-purpose formulation is
M rT rP
rTT ETT ETP
rTP ETP EPP
∆nJi
∆ lnT
∆ lnP
= −
r
eT
eP
, (5.1)
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 72
where M refers to the Jacobian matrix of the isothermal-isobaric flash, ∂ri/∂nPk for i, k = 1, .., Nc.
The vector r consists of fugacity residuals
ri = f ji − fpi , (5.2)
where j refers to phase j and p is the reference phase. The matrix elements rT and rP are given by:
rTi = T
(∂ ln φji∂T
− ∂ ln φpi∂T
), (5.3)
rPi = P
(∂ ln φji∂P
− ∂ ln φpi∂P
). (5.4)
The residual vector elements eT and eP consist of nonlinear thermodynamic constraint equations,
the form of which are prescribed by the state function flash specification. A complete description of
the residual elements and the remaining matrix elements is provided by Michelsen [88]. The subject
of this chapter is the isenthalpic-isobaric flash, on which we now focus our developments. Since
pressure is specified but temperature is unknown, pressure-dependent terms are no longer required
in Eq. 5.1 and the system of equations reduces to
M rT
rTT ETT
∆nji
∆ lnT
= −
r
(H −Hspec)/RT
. (5.5)
In Eq. 5.1 and Eq. 5.5 the term ETT refers to the temperature derivative of the enthalpy constraint,
i.e. ETT = −(1/R) ∂H/∂T .
Using Michelsen’s state function based formulation, the isenthalpic flash is solved using a common
Jacobian matrix that comprises the isothermal-isobaric matrix, with an additional row and column
to incorporate temperature and the enthalpy constraint. The symmetric matrix in Eq.5.1 becomes
poorly conditioned at phase boundaries, as component mole numbers are used as independent vari-
ables. This is well known for the isothermal-isobaric case, which is manifest in M [52]. Of greater
concern, the system of equations becomes degenerate for hydrocarbon-water mixtures in which trace
components appear. An alternative set of independent variables is required for a general-purpose
formulation. We choose the reduced variables because the system of reduced equations is full-rank
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 73
by construction, even in the presence of trace components [31].
5.3 Application of a reduced method to isenthalpic flash
Reduced variables have only been used for stability testing and phase-split calculations with isother-
mal specifications. In Chapter 4 we focused on the formulation of the reduced basis for isothermal
problems. We demonstrated applicability of the reduced variables formulation to the isothermal
flash problem. We now extend the application of a reduced basis to the isenthalpic domain for the
first time.
5.3.1 Formulation
One of the key contributions of this research is the solution of the isenthalpic flash in a reduced
parameter space. We achieve this by replacing the conventional variables in Eq. 5.5 with reduced
variables, thereby extending Michelsen’s concept to a reduced basis. Using the reduced variables,
Γ RT
HX ETT
∆X
∆ lnT
= −
R
(H −Hspec)/RT
, (5.6)
where the vector R refers to residuals corresponding to the isothermal-isobaric flash, as given by
Eq. B-26 through Eq. B-31 in Appendix B. The partial derivatives in Γ are the derivatives of R with
respect to the set of reduced variables X = {Qj , bj , βj} for j = 1, .., Np − 1. Following Michelsen
[88], we take the natural logarithm of temperature as the final independent variable, aligned with the
enthalpy constraint. The column vector RT refers to the derivatives of Eq. B-26 through Eq. B-31
with respect to ln(T ). Finally, the term Hx is the derivative of the enthalpy constraint (Eq. 1.1)
with respect to the reduced variables X.
Incorporation of reduced variables into a generalized formulation results in an asymmetric Jaco-
bian matrix. However, the reduced variables yield a set of nonlinear equations that are inherently
full-rank, owing to the orthogonality of the spectral decomposition of the BIP matrix. Provided a
reasonable initial guess is available, the Newton method can be used to attain rapid convergence.
The Newton procedure for isenthalpic flash is as follows:
• Step 1: Make an initial estimate of temperature, T .
• Step 2: Initialize the reduced variables {QQQV , bV , V,QQQW , bW ,W, ln(T )}.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 74
• Step 3: Calculate {QQQL, bL, L}.
• Step 4: Calculate fugacity coefficients, φLi , φVi , φWi and the equilibrium ratios KVi = φLi /φ
Vi
and KWi = φLi /φ
Wi .
• Step 5: Calculate phase compositions xi, yi, wi.
• Step 6: Compute the total molar enthalpy of the mixture H =∑Npj hjβj .
• Step 6: Check the fugacity residual ||fL − fJ || and the enthalpy residual (H − Hspec)/RT .
If each of the residuals are smaller than the respective convergence criteria tolerances, stop.
Otherwise, proceed to Step 7.
• Step 7: If convergence remains unattained, construct and solve the linear system:
J ·∆X = −e (5.7)
• Step 8: Update the reduced variables and temperature, and then go back to Step 3.
5.3.2 Implementation
Partial derivatives of the enthalpy constraint with respect to reduced variables are highly convo-
luted, owing to the complexity of the enthalpy departure function (see Eq. D-24 in the appendix).
Derivatives are generated analytically in ADETL using foundational differentiation rules such as
the product, quotient and chain rule. ADETL was used for functional testing of the reduced flash
algorithm described in Chapter 4. In addition, the library has been used extensively to generate
partial derivatives for a wide variety of applications including reservoir simulation [157] and opti-
mization [67]. The integrity of the ADETL-generated derivatives has been verified through rigorous
comparison with analytical implementations and numerical differentiation.
5.4 Case studies
In this section we examine the performance of the reduced variables isenthalpic flash implementation
for two- and three-phase-split problems. Each of the three fluids in this section exhibit narrow boiling
point behavior. We begin with an example of a hydrocarbon fluid, and demonstrate performance
comparable with that of a conventional Newton formulation (Eq. 5.5). We then switch our focus
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 75
to hydrocarbon-water mixtures. The exemplary performance of our novel approach is established
through an analysis of convergence for difficult problems involving hydrocarbon-water mixtures at
elevated temperatures.
We tested our method across an extensive parameter space, for multiple hydrocarbon and
hydrocarbon-water mixtures. We focus only on the most pertinent test cases to demonstrate the
efficacy of our approach. Our analysis demonstrates that the reduced variables exhibit relatively
benign behavior with respect to temperature variations in narrow boiling point fluids.
5.4.1 Case 1: CO2-rich narrow boiling point hydrocarbon fluid
Case 1 is a six-component mixture consisting of 80% carbon dioxide (CO2), 6.6% methane (C1),
2.2% propane (C3), 2.2% n-pentane (C5), 2.2%n-octane (C8), and 6.8% n-dodecane (C12). This
fluid is identical to that used by Zhu and Okuno [178]. Fluid properties are provided in Table 5.1,
binary interaction parameters are given in Table 5.2, and heat capacity data is listed in Table 5.3.
We compare the performance of conventional variables with the reduced variables in an isenthalpic
context. We use this example to demonstrate the suitability of the reduced formulation to isenthalpic
flash calculations. This case is a challenging narrow boiling point problem [178], although in contrast
to hydrocarbon-water systems the mixture does not contain near-pure phases. Fig. 5.1 shows the
PT-phase diagram for the system. Following Zhu and Okuno [178] we selected the test point in the
two-phase region, at 303.35 K and 77.5 bar.
This example was selected to establish the efficacy of the reduced formulation for the fully coupled
solution of the isenthalpic flash. For our test point, we initialize composition and phase fractions by
performing an isothermal phase-split calculation at 309 K. From this initial temperature estimate
we use Newton’s method to converge to the solution. Fig. 5.2 shows convergence of both the
conventional and reduced variables implementations to the solution temperature. Fig. 5.3 and
Fig. 5.4 show the reduction in the enthalpy and fugacity residuals, achieved using reduced and
conventional variables. Slightly better performance is observed for the reduced isenthalpic flash,
which requires one fewer iteration for convergence to a very tight tolerance. Fig. 5.5 shows the
condition number of the Jacobian matrices associated with the reduced and conventional variables
formulations for a converged isenthalpic phase-split across the two-phase region at 77.5 bar. In our
implementation we compute the condition number using the Eigen library [50]. Superior conditioning
of the reduced formulation is observed. Superior conditioning is to be expected, given both the
orthogonal basis from which the reduced method is derived and the smaller linear system.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 76
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
CO2 0.800 44.01 304.20 73.76 0.225
C1 0.066 16.043 190.60 46.00 0.008
C3 0.022 44.097 369.80 42.46 0.152
C5 0.022 72.151 469.60 33.74 0.251
C8 0.022 114.232 568.80 24.82 0.394
C12 0.068 170.34 658.30 18.24 0.562
Table 5.1: Properties of six-component hydrocarbon-CO2 fluid in Case 1 [178]
BIP CO2 C1 C3 C5 C8 C12
CO2 0
C1 0.1200 0
C3 0.1200 0 0
C5 0.1200 0 0 0
C8 0.1000 0.0496 0 0
C12 0.1000 0 0 0 0 0
Table 5.2: Binary interaction parameters for six-component hydrocarbon-CO2 mixture in Case 1.
Our objective here is merely to demonstrate proof of concept, through performance comparable
to that of the conventional Newton method for isenthalpic flash. We do not seek to laud the virtues
of the reduced formulation over the conventional approach. Indeed, performance differences are
quite small. However, the subsequent test cases involve hydrocarbon-water mixtures, in which trace
components provide a strong case for the use of reduced variables in isenthalpic flash.
Component C0P1 J/(mol K) C0
P2 J/(mol K2) C0P3 J/(mol K3) C0
P4 J/(mol K4)
CO2 19.795 7.343E-02 -5.602E-05 1.715E-08
C1 19.250 5.212E-02 1.197E-05 -1.132E-08
C3 -4.224 3.063E-01 -1.586E-04 3.215E-08
C5 -3.626 4.873E-01 -2.580E-04 5.305E-08
C8 -6.096 7.712E-01 -4.195E-04 8.855E-08
C12 -9.328 1.1490000 -6.347E-04 1.359E-07
Table 5.3: Heat capacity coefficient data for Case 1 [178].
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 77
Figure 5.1: PT-phase diagram for the CO2-rich narrow boiling point hydrocarbon fluid described inTable 5.1. Pressure is sampled every 0.25 bar from 2 bar to 220 bar. Temperature is sampled every0.25 K from 200 K to 550 K. The test condition is indicated at 303.35 K and 77.5 bar. Narrowboiling point behavior has been demonstrated in the vicinity of the test condition by Zhu and Okuno[178].
Figure 5.2: Convergence to the solution temperature using Newton’s method for two-phase isen-thalpic flash, with both reduced and conventional formulations shown.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 78
Figure 5.3: Convergence of the enthalpy constraint residual versus iteration number for two-phaseisenthalpic flash using Newton’s method. Results are shown for both reduced and conventionalformulations.
Figure 5.4: Convergence of the fugacity residual versus iteration number for two-phase isenthalpicflash using Newton’s method. Results are shown for reduced and conventional formulations.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 79
Figure 5.5: Condition numbers of the Jacobian matrices associated with the conventional and re-duced variables formulations. Condition number was computed at convergence of the two-phaseflash across the entire two-phase region at a pressure of 77.5 bar.
5.4.2 Case 2: Narrow boiling point pseudocomponent hydrocarbon-water
mixture
Case 2 consists of a five-component hydrocarbon-water mixture from Luo and Barrufet [79] intro-
duced in Chapter 4. Fluid parameters are summarized in Table 4.1. Binary interaction parameters
are listed in Table 4.2, and heat capacity coefficients are provided in Table 5.4. The oil is a pseu-
docomponent medium-heavy crude with a wide three-phase region, largely attributable to the first
hydrocarbon pseudocomponent, which is of relatively low molecular weight. The system has been
observed to exhibit narrow boiling point behavior, and has been studied by several authors in the
context of isenthalpic flash [180, 113]. We use this case study to emphasize the suitability of our
reduced formulation for isenthalpic flash problems involving hydrocarbon-water mixtures.
Fig. 5.6 through Fig. 5.9 display the phase diagrams for the system. The solution condition
is indicated at T = 483.63 K and P = 30 bars, in the PT-phase diagram of Fig. 5.6 and in the
PH-phase diagram in Fig. 5.8. Fig. 5.7 shows enthalpy contours associated with the phase regions
displayed in Fig. 5.6. There is an abrupt increase in enthalpy associated with the disappearance of the
aqueous phase, corresponding to the narrow boiling point and high heat capacity of water. Fig. 5.9
displays the temperature contours associated with the phase regions in Fig. 5.8. The evolution in
temperature across pressure-enthalpy space is far more gradual than the enthalpy variations observed
in pressure-temperature space (Fig. 5.7).
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 80
Component C0P1 J/(mol K) C0
P2 J/(mol K2) C0P3 J/(mol K3) C0
P4 J/(mol K4)
H2O 32.200 0.0019240 1.055E-05 -3.596E-09
PC1 -3.500 0.0057640 5.090E-07 0.0
PC2 -0.404 0.0006572 5.410E-08 0.0
PC3 -6.100 0.0109300 1.410E-06 0.0
PC4 -4.500 0.0080490 1.040E-06 0.0
Table 5.4: Heat capacity coefficient data for five-component oil-water mixture in Case 2 [180]. Fluidcharacterization can be found in Table 4.1 and binary interaction parameter data is listed in Table 4.2in Chapter 4.
We examined convergence of the isenthalpic reduced variables formulation for a particular case in
the three-phase region. We selected the same test case used by Zhu and Okuno [180] in their study of
direct substitution (T = 483.63 K and P = 30 bars). We use the same starting temperature of 450
K. Initially, the temperature is too far away to invoke the Newton method. We start with isothermal
flash calculations at 450 K, and at the upper temperature limit of 550 K. We then perform regula
falsi updates, until sufficiently close to the solution. At 486 K Newton’s method is initiated, and
convergence is attained in just four Newton iterations. Fig. 5.10 shows the convergence to the
solution temperature. The efficacy of our reduced method for this problem is more apparent in
Fig. 5.11, which shows convergence in both the fugacity residual norm and the norm of the enthalpy
constraint. The Newton iterations converge rapidly, provided the initial guess is sufficiently close to
the solution.
Fig. 5.12 shows the condition number of the Jacobian matrix associated with the reduced
Newton method. The condition number is computed across the three-phase region at 30 bar. Across
the entire three-phase region the linearized system is well-conditioned. This result is in contrast to
the work of Zhu and Okuno [180], who showed ill-conditioning of the Jacobian matrix associated
with the direct substitution algorithm.
5.4.3 Case 3: Narrow boiling point heavy oil-water mixture
Case 3 is the five-component oil-water mixture introduced in Chapter 3. Table 3.6 details the
properties of the water and the four hydrocarbon components. Note that the composition differs
from that in Chapter 3, as the mole fraction of the water component is now increased to 80%. Binary
interaction parameters are listed in Table 3.7, and Table 3.11 provides heat capacity coefficient data.
The spectral decomposition of the BIP parameter matrix yields only two nonzero eigenvalues. The
heavy oil comprises medium and high molecular weight hydrocarbons only. The absence of light
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 81
Figure 5.6: PT phase diagram for the five-component hydrocarbon-water mixture in Table 4.1. Themixture is 50% water, 50% hydrocarbon. Pressure is sampled every 0.5 bar and temperature issampled every 0.25 K. The test condition is at 483.63 K and 30 bar.
Figure 5.7: PT phase diagram with enthalpy contours for the five-component hydrocarbon-watermixture in Table 4.1.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 82
Figure 5.8: PH phase diagram for the five-component hydrocarbon-water mixture in Table 4.1.The PH-phase diagram is a mapping of the PT-phase diagram in Fig. 5.6 to the pressure-enthalpyparameter space. Pressure is sampled every 0.5 bar and enthalpy is sampled every 0.5 J/g.
Figure 5.9: PH phase diagram with temperature contours for the five-component hydrocarbon-watermixture in Table 4.1.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 83
Figure 5.10: Convergence to the solution temperature using the reduced variables implementationof Newton’s method for three-phase isenthalpic flash. The initial guess for temperature is 450 K,with an upper temperature limit of 550 K. After a few regula falsi iterations Newton’s method isinitiated, and rapid convergence to the solution temperature is attained.
Figure 5.11: Convergence of reduced variables implementation of Newton’s method for three-phaseisenthalpic flash. A rapid reduction is observed in both the fugacity residual norm and the residualof the enthalpy constraint.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 84
Figure 5.12: Condition number of the Jacobian matrix of the reduced variables with Newton’smethod. The condition number is computed at convergence for points across the three-phase regionat a fixed pressure of 30 bar.
hydrocarbon components contributes to the narrow boiling point characteristics of the oil when
combined with water at elevated temperatures.
We use this case to further demonstrate the efficacy of the the reduced isenthalpic flash method
in a narrow boiling point scenario. The mixture consists of a very narrow region of immiscibility,
in contrast to the five-component fluid in Case 2. This can be seen clearly in Fig. 5.13, which
shows the PT-phase diagram. Fig. 5.14 shows the enthalpy contours superimposed over the PT-
phase-diagram. Enthalpy increases rapidly across the three-phase zone, which appears small in
pressure-temperature space. Comparison of Fig. 5.13 with Fig. 5.15 shows that enthalpy changes
dramatically with a small change in temperature across the three-phase region. Fig. 5.16 shows
temperature contours in the PH parameter space. Temperature changes gradually and visual com-
parison with Fig. 5.15 suggests no obvious correlation between temperature and the phase state.
Phase fractions evolve rapidly in a very narrow region of temperature. Fig. 5.17 illustrates the
change in vapor and aqueous phase fractions as a function of temperature, as well as the enthalpy
change. Pressure is fixed at 25 bar. The increase in enthalpy is closely associated with the increase in
vapor phase fraction. Fig. 5.18 plots the condition number vs. temperature across the three-phase
region. The matrix is well conditioned, as in Cases 1 and 2.
We observed rapid convergence of our reduced isenthalpic flash formulation for this narrow boiling
point problem. We examined convergence at the point P = 25 bars, H = −95 J/g. The solution
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 85
Figure 5.13: PT-phase diagram for Case 3, a mixture of 80% water and 20% heavy oil. In thepressure-temperature space the region of three-phase behavior is very narrow. Pressure is sampledevery 0.5 bar and temperature is sampled every 0.25 K.
temperature is T = 489.37 K. Fig. 5.19 and Fig. 5.20 show the convergence behavior for a
series of initial temperature guesses across the three-phase region at 25 bars. For each initial guess,
we performed a single isothermal flash calculation to obtain initial estimates of phase fractions
and compositions. We then switched to the Newton method. Fig. 5.19 shows that convergence is
attained within five iterations, for almost any initial guess for temperature in the three-phase region.
Fig. 5.20 shows the residual of the enthalpy constraint vs. the number of Newton iterations required
for convergence. Convergence is rapid, even when the initial guesses correspond to a large residual
of the enthalpy constraint.
5.5 Discussion
The main application of the isenthalpic flash is in reservoir simulation of steam-based thermal EOR,
including steam flooding, cyclic steam flooding and SAGD. The fluid systems are hydrocarbon-
water mixtures at elevated temperatures. Isenthalpic flash is required in thermal simulation when
the overall molar variables formulation is used. The isenthalpic flash kernel is critical to the global
solution of conservation laws because: (i) The energy equation is sensitive to phase behavior at
the local level; and (ii) the molar variables formulation requires closure of local thermodynamic
constraints at each iteration to close the system of equations [157]. However, isenthalpic flash
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 86
Figure 5.14: Enthalpy contours superimposed on the PT-phase diagram for Case 3. Enthalpychanges abruptly across phase boundaries.
Figure 5.15: PH-phase diagram for the fluid in Case 3. Pressure is sampled every 0.25 bar andenthalpy is sampled every 1 J/g. The three-phase region is prominent in the pressure-enthalpyparameter space, whereas in the PT-diagram the zone of three-phase behavior is incredibly narrow(Fig. 5.13).
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 87
Figure 5.16: Temperature contours displayed in pressure-enthalpy space for the five-componentmixture of heavy oil and water in Case 3. The change in temperature is relatively gradual acrossthe parameter space.
Figure 5.17: Change in enthalpy and phase fractions with temperature across the three-phase regionat 25 bar for Case 3.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 88
Figure 5.18: Condition number versus temperature across the three-phase region at 25 bar for Case3.
Figure 5.19: Initial temperature vs. iterations required for convergence. The specified conditionsare P = 25 bar and H = −95 J/g and the solution temperature is T = 489.37 K. Convergence isattained rapidly, even for initial guesses at the edge of the three-phase zone.
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 89
Figure 5.20: Residual of the enthalpy constraint at initial guess vs. number of iterations requiredfor convergence. The test point is P = 25 bar and H = −95 J/g. The reduced method convergeswithin five iterations even when the initial guess is far from the solution.
has received little attention in the phase equilibrium literature in comparison to isothermal flash,
presumably because of its niche application in thermal reservoir simulation.
Given our desire for high fidelity coupling of local thermodynamic constraints and the global
mass and energy balances, we identified the need to satisfy isofugacity, material balance and en-
thalpy constraints to a tight tolerance. We also recognized the need for rapid convergence, even for
narrow boiling point fluids, which are ubiquitous in thermal recovery processes. In keeping with
the dissertation theme of a completely general-purpose formulation, we also identified the need to
account for all components in all phases. The novel isenthalpic flash formulation presented in this
chapter meets all of these requirements. Through the preceding examples we have demonstrated
rapid convergence of the new algorithm, for three fluids identified as narrow boiling point mixtures
in the literature. The new formulation has advantages over existing approaches, although several
issues remain with respect to efficient execution in reservoir simulation.
Existing solutions to the isenthalpic flash involve either: (i) Decoupled solution of the isothermal
flash and the temperature; (ii) direct substitution, whereby the phase fractions are coupled with
temperature and equilibrium ratios are updated separately; (iii) Newton’s method for root-finding
or minimization, using component mole numbers as independent variables. Of the existing solutions,
decoupled methods are slow and impractical for large scale reservoir simulation. Direct substitution
breaks down in narrow boiling point systems. However, narrow boiling point behavior is ubiquitous
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 90
in the simulation of thermal recovery processes, owing to the thermodynamic dominance of the
water component. In addition, the speed of convergence of direct substitution is unsatisfactory for
large scale reservoir simulation. The reduced isenthalpic flash introduced in this research converges
quickly to a strict tolerance. We observed this exemplary performance for the fluids presented as
case studies, each of which exhibits narrow boiling point behavior. The key advantage of a fully
coupled solution to the isenthalpic flash is vastly superior performance in the case of narrow boiling
point behavior.
Chapter 4 discussed the advantages of reduced variables for flash calculations. Namely, a poten-
tial reduction in the dimensionality of the problem, and an inherently full rank linearized system
owing to the orthogonal basis from which the variables are constructed. Fig. 5.5 shows the con-
dition number when the reduced variables and the conventional variables are used for a two-phase
isenthalpic flash. The reduced formulation condition number is up to several orders of magnitude
lower. The superior conditioning of the reduced formulation is likely attributable to both the phase
boundary effects that hinder the conventional variables, in addition to the orthogonal basis from
which the reduced variables are constructed. Regarding the former, the conventional variables in
isenthalpic flash are the component mole numbers. Phase component mole numbers are known to
suffer from an ill-defined Jacobian matrix close to the phase boundaries [52], which explains the
increase in the condition number close to the phase boundaries. Another possible effect could stem
from decreased temperature sensitivity of the reduced variables, in comparison to the conventional
variables.
A specific characteristic of hydrocarbon water mixtures is the presence of trace components,
which adversely impacts the performance of Newton methods when using conventional variables
[31]. For this reason, isenthalpic flash formulated with component mole numbers as independent
variables cannot be directly used for hydrocarbon water mixtures. The reduced Newton method
introduced in this research fills an important void in this regard. Because the reduced method is
constructed from an orthogonal basis, the resulting Jacobian matrix is intrinsically full-rank. In
Case 2 and Case 3 we illustrated the applicability of our reduced isenthalpic flash formulation to
hydrocarbon-water mixtures in which trace components appear. Prior rapidly convergent algorithms
have placed restrictions on phase compositions to avoid matrix ill-conditioning [13]. The reduced
formulation is insensitive to the presence of the component near-insolubility in any of the phases
present.
The excellent performance of the new isenthalpic flash formulation is not without caveats. Our
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 91
formulation is a Newton method, for which convergence is not guaranteed. Formulation of a min-
imization algorithm with a reduced basis is challenging. The Hessian is inherently non-symmetric.
Furthermore, solution of the isenthalpic flash via direct maximization of entropy is challenging with
any set of independent variables, on account of the nonlinear enthalpy constraint [88]. In our im-
plementation testing we noted excellent convergence for narrow boiling point fluids, when using
a criterion of H − Hspec < 0.1 to invoke the Newton solver. No switch criterion was applied to
the fugacity constraints in the presented examples. However, this is because prior nested solution
of the isothermal flash using bisection or regula falsi results in excellent initial guesses for phase
compositions.
The decoupled approach is a means of pre-conditioning the isenthalpic flash and constraining the
phase state. However, this approach is highly inefficient. In Chapter 3 and Chapter 4 we described
procedures for sequential phase-stability testing and phase-split calculations, assuming no prior
knowledge of the phase state. In a reservoir modeling context, precedents can be established in phase
equilibrium which are valuable in a time-evolution simulation. We noted that presumptions regarding
the phase state and composition are not as prudent as sequential stability testing and phase-split
calculations. However, certain algorithms can reliably use prior information to assist in selection of
the most appropriate phase-equilibrium algorithm and satisfy local thermodynamic constraints. For
instance, compositional space parameterization (CSP) can be used to bypass stability testing when
used in a natural variables framework [174, 175].
In a typical reservoir simulation study, the vast majority of grid cells experience very little change
in state between time steps. In most regions of the domain, the number of phases is invariant from
one time step to another, and there is little variation in the composition and amount of each of the
phases present. Brantferger [13] noted that good initial guesses of equilibrium compositions and
temperature are often available. With relative thermodynamic homeostasis in most parts of the
reservoir, compositions and phase fractions from the prior time step constitute an excellent initial
guess for the phase split calculation. In isothermal compositional reservoir simulation the Newton
method can be used directly to achieve rapid convergence to a tight tolerance in just a few iterations
[90].
The isenthalpic flash kernel is incredibly costly in thermal compositional simulation. The ex-
emplary performance demonstrated in this research is for a Newton method which is not globally
convergent, and which requires preconditioning. However, we can envisage a scenario in which the
reduced isenthalpic phase-split algorithm can be used directly in a CSP framework. To date, CSP
CHAPTER 5. REDUCTION METHOD FOR RAPID ISENTHALPIC FLASH 92
has found the most application in natural variables formulations to skip stability testing. The tight
tolerances required by the molar variables formulation are not amenable to solution of flash calcula-
tions by means of CSP-based flash. However, parameterization of pressure-enthalpy compositional
space could be used to constrain the phase state and estimate compositions which could then be
used directly in a Newton solver.
5.6 Conclusions
In this chapter we presented a new method for isenthalpic flash using reduced variables. We described
a novel extension of reduced variables beyond the isothermal domain in phase equilibrium problems.
Solution of the isenthalpic flash using a reduced basis benefits from the advantages discussed in
Chapter 4, including:
• A potential reduction in the dimensionality of the problem
• An inherently full rank linearized system owing to the orthogonal basis from which the variables
are constructed.
Both of these advantages are particularly relevant to hydrocarbon-water mixtures in the sim-
ulation of thermal recovery. The reduction in problem dimensionality combats the computational
burden and characterization difficulty often posed by the large number of components present in
heavy oil mixtures. Further to this point, the characterization of oil-water mixtures often involves a
BIP-matrix consisting of many zero values, which offers a significant opportunity for dimensionality
reduction. With respect to the inherent full dimensionality of the linearized system, the reduced basis
acts as low pass filter on the underlying problem, circumventing the effect of near pure phases which
compromise the use of standard variables because of matrix ill conditioning. For hydrocarbon-water
mixtures the reduced method is agnostic to the presence of trace components in the phases.
With reference to three case studies we demonstrated excellent performance of the reduced isen-
thalpic formulation. Provided the initial guess was sufficiently close to the solution, convergence
was attained by the reduced isenthalpic formulation in only a handful of iterations. Quadratic con-
vergence was observed even for narrow boiling point mixtures. The reduced isenthalpic formulation
provides new capability in the form of a rapidly convergent algorithm that allows for completely
generalized component partitioning across all fluid phases. The developments in this chapter pro-
vide important capability in our isenthalpic framework. We now bring this isenthalpic framework
to fruition in Chapter 6.
Chapter 6
Thermodynamically Rigorous
Thermal Simulation
In this chapter we describe the formulation and implementation of a fully-compositional thermal
simulator. The EOS kernel includes the phase equilibrium algorithms developed in Chapters 3, 4
and 5.
Our primary objective in the development of this simulator was to demonstrate proof of concept
of an isenthalpic framework for thermal compositional simulation. As a secondary priority, we
compared the nonlinear performance of the molar and natural formulations.
This chapter proceeds as follows. We begin with a mathematical description of the overall
molar composition formulation. Next, we describe the isenthalpic molar formulation and provide a
description of the implementation in AD-GPRS. We then showcase the capability of the framework,
using several thermal compositional simulation examples. We discuss these simulation cases before
drawing conclusions.
6.1 Mathematical basis
The primary equations in thermal reservoir simulation include the mass and energy conservation
laws.
93
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 94
6.1.1 Conservation of mass
Rate of mass accumulation = Net rate of mass flux + Rate of mass production/injection
For a compositional model, the equation for conservation of mass is written for each component i:
∇ ·
np∑j=1
ρj~vjxji
=∂
∂t
np∑j=1
φρjSjxji
+
np∑j=1
qjρjxji , (6.1)
where xji is the mass fraction of component i in phase j. The velocity of phase j, ~vj , is given by
Darcy’s Law
~vj = −~~k kjrµj· ∇Φj , (6.2)
where Φj is the potential of phase j. Eq. 6.2 includes gravity, although in this work we did not
consider gravity effects.
6.1.2 Energy balance
Rate of energy accumulation = Net rate of energy flux + Rate of energy production/injection(6.3)
The energy flux consists of the convective contributions of the flowing phases, conduction and radi-
ation. In reservoir simulation, radiation is often neglected as its contribution to the overall energy
flux is small compared to convection and conduction.
Convection
Convective heat transfer is heat transfer by a moving fluid
ρC∂T
∂t+∇ (~vρE) = 0, (6.4)
where energy, E, is given by
E = H + PV +1
2v2 + gz. (6.5)
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 95
Internal energy and enthalpy are related via H = U + PV .
Conduction
Conduction does not involve flow. Rather, it occurs as a result of molecular collisions. Heat transfer
via conduction is given by
ρC∂T
∂t−∇ · (λ∇T ) = 0, (6.6)
where λ is the thermal conductivity. This term is usually transformed into thermal diffusivity,
α = −λ/ρC, so that conductive heat transfer becomes
∂T
∂t+∇ · (α∇T ) = 0. (6.7)
Governing energy equation
The energy balance can be written as
∂
∂t
ρU +1
2
np∑j=1
ρj |~vj |2+∇ · ~E +
np∑j=1
∇ · (P j~vj)−np∑j=1
ρj~vj · ~g = 0. (6.8)
Recalling the assumption that heat transfer is via conduction and convection only, and accounting
for source, sink and influx terms, the energy balance may be written as follows:
Q+∂
∂t
np∑j=1
φρjSjU j + (1− φ)ρsUs +1
2
np∑j=1
ρj |~vj |2 (6.9)
−∇ · (α∇T ) +
np∑j=1
∇ · (ρj~vj[U j +
1
2|vj |2
])
+
np∑j=1
∇ · (P j~vj)−np∑j=1
ρj~vj · ~g
=
np∑j=1
qjhj .
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 96
Multiplying P by density yields PV/m which can then be added to specific internal energy, U , to
give specific enthalpy
Q+∂
∂t
np∑j=1
φρjSjUj + (1− φ)ρsUs +1
2
np∑j=1
ρj |~vj |2 (6.10)
−∇ · (α∇T ) +
np∑j=1
∇ · (ρj~vj[hj +
1
2|vj |2
])
−np∑j=1
ρj~vj · ~g
=
np∑j=1
qjhj ,
where U refers to the specific internal energy, Q refers to heat influx rate and h refers to specific
enthalpy ( i.e. H/m). Ignoring the momentum and gravity-dependent terms yields
Q+∂
∂t
np∑j=1
φρjSjUj + (1− φ)ρsUs
−∇ · (α∇T ) +
np∑j=1
∇ · (ρj~vjhj) =
np∑j=1
qjhj . (6.11)
Equation 6.11 is a parabolic equation due to the presence of the conduction term.
6.2 Overall molar composition formulation
In compositional simulation, the overall molar composition formulation is an alternative to the
natural variables formulation for two key reasons:
1. A persistent set of primary variables.
2. The global solution of algebraic equations is isolated from fluid property calculations.
In this choice of primary variables, variable switching is not required, and linear solvers can be
designed and optimized for the system of equations. In the case of the natural variables, phase
compositions and saturations constitute interdependent primary variables. The implication is that
thermodynamic properties are consistent only at the converged solution of the nonlinear system of
equations [37]. In the case of the molar variables, the number of primary variables is equal to the
number of independent variables. The formulation ensures the thermodynamic properties are always
consistent [37].
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 97
In thermal compositional simulation, the overall molar composition formulation carries additional
advantages owing to (i) the frequency of phase changes, and (ii) the interdependency of pressure
and temperature in the limiting case of a single degree of freedom. In the case of the former,
phase changes occur more frequently in thermal recovery processes, on account of the steep thermal
gradients. Theoretically, the latter case only occurs in cases where the number of phases Np exceeds
the number of components, i.e. Np = Nc + 1. However, heavy oil mixtures in combination with
water may act as a single pseudocomponent. Injection of steam into the reservoir gives rise to a
pseudo two-component, three-phase system.
The state postulate in thermodynamics says that the state of a simple compressible system
is completely specified by two independent, intensive properties. In reservoir simulation, pressure
and temperature serve almost universally as the intensive properties of choice. Interdependency
precludes their use, however. In the natural formulation, this difficulty can be addressed using
variable substitution. However, when an invariant set of primary variables is used in the overall molar
composition formulation, it is necessary to use an alternate primary variable. The common choice
is enthalpy, which is aligned with the energy equation. However, this is not without consequence.
Enthalpy is an extensive primary variable, which when used in combination with pressure does not
completely specify the state of a simple compressible system.
The primary variables in this formulation are:
• P - pressure [1]
• H - mixture specific enthalpy [1]
• Zc - overall mixture composition [nc − 1]
In the molar formulation, fluid calculations are completely decoupled from the conservation
laws. However, in fully implicit models, the calculation of the transmissibility derivatives becomes
highly convoluted [37]. Derivatives of transmissibility terms stem naturally from saturation, whereas
derivatives of transmissibility with respect to species compositions is incredibly contrived. Farkas
[37] notes there are two approximations of these derivatives that have been used in the linearization
of the governing equations. First, the transmissibility derivatives with respect to compositions can
be calculated numerically. Second, an analytical approximation of the derivatives can be taken.
Neither the numerical approximation of derivatives nor the inexact Newton approach is ideal. In
the next section we discuss our approach, which uses Newton’s method with no approximations of
the Jacobian derivatives.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 98
6.3 Development and implementation in AD-GPRS
The isenthalpic molar formulation is simply a specific case of the nonlinear molar variables formu-
lation. The key difference is the inclusion of thermal physics. The sequential implicit framework
in AD-GPRS splits the thermal and flow problems into separate class structures, using a bridge
pattern [124, 125]. For this reason, the isenthalpic molar variables formulation is a child class of the
molar variables formulation. Most function calls are identical to those in the isothermal molar for-
mulation, with the key distinctions being those related to phase equilibrium (isenthalpic flash) and
the computation of derivatives. The isenthalpic formulation requires isenthalpic flash, whereas the
isothermal formulation uses isothermal flash. Temperature is a dependent variable in the isenthalpic
framework. Nevertheless, it is used for property calculations in both the flow physics and thermal
physics modules. For this reason it must be computed as a coupled property. However, temperature
is computed along with phase compositions in the isenthalpic flash, so compositions are also treated
as coupled properties.
The molar framework requires phase stability testing at each grid block to determine the phase
state. In the isothermal molar formulation flash calculations are not required at grid blocks in which
only a single phase is present. However, if two or more phases are present flash calculations must
be performed to obtain the the phase compositions, in each grid block. In an isenthalpic setting
the phase behavior is complicated because temperature is an additional unknown. A temperature
solve must be performed at every grid block, regardless of the phase state. If the system is single
phase this amounts to a single-phase temperature solve. Otherwise, temperature is computed via
the isenthalpic flash.
A major difficulty in the development of an isenthalpic simulator is the construction of the
system of equations for the global solution of the governing equations with Newton’s method. First,
the secondary constraints must be converged to close the system of equations. This is achieved
through the phase equilibrium kernel (i.e. flash). The second difficulty lies in computation of
the partial derivatives that comprise the Jacobian matrix. The derivatives of residual equations
with respect to primary variables is complicated because most of the secondary variables are not
computed as a function of primary variables. In order to obtain derivatives of secondary variables
with respect to primary variables, we have two choices: (a) Manually take derivatives (i.e. by hand)
for each secondary variable as a function of each primary variable; (b) Implicitly compute the partial
derivatives. Option (a) is computationally efficient. However, it is time consuming, and highly error
prone. We select option (b) because it is far less error prone. However, the computational overhead
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 99
is quite significant. To compute derivatives implicitly we use the implicit function theorem.
6.3.1 Computation of derivatives using implicit function theorem
The derivatives of the phase fractions xcp and the temperature T must be obtained as a function
of the primary unknowns. This is achieved through the use of the implicit function theorem. Some
explanation is required here. Consider a system of equations F
F1 (s1, s2, ..., sn, p1, p2, ...pm)
F1 (s1, s2, ..., sn, p1, p2, ...pm)
...
Fm (s1, s2, ..., sn, p1, p2, ...pm)
The system of equations includes the secondary variables s and the primary variables p. The
objective is to obtain the derivatives of the secondary variables s in terms of the primary variables
p. According to the implicit function theorem, if
det
(∂F
∂p
)6= 0 (6.12)
then in a neighborhood of (s0,p0) there exist unique functions pi = fi(s1, s2, ...sn) for i = 1, ...m
where pi ∈ C1 and the partial derivatives of the functions f may be computed implicitly.
We form a system of constraint equations F = 0, which we write in terms of the primary and
secondary variables:
Fi = f1i (P, T, xi1)− fpi (P, T, xcp), i = 1, ..., nc, j = 2, ..., np (6.13)
Fi+nc = zi −np∑j=1
βpxi,j , i = 1, ..., nc (6.14)
F2nc+1 =
nc∑c=1
(xc1 − xcp), j = 2, ..., np (6.15)
F2nc+2 = H −Np∑j=1
βjhj (6.16)
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 100
Implicit computation of derivatives has previously been used in AD-GPRS, although only for
isothermal simulation (see [38], for example). The isenthalpic formulation differs from the isothermal
molar formulation in that there is an additional equation - i.e. Eq. 6.16. When a single phase is
present in a grid block, Eq. 6.13 through Eq. 6.15 no longer apply. However, Eq. 6.16 still needs to
be satisfied for the purposes of computing derivatives as a function of H.
∂~x
∂~z= −
(∂F
∂~x
)−1∂F
∂~z(6.17)
where,
~x =
xi
βj
T
~z =
P
H
Zi
F =
Fi...
F2nc+2
(6.18)
This routine allows implicit calculation of property derivatives (e.g. derivatives of density, vis-
cosity, etc) in terms of the primary variables.
For all thermal compositional problems we use a direct solver from the PARDISO library [135,
134]. The development of efficient linear solvers for thermal reservoir simulation is an outstanding
challenge, beyond the scope of this work.
6.4 Case studies in compositional thermal simulation
We now turn our focus to several case studies in thermal compositional simulation. We use this sec-
tion to demonstrate our general purpose compositional framework, which allows for all components
in all phases. We implemented both the natural variables formulation and the overall compositional
formulation, which incorporates enthalpy as a primary variable. Here we compare and contrast the
performance of each formulation for simulation of thermal recovery processes, in which the primary
source of nonlinearity is hydrocarbon-water phase behavior.
Following implementation we verified the efficacy of the isenthalpic framework with a simple
steam flood of a ternary mixture. Our case studies begin with a review of this simple one-dimensional
case for proof of concept. Next, we present an example of steam-solvent coinjection to study the
performance of the molar and natural formulations. Here, we also include conductive thermal flux.
Finally, we take a detailed look at the performance of the molar and natural formulations with
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 101
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
H2O 0.30 18.015 647.30 220.8900 0.344
C3 0.42 44.097 369.80 42.46 0.152
C16 0.28 226.400 717.00 14.19 0.742
Table 6.1: Properties of initial reservoir fluid in Case 1 [180]
BIP H2O C3 C16
H2O 0
C3 0.6841 0
C16 0.3583 0 0
Table 6.2: Binary interaction parameters for three-component mixture in Case 1.
reference to a case involving steam injection into a narrow boiling point fluid. Through this final
case study we show the superior nonlinear performance of the molar variables framework for the
advancement of a flash front in a narrow boiling point fluid. In the first three examples flow was
strictly one dimensional. Gravity and capillary pressure were not not included in any of the cases.
It follows that counter-current flow was not present and not a source of nonlinearity.
6.4.1 Case 1: Steam drive
We begin with a simple one dimensional steam flood of a ternary mixture. We use this example for
proof of concept. Fluid parameters are provided in Table 6.1 and binary interaction parameters are
listed in Table 6.2. Heat capacity coefficients are listed in Table 6.3. The PT-phase diagram for
the initial reservoir composition is presented in Figure 6.1. Zhu and Okuno [180] used this ternary
mixture in the study of robust isenthalpic flash algorithms for narrow boiling point fluids. Although
the mixture exhibits narrow boiling point behavior, there exists a substantial three-phase region in
pressure-temperature space (see Fig. 6.1).
We inject steam at a constant BHP of 40 bar and a temperature of 530 K, which is slightly above
Component C0P1 J/(mol K) C0
P2 J/(mol K2) C0P3 J/(mol K3) C0
P4 J/(mol K4)
H2O 32.200 1.907×10−3 1.055×10−5 -3.596×10−9
C3 -4.220 3.063×10−1 -1.586×10−4 3.215×10−8
C16 -13.000 1.529 -8.537×10−4 1.850×10−7
Table 6.3: Heat capacity coefficient data for Case 1 [180]
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 102
Figure 6.1: PT phase diagram for initial reservoir fluid in Case 1, consisting of 30% H2O, 42% C3
and 28% C16.
the steam saturation temperature. The initial reservoir temperature is 340 K. The injection well is
at a constant pressure of 15 bar. We use BHP specifications for both injection and production wells.
Very small time steps are used and the system is only a three-component fluid with a relatively
wide region of three-phase behavior. Nonconvergence of the global Newton solver is not an issue and
no time step cuts are required for either of the two variable formulations. Each formulation uses a
total of 1391 time steps for the simulation, with the molar variables requiring 2794 global Newton
iterations and the natural variables requiring 2831 global Newton iterations. Nonlinear performance
is very similar between the two formulations.
For validation purposes we show the results attained at the end of the simulation. The natural
variables formulation has been used extensively for isothermal and thermal compositional simulation
in AD-GPRS and serves as a point of comparison for the newly developed isenthalpic framework.
Fig. 6.2 through Fig. 6.5 compare the end time simulation results using the alternative variable
formulations
With this simple example we have shown that the two formulations yield the same result, and
in doing so have validated the isenthalpic framework. Questions remain as to whether nonlinear
performance will differ for more challenging cases. We now turn our attention to a more difficult
case study, involving a seven-component system.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 103
Figure 6.2: So vs. xD at end of simulation.
Figure 6.3: Sg vs. xD at end of simulation.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 104
Figure 6.4: P vs. xD at end of simulation.
Figure 6.5: T vs. xD at end of simulation.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 105
6.4.2 Case 2: Steam-solvent coinjection
In this example we simulated steam-solvent coinjection in one dimension. We selected this case to
examine the effects of conduction on nonlinear performance.
The fluid in this case study consists of the five-component fluid in 4.3.1, although the fraction
of the water component has been decreased. The initial reservoir fluid also includes a trace of the
solvent components C1 and C3. Table 6.4 provides details of the initial reservoir fluid characteristics.
Binary interaction parameters are provided in Table 6.5 and heat capacity correlation coefficients
are listed in Table 6.6. The composition of the injectant is representative of a steam-solvent mixture,
comprising 80% H2O, 9.95% C1, 9.95% C3 and 0.1% PC1. The initial reservoir conditions are 320 K
and 20 bar, which puts the reservoir fluid in the two-phase oil-water state. As for Case 1, the model
is a one dimensional homogeneous reservoir. Dirichlet boundary conditions are used for both the
injection and production wells. The injector BHP is 40 bar and the injectant temperature is fixed
at 530 K. The production well BHP is set to 20 bar.
Injection of the steam solvent mixture proceeds for 15 days, which is more than sufficient for
breakthrough of the vapor phase to occur at the production well. As injection proceeds a flash
front moves across the reservoir. Our focus here is the numerical results, rather than the physical
phenomena. Fig. 6.6 through Fig. 6.8 summarize the nonlinear performance of the natural and molar
formulations for this problem. For both formulations, non-convergence of the global Newton loop
was not an issue. No time step cuts were incurred. The molar formulation marginally outperformed
the natural formulation, taking fewer Newton iterations (Fig. 6.8) and fewer time steps (Fig. 6.6),
leading to a larger average CFL number (Fig. 6.7). However, performance is only marginally better.
Also of interest, the addition of the second order conductive flux term makes the problem easier.
Both the natural and molar formulations exhibit improved performance for combined conductive-
convective heat transfer.
6.4.3 Case 3: Steam flooding for narrow boiling point fluid
We now present a particularly challenging case, using the narrow boiling point fluid previously
studied in sections 3.3.2 and 5.4.3. The three-phase region is very narrow in pressure-temperature
space, in contrast to the fluids in simulation cases 1 and 2. We selected this case study to highlight
the advantage of the isenthalpic molar formulation for compositional simulation of thermal recovery
in which narrow boiling point behavior is manifest across a narrow three-phase region.
The key here is the narrow region of three-phase behavior exhibited by this mixture, and the
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 106
Component Mole fraction MW (g/mol) Tc (K) Pc (bar) ω
H2O 0.24999998 18.015 647.3 220.8900 0.344
C1 1.0E-08 16.043 190.60 46.00 0.008
C3 1.0E-08 44.097 369.80 42.46 0.152
PC1 0.225 30.00 305.556 48.82 0.098
PC2 0.15 156.00 638.889 19.65 0.535
PC3 0.15 310.00 788.889 10.20 0.891
PC4 0.225 400.00 838.889 7.72 1.085
Table 6.4: Properties and composition of initial reservoir fluid for Case 2.
BIP H2O C1 C3 PC1 PC2 PC3 PC4
H2O 0
C1 0.756000
C3 0.684100 0
PC1 0.719180 0 0
PC2 0.459960 0 0 0
PC3 0.267730 0 0 0 0
PC4 0.241660 0 0 0 0 0
Table 6.5: Binary interaction parameters for seven-component system in Case 2.
Component C0P1 J/(mol K) C0
P2 J/(mol K2) C0P3 J/(mol K3) C0
P4 J/(mol K4)
H2O 32.200 0.0019240 1.055E-05 -3.596E-09
C1 19.300 5.212E-02 1.197E-05 -1.132E-08
C3 -4.220 3.063E-01 -1.586E-04 3.215E-08
PC1 -3.500 0.0057640 5.090E-07 0.0
PC2 -0.404 0.0006572 5.410E-08 0.0
PC3 -6.100 0.0109300 1.410E-06 0.0
PC4 -4.500 0.0080490 1.040E-06 0.0
Table 6.6: Heat capacity coefficient data for seven-component oil-water mixture in Case 2 [180].
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 107
Figure 6.6: Time steps required for alternate formulations in Case 2.
Figure 6.7: Maximum average CFL number for alternate formulations in Case 2.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 108
Figure 6.8: Total Newton iterations required for alternate formulations in Case 2. Clearly, conductionmakes the problem somewhat easier for the nonlinear solver.
relative advantage of the molar variables over the natural variables comes to the fore. We emphasize
that this case is far more challenging than many of the compositional thermal simulation case studies
presented in the literature. Recently published studies of thermal compositional formulations have
used examples consisting of three or four pseudocomponent systems, featuring a light hydrocarbon
component [173, 176]. Lighter components such as C1 lead to three-phase regions that cover a vast
swathe of the pressure-temperature parameter space.
In this study we used mixed boundary conditions. For the injection well, we specified a constant
injection rate of 150 m3/day of superheated steam. For the production well we used a constant
BHP specification of 25 bar. While 25 bar is a relatively high pressure for a steam flood, it is not
unreasonable for a deeper reservoir. Conduction was not considered for this case.
The one dimensional steam flood proceeds for a total of 8.5 days, which is sufficient to allow
for vapor phase breakthrough at the production well. We began the study with a coarse model,
although we set the maximum time step size to 0.02 days. We then progressively refined the model,
while maintaining the maximum time step size at 0.02 days. Our interest here was in resolving the
advancing flash front as steam moves across the reservoir. Progressive refinement in space coupled
with a fixed ∆tmax places the nonlinear solver under increasing strain.
Analyses of the simulation study are displayed in Fig. 6.9 through Fig. 6.15. We plot nonlinear
performance against dimensionless grid cell size, which is taken as ∆xD = ∆x/L where L is the
distance between the injection and production wells. The principle finding of our analysis is that the
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 109
Figure 6.9: Number of time steps vs. dimensionless cell size for alternate formulations in Case 3.
∆Smax Timesteps
Wastedsteps
Newtoniterations
WastedNewton
Lineariterations
Wastedlinear
Avg. maxCFL
No chop 1156 375 3928 1831 3928 1842 1.78E-01
0.2 1252 469 4119 2108 4119 2221 1.64E-01
0.1 1404 647 4437 3019 4437 3121 1.463E-01
Table 6.7: Comparison of nonlinear performance for Natural variable formulation with and withoutAppleyard chop [9] for Case 3. Shown here are the metrics for the most refined test case, for whichthe dimensionless grid cell size is 0.11. Chopping the saturation update is a hindrance to Newton’smethod.
molar variables formulation outperforms the natural variables formulation as the grid is refined for a
given maximum time step size. Fig. 6.9 shows that the overall molar composition formulation requires
fewer time steps as the grid cell size gets smaller, the implication of which is larger CFL numbers
(Fig. 6.10). The natural variables formulation requires a greater number of Newton iterations and a
greater number of linear solver iterations over the course of the simulation (Fig. 6.11 and Fig. 6.12
respectively). As the grid is refined the superior performance of the molar formulation becomes
apparent. The most prominent differences in performance are displayed in Fig. 6.13, Fig. 6.14
and Fig. 6.15, which show wasted time steps, wasted Newton iterations and wasted linear solver
iterations. Table 6.7 shows that addition of saturation chopping to the natural formulation does not
aid the performance of Newton’s method. In fact, performance of the nonlinear solver is hindered.
This suggests that the majority of the nonlinearities stem from phase changes.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 110
Figure 6.10: Maximum averaged CFL number vs. dimensionless cell size for alternate formulationsin Case 3.
Figure 6.11: Successful Newton iterations vs. dimensionless cell size for alternate formulations inCase 3 (NB: Does not include wasted Newton iterations).
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 111
Figure 6.12: Linear iterations vs. dimensionless cell size for alternate formulations in Case 3 (NB:Does not include wasted linear iterations).
Figure 6.13: Wasted time steps vs. dimensionless cell size for alternate formulations in Case 3.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 112
Figure 6.14: Wasted Newton iterations vs. dimensionless cell size for alternate formulations in Case3.
Figure 6.15: Wasted linear solver iterations vs. dimensionless cell size for alternate formulations inCase 3.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 113
Figure 6.16: Gas saturation after 45 days of steam injection into homogeneous reservoir. Grid is33x15 cells.
6.4.4 Case 4: Two dimensional steam flood with narrow boiling point
In the following examples we use the same five-component narrow-boiling-point fluid as in Case 3.
The narrow boiling point phase behavior challenge persists. However, we extended our analysis to
a two dimensional model. Conduction was excluded from the model, as for Case 3.
A. Areal steam flood in homogeneous reservoir with narrow boiling point fluid
In this example we injected steam and produced oil in a reservoir 55 meters long and 25 meters wide.
The porosity is 20% and the permeability is 100 mD. The reservoir is isotropic. We simulated 45
days of steam injection and oil production. We performed the simulation on a coarse grid (11x5 cells)
and on a refined grid (33x15 cells). The end of simulation saturation and temperature profiles are
displayed in Fig. 6.16 and Fig. 6.17. For brevity we only show profiles for the refined case. Detailed
summaries of performance are provided in Table 6.8 and Table 6.9. Clearly, the molar variables
exhibits standout performance. Once again, saturation chopping does not improve convergence
of the natural formulation. Upon refinement, the performance of the molar formulation improves
relative to that of the natural formulation.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 114
Figure 6.17: Temperature following 45 days of steam injection on refined grid (33x15 cells).
Timesteps
Wastedsteps
Newtoniterations
WastedNewton
Lineariterations
Wastedlinear
Avg. maxCFL
Natural 180 75 634 253 634 289 8.08E-01
Appleyard 206 91 666 390 666 413 4.30E-01
Molar 162 30 552 150 552 150 8.86E-01
Table 6.8: Case 4A comparison of nonlinear performance for the natural variables formulation,natural variables formulation with Appleyard chop, and the molar variables formulation. The set ofmolar variables yields superior nonlinear performance.
Timesteps
Wastedsteps
Newtoniterations
WastedNewton
Lineariterations
Wastedlinear
Avg. maxCFL
Natural 1003 729 3714 2602 3714 2923 2.063
Appleyard 1356 1090 4714 4678 4714 4873 1.526
Molar 715 155 2642 774 2642 775 2.895
Table 6.9: Case 4A comparison of nonlinear performance for the natural variables formulation,natural variables formulation with Appleyard chop, and the molar variables. In this case the gridis refined piecewise (33x15 cells). The set of molar variables yields superior nonlinear performance.Moreover, the molar variables appear to show superior scaling as the domain is refined piecewise(compare with Table 6.8).
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 115
B. Areal steam flood in heterogeneous reservoir with narrow boiling point fluid
In this study we introduced heterogeneity and anisotropy. Fig. 6.18 shows the permeability distri-
bution across the reservoir and Fig. 6.19 displays the distribution of porosity. The average porosity
is 23.2% and the total pore volume differs from that in Case 4A. However, the reservoir dimensions,
number of grid cells and location of the wells is the same.
A logical hypothesis in this case is that the introduction of heterogeneity will result in improved
performance of the natural variables formulation relative to the molar formulation. The basis for
this assumption is the increase in flux-based nonlinearity stemming from the heterogeneity and
anisotropy in the reservoir. In this example we injected steam for 35 days. The problem is not
directly comparable with the homogeneous case on account of the differences in injection time, pore
volume and heterogeneity in the model.
Saturation and temperature profiles at the end of the simulation are displayed in Fig. 6.20 and
Fig. 6.21 for the refined case. Performance metrics are listed in Table 6.10 and Table 6.11. Once
again, the molar variables displays the best performance. However, in this case the performance
of the molar variables relative to the natural variables is even better. This is surprising, given the
addition of heterogeneity and anisotropy. A likely explanation is that the heterogeneity induces more
phase changes and flow becomes more complex. The relative improvement in the molar formulation
with grid refinement may also be explained by a greater number of phase changes.
∆Smax Timesteps
Wastedsteps
Newtoniterations
WastedNewton
Lineariterations
Wastedlinear
Avg. maxCFL
Natural 238 89 802 390 802 405 0.3081
Appleyard 249 98 835 432 835 449 0.295
Molar 209 33 702 165 702 165 0.3533
Table 6.10: Comparison of nonlinear performance for alternate variable formulations in Case 4B onthe original coarse grid (11x5 cells). Despite the heterogeneity and anisotropy in the system, thenatural variables formulation shows very poor performance. Saturation chopping is detrimental toperformance, as for Case 3 (see Table 6.7).
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 116
Figure 6.18: Map of permeability distribution across the heterogeneous reservoir in Case 4b. Thecolor bar indicates the natural logarithm of permeability in the x-direction. The reservoir isanisotropic with ky = 0.2× kx .
Figure 6.19: Map of porosity distribution across the heterogeneous reservoir in Case 4b. The colorbar indicates porosity.
Figure 6.20: Gas saturation after 35 days of steam injection on refined grid.
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 117
Figure 6.21: Temperature after 35 days of steam injection on refined grid.
∆Smax Timesteps
Wastedsteps
Newtoniterations
WastedNewton
Lineariterations
Wastedlinear
Avg. maxCFL
Natural 969 637 3580 2873 3580 2963 1.122
Appleyard 1111 785 4013 3596 4013 3691 0.9783
Molar 637 56 2374 280 2374 280 1.706
Table 6.11: Comparison of nonlinear performance for alternate formulations for refined Case 4B.The grid is 33x15 cells. Clearly, the set of molar variables yields superior nonlinear performancewhich further improves relative to the natural formulation upon piecewise refinement (compare withTable 6.10).
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 118
6.5 Discussion
Thermal compositional simulation involves the complex interplay of phase behavior with mass and
energy flux in porous media. Simulation of oil recovery in a multicomponent multiphase thermal
setting gives rise to a highly coupled system of nonlinear equations. In discrete form, the system of
algebraic equations are linearized using Newton’s method.
In this research, solution of the algebraic system of equations was achieved using the fully im-
plicit method (FIM). FIM solution is unconditionally stable, although computationally intensive.
The hyperbolic form of mass transport equations is amenable to solution via explicit time stepping.
However, explicit time-discretization suffers from a severe stability restriction. In reservoir simula-
tion, large variability in flow velocities are present across the reservoir, contributing to a wide range
of CFL numbers across the domain. The variability in CFL numbers is attributable to high flow ve-
locities in the vicinity of wellbores and spatial variations in permeability, which can differ by several
orders of magnitude. For this reason, IMPES methods are severely time-restricted [26, 27]. How-
ever, modern simulators use adaptive implicit methods (AIM) [136] to avoid both the computational
burden of FIM and the severe stability restrictions of explicit time discretization. AIM partitions
the transport problem into high-CFL and low-CFL number regions. Only the high-CFL grid cells or
interfaces require implicit treatment [128]. In a thermal setting, Thermal Adaptive Implicit Methods
are required. However, the use of adaptive implicit time stepping is largely unsuitable for thermal
simulation, owing to the conduction term in Eq. 6.11. Because of the second order diffusive effect of
conduction, the stability criteria restrict the allowable time steps to impractically small values when
temperature is treated explicitly [5]. Maes et al. [80] showed that for large, thermal compositional
reservoir models, the conduction term should always be discretized implicitly. However, even in
the absence of conductive heat transfer, stability constraints on convective mass transport with the
IMPES method become magnified by the large mobility ratios that are encountered in simulation of
steam flooding [28].
Analysis of nonlinearity in reservoir simulation has largely been restricted to the flux function
and its constitutive elements. Heterogeneity and relative permeability influence viscous forces, and
capillarity and buoyancy induce counter-current flow. The combination of these effects on the flux
function have been identified as the key challenge to nonlinear convergence in reservoir simulation
(see Fig. 6.22). The development of nonlinear solvers for these phenomena is an active area of
research [63, 161, 73].
Addition of conduction makes the energy equation parabolic, rather than hyperbolic. This
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 119
Figure 6.22: Sources of nonlinearity in the saturation flux function (from Wang [160]).
leads to dissipation of thermal fronts, and solution of the coupled system of equations becomes
easier with fully implicit time discretization (see Fig. 6.6 through Fig. 6.8). Presumably this is
because the coupling between the energy equation and mass conservation laws is relaxed. Conduction
is an essential consideration in simulation of thermal recovery processes, particularly in realistic
three-dimensional models. The steam chest is often highly compressible and slow moving. In the
case of cyclic steam injection there is often a soak period. In these scenarios, convective heat
transfer is near negligible. In heterogeneous reservoirs high temperature steam may not reach lower
permeability regions. Conduction is important for heat transfer to these lower permeability zones
and perpendicular to the principal axis of flow. Conduction is also responsible for heat loss to
adjacent layers. In Cases 1, 2 and 4 we exclude conduction only for the purposes of academic
inquiry.
In Fig. 6.15 we showed that the molar formulation results in fewer wasted linear solver iterations
in comparison to the natural formulation. We also showed in Table 6.7 that the addition of an
Appleyard damping strategy hinders convergence. Damping the Newton updates to saturation is
often a highly effective heuristic strategy for nonlinearities associated with large saturation changes.
In reservoir simulation these saturation changes are often associated with the liberation of phases
from a previously immobile state. Clearly, this is not the source of nonlinearity here.
A limitation of the analysis in this study is the use of isothermal CFL numbers as a metric for
dimensionless time step size. Thermal CFL numbers (termed CFLT) have been derived by several
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 120
authors [10, 80]. A more comprehensive analysis of performance would use CFLT numbers in place
of CFL numbers. However, the calculation of CFLT numbers is overly complex for the purpose
of this research, and we use the CFL number as a proxy metric for dimensionless time step size.
The study of mixed implicit AIM formulations or sequential implicit methods in thermal reservoir
simulation would require a more rigorous analysis using CFLT numbers.
Our analysis shows that linearization of the algebraic equations around the molar variables
leads to improved nonlinear performance in comparison to when the natural variables are used. As
discussed, AIM time discretization is particularly useful for efficient time stepping in compositional
reservoir simulation. Existing AIM implementations are limited to the natural variables. An AIM
implementation in a molar variables framework would incur a greater overhead due to the cost
of tracking many components. This is an implementation advantage of the natural formulation.
However, this advantage does not carry over to thermal simulation, given the difficulty of applying
adaptive implicit time discretization to the energy equation.
It is widely recognized that performance of the nonlinear formulation is related to the physics of
the underlying problem [152]. For example, in depletion processes, the molar variables formulation
can be more computationally efficient [37]. Coats [24] suggested that if the primary source of non-
linearity is relative permeability, the natural variables formulation is more attractive. Perhaps the
molar variables is not considered attractive because of the difficulty in taking derivatives of trans-
missibility related terms with respect to overall compositions of components. Superior performance
was observed for the molar formulation in this work, even under the effects of heterogeneity and cap-
illarity. It is possible that the conventional view of the molar formulation as inferior for flux-related
nonlinearities stems from poor performance of legacy FIM implementations using inexact Newton
or numerical derivatives.
Thermal simulation employing enthalpy as primary variable dates back to Faust and Mercer
[39], who solved the geothermal simulation problem with a persistent set of primary variables.
Although the geothermal formulation is a pure narrow boiling point problem, it does not include
key nonlinearities characteristic of compositional simulation. In the geothermal formulation there
are no compositional effects and no flash calculations are required. The geothermal formulation is
likely far more forgiving to the natural formulation than a full compositional problem, as the single-
component composition in a geothermal problem means that secondary equations are satisfied at
each iteration via the saturation constraint. In a compositional setting this is not the case.
The focus of this chapter was the demonstration of capability and nonlinear performance. We
CHAPTER 6. THERMODYNAMICALLY RIGOROUS THERMAL SIMULATION 121
used only simple example cases, although refinement showed performance of the isenthalpic molar
formulation scales far better than performance of the natural variables. In large scale reservoir
simulation the majority of computational time is spent on the solution of the linearized system of
equations. A limitation of this analysis is the use of a direct solver. The current generation of
AD-GPRS does not include data structures for sparse matrix storage nor preconditioners for Krylov
subspace solvers. Performance of direct linear solvers is not scalable, and highly efficient sparse
iterative solvers are required for industrial scale reservoir simulation. With an iterative solver, the
number of wasted linear solver iterations would be far higher than the quantity seen in Fig. 6.15.
6.6 Summary
In this chapter we described a new isenthalpic framework for thermal compositional simulation,
which constructs high fidelity derivatives using the implicity function theorem. This is the first
compositional thermal simulator that both uses enthalpy as a primary variable and is fully general
purpose, accounting for all components in all phases. Analysis of several case studies showed:
• Physical results using the isenthalpic molar formulation were identical to those using the
natural formulation.
• Superior performance of the molar variables formulation, even for cases involving flux-based
sources of nonlinearity.
This work is the first use of reduced variables for three-phase equilibrium calculations in thermal
simulation and the first use of reduced variables for isenthalpic flash in thermal simulation. In effect,
we have demonstrated the integrity of the coupling between local thermodynamic constraints and
the governing mass and energy equations.
Chapter 7
Conclusions and Future Research
7.1 Summary and conclusions
The research presented in this dissertation involves the formulation and implementation of an isen-
thalpic compositional framework for thermal reservoir simulation. The principal nonlinearities in
simulation of thermal enhanced oil recovery are phase changes which are driven by pressure, compo-
sitional, and thermal gradients in the reservoir. These nonlinearities are manifest in the coefficients
of the governing mass and energy equations. Little choice exists regarding the selection of the con-
servation laws as primary equations in thermal reservoir simulation. However, far more freedom
exists in the selection of primary variables. An initial postulate of this research was that a for-
mulation comprising the molar variables and enthalpy constitutes a superior selection for thermal
compositional simulation. Development of an isenthalpic-based compositional framework proceeded
on the basis of this tenet.
Given the complexity of thermal compositional simulation, the initial strategy was centered
around seemingly simpler problems. Preliminary efforts not described in this dissertation consisted
of development of a geothermal simulator, and isenthalpic compositional simulation using nested
isothermal flash with a black-box phase equilibrium package. The rationale was twofold: (i) Two-
phase geothermal simulation is the most pure form of narrow boiling point behavior; (ii) thermo-
dynamic constraints in thermal compositional simulation can be satisfied through a simple function
call. Initial research was ill-fated, however, for the following reasons:
• Implementation of a geothermal simulation model in both the natural and molar variables
122
CHAPTER 7. CONCLUSIONS AND FUTURE RESEARCH 123
involves only a single mass conservation equation. Granted, the problem does embody some of
the key challenges in thermal simulation, including nonlinear coupling of the mass and energy
conservation laws, poor conditioning of the linearized system of equations and the negative
compressibility phenomenon. However, the single-component system involves no coupling of
phase compositions to the conservation laws. Thermodynamically consistent fluid properties
are incidental to the problem, rather than dependent on the nonlinear formulation. Superior
conditioning of the linear system is provided by the molar variables, although overall perfor-
mance is not significantly improved.
• Ostensibly, the overall compositional variables isolate fluid property calculations from the
nonlinear system of equations. This was, after all, the original motivation for the molar
formulation [4]. However, implementation of the molar variables formulation simply cannot
rely upon black-box EOS calculations. Partial derivatives in the Jacobian must be calculated
on a basis that is thermodynamically consistent with the phase equilibrium computations. Our
initial approach paired fluid phase compositions computed using an external EOS with fluid
property derivatives computed using automatic differentiation in AD-GPRS. One of the key
lessons from this research is the need for implementation consistency.
Ultimately, our desire for high fidelity coupling of thermodynamic constraints with the global
solution of the nonlinear equations led to several objectives. First, the design of a stability analysis
procedure specifically for hydrocarbon water mixtures in thermal settings. Second, design and
development of an in-house three-phase isothermal flash for hydrocarbon water mixtures, using the
reduced variables. Third, a rapid isenthalpic flash routine. Finally, a generalized compositional
simulator using the molar variables and enthalpy as primary variables. Together these elements -
isothermal stability, isothermal flash, isenthalpic flash and the nonlinear molar implementation -
form the four pillars of our isenthalpic framework. Execution of this four pillars policy led to several
research achievements, which we summarize and draw conclusions from below.
The first objective of this research was to develop a procedure for stability analysis in hydrocarbon-
water mixtures at high temperature. While stability analysis typically requires multiple initial esti-
mates of the test phase composition, the unique interactions of the polar and non-polar components
in these systems requires fewer initial estimates.
• For the first time we used the steam saturation curve to partition the parameter space and
guide the selection of K-values.
CHAPTER 7. CONCLUSIONS AND FUTURE RESEARCH 124
• In two-phase stability testing we used the state of the two-phase mixture to choose the trial
phase and make the appropriate initial estimates for the test phase composition.
The result of our approach is consistent resolution of phase boundaries through identification of
the phase state, examples of which can be seen in Chapter 3. Our strategy for stability analysis
serves as an important step toward strengthening the coupling of phase-equilibrium calculations and
solution of the conservation laws. Isenthalpic flash can be solved quickly with a Newton method if
the phase state can be constrained. Finally, stability analysis provides excellent initial estimates for
the isothermal phase-split.
The second objective in this research was to develop and implement an isothermal flash for rapid
multiphase flash calculations involving water. Chapter 4 presented the development and implemen-
tation of a three-phase flash using a generalized eigenvalue reduced formulation. For verification
purposes, extensive testing was carried out. Key lessons include:
• The reduced variables are well-suited to the solution of phase split calculations involving water,
particularly in comparison to conventional formulations, which can become rank deficient as
phases become near-pure.
• The reduced variables, formulated from the underlying attraction and co-volume parameters
in the cubic EOS, are agnostic to trace concentrations within a phase. For hydrocarbon water
mixtures the reduced variables yield a full rank linearized system of equations, by construction.
The reduced formulation provides rapid solution of the phase split calculation for hydrocarbon
water mixtures, even in the case of bicritical points. Verification of our formulation was provided
through parallel development and implementation using automatic differentiation with the Stanford
Automatic Differentiation Extensible Template Library (ADETL). This research is the first to make
use of ADETL for advanced equation of state calculations.
A key element of the isenthalpic framework presented in this research is the isenthalpic flash.
We developed a new method for isenthalpic flash, using a set of reduced variables to solve for phase
compositions, phase amounts and system temperature. We used ADETL to generate derivatives
of the complex enthalpy departure function with respect to the reduced parameters. Chapter 5
described details of the formulation and development of the reduced isenthalpic flash algorithm, and
presented several demonstrative case studies.
• The reduced isenthalpic flash exhibits rapid convergence, even in the case of narrow boiling
point mixtures.
CHAPTER 7. CONCLUSIONS AND FUTURE RESEARCH 125
• Desirable characteristics of the reduced variables in solution of the isothermal flash carry over
to the isenthalpic case. These include construction of a full-rank linear system and superior
conditioning compared to conventional methods.
The isenthalpic flash is a core component of the isenthalpic framework, providing the means to close
the system of thermodynamic constraints as required in the molar variables formulation.
The last objective of the isenthalpic compositional framework entailed the implementation of an
overall compositional formulation for generalized, thermodynamically consistent thermal simulation.
Chapter 6 described details of the simulator, including several case studies involving comparison of
performance with the natural variables:
• Neither assumptions nor restrictions are imposed on the composition of the fluid phases. Arbi-
trary component partitioning is permitted across phases, which accounts for mutual solubility
of hydrocarbons and water and high temperatures.
• Fluid derivatives are generated within the underlying EOS, and the implicit function theorem
is used for implicit generation of secondary variable derivatives with respect to primary un-
knowns. This overcomes one of the major challenges of the molar variables formulation; that
is, derivation and implementation of transmissibility derivatives.
The use of the reduced flash for the EOS kernel is the first use of a reduced method for three-
phase thermal compositional simulation and the first use of a reduced isenthalpic flash in reservoir
simulation. Case studies in Chapter 6 showed that the molar variables exhibit superior nonlinear
performance to the natural variables, particularly with grid refinement. We attribute this superior
performance to the persistent set of primary variables and invariant set of equations used in the
molar formulation, which provides robust coupling of thermodynamic constraints to the governing
mass and energy conservation laws. The natural variables formulation, in contrast, does not attain
thermodynamic consistency until convergence of the global Newton iterations. Furthermore, the
natural formulation always accounts for phase appearance by introducing an epsilon quantity of the
new phase [167].
The isenthalpic-compositional framework developed in this research unequivocally demonstrates
the superiority of the molar formulation for nonlinear behavior stemming from phase changes in
thermal simulation. While the framework presents a number of novel contributions, some open
issues remain.
CHAPTER 7. CONCLUSIONS AND FUTURE RESEARCH 126
7.2 Future research
There are several challenges that persist in the development of compositional thermal simulators.
Future research may be partitioned into three broad categories: (i) Phase equilibrium calculations at
the local level; (ii) nonlinearity and nonlinear formulations; (iii) solution of the the linearized system
of equations at the global level. This dissertation concludes with commentary on these remaining
challenges and suggestions for potential solutions.
7.2.1 Phase equilibrium
One of the key bottlenecks in using the molar variables is closing the thermodynamic constraints
using phase equilibrium calculations in the isenthalpic domain. As stated repeatedly in this disser-
tation, the number of equilibrium phases is uncertain in the isenthalpic flash, because temperature
is unknown a priori. The reduced isenthalpic flash presented in this research requires a good initial
guess for temperature and phase compositions. In addition, the number of phases and the phase
identities are first established through nested isothermal flash which is expensive. The true value of a
rapidly convergent Newton flash algorithm may be realized in reservoir simulation using information
of the phase state and composition from previous time steps. As noted by Brantferger [13], good
initial guesses of equilibrium compositions and temperature are often available from prior time steps.
In the molar variable formulation flash is required at each global Newton iteration, and good initial
guesses of composition and temperature are available from prior global nonlinear iterations within a
time step. One of the keys to developing an efficient isenthalpic flash kernel, is to obtain an informed
estimate of temperature and equilibrium composition. Compositional space parameterization (CSP)
may provide this capability.
CSP was initially used in isothermal compositional simulation [153, 154, 155] and then extended
to thermal compositional simulation [60, 61, 176]. CSP reduces the dimensionality of the phase
behavior problem by parameterizing tie lines. Essentially, the problem is transformed from compo-
sitional space, involving a multitude of components, into tie line space. However, its application has
primarily been within a natural variables framework. A potential limitation of CSP with respect
to the molar variables is that it does not close the thermodynamic constraints to the same level of
accuracy or consistency as flash calculations using a cubic equation of state. CSP may be used to
skip stability testing and identify the underlying phase state. Strategies to bypass stability analysis
have been used in isothermal compositional simulation [110, 123]. Zaydullin et al. [174] recently
CHAPTER 7. CONCLUSIONS AND FUTURE RESEARCH 127
showed that CSP could be used to bypass phase stability testing in thermal simulation. A poten-
tial extension of this research is the incorporation of CSP into the isenthalpic framework. We can
envisage an isenthalpic phase equilibrium kernel in which CSP is used to constrain the temperature
within certain bounds and the phase state is identified. CSP may provide an initial estimate of
temperature and phase compositions for the isenthalpic flash. To date, CSP has not been attempted
in the pressure-enthalpy-composition parameter space. However, an initial hypothesis is that this
parameter space is more amenable to parameterization than the pressure-temperature-composition
space, especially for narrow boiling point fluids. A comparison of Fig. 5.14 and Fig. 5.15 provides
reasoning for this hypothesis. Clearly, the narrow region of immiscibility becomes dilated in moving
from the PT-phase diagram to the PH-phase diagram.
7.2.2 Nonlinear formulation
In this dissertation we compared performance of the natural and molar formulations through sev-
eral case studies of thermal compositional simulation. The molar variables demonstrated superior
nonlinear performance compared with the natural variables. The difference in performance was
magnified upon grid refinement and upon the introduction of heterogeneity. This clear superiority
is in contrast to the relative performance of the alternative formulations in isothermal compositional
simulation, for which it has been shown that the natural variables offer better performance [156].
However, the comparison provided by Voskov and Tchelepi [156] is for two-phase systems. The same
conclusions may not apply in a study of three-phase compositional simulation, or 4-phase composi-
tional simulation in which gas solubility in water is considered. As the number of phases grows, the
number of equations in the natural variables formulation also grows, as does the complexity required
in variable switching and reconfiguring the linear system. Of course, there are grave consequences for
dynamic memory allocation and deallocation, although that is beyond the scope of this discussion.
Our study of nonlinear performance was restricted to nonlinearities stemming from phase changes
and viscous forces associated with heterogeneity, anisotropy and relative permeability. A more
thorough study of nonlinear performance might include capillarity and buoyancy. A widely held
belief in the reservoir simulation community is that nonlinearities stemming from the flux function are
more amenable to solution with the natural variables. However, the molar formulation was originally
borne out of an IMPES implementation and historically many FIM implementations used inexact
Newton methods or numerical derivatives because of the complexity of obtaining transmissibility
derivatives with respect to the primary variables. It is possible that this has led to the widely held
view that the molar formulation yields inferior convergence for transport related nonlinearities.
7.2.3 Solution of the linearized system
A major limitation of this research and of the current generation of AD-GPRS is the use of direct
linear solvers in the solution of the linearized system of equations. The new sequential implicit
framework in AD-GPRS affords a great deal of flexibility in coupling different physics and different
nonlinear solution strategies [124]. However, this new framework is incompatible with many of the
advanced linear solver preconditioners and sparse matrix data structures previously developed in
SUPRI-B and implemented in AD-GPRS [177]. Should this capability be revivified, future research
may include the development of preconditioners specifically for thermal problems. This research
might begin with an analysis on the influence of the energy equation on the condition of the Jacobian
matrix. In addition, the choice of primary variables on the structure and condition of the Jacobian
is an important consideration. Solution of the linearized system of equations remains the limiting
computational kernel in industrial-scale reservoir simulation.
128
Nomenclature
GI Ideal Gibbs free energy
gE,j Excess Gibbs free energy of phase j
βj Phase j mole fraction
φji Fugacity coefficient for component i in phase j
ω Acentric factor
Ψ Matrix of binary interaction parameters
A Helmholtz free energy, dimensionless PR EOS energetic term
a PR EOS energetic term
B Dimensionless PR EOS co-volume term
b PR EOS co-volume term
f ji Fugacity of component i in phase j
G Gibbs free energy
H, Hspec Enthalpy, specified mixture enthalpy, J
hj Enthalpy of phase j, J
KVi Equilibrium constant for oil-vapor
KWi Equilibrium constant for oil-water
kij Binary interaction parameter for components i and j
129
L, V,W Oleic, vapor and aqueous phase amount. Denote oleic, vapor and aqueous phase when used
as superscripts.
m No. of significant eigenvalues resulting from spectral decomposition
Nc Number of components
nji Component mole number, for component i in phase j
Np Number of phases
P Pressure, bar
Pc Critical pressure, bar
Qk Reduced variable k resulting from spectral decomposition of BIP matrix
R Universal gas constant, 8.314 J/mol −K
S Entropy, J/K
T Temperature, K
Tc Critical temperature, K
v Volume, L
wi Mole fraction of component i in aqueous phase
xi Mole fraction of component i in oleic phase
yi Mole fraction of component i in vapor phase
Z Compressibility factor
zi Mole fraction of component i in overall mixture
XXX Set of reduced variables
130
Chapter 8
Appendix
As an addendum to this dissertation we provide additional technical details on key elements of
the research. Included in this section is a flowchart of the stability testing algorithm developed
in Chapter 3, a full description of the three-phase reduced variables method from Chapter 4, and
details of the enthalpy constraint introduced in Chapter 5.
131
A Flowchart of stability analysis algorithm
P > Psat(T )?P, T
Stability testKH2O,
KWilson,1/KWilson
Stability testKWilson,1/KWilsonzi
TPD < 0? TPD<0?
VL flash with lowestTPD. System is VL.
Single phase
2P flash using: (i) Eubank xw(ii) Ki from lowest TPD stability
Flash resultsidentical?
2P flash withKi from nextlowest TPD
stability
First test stability of 2PFlash with min Gibbs Energy
Aqueous phasepresent?
Stability testof non-aqueous
phase withKWilson,1/KWilson
Stabilitytest of heavyphase withKH2O
TPD < 0?
3P flash.Systemis VLW.
Each unique2P flashtested?
System is 2P.Take lowest
Gibbs Energy2P result
Test stabilityof 2nd unique
2P flash
yesno
yesyes
no
yes
yes
no
yes
no
yes
no
nono
132
B Mathematical development of the reduced method for three-
phase isothermal flash
B.1 Development of the reduced variables.
The Gibbs free energy of mixture is the summation of the ideal Gibbs free energy and the Excess
Gibbs free energy:
G = GI + GE . (B-1)
For a three-phase VLW system the ideal Gibbs free energy is the combined ideal energies of the
three phases:
GI =
Nc∑i=1
nVi ln(yi) +
Nc∑i=1
nLi ln(xi) +
Nc∑i=1
nWi ln(wi). (B-2)
The excess Gibbs energy of the mixture is given by
GE = V gE,V + LgE,L +WgE,W , (B-3)
where gE,V , gE,L and gE,W are the excess Gibbs free energies of the vapor, liquid and aqueous
phases respectively. Thus,
G =∑Nci=1 n
Vi ln(yi) +
∑Nci=1 n
Li ln(xi) +
∑Nci=1 n
Wi ln(wi) + V gE,V + LgE,L +WgE,W (B-4)
However, the total moles of the feed is the sum of the moles across the phases,
V + L+W = 1 (B-5)
Thus, if QVQVQV , QWQWQW , V and W are independent variables,
QLQLQL =QFQFQF − VQVQVQV −WQWQWQW
L, (B-6)
where the superscript F refers to moles of the feed, and
nL = n− nV − nW (B-7)
133
Thus, in functional form:
n = (n1, n2...., nNc) (B-8)
nV = (nV1 , nV2 ...., n
VNc) (B-9)
nL = (nL1 , nL2 ...., n
LNc) (B-10)
nW = (nW1 , nW2 ...., nWNc) (B-11)
Equations B-5, B-6 and B-7 in equation B-4 yield,
G =
Nc∑i=1
nVi ln(yi) +
Nc∑i=1
nWi ln(wi) +
Nc∑i=1
(ni − nVi − nWi
)ln(xi)
+ V gE,V(QV)
+WgE,W(QW
)+ (F − V −W ) gE,L
(QV , QW
) (B-12)
Via the definition QVQVQV = VQVQVQV and QWQWQW = WQWQWQW we obtain:
G =
Nc∑i=1
nVi ln(yi) +
Nc∑i=1
nWi ln(wi) +
Nc∑i=1
(ni − nVi − nWi
)ln(xi)
+ V gE,V(QV
V
)+WgE,W
(QW
W
)+ (F − V −W ) gE,L
(QV
V,QW
W
) (B-13)
To be clear, the component mole numbers nVi and nWi are dependent variables. The variables are
subject to the following constraints:
QVα =
Nc∑i=1
qαinVi α = 1, ...,m (B-14)
QWα =
Nc∑i=1
qαinWi α = 1, ...,m (B-15)
134
bV =
Nc∑i=1
yibi (B-16)
bW =
Nc∑i=1
wibi (B-17)
V =
Nc∑i=1
nVi (B-18)
W =
Nc∑i=1
nWi (B-19)
B.2 Solution of the nonlinear equations.
The phase-split calculations are performed via solution of the system of nonlinear equations. Here
we outline the procedure via (i) successive substitution; and (ii) Newton’s method. The independent
set of reduced variables is {QVQVQV , bV , V,QVQVQV , bW ,W}. The nonlinear equations for three-phase flash
are as follows:
Nc∑i=1
yiqαi −QVα = Rα α = 1, ...,m (B-20)
Nc∑i=1
yibi − bV = RM (B-21)
Nc∑i=1
(yi − xi) = RM+1 (B-22)
Nc∑i=1
wiqαi −QWα = Rα+M+1 α = 1, ...,m (B-23)
135
Nc∑i=1
wibi − bW = R2M+1 (B-24)
Nc∑i=1
(wi − xi) = R2M+2 (B-25)
In Eq. B-21 through B-25 we take M = m+ 1.
136
B.3 Jacobian matrix.
Here we provide the full form of the Jacobian matrix for the three-phase split calculation using the
Newton method with reduced variables:
J =
∂R1
∂QV1· · · ∂R1
∂QVm
∂R1
∂bV∂R1
∂V∂R1
∂QW1· · · ∂R1
∂QWm
∂R1
∂bW∂R1
∂W
... · · · · · · · · · · · · · · · · · · · · · · · · · · ·
∂RM+1
∂QV1· · · ∂RM+1
∂QVm
∂RM+1
∂bV∂RM+1
∂V∂RM+1
∂QW1· · · ∂RM+1
∂QWm
∂RM+1
∂bW∂RM+1
∂W
∂RM+2
∂QV1· · · ∂RM+2
∂QVm
∂RM+2
∂bV∂RM+2
∂V∂RM+2
∂QW1· · · ∂RM+2
∂QWm
∂RM+2
∂bW∂RM+2
∂W
... · · · · · · · · · · · · · · · · · · · · · · · · · · ·
∂R2M+2
∂QV1· · · ∂R2M+2
∂QVm
∂R2M+2
∂bV∂R2M+2
∂V∂R2M+2
∂QW1· · · ∂R2M+2
∂QWm
∂R2M+2
∂bW∂R2M+2
∂W
B.4 Partial derivatives constituting the Jacobian matrix elements.
Derivatives of residuals R1 through Rm:
∂Rk∂QVγ
=
Nc∑i=1
qαi∂yi∂QVγ
− δαγ , (B-26)
∂Rk∂bV
=
Nc∑i=1
qαi∂yi∂bV
, (B-27)
∂Rk∂V
=
Nc∑i=1
qαi∂yi∂V
, (B-28)
137
∂Rk∂QWγ
=
Nc∑i=1
qαi∂yi∂QWγ
, (B-29)
∂Rk∂bW
=
Nc∑i=1
qαi∂yi∂bW
, (B-30)
∂Rk∂W
=
Nc∑i=1
qαi∂yi∂W
, (B-31)
where k, α, γ = 1, 2...m. For the derivatives of the residual RM :
∂RM∂QVγ
=
Nc∑i=1
bi∂yi∂QVγ
(B-32)
∂RM∂QWγ
=
Nc∑i=1
bi∂yi∂QWγ
(B-33)
∂RM∂bV
=
Nc∑i=1
bi∂yi∂bV
− 1 (B-34)
∂RM∂bW
=
Nc∑i=1
bi∂yi∂bW
(B-35)
∂RM∂V
=
Nc∑i=1
bi∂yi∂V
(B-36)
138
∂RM∂W
=
Nc∑i=1
bi∂yi∂W
(B-37)
Now, for the derivatives of the residual RM+1:
∂RM+1
∂QVγ=
Nc∑i=1
(∂yi∂QVγ
− ∂xi∂QVγ
)(B-38)
∂RM+1
∂QWγ=
Nc∑i=1
(∂yi∂QWγ
− ∂xi∂QWγ
)(B-39)
∂RM+1
∂bV=
Nc∑i=1
(∂yi∂bV
− ∂xi∂bV
)(B-40)
∂RM+1
∂bW=
Nc∑i=1
(∂yi∂bW
− ∂xi∂bW
)(B-41)
∂RM+1
∂V=
Nc∑i=1
(∂yi∂V− ∂xi∂V
)(B-42)
∂RM+1
∂W=
Nc∑i=1
(∂yi∂W
− ∂xi∂W
)(B-43)
For the derivatives for the residuals RM+2 through R2M :
∂Rk∂QVγ
=
Nc∑i=1
qαi∂wi∂QVγ
− δαγ (B-44)
139
∂Rk∂bV
=
Nc∑i=1
qαi∂wi∂bV
(B-45)
∂Rk∂V
=
Nc∑i=1
qαi∂wi∂V
(B-46)
∂Rk∂QWγ
=
Nc∑i=1
qαi∂wi∂QWγ
− δαγ (B-47)
∂Rk∂bW
=
Nc∑i=1
qαi∂wi∂bW
(B-48)
∂Rk∂W
=
Nc∑i=1
qαi∂wi∂W
(B-49)
where α, γ = 1, 2...m, k = 2M + 1, ...2M . For the derivatives of the residual R2M+1:
∂R2M+1
∂QVγ=
Nc∑i=1
bi∂wi∂QVγ
(B-50)
∂R2M+1
∂QWγ=
Nc∑i=1
bi∂wi∂QWγ
(B-51)
∂R2M+1
∂bV=
Nc∑i=1
bi∂wi∂bV
(B-52)
140
∂R2M+1
∂bW=
Nc∑i=1
bi∂wi∂bW
− 1 (B-53)
∂R2M+1
∂V=
Nc∑i=1
bi∂wi∂V
(B-54)
∂R2M+1
∂W=
Nc∑i=1
bi∂wi∂W
(B-55)
Finally, for the derivatives of the residual R2M+2:
∂R2M+2
∂QVγ=
Nc∑i=1
(∂wi∂QVγ
− ∂xi∂QVγ
)(B-56)
∂R2M+2
∂QWγ=
Nc∑i=1
(∂wi∂QWγ
− ∂xi∂QWγ
)(B-57)
∂R2M+2
∂bV=
Nc∑i=1
(∂wi∂bV
− ∂xi∂bV
)(B-58)
∂R2M+2
∂bW=
Nc∑i=1
(∂wi∂bW
− ∂xi∂bW
)(B-59)
∂R2M+2
∂V=
Nc∑i=1
(∂wi∂V− ∂xi∂V
)(B-60)
141
∂R2M+2
∂W=
Nc∑i=1
(∂wi∂W
− ∂xi∂W
)(B-61)
B.5 Construction of Jacobian elements.
∂xi∂QVα
=−zi
(V∂KV
i
∂QVα+W
∂KWi
∂QVα
)[1 + V (KV
i − 1) +W (KWi − 1)
]2 (B-62)
∂xi∂QWα
=−zi
(V∂KV
i
∂QWα+W
∂KWi
∂QWα
)[1 + V (KV
i − 1) +W (KWi − 1)
]2 (B-63)
∂xi∂bV
=−zi
(V∂KV
i
∂bV+W
∂KWi
∂bV
)[1 + V (KV
i − 1) +W (KWi − 1)
]2 (B-64)
∂xi∂bW
=−zi
(V∂KV
i
∂bW+W
∂KWi
∂bW
)[1 + V (KV
i − 1) +W (KWi − 1)
]2 (B-65)
∂xi∂V
=zi
[1−KV
i − V∂KV
i
∂V −W∂KW
i
∂V
][1 + V (KV
i − 1) +W (KWi − 1)
]2 (B-66)
∂xi∂W
=zi
[1−KW
i − V∂KV
i
∂W −W ∂KWi
∂W
][1 + V (KV
i − 1) +W (KWi − 1)
]2 (B-67)
Of course, yi can be written as:
yi = KVi xi =
KVi zi
1 + V (KVi − 1) +W (KW
i − 1). (B-68)
142
Thus, we can write:
∂yi∂QVα
= xi∂KV
i
∂QVα+KV
i
∂xi∂QVα
(B-69)
∂yi∂QWα
= xi∂KV
i
∂QWα+KV
i
∂xi∂QWα
(B-70)
∂yi∂bV
= xi∂KV
i
∂bV+KV
i
∂xi∂bV
(B-71)
∂yi∂bW
= xi∂KV
i
∂bW+KV
i
∂xi∂bW
(B-72)
∂yi∂V
= xi∂KV
i
∂V+KV
i
∂xi∂V
(B-73)
∂yi∂W
= xi∂KV
i
∂W+KV
i
∂xi∂W
(B-74)
Similarly, with Wi = KWi xi we can write,
∂wi∂QVα
= xi∂KW
i
∂QVα+KW
i
∂xi∂QVα
(B-75)
∂wi∂QWα
= xi∂KW
i
∂QWα+KW
i
∂xi∂QWα
(B-76)
143
∂wi∂bV
= xi∂KW
i
∂bW+KW
i
∂xi∂bV
(B-77)
∂wi∂bW
= xi∂KW
i
∂bW+KW
i
∂xi∂bW
(B-78)
∂wi∂V
= xi∂KW
i
∂V+KW
i
∂xi∂V
(B-79)
∂wi∂W
= xi∂KW
i
∂W+KW
i
∂xi∂W
(B-80)
Now, for the partial derivatives involving equilibrium ratios:
∂KVi
∂QVα= −KV
i
[V
L
∂ ln φLi∂QLα
+∂ ln φVi∂QVα
](B-81)
∂KVi
∂QWα= −KL
i
W
L
∂ ln φLi∂QLα
(B-82)
∂KVi
∂bV= −KV
i
[V
L
∂ ln φLi∂bL
+∂ ln φVi∂bV
](B-83)
∂KVi
∂bW= −KL
iWL∂ ln φLi∂bL
(B-84)
∂KVi
∂V=KVi
L
[m∑α=1
(QLα −QVα )∂ ln(φLi )
∂QLα+ (bL − bV )
∂ ln(φLi )
∂bL
](B-85)
144
∂KVi
∂W=KVi
L
[m∑α=1
(QLα −QWα )∂ ln(φLi )
∂QLα+ (bL − bW )
∂ ln(φLi )
∂bL
](B-86)
Similarly, for the derivatives of KW with respect to the independent variables:
∂KWi
∂QVα= −KW
i
V
L
∂ ln φLi∂QLα
(B-87)
∂KWi
∂QWα= −KW
i
[W
L
∂ ln φLi∂QLα
+∂ ln φWi∂QWα
](B-88)
∂KWi
∂bV= −KW
i
V
L
∂ ln φLi∂bL
(B-89)
∂KWi
∂bW= −KW
i
[W
L
∂ ln φLi∂bL
+∂ ln φWi∂bW
](B-90)
∂KWi
∂V=KWi
L
[m∑α=1
(QLα −QVα )∂ ln(φLi )
∂QLα+ (bL − bV )
∂ ln(φLi )
∂bL
](B-91)
∂KWi
∂W=KWi
L
[m∑α=1
(QLα −QWα )∂ ln(φLi )
∂QWα+ (bL − bW )
∂ ln(φWi )
∂bW
](B-92)
145
C Expression for total molar enthalpy
The total enthalpy of a mixture consisting of Np phases is
H =
Np∑j
βj
(HIdealj +HDep
j
). (C-1)
The expression for total molar enthalpy in Eq. C-1 is identical to the summation of enthalpy over
Np phases as expressed in Eq. 1.1. Note that the molar enthalpy of each phase is the summation
of the ideal gas molar enthalpy HjIdeal, and the molar enthalpy departure Hj
Dep. The expression for
molar enthalpy of phase j as an ideal gas mixture is
HjIdeal =
Nc∑i
xiHi,Ideal, (C-2)
where xi refers to the fraction of component i in phase j. The molar ideal gas enthalpy for component
i is denoted Hi,Ideal, and is expressed as a polynomial,
Hi,Ideal = C0p1i(T − T0) + C0
p2i
(T 2 − T 20 )
2+ C0
p3i
(T 3 − T 30 )
3+ C0
p4i
(T 4 − T 40 )
4. (C-3)
Note that HjDep is the molar enthalpy departure Hj −Hj
0 for phase j, and is given in Eq. D-24. For
completeness, the enthalpy departure function is developed below.
146
D The enthalpy departure function
D.1 Derivation of thermodynamic departure functions
We begin with the first law of thermodynamics, which states that the change in internal energy in
a closed system is equal to the heat energy added to the system and the work done to the system
dU = δQ+ δW. (D-1)
The second law of thermodynamics states that in a reversible system the heat added is δQ = TdS,
and the work done to the system is δW = −PdV . Thus the change in internal energy becomes
dU = TdS − PdV. (D-2)
By definition, Helmholtz free energy is
A ≡ U − TS. (D-3)
Taking the derivative of Helmholtz free energy and using Eq. D-2
dA = −PdV − SdT. (D-4)
At constant temperature, the second term in Eq.D-4 disappears and we obtain
dAT = −PdV. (D-5)
Integrating Eq. D-5 at constant temperature and constant composition from a reference volume, V0
to the system volume, V yields an expression for the Helmholtz free energy departure function
A−A0 = −∫ V
V0
PdV. (D-6)
Breaking the integral in Eq D-6 into two parts to separate the real state and the reference state
yields
A−A0 = −∫ V
∞PdV −
∫ ∞V0
PdV. (D-7)
147
The first term in Eq. D-7 requires real gas properties, and is temperature dependent.
A−A0 = −∫ V
∞PdV −
∫ ∞V0
PdV +
∫ V
∞
RT
VdV −
∫ V
∞
RT
VdV,
= −∫ V
∞
(P − RT
V
)dV −RT ln
(V
V0
). (D-8)
Using Eq. D-8 and the definition of Helmholtz free energy in Eq. D-3, the thermodynamic departure
function for entropy is obtained
S − S0 = − ∂
∂T(A−A0)V . (D-9)
Hydrocarbon phase equilibrium computations are usually performed in an isothermal-isobaric
context, in an isobaric setting, in which P is held constant. In this context, Gibbs Energy is the
preferred thermodynamic state function (whereas with Helmholtz energy is preferred in an isochoric
setting). The Gibbs free energy is given by:
G(P, T ) = U + PV − TS, (D-10)
G(P, T ) = A− PV. (D-11)
Analogous to the Helmholtz departure function in Eq. D-6 the Gibbs Free Energy departure
function is developed as follows:
G−G0 =
∫ P
P0
V dP,
=
∫ P
0
V dP +
∫ 0
P0
V dP,
=
∫ P
0
(V − RT
P
)dP +RT ln
P
P0,
=RT lnφ+RT lnP
P0. (D-12)
Of significance here are the reference pressure, P0 and the reference volume, V0. If P0 is set to
148
a unit pressure, say 1 bar, then V0 = RT . However, if P0 is set to the system pressure P , then
V/V0 = Z. Similarly, if the reference volume V0 is set to a unit volume, say 1 liter, then P0 = RT .
Alternatively, if V0 = V , the system volume, then we have P/P0 = Z.
We can link the expression for Gibbs Energy departure to Helmholtz Energy departure given the
relationship between fugacity coefficient and Helmholtz Energy:
lnφ =1
RT
∫ V
∞
(RT
V− P
)dV − lnZ + (Z − 1) , (D-13)
RT lnφ =∫ V∞(RTV − P
)dV −RT lnZ +RT (Z − 1) . (D-14)
Combining Eq. D-14 with Eq. D-8
A−A0 =−∫ V
∞
(P − RT
V
)dV −RT ln
(V
V0
),
=RT lnφ+RT lnZ −RT (Z − 1)−RT ln
(V
V0
). (D-15)
Using the Gibbs free energy departure function in Eq. D-12,
A−A0 = (G−G0)−RT lnP
P0+RT lnZ −RT (Z − 1)−RT ln
(V
V0
). (D-16)
For a real gas PV = ZRT , and for an ideal gas P0V0 = ZRT . Therefore,
ln
(P
P0
)= ln (Z)− ln
(V
V0
). (D-17)
Substituting the expression in Eq. D-17 in to Eq. D-16 yields
G−G0 = (A−A0) +RT (Z − 1) . (D-18)
Finally, we obtain the enthalpy departure function by substituting the definition of Gibbs free energy
149
G = H − TS into Eq. D-18:
H −H0 = (G−G0) + T (S − S0) ,
= (A−A0) + T (S − S0) +RT (Z − 1) . (D-19)
D.2 PR EOS form of the enthalpy departure function
Using the Peng Robinson EOS (Eq. 4.1) in combination with Eq. D-15:
A−A0 = −RT ln
(V − bV
)−RT ln
(V
V0
)+
a
2√
2bln
(V + (1−
√2)b
V + (1 +√
2)b
)(D-20)
Differentiating Eq. D-20 with respect to T and taking the negative of the result yields the entropy
departure function
S − S0 = R ln
(V − bV
)+R ln
(V
V0
)− ∂a(T )
∂T
1
2√
2bln
((1−
√2)b+ V
(1 +√
2)b+ V
). (D-21)
Substituting the expressions in Eq. D-20 and Eq. D-21 in to Eq. D-19 yields the enthalpy departure
function in PR EOS form
H −H0 =−RT ln
(V − bV
)+
a
2√
2bln
(V + (1 +
√2)b
V + (1−√
2)b
)+ T
[R ln
(V − bV
)+R ln
(V
V0
)]
− T
[∂a(T )
∂T
1
2√
2bln
((1 +
√2)b+ V
(1−√
2)b+ V
)]+RT (Z − 1)−RT ln
(V
V0
).
(D-22)
Simplifying Eq. D-22
H −H0 =1
2√
2b
(a− T ∂a(T )
∂T
)ln
((1 +
√2)b+ V
(1−√
2)b+ V
)+RT (Z − 1) . (D-23)
Substituting PV = ZRT into Eq. D-23
H −H0 =1
2√
2b
(T∂a(T )
∂T− a)
ln
(Z + (1−
√2)B
Z + (1 +√
2)B
)+RT (Z − 1) , (D-24)
150
where B = αbP/RT . Eq. D-24 is identical to the expression given by Peng and Robinson [115], and
is equivalent to the dimensionless form used by Zhu and Okuno [181]. We use the dimensional form
of the energetic parameter because it is more amenable to construction of derivatives with automatic
differentiation using ADETL. However, it is also possible to convert the partial derivative ∂a/∂T to
its dimensionless form, ∂A/∂T :
H −H0 =P
2√
2BRT
(a− T ∂a(T )
∂T
)ln
(Z + (1−
√2)B
Z + (1 +√
2)B
)+RT (Z − 1)
=P
2√
2BRT
(T∂a(T )
∂T− a)
ln
(Z + (1 +
√2)B
Z + (1−√
2)B
)+RT (Z − 1)
=1
2√
2B
(P
R
[∂a(T )
∂T− a
T
])ln
(Z + (1 +
√2)B
Z + (1−√
2)B
)+RT (Z − 1)
=1
2√
2B
(P
R
∂
∂T
(AR2T 2
P
)− AR2T 2P
PRT
)ln
(Z + (1 +
√2)B
Z + (1−√
2)B
)+RT (Z − 1)
=1
2√
2B
(R
[2AT + T 2 ∂A
∂T
]−ART
)ln
(Z + (1 +
√2)B
Z + (1−√
2)B
)+RT (Z − 1)
=1
2√
2B
(ART +RT 2 ∂A
∂T
)ln
(Z + (1 +
√2)B
Z + (1−√
2)B
)+RT (Z − 1) . (D-25)
The form of the enthalpy departure function in Eqn. D-25 is identical to that presented by Zhu &
Okuno [181].
151
E Derivatives of thermodynamic functions
E.1 Derivative of mixture energetic term
The mixture energetic term a (or αa) is given by:
a =
N∑i
N∑j
xixj√aiaj (1− kij) (D-1)
Taking the derivative with respect to temperature:
∂a
∂T=
N∑i
N∑j
xixj (1− kij)[√ai∂aj∂T
+√aj∂ai∂T
](D-2)
E.2 Derivative of component energetic term
Eq. D-2 includes the partial derivative of the component energetic parameter ai with respect to
temperature. This derivative is given by
∂ai∂T
= −0.45724R2T 1c .5
Pc√T
κ
[1 + κ
(1−
√T
Tc
)](D-3)
152
Bibliography
[1] Anahita Abadpour and Mikhail Panfilov. Method of negative saturations for modeling two-
phase compositional flow with oversaturated zones. Transport in porous media, 79(2):197–214,
2009.
[2] A Abdalla and K.H. Coats. A three-phase experimental and numerical simulation study of the
steam flood process. In Fall Meeting of the Society of Petroleum Engineers of AIME. Society
of Petroleum Engineers, 1971.
[3] JH Abou-Kassem and K Aziz. Handling of phase change in thermal simulators. Journal of
petroleum technology, 37(09):1–661, 1985.
[4] Gabor Acs, Sandor Doleschall, and Eva Farkas. General purpose compositional model. SPE
J, 25(4):543–553, 1985.
[5] Anshul Agarwal. Thermal adaptive implicit reservoir simulation. PhD thesis, Stanford Uni-
versity, 2009.
[6] Rajeev K Agarwal, Yau-Kun Li, Long X Nghiem, and Dennis A Coombe. Multiphase multi-
component isenthalpic flash calculations. Journal of Canadian Petroleum Technology, 30(03),
1991.
[7] Ned Anderson and Ake Bjorck. A new high order method of regula falsi type for computing
a root of an equation. BIT Numerical Mathematics, 13(3):253–264, 1973.
[8] John R Appleyard and Ian M Cheshire. The cascade method for accelerated convergence in
implicit simulators. In European Petroleum Conference. Society of Petroleum Engineers, 1982.
[9] JR Appleyard, IM Cheshire, and RK Pollard. Special techniques for fully implicit simulators.
153
In Proceedings of the European Symposium on Enhanced Oil Recovery, Bournemouth, England,
pages 395–408, 1981.
[10] SPE Arthur Moncorge and A Tchelepi Hamdi. Stability criteria for thermal adaptive implicit
compositional flows. SPE Journal, 2009.
[11] Khalid Aziz, AB Ramesh, and PT Woo. Fourth spe comparative solution project: comparison
of steam injection simulators. Journal of petroleum technology, 39(12):1–576, 1987.
[12] Lee E Baker, Alan C Pierce, and Kraemer D Luks. Gibbs energy analysis of phase equilibria.
Society of Petroleum Engineers Journal, 22(05):731–742, 1982.
[13] Kenneth Mark Brantferger. Development of a thermodynamically consistent, fully implicit,
equation-of-state, compositional steamflood simulator. PhD thesis, The University of Texas at
Austin, 1991.
[14] Kenneth Mark Brantferger, GA Pope, and K Sepehrnoori. Development of a thermodynam-
ically consistent fully implicit equation-of-state compositional steamflood simulator. In SPE
Symposium on Reservoir Simulation. Society of Petroleum Engineers, 1991.
[15] DH Brownell Jr, SK Garg, and JW Pritchett. Computer simulation of geothermal reservoirs.
NASA STI/Recon Technical Report N, 77:27564, 1975.
[16] Jacques Burger, Pierre Sourieau, Michel Combarnous, and Henry J Ramey. Thermal methods
of oil recovery. Technip, 1985.
[17] Jean-Louis Burgot. Escaping tendency. In The Notion of Activity in Chemistry, pages 21–26.
Springer, 2017.
[18] Y B Chang. Development and Application of an Equation of State Compositional Simulator.
PhD thesis, The University of Texas at Austin, 1990.
[19] Shaji Chempath, Huafei Sun, and Kjetil Haugen. Optimization based isenthalpic flash for
thermal reservoir simulations. In SPE Reservoir Simulation Conference. Society of Petroleum
Engineers, 2017.
[20] MCH Chien, ST Lee, and WH Chen. A new fully implicit compositional simulator. SPE,
13385:10–13, 1985.
154
[21] K H Coats. Simulation of steamflooding with distillation and solution gas. Society of Petroleum
Engineers Journal, 16(05):235–247, 1976.
[22] K H Coats. Geothermal reservoir modelling. In SPE Annual Fall Technical Conference and
Exhibition. Society of Petroleum Engineers, 1977.
[23] K H Coats. A highly implicit steamflood model. Society of Petroleum Engineers Journal,
18(05):369–383, 1978.
[24] K H Coats. An equation of state compositional model. Society of Petroleum Engineers Journal,
20(05):363–376, 1980.
[25] K H Coats. Reservoir simulation: A general model formulation and associated physical/nu-
merical sources of instability. Boundary and Interior Layers—Computational and Asymptotic
Methods, pages 62–76, 1980.
[26] K H Coats. IMPES stability: Selection of stable timesteps. SPE Journal, 8(02):181–187, 2003.
[27] K H Coats. IMPES stability: The CFL limit. SPE Journal, 8(03):291–297, 2003.
[28] K H Coats, W D George, Chieh Chu, and B E Marcum. Three-dimensional simulation of
steamflooding. Society of Petroleum Engineers Journal, 14(06):573–592, 1974.
[29] Computer Modeling Group Ltd. CMG-STARS Users Guide, 2012.
[30] Computer Modelling Group Ltd. WinProp User Guide, 2011.
[31] Michael Connolly, Huanquan Pan, and Hamdi A Tchelepi. SPE Journal, In review.
[32] RB Crookston, WE Culham, and WH Chen. A numerical simulation model for thermal
recovery processes. Society of Petroleum Engineers Journal, 19(01):37–58, 1979.
[33] CM Crowe and M Nishio. Convergence promotion in the simulation of chemical processes—the
general dominant eigenvalue method. AIChE Journal, 21(3):528–533, 1975.
[34] M Dowell and P Jarratt. A modified regula falsi method for computing the root of an equation.
BIT Numerical Mathematics, 11(2):168–174, 1971.
[35] Ioannis G Economou and Constantine Tsonopoulos. Associating models and mixing rules in
equations of state for water/hydrocarbon mixtures. Chemical Engineering Science, 52(4):511–
525, 1997.
155
[36] Philip T Eubank, Ching H Wu, Juan FJ Alvarado, Alfonso Forero, and Michael K Beladi. Mea-
surement and prediction of three-phase water/hydrocarbon equilibria. Fluid Phase Equilibria,
102(2):181–203, 1994.
[37] Eva Farkas. Linearization techniques of reservoir-simulation equations: Fully implicit cases.
SPE Journal, 3(04):316–323, 1998.
[38] Sara Forough Farshidi. Compositional Reservoir Simulation-based Reactive-transport Formula-
tions, with Application to CO2 Storage in Sandstone and Ultramafic Formations. PhD thesis,
Stanford University, 2016.
[39] Charles R Faust and James W Mercer. Finite-difference model of two-dimensional, single-,
and two-phase heat transport in a porous medium–version i. Open-file report 77-234 1977. 84
p, 9 fig, 2 tab, 12 ref., 1977.
[40] Charles R Faust and James W Mercer. Geothermal reservoir simulation: 1. mathematical mod-
els for liquid-and vapor-dominated hydrothermal systems. Water resources research, 15(1):23–
30, 1979.
[41] J Ferrer and F Ali. A three-phase two-dimensional compositional thermal simulator for steam
injection processes. Journal of Canadian Petroleum Technology, 16(01), 1977.
[42] A Firoozabadi, R Nutakki, TW Wong, and K Aziz. EOS predictions of compressibility and
phase behavior in systems containing water, hydrocarbons, and CO2. SPE reservoir engineer-
ing, 3(02):673–684, 1988.
[43] Abbas Firoozabadi and Huanquan Pan. Fast and robust algorithm for compositional modeling:
Part i-stability analysis testing. SPE Journal, 7(01):78–89, 2002.
[44] Sergio Galdino. Interval methods for root-finding of nonlinear equations of one variable. In
Systems, Man, and Cybernetics (SMC), 2012 IEEE International Conference on, pages 439–
444. IEEE, 2012.
[45] SK Garg and JW Pritchett. On pressure-work, viscous dissipation and the energy balance
relation for geothermal reservoirs. Advances in Water Resources, 1(1):41–47, 1977.
[46] Josiah Willard Gibbs. On the equilibrium of heterogeneous substances. American Journal of
Science, (96):441–458, 1878.
156
[47] Seyhan Emre Gorucu and Russell T Johns. Comparison of reduced and conventional two-phase
flash calculations. SPE Journal, 20(02):294–305, 2015.
[48] Seyhan Emre Gorucu and Russell Taylor Johns. New reduced parameters for flash calculations
based on two-parameter bip formula. Journal of Petroleum Science and Engineering, 116:50–
58, 2014.
[49] Malcolm A Grant and Michael L Sorey. The compressibility and hydraulic diffusivity of a
water-steam flow. Water Resources Research, 15(3):684–686, 1979.
[50] Gael Guennebaud, Benoıt Jacob, et al. Eigen v3. http://eigen.tuxfamily.org, 2010.
[51] Kjetil B Haugen and Bret Beckner. A critical comparison of reduced and conventional EOS
algorithms. SPE Journal, 18(02):378–388, 2013.
[52] Kjetil B Haugen, Abbas Firoozabadi, and Lixin Sun. Efficient and robust three-phase split
computations. AIChE Journal, 57(9):2555–2565, 2011.
[53] Mohammadreza Heidari. Equation of State Based Thermal Compositional Reservoir Simulator
for Hybrid Solvent/Thermal Processes. PhD thesis, University of Calgary, 2014.
[54] Mohammadreza Heidari, Long X Nghiem, and Brij B Maini. Improved isenthalpic multiphase
flash calculations for thermal compositional simulators. In SPE Heavy Oil Conference-Canada.
Society of Petroleum Engineers, 2014.
[55] EM Hendriks and ARD Van Bergen. Application of a reduction method to phase equilibria
calculations. Fluid Phase Equilibria, 74:17–34, 1992.
[56] Eric M Hendriks. Reduction theorem for phase equilibrium problems. Industrial & engineering
chemistry research, 27(9):1728–1732, 1988.
[57] Hussein Hoteit and Abbas Firoozabadi. Simple phase stability-testing algorithm in the reduc-
tion method. AIChE journal, 52(8):2909–2920, 2006.
[58] Chung-Kan Huang, Yi-Kun Yang, and Milind D Deo. A new thermal-compositional reservoir
simulator with a novel” equation line-up” method. In SPE Annual Technical Conference and
Exhibition. Society of Petroleum Engineers, 2007.
157
[59] Pongsarl Huyakorn and George F Pinder. A pressure-enthalpy finite element model for sim-
ulating hydrothermal reservoirs. Mathematics and Computers in Simulation, 20(3):167–178,
1978.
[60] Alireza Iranshahr, Denis Voskov, and Hamdi Tchelepi. Tie-simplex parameterization for EOS-
based thermal compositional simulation. SPE Journal, 15(2):545–556, 2010.
[61] Alireza Iranshahr, Denis V Voskov, and Hamdi A Tchelepi. Tie-simplex based compositional
space parameterization: Continuity and generalization to multiphase systems. AIChE Journal,
59(5):1684–1701, 2013.
[62] K Ishimoto, GA Pope, and K Sepchrnoori. An equation-of-state steam simulator. In
Situ;(United States), 11(1), 1987.
[63] Patrick Jenny, Hamdi A Tchelepi, and Seong H Lee. Unconditionally convergent nonlinear
solver for hyperbolic conservation laws with s-shaped flux functions. Journal of Computational
Physics, 228(20):7497–7512, 2009.
[64] Bjarne H Jensen and Aage Fredenslund. A simplified flash procedure for multicomponent mix-
tures containing hydrocarbons and one non-hydrocarbon using two-parameter cubic equations
of state. Industrial & engineering chemistry research, 26(10):2129–2134, 1987.
[65] RT Johns, B Dindoruk, and FM Orr Jr. Analytical theory of combined condensing/vaporizing
gas drives. SPE Advanced Technology Series, 1(02):7–16, 1993.
[66] DE Kenyon and GA Behie. Third spe comparative solution project: Gas cycling of ret-
rograde condensate reservoirs. jpt 39 (8): 981–997. Technical report, SPE-12278-PA. DOI:
10.2118/12278-PA, 1987.
[67] Drosos Kourounis, Louis J Durlofsky, Jan Dirk Jansen, and Khalid Aziz. Adjoint formula-
tion and constraint handling for gradient-based optimization of compositional reservoir flow.
Computational Geosciences, 18(2):117, 2014.
[68] Felix Kwok and Hamdi A Tchelepi. Convergence of implicit monotone schemes with applica-
tions in multiphase flow in porous media. SIAM Journal on Numerical Analysis, 46(5):2662–
2687, 2008.
158
[69] Alexandre Lapene, Dan Vladimir Nichita, Gerald Debenest, and Michel Quintard. Three-
phase free-water flash calculations using a new modified rachford–rice equation. Fluid Phase
Equilibria, 297(1):121–128, 2010.
[70] A Lauser, C Hager, R Helmig, and B Wohlmuth. A new approach for phase transitions in
miscible multi-phase flow in porous media. Advances in Water Resources, 34(8):957–966, 2011.
[71] Claude F Leibovici and Jean Neoschil. A solution of rachford-rice equations for multiphase
systems. Fluid Phase Equilibria, 112(2):217–221, 1995.
[72] Gilbert Newton Lewis. The osmotic pressure of concentrated solutions, and the laws of the
perfect solution. Journal of the American Chemical Society, 30(5):668–683, 1908.
[73] Boxiao Li and Hamdi A Tchelepi. Unconditionally convergent nonlinear solver for multiphase
flow in porous media under viscous force, buoyancy, and capillarity. Energy Procedia, 59:404–
411, 2014.
[74] Ruixue Li and Huazhou Li. A robust three-phase isenthalpic flash algorithm based on free-
water assumption. Journal of Energy Resources Technology, 2017.
[75] Yinghui Li and Russell T Johns. Rapid flash calculations for compositional simulation. SPE
Reservoir Evaluation & Engineering, 9(05):521–529, 2006.
[76] Zhidong Li and Abbas Firoozabadi. Cubic-plus-association equation of state for water-
containing mixtures: Is cross association necessary? AIChE journal, 55(7):1803–1813, 2009.
[77] Zhidong Li and Abbas Firoozabadi. General strategy for stability testing and phase-split
calculation in two and three phases. SPE Journal, 17(04):1–096, 2012.
[78] Kai Liu, Ganesan Subramanian, David I Dratler, Jean-Pierre Lebel, and Jeffrey A Yerian. A
general unstructured-grid, equation-of-state-based, fully implicit thermal simulator for com-
plex reservoir processes. SPE Journal, 14(02):355–361, 2009.
[79] Shanqiang Luo and Maria A Barrufet. Reservoir simulation study of water-in-oil solubility
effect on oil recovery in steam injection process. SPE Reservoir Evaluation & Engineering,
8(06):528–533, 2005.
[80] J Maes, A Moncorge, and H Tchelepi. Thermal adaptive implicit method: Time step selection.
Journal of Petroleum Science and Engineering, 106:34–45, 2013.
159
[81] Ken McKinnon and Marcel Mongeau. A generic global optimization algorithm for the chemical
and phase equilibrium problem. Journal of Global Optimization, 12(4):325–351, 1998.
[82] Michael Michelsen, Wei Yan, and Erling H Stenby. A comparative study of reduced-variables-
based flash and conventional flash. SPE Journal, 18(05):952–959, 2013.
[83] Michael L Michelsen. The isothermal flash problem. part i. stability. Fluid phase equilibria,
9(1):1–19, 1982.
[84] Michael L Michelsen. The isothermal flash problem. part ii. phase-split calculation. Fluid
Phase Equilibria, 9(1):21–40, 1982.
[85] Michael L Michelsen. Simplified flash calculations for cubic equations of state. Industrial &
Engineering Chemistry Process Design and Development, 25(1):184–188, 1986.
[86] Michael L Michelsen. Multiphase isenthalpic and isentropic flash algorithms. Fluid phase
equilibria, 33(1):13–27, 1987.
[87] Michael L Michelsen. Phase equilibrium calculations. what is easy and what is difficult?
Computers & chemical engineering, 17(5):431–439, 1993.
[88] Michael L Michelsen. State function based flash specifications. Fluid Phase Equilibria, 158:617–
626, 1999.
[89] Michael L Michelsen and Robert A Heidemann. Calculation of critical points from cubic
two-constant equations of state. AIChE journal, 27(3):521–523, 1981.
[90] Michael Locht Michelsen, Jørgen Mollerup, and Martin Peter Breil. Thermodynamic models:
Fundamental & computational aspects. Tie-Line Publications, 2008.
[91] Saeedeh Mohebbinia, Kamy Sepehrnoori, and Russell T Johns. Four-phase equilibrium calcu-
lations of carbon dioxide/hydrocarbon/water systems with a reduced method. SPE Journal,
18(05):943–951, 2013.
[92] MW Molloy and ML Sorey. Code comparison project: a contribution to confidence in geother-
mal reservoir simulators. Trans.-Geotherm. Resour. Counc.;(United States), 5(CONF-811015-
), 1981.
160
[93] Joachim Moortgat, Zhidong Li, and Abbas Firoozabadi. Three-phase compositional modeling
of CO2 injection by higher-order finite element methods with cpa equation of state for aqueous
phase. Water Resources Research, 48(12), 2012.
[94] Long X Nghiem, K Aziz, and YK Li. A robust iterative method for flash calculations using the
soave-redlich-kwong or the peng-robinson equation of state. Society of Petroleum Engineers
Journal, 23(03):521–530, 1983.
[95] Long X Nghiem and Yau-Kun Li. Computation of multiphase equilibrium phenomena with
an equation of state. Fluid Phase Equilibria, 17(1):77–95, 1984.
[96] LX Nghiem and RA Heidemann. General acceleration procedure for multiphase flash calcula-
tion with application to oil-gas-water systems. In Proceedings of the 2nd European Symposium
on Enhanced Oil Recovery, pages 303–316, 1982.
[97] Dan Vladimir Nichita. Phase envelope construction for mixtures with many components.
Energy & Fuels, 22(1):488–495, 2007.
[98] Dan Vladimir Nichita, Daniel Broseta, and Francois Montel. Calculation of convergence pres-
sure/temperature and stability test limit loci of mixtures with cubic equations of state. Fluid
Phase Equilibria, 261(1):176–184, 2007.
[99] Dan Vladimir Nichita and Florea Minescu. Efficient phase equilibrium calculation in a reduced
flash context. The Canadian Journal of Chemical Engineering, 82(6):1225–1238, 2004.
[100] Dan Vladimir Nichita and Martin Petitfrere. Phase equilibrium calculations with quasi-newton
methods. Fluid Phase Equilibria, 406:194–208, 2015.
[101] Ryosuke Okuno. Modeling of multiphase behavior for gas flooding simulation. PhD thesis, The
University of Texas at Austin, 2009.
[102] Ryosuke Okuno, Russell Johns, and Kamy Sepehrnoori. A new algorithm for rachford-rice for
multiphase compositional simulation. SPE Journal, 15(02):313–325, 2010.
[103] Ryosuke Okuno, Russell T Johns, and Kamy Sepehrnoori. Three-phase flash in compositional
simulation using a reduced method. SPE Journal, 15(03):689–703, 2010.
[104] Franklin Mattes Orr. Theory of gas injection processes. Tie-Line Publications, 2007.
161
[105] Michael J O’Sullivan, Karsten Pruess, and Marcelo J Lippmann. State of the art of geothermal
reservoir simulation. Geothermics, 30(4):395–429, 2001.
[106] MJ O’sullivan. Geothermal reservoir simulation. International journal of energy research,
9(3):319–332, 1985.
[107] Huanquan Pan, Michael Connolly, and Hamdi A Tchelepi. Multiphase equilibrium calculation
framework for compositional simulation of CO2 eor in low temperature reservoirs. AIChE
Journal, In review.
[108] Huanquan Pan and Abbas Firoozabadi. Complex multiphase equilibrium calculations by direct
minimization of gibbs free energy by use of simulated annealing. SPE Reservoir Evaluation &
Engineering, 1(01):36–42, 1998.
[109] Huanquan Pan and Abbas Firoozabadi. Fast and robust algorithm for compositional modeling:
Part ii-two-phase flash computations. SPE Journal, 8(04):380–391, 2003.
[110] Huanquan Pan and Hamdi A Tchelepi. Compositional flow simulation using reduced-
variables and stability-analysis bypassing. In SPE Reservoir Simulation Symposium. Society
of Petroleum Engineers, 2011.
[111] D Paterson, W Yan, ML Michelsen, and EH Stenby. Isenthalpic flash for thermal recovery. In
ECMOR XV-15th European Conference on the Mathematics of Oil Recovery, 2016.
[112] D Paterson, W Yan, ML Michelsen, and EH Stenby. Isenthalpic flash for thermal recovery. In
ECMOR XV-15th European Conference on the Mathematics of Oil Recovery, 2016.
[113] Duncan Paterson, Wei Yan, Michael L Michelsen, and Erling H Stenby. Robust and efficient
isenthalpic flash algorithms for thermal recovery of heavy oil. In SPE Improved Oil Recovery
Conference. Society of Petroleum Engineers, 2016.
[114] DW Peaceman. A nonlinear stability analysis for difference equations using semi-implicit
mobility. Society of Petroleum Engineers Journal, 17(01):79–91, 1977.
[115] Ding-Yu Peng and Donald B Robinson. A new two-constant equation of state. Industrial &
Engineering Chemistry Fundamentals, 15(1):59–64, 1976.
[116] Ding-Yu Peng and Donald B Robinson. Two-and three-phase equilibrium calculations for coal
gasification and related processes. ACS Publications, 1980.
162
[117] Douglas Roger Perschke. Equation-of-state phase-behavior modeling for compositional simula-
tion. PhD thesis, The University of Texas at Austin, 1988.
[118] Martin Petitfrere and Dan Vladimir Nichita. Multiphase equilibrium calculations using a
reduction method. Fluid Phase Equilibria, 401:110–126, 2015.
[119] George Francis Pinder. State-of-the-art review of geothermal reservoir modelling. Technical
report, California Univ., Berkeley (USA). Lawrence Berkeley Lab., 1979.
[120] Michael Prats. Thermal recovery. SPE of AIME, New York, NY, 1982.
[121] Karsten Pruess, CM Oldenburg, and GJ Moridis. Tough2 user’s guide version 2. Lawrence
Berkeley National Laboratory, 1999.
[122] HH Rachford Jr and JD Rice. Procedure for use of electronic digital computers in calculating
flash vaporization hydrocarbon equilibrium. Journal of Petroleum Technology, 4(10):19–3,
1952.
[123] Claus P Rasmussen, Kristian Krejbjerg, Michael L Michelsen, and Kersti E Bjurstrøm. In-
creasing the computational speed of flash calculations with applications for compositional,
transient simulations. SPE Reservoir Evaluation & Engineering, 9(01):32–38, 2006.
[124] Ruslan Rin. Implicit Coupling Framework for Multi-physics reservoir simulation. PhD thesis,
Stanford University, 2017.
[125] Ruslan Rin, Pavel Tomin, Timur Garipov, Denis Voskov, and Hamdi Tchelepi. General implicit
coupling framework for multi-physics problems. In SPE Reservoir Simulation Conference.
Society of Petroleum Engineers, 2017.
[126] Donald B Robinson and Ding-Yu Peng. The characterization of the heptanes and heavier
fractions for the GPA Peng-Robinson programs. Gas Processors Association, 1978.
[127] Donald B Robinson, Ding-Yu Peng, and Samuel YK Chung. The development of the peng-
robinson equation and its application to phase equilibrium in a system containing methanol.
Fluid Phase Equilibria, 24(1-2):25–41, 1985.
[128] TF Russell. Stability analysis and switching criteria for adaptive implicit methods based on the
CFL condition. In SPE Symposium on Reservoir Simulation. Society of Petroleum Engineers,
1989.
163
[129] F. Saaf. Efficient application of reduced variable transformation and conditional stability
testing in reservoir simulation flash calculations, December 6 2007. US Patent App. 11/758,215.
[130] Nasser Sabet and Hamid Reza Erfani Gahrooei. A new robust stability algorithm for three
phase flash calculations in presence of water. Journal of Natural Gas Science and Engineering,
35:382–391, 2016.
[131] Hamidreza Salimi. Negative-saturation approach for (non)-isothermal compositional three-
phase flow simulations in porous media. Computational Geosciences, pages 1–22, 2014.
[132] A Saul and Wolfgang Wagner. International equations for the saturation properties of ordinary
water substance. Journal of Physical and Chemical Reference Data, 16(4):893–901, 1987.
[133] Graham Saville and Richard Szczepanski. Calculation of phase equilibria by minimization
techniques-problems of thermodynamic consistency. Fluid Phase Equilibria, 14:245–254, 1983.
[134] Olaf Schenk and Klaus Gartner. Solving unsymmetric sparse systems of linear equations with
pardiso. Future Generation Computer Systems, 20(3):475–487, 2004.
[135] Olaf Schenk, Klaus Gartner, and Wolfgang Fichtner. Efficient sparse lu factorization with
left-right looking strategy on shared memory multiprocessors. BIT Numerical Mathematics,
40(1):158–176, 2000.
[136] Schlumberger. INTERSECT: Technical Description 2015.1, 2015.
[137] AA Shinta and Abbas Firoozabadi. Predicting phase behavior of water/reservoir-crude systems
with the association concept. SPE Reservoir Engineering, 12(02):131–137, 1997.
[138] Ali A Shinta and Abbas Firoozabadi. Equation of state representation of aqueous mixtures
using an association model. The Canadian Journal of Chemical Engineering, 73(3):367–379,
1995.
[139] GM Shook and DD Faulder. Validation of a geothermal simulator. Technical report,
DOEEEGTP (USDOE Office of Energy Efficiency and Renewable Energy Geothermal Tech
Pgm), 1991.
[140] N D Shutler. Numerical three-phase simulation of the linear steamflood process. Society of
Petroleum Engineers Journal, 9(02):232–246, 1969.
164
[141] N D Shutler. Numerical three-phase model of the two-dimensional steamflood process. Society
of Petroleum Engineers Journal, 10(04):405–417, 1970.
[142] Giorgio Soave. Equilibrium constants from a modified redlich-kwong equation of state. Chem-
ical Engineering Science, 27(6):1197–1203, 1972.
[143] Ingolf Søreide and Curtis H Whitson. Peng-robinson predictions for hydrocarbons, CO2, N2,
and H2S with pure water and NaCl brine. Fluid Phase Equilibria, 77:217–240, 1992.
[144] Huafei Sun, Ashwin Raghavan, Kjetil Haugen, and Shaji Chempath. An improved isenthalpic
flash algorithm based on maximization of entropy. Fluid Phase Equilibria, 438:18–28, 2017.
[145] Thomas BS Tan and John P Letkeman. Application of d4 ordering and minimization in an
effective partial matrix inverse iterative method. paper SPE, 10493:1–3, 1982.
[146] RM Toronyi and SM Ali. Two-phase, two-dimensional simulation of a geothermal reservoir.
Society of Petroleum Engineers Journal, 17(03):171–183, 1977.
[147] JA Trangenstein. Minimization of gibbs free energy in compositional reservoir simulation. In
SPE Reservoir Simulation Symposium. Society of Petroleum Engineers, 1985.
[148] Abdoljalil Varavei. Development of an equation-of-state thermal flooding simulator. PhD
thesis, The University of Texas at Austin, 2009.
[149] Abdoljalil Varavei and Kamy Sepehrnoori. An EOS-based compositional thermal reservoir
simulator. In SPE Reservoir Simulation Symposium. Society of Petroleum Engineers, 2009.
[150] Arun Venkat Venkatramani and Ryosuke Okuno. Modeling of multiphase behavior for water/n-
alkane mixtures by use of the Peng-Robinson EOS. In SPE Heavy Oil Conference-Canada.
Society of Petroleum Engineers, 2014.
[151] PKW Vinsome. A numerical description of hot-water and steam drives by the finite-difference
method. Technical report, Shell Internat Res Mij BV, 1974.
[152] Denis Voskov. An extended natural variable formulation for compositional simulation based
on tie-line parameterization. Transport in porous media, 92(3):541–557, 2012.
[153] Denis Voskov and Hamdi Tchelepi. Compositional space parameterization: multi-contact
miscible displacements and extension to multiple phases. SPE Journal, 14(3):441–449, 2009.
165
[154] Denis Voskov and Hamdi A Tchelepi. Compositional space parametrization for miscible dis-
placement simulation. Transport in Porous Media, 75(1):111–128, 2008.
[155] Denis V Voskov and Hamdi A Tchelepi. Compositional space parameterization: theory and
application for immiscible displacements. SPE J, 14(3):431–440, 2009.
[156] Denis V Voskov and Hamdi A Tchelepi. Comparison of nonlinear formulations for two-
phase multi-component EOS based simulation. Journal of Petroleum Science and Engineering,
82:101–111, 2012.
[157] Denis Viktorovich Voskov, Hamdi A Tchelepi, and Rami Younis. General nonlinear solution
strategies for multiphase multicomponent EOS based simulation. In SPE Reservoir Simulation
Symposium. Society of Petroleum Engineers, 2009.
[158] John R Wallis. An iterative matrix solution technique for steamflood simulation. TPJ, 2:6,
1982.
[159] P Wang, I Yotov, M Wheeler, T Arbogast, C Dawson, M Parashar, and K Sepehrnoori. A
new generation EOS compositional reservoir simulator: Part i-formulation and discretization.
In SPE Reservoir Simulation Symposium. Society of Petroleum Engineers, 1997.
[160] Xiaochen Wang. Trust-Region Newton Solver for Multiphase Flow and Transport in Porous
Media. PhD thesis, Stanford University, 2012.
[161] Xiaochen Wang and Hamdi A Tchelepi. Trust-region based solver for nonlinear transport in
heterogeneous porous media. Journal of Computational Physics, 253:114–137, 2013.
[162] JW Watts. A compositional formulation of the pressure and saturation equations. SPE
Reservoir Engineering, 1(3):243–252, 1986.
[163] Curtis H Whitson and Michael L Michelsen. The negative flash. Fluid Phase Equilibria,
53:51–71, 1989.
[164] TW Wong and K Aziz. Considerations in the development of multipurpose reservoir simulation
models. In proceedings of the 1st and 2nd International Forum on Reservoir Simulation,
Alpbach, Austria, pages 4–8, 1988.
[165] TW Wong, A Firoozabadi, and K Aziz. Relationship of the volume-balance methods of compo-
sitional simulation to the newton-raphson method. SPE Reservoir Engineering, pages 415–422,
1990.
166
[166] Zhi Yang Wong. A geothermal reservoir simulator in AD-GPRS. Master’s thesis, Stanford
University, 2015.
[167] Zhi Yang Wong, Roland Horne, and Denis Voskov. Comparison of nonlinear formulations for
geothermal reservoir simulations. In 41st Workshop on Geothermal Reservoir Engineering,
2016.
[168] Jianzhong Wu and John M Prausnitz. Phase equilibria for systems containing hydrocarbons,
water, and salt: An extended peng-robinson equation of state. Industrial & engineering chem-
istry research, 37(5):1634–1643, 1998.
[169] Wei Yan and Erling H Stenby. On solving the rachford-rice equation with higher order methods.
Fluid Phase Equilibria, 363:290–292, 2014.
[170] Larry C Young and Robert E Stephenson. A generalized compositional approach for reservoir
simulation. Society of Petroleum Engineers, 23(5):727–742, 1983.
[171] Rami Younis, Hamdi Tchelepi, and Khalid Aziz. Adaptively localized continuation-newton
method: Nonlinear solvers that converge all the time. SPE J, 15(2):526–544, 2010.
[172] Rami Mustafa Younis. Modern advances in software and solution algorithms for reservoir
simulation. PhD thesis, Stanford University, 2011.
[173] R Zaydullin, DV Voskov, and HA Tchelepi. Comparison of EOS-based and K-values-based
methods for three-phase thermal simulation. Transport in Porous Media, pages 1–24, 2016.
[174] R Zaydullin, DV Voskov, and HA Tchelepi. Phase-state identification bypass method for three-
phase thermal compositional simulation. Computational Geosciences, 20(3):461–474, 2016.
[175] Rustem Zaydullin. Compositional space parameterization methods for thermal-compositional
simulation. PhD thesis, Stanford University, 2015.
[176] Rustem Zaydullin, Denis V Voskov, Scott C James, Heath Henley, and Angelo Lucia. Fully
compositional and thermal reservoir simulation. Computers & Chemical Engineering, 63:51–
65, 2014.
[177] Y Zhou. Parallel general-purpose reservoir simulation with coupled reservoir models and mul-
tisegment wells. PhD thesis, PhD Thesis, Stanford University, 2012.
167
[178] Di Zhu and Ryosuke Okuno. A robust algorithm for isenthalpic flash of narrow-boiling fluids.
Fluid Phase Equilibria, 379:26–51, 2014.
[179] Di Zhu and Ryosuke Okuno. Analysis of narrow-boiling behavior for thermal compositional
simulation. In SPE Reservoir Simulation Symposium. Society of Petroleum Engineers, 2015.
[180] Di Zhu and Ryosuke Okuno. Robust isenthalpic flash for multiphase water/hydrocarbon mix-
tures. SPE Journal, 20(06):1–350, 2015.
[181] Di Zhu and Ryosuke Okuno. Multiphase isenthalpic flash integrated with stability analysis.
Fluid Phase Equilibria, 423:203–219, 2016.
168