Professional Documents
Culture Documents
by
Waleed Fazelipour
2007
Development of a Fully Implicit, Parallel,
Equation-of-State Compositional Simulator to
Model Asphaltene Precipitation in
Petroleum Reservoirs
by
Thesis
Petroleum Reservoirs
Approved by
Supervising Committee:
_____________________
Gary A. Pope, Co-Supervisor
_____________________
Kamy Sepehrnoori, Co-Supervisor
Dedication
I have been lucky to have the privilege of studying at The University of Texas at
Austin. During my studies at UT, many people helped me in different ways in completing
First, I would like to thank my supervising professors, Prof. Gary A. Pope and
Prof. Kamy Sepehrnoori for their kind supervision and in completing this research. I am
indebted to them for all the useful meetings and discussions I had with them, for helping
me out whenever I was stuck and most importantly, for teaching me how to analyze a
Tarahhom for their great help with the General Purpose Adaptive Simulator. Numerous
and long discussions with them on the formulation and coding were very useful.
I would also like to thank Kazuhiro Asakawa and Nitin Chowdhury for helping
me get started on my research. Thanks to Ajitabh Kumar for his help on starting use of
CMG GEM. I would also like to thank my friends, Elif Altinay, Vishal Bang, Mohabbat
Ahmadi, Abraham John, Jitendra Mohan, Gholamreza Garmeh, Nariman Fathi, Amir
different ways, for their good company and for providing me with some useful
I would also like to take this opportunity to thank the industrial sponsors of this
research; NIOC, Chevron, Marathon Oil, ConocoPhillips, PetroTel, Devon Energy, Shell
and Shengli Oilfields. I would also like to thank CMG Ltd. for providing their tools
v
which includes Builder, GEM, Results 3D, Results Graph and WinProp for my research
and also for their technical support throughout the time. I am specially, thankful to Bruce
Kohse for his help with the asphaltene-related models in CMG GEM and WinProp. I am
also thankful to Clovis R. Maliska Jr. and Marcos Cabral Damiani from ESSS for
providing their post processing software called Kraken which was used for GPAS.
I would also like to thank Ms. Esther Barrientes for taking care of all the
administrative hassles for me. Thanks are also due to Ms. Joanna Castillo for her help
love and faith in me. Their constant encouragement enabled me to keep going and
complete my research.
vi
Abstract
Petroleum Reservoirs
by
affects all aspects of oil production, processing and transportation. It is very important to
predict the asphaltene precipitation during the production process. Many models have
compositional simulator called GPAS, developed at the Center for Petroleum and
Peng-Robinson EOS is used for the hydrocarbon phase behavior calculations. The linear
solvers from PETSc package (Portable Extensible Toolkit for Scientific Computation) are
used for the solution of the underlying linear equations. The framework provides
and message passing between processors for updating physical properties in mass-
GPAS. We believe this implementation has led to a more powerful reservoir simulator
that can be used to predict asphaltene precipitation by small and large oil companies to
help them in the design of complex gas and waterflooding processes on their desktops or
a cluster of computers.
Nghiem's model is a solid model that treats the precipitating asphaltene as a single
component residing in the solid phase while oil and gas phases are modeled with a cubic
EOS. Solid models may require many empirical parameters and a large amount of tuning
during the oil production process. Many models have been developed to predict the onset
point and the amount of asphaltene precipitation as well as the change in relative
viii
permeability. In this study, physical properties models were also implemented in GPAS
asphaltene precipitation may damage the oil production in most cases. A key conclusion
of the findings is the ability to predict the deposition of asphaltenes in the reservoir
without the need for generating data from expensive downhole samples.
ix
Table of Contents
Acknowledgements ............................................................................................................v
Abstract............................................................................................................................ vii
xv
C.5 Derivatives with respect to lnK n cs .................................................................395
xvi
E.2.1 Derivatives for the On-Diagonal Elements of the Jacobian Matrix......450
E.2.2 Derivatives for the Off-Diagonal Elements of the Jacobian Matrix .....457
E.3 Derivatives with respect to P ........................................................................458
E.3.1 Derivatives for the On-Diagonal Elements of the Jacobian Matrix......458
E.3.2 Derivatives for the Off-Diagonal Elements of the Jacobian Matrix .....463
E.4 Derivatives with respect to lnK n cs .................................................................467
E.4.1 Derivatives for the On-Diagonal Elements of the Jacobian Matrix......467
E.4.2 Derivatives for the Off-Diagonal Elements of the Jacobian Matrix .....469
E.5 Derivatives with respect to L g .......................................................................470
E.5.1 Derivatives for the On-Diagonal Elements of the Jacobian Matrix......470
E.5.2 Derivatives for the Off-Diagonal Elements of the Jacobian Matrix .....473
E.6 Derivatives with respect to Ls .......................................................................473
E.6.1 Derivatives for the On-Diagonal Elements of the Jacobian Matrix......473
E.6.2 Derivatives for the Off-Diagonal Elements of the Jacobian Matrix .....476
xvii
G.6 Derivatives with respect to Ls .......................................................................485
xviii
I.2.2 Derivatives with respect to N i ..............................................................491
xx
L.4.6 Derivatives with respect to Ls ..............................................................519
Nomenclature .................................................................................................................604
References .......................................................................................................................610
Vita .................................................................................................................................620
xxi
List of Tables
Table 3.2: Core data for oil core flood simulation ............................................................49
Table 3.3: Deposition model parameters for oil core flood simulation ............................50
Table 3.5: Binary Interaction Parameters for different components for Weyburn fluid...52
Table 3.6: Liquid-gas relative permeability and capillary pressure table .........................52
Table 3.7: Water-oil relative permeability and capillary pressure table ...........................53
Table 3.8: The fluid compositions and molecular weights of dead oil and separator
gas .................................................................................................................53
Table 3.9: The composition of core oil and injection gas .................................................54
Table 3.12: Binary interaction parameters for the North Sea fluid...................................55
Table 3.13: Liquid-gas relative permeability and capillary pressure table .......................56
Table 3.14: Water-oil relative permeability and capillary pressure table .........................56
Table 3.16: Two-dimensional radial model data for oil depletion simulation ..................57
Table 3.17: Input parameters for the deposition and flocculation models ........................58
Table 3.19: Liquid-gas relative permeability & capillary pressure table for rock 1 .........60
Table 3.20: Liquid-gas relative permeability & capillary pressure table for rock 2 .........60
Table 3.21: Water-oil relative permeability & capillary pressure table for rock 1 ...........61
xxii
Table 3.22: Water-oil relative permeability & capillary pressure table for rock 2 ...........61
Table 3.27: Input parameters for the asphaltene flocculation model ................................63
Table 3.28: 2-D radial model data for oil depletion simulation with grid refinement ......64
Table 5.1: Summary of code added to GPAS for modeling asphaltene precipitation ....204
Table 6.1: Data for modeling the porous medium (Case GF1).......................................236
Table 6.2: Grid data for the 30-gridblock scenario (Case GF1)......................................236
Table 6.3: Grid data for the 60-gridblock scenario (Case GF1)......................................237
Table 6.7: PVT properties for the modeled fluid (Case GF1).........................................239
Table 6.8: Binary Interaction Coefficients between different components (Case GF1).239
Table 6.11: Well specifications for the 30-gridblock scenario (Case GF1)....................241
xxiii
Table 6.12: Well specifications for the 60-gridblock scenario (Case GF1)....................242
Table 6.14: Input parameters for the asphaltene precipitation model (Case GF1) .........243
Table 6.15: Summary of runs made for sensitivity and comparative studies (Case
GF1) ............................................................................................................244
Table 6.16: Data for modeling the porous medium (Case GF3).....................................245
Table 6.17: Grid data for the 30-gridblock scenario (Case GF3)....................................245
Table 6.18: Grid data for the 60-gridblock scenario (Case GF3)....................................246
Table 6.22: PVT properties for the modeled fluid (Case GF3).......................................248
GF3) ............................................................................................................248
Table 6.26: Well specifications for the 30-gridblock scenario (Case GF3)....................250
Table 6.27: Well specifications for the 60-gridblock scenario (Case GF3)....................251
Table 6.29: Input parameters for the asphaltene precipitation model (Case GF3) .........252
Table 6.30: Summary of runs made for sensitivity and comparative studies (Case
GF3) ............................................................................................................253
Table 6.32: Grid data for the 30-gridblock scenario (Case GVM5) ...............................254
Table 6.33: Grid data for the 60-gridblock scenario (Case GVM5) ...............................255
xxiv
Table 6.34: Properties of water (Case GVM5) ...............................................................255
Table 6.37: PVT properties for the modeled fluid (Case GVM5) ..................................257
Table 6.38: Binary Interaction Coefficients between components (Case GVM5) .........257
Table 6.41: Well specifications for the 30-gridblock scenario (Case GVM5)................259
Table 6.42: Well specifications for the 60-gridblock scenario (Case GVM5)................260
Table 6.44: Input parameters for the asphaltene precipitation model (Case GVM5) .....261
Table 6.45: Summary of runs for sensitivity and comparative studies (Case GVM5) ...262
Table 6.46: Data for modeling the porous medium (Case GVM10)...............................263
Table 6.51: PVT properties for the modeled fluid (Case GVM10) ................................266
Table 6.52: Binary Interaction Coefficients between components (Case GVM10) .......266
Table 6.57: Input parameters for the asphaltene precipitation model (Case GVM10) ...269
Table 6.58: Summary of runs for sensitivity and comparative studies (Case GVM10) .270
xxv
Table 6.59: Data for modeling the porous medium (Case GVR8)..................................271
Table 6.64: PVT properties for the modeled fluid (Case GVR8) ...................................274
Table 6.65: Binary Interaction Coefficients between components (Case GVR8) ..........274
Table 6.70: Input parameters for the asphaltene precipitation model (Case GVR8) ......277
Table 6.71: Summary of runs for sensitivity and comparative studies (Case GVR8) ....278
Table 6.76: PVT properties for the reservoir fluid (Case 6.7) ........................................281
Table 6.82: Input parameters for the asphaltene precipitation model (Case 6.7)............284
xxvi
List of Figures
Figure 3.1: Schematic representation of the oil core flood simulation .............................70
Figure 3.6: Schematic representation of the gas injection core flood simulation .............74
Figure 3.7: S g and interfacial tension, k12 = 0.0 day 1 and = 0.0 day 1 ....................75
Figure 3.8: Precipitated asphaltene, k 21 = 0.0 day 1 and = 0.0 day 1 .........................76
Figure 3.9: Flocculated asphaltene, k 21 = 0.0 day 1 and = 0.0 day 1 .........................76
Figure 3.10: Precipitated asphaltene, k12 = 10.0 day 1 and = 0 day 1 ........................77
Figure 3.11: Flocculated asphaltene, k12 = 10.0 day 1 and = 0 day 1 ........................77
Figure 3.12: Precipitated asphaltene, k12 = 100 day 1 and = 0 day 1 .........................78
Figure 3.13: Flocculated asphaltene, k12 = 100 day 1 and = 0 day 1 .........................78
Figure 3.21: Schematic of the radial reservoir including the production well..................82
Figure 3.22: The liquid-gas relative permeability curves for rock type 1.........................83
xxvii
Figure 3.23: The liquid-gas relative permeability curves for rock type 2.........................83
Figure 3.24: The water-oil relative permeability curves for rock type 1 ..........................84
Figure 3.25: The water-oil relative permeability curves for rock type 2 ..........................84
Figure 3.26: The liquid-gas capillary pressure curve for rock type 1 ...............................85
Figure 3.27: The liquid-gas capillary pressure curve for rock type 2 ...............................85
Figure 3.28: The water-oil capillary pressure curve for rock type 1.................................86
Figure 3.29: The water-oil capillary pressure curve for rock type 2.................................86
Figure 3.30: Three-phase oil relative permeability for rock type 1 ..................................87
Figure 3.31: Three-phase oil relative permeability for rock type 2 ..................................87
Figure 3.33: Development of resistance factor for radial model simulation ....................88
Figure 3.34: Block pressure as a function of time for pressure depletion simulation.......89
Figure 3.35: Deposited asphaltene, permeability resistance factor and block pressure....89
Figure 3.36: Deposited asphaltene (lb/cu. ft bulk vol.) after 1 year production ...............90
Figure 3.37: Schematic representation of the radial reservoir with grid refinement ........91
Figure 3.38: Schematic of the radial reservoir with grid refinement including the well ..91
Figure 3.45: Development of solid deposition for single-well with heterogeneity ..........95
Figure 3.46: Development of resistance factor for radial model with grid refinement ....95
Figure 3.47: Block pressure for 2-D radial model with grid refinement ..........................96
xxviii
Figure 3.48: Deposited asphaltene, permeability resistance factor and block pressure....96
Figure 3.49: Deposited asphaltene (lb/cu. ft bulk vol.) after 1 year production ...............97
Figure 5.1: The overall structure of GPAS with the capability of modeling asphaltene
precipitation ................................................................................................207
Figure 6.1: Schematic representation of the discretized porous media used in Case
GF1 .............................................................................................................285
Figure 6.2: Location of injection and production wells used in Case GF1.....................285
Figure 6.5: Three-phase oil relative permeability for rock type 1 by Stones first
Figure 6.6: Three-phase oil relative permeability for rock type 1 by Stones second
Figure 6.8: Schematic representation of the fluid flow vectors in areal viewpoint
Figure 6.9: Static asphaltene Precipitation curve for the reservoir fluid used (Case
GF1) ............................................................................................................290
Figure 6.10: Comparison of average pressure without and with the effect of
Figure 6.11: Comparison of pressure profile without (top) and with (bottom) the
Figure 6.12: Comparison of oil rate without and with the effect of asphaltene (Case
GF1) ............................................................................................................292
xxix
Figure 6.13: Comparison of injector bottom-hole pressure without and with the effect
Figure 6.15: Pressure profile at 685 PV injected for R f ,max of 3 (Case GF1) ................293
Figure 6.16: Pressure profile at 685 PV injected for R f ,max of 4 (Case GF1) ................294
Figure 6.17: Pressure profile at 685 PV injected for R f ,max of 5 (Case GF1) ................294
Figure 6.21: Pressure profile at 685 PV injected for w as,max of 0.0010 (Case GF1) ......296
Figure 6.22: Pressure profile at 685 PV injected for w as,max of 0.0015 (Case GF1) ......297
Figure 6.23: Pressure profile at 685 PV injected for w as,max of 0.0020 (Case GF1) ......297
Figure 6.25: Average pressure under the effect of gridblock discretion (Case GF1) .....298
Figure 6.26: Comparison of the oil rate under the effect of gridblock discretion with
Figure 6.27: Comparison of the pressure profile under the effect of gridblock
Figure 6.28: Comparison of the average pressure between CMG GEM and GPAS
Figure 6.29: Comparison of the oil rate between CMG GEM and GPAS (Case GF1) ..301
xxx
Figure 6.30: Schematic representation of the discretized porous media used in Case
GF3 .............................................................................................................302
Figure 6.31: Location of injection and production wells used in Case GF3...................302
Figure 6.34: Three-phase oil relative permeability for rock type 1 by Stones first
Figure 6.35: Three-phase oil relative permeability for rock type 1 by Stones second
Figure 6.37: Schematic representation of the fluid flow vectors in areal viewpoint
Figure 6.38: Static asphaltene precipitation curve for the reservoir fluid used (Case
GF3) ............................................................................................................307
Figure 6.39: Comparison of average pressure with and without the effect of
Figure 6.40: Comparison of pressure profile without (top) and with (bottom) the
Figure 6.41: Comparison of oil rate without and with the effect of asphaltene (Case
GF3) ............................................................................................................309
Figure 6.42: Comparison of the injector bottom-hole pressure without and with the
Figure 6.44: Pressure profile at 80 PV injected for R f ,max of 4 (Case GF3) ..................310
xxxi
Figure 6.45: Pressure profile at 80 PV injected for R f ,max of 5 (Case GF3) ..................311
Figure 6.46: Pressure profile at 80 PV injected for R f ,max of 6 (Case GF3) ..................311
Figure 6.47: Pressure profile at 80 PV injected for R f ,max of 8 (Case GF3) ..................312
Figure 6.48: Pressure profile at 80 PV injected for R f ,max of 10 (Case GF3) ................312
Figure 6.50: Sensitivity of oil rate to the maximum resistance factor (Case GF3).........313
Figure 6.52: Average pressure under the effect of gridblock discretion (Case GF3) .....314
Figure 6.53: Comparison of the oil rate under the effect of gridblock discretion with
Figure 6.54: Comparison of the pressure profile under the effect of gridblock
Figure 6.55: Comparison of the average pressure between CMG GEM and GPAS
Figure 6.57: Schematic representation of the discretized porous media used in Case
GVM5 .........................................................................................................318
Figure 6.58: Location of injection and production wells used in Case GVM5 ..............318
Figure 6.61: Three-phase oil relative permeability for rock type 1 by Stones first
Figure 6.64: Schematic representation of the fluid flow vectors in areal viewpoint
(Case GVM5)..............................................................................................322
Figure 6.65: Static asphaltene precipitation curve for the reservoir fluid (Case
GVM5)........................................................................................................323
Figure 6.66: Comparison of average pressure without and with the effect of
Figure 6.67: Comparison of the pressure profile without (top) and with (bottom) the
Figure 6.68: Comparison of the oil rate without and with the effect (Case GVM5) ......325
Figure 6.69: Comparison of the injector bottom-hole pressure without and with the
Figure 6.71: Pressure profile at 67 PV injected for R f ,max of 4 (Case GVM5) ..............326
Figure 6.72: Pressure profile at 67 PV injected for R f ,max of 5 (Case GVM5) ..............327
Figure 6.73: Pressure profile at 67 PV injected for R f ,max of 6 (Case GVM5) ..............327
Figure 6.74: Pressure profile at 67 PV injected for R f ,max of 8 (Case GVM5) ..............328
Figure 6.75: Pressure profile at 67 PV injected for R f ,max of 10 (Case GVM5) ............328
Figure 6.77: Sensitivity of oil rate to maximum resistance factor (Case GVM5) ..........329
Figure 6.78: Pressure profile at 67 PV injected for w as,max of 0.0005 (Case GVM5) ....330
xxxiii
Figure 6.79: Pressure profile at 67 PV injected for w as,max of 0.0010 (Case GVM5) ....330
Figure 6.80: Pressure profile at 67 PV injected for w as,max of 0.0015 (Case GVM5) ....331
Figure 6.81: Pressure profile at 67 PV injected for w as,max of 0.0020 (Case GVM5) ....331
Figure 6.83: Average pressure under the effect of gridblock discretion (Case GVM5).332
Figure 6.84: Comparison of the oil rate under the effect of gridblock discretion with
(Case GVM5)..............................................................................................334
Figure 6.86: Comparison of the average pressure between CMG GEM and GPAS
Figure 6.87: Comparison of the oil rate between CMG GEM and GPAS (Case
GVM5)........................................................................................................335
Figure 6.88: Schematic representation of the discretized porous media used in Case
GVM10 .......................................................................................................336
Figure 6.89: Location of injection and production wells used in Case GVM10 ............336
Figure 6.92: Three-phase oil relative permeability for rock type 1 by Stones first
Figure 6.93: Three-phase oil relative permeability for rock type 1 by Stones second
xxxiv
Figure 6.94: Schematic representation of the fluid flow pattern in 3-dimensional
Figure 6.95: Schematic representation of the fluid flow vectors in areal viewpoint
(Case GVM10)............................................................................................340
Figure 6.96: Static asphaltene precipitation curve for reservoir fluid used (Case
GVM10)......................................................................................................341
Figure 6.97: Comparison of average pressure without and with the effect of
Figure 6.98: Comparison of pressure profile without (top) and with (bottom) the
Figure 6.99: Comparison of producer oil rate without and with the effect (Case
GVM10)......................................................................................................343
Figure 6.100: Comparison of injector bottom-hole pressure without and with the
Figure 6.102: Pressure profile at 68 PV injected for R f ,max of 3 (Case GVM10) ..........344
Figure 6.103: Pressure profile at 68 PV injected for R f ,max of 4 (Case GVM10) ..........345
Figure 6.104: Pressure profile at 68 PV injected for R f ,max of 5 (Case GVM10) ..........345
Figure 6.106: Sensitivity of oil rate to the maximum resistance factor (Case GVM10) 346
Figure 6.107: Pressure profile at 68 PV injected for w as,max of 0.0010 (Case GVM10) 347
Figure 6.108: Pressure profile at 68 PV injected for w as,max of 0.0013 (Case GVM10) 347
Figure 6.109: Pressure profile at 68 PV injected for w as,max of 0.0015 (Case GVM10) 348
Figure 6.110: Pressure profile at 68 PV injected for w as,max of 0.0020 (Case GVM10) 348
xxxv
Figure 6.111: Sensitivity of average pressure to w as,max (Case GVM10).......................349
Figure 6.112: Sensitivity of injector bottom-hole pressure to w as,max (Case GVM10) ..349
GVM10)......................................................................................................350
Figure 6.114: Pressure profile at 68 PV injected for vs of 0.8 litres/gmol (Case
GVM10)......................................................................................................350
Figure 6.115: Pressure profile at 68 PV injected for vs of 1.2 litres/gmol (Case
GVM10)......................................................................................................350
Figure 6.116: Sensitivity of average pressure to the solid molar volume (Case
GVM10)......................................................................................................351
Figure 6.117: Sensitivity of producer oil rate to the solid molar volume (Case
GVM10)......................................................................................................351
GVM10)......................................................................................................352
Figure 6.119: Comparison of the average pressure between CMG GEM and GPAS
Figure 6.120: Comparison of the producer oil rate between CMG GEM and GPAS
Figure 6.122: Schematic representation of the discretized porous media used in Case
GVR8 ..........................................................................................................354
Figure 6.123: Location of injection and production wells used in Case GVR8 .............354
xxxvi
Figure 6.126: Three-phase oil relative permeability for rock type 1 by Stones first
Figure 6.127: Three-phase oil relative permeability for rock type 1 by Stones second
GVR8).........................................................................................................358
Figure 6.130: Static asphaltene precipitation curve for reservoir fluid used (Case
GVR8).........................................................................................................359
Figure 6.131: Comparison of the average pressure without and with the effect of
Figure 6.132: Comparison of pressure profile without (top) and with (bottom) the
Figure 6.133: Comparison of producer oil rate without and with the effect (Case
GVR8).........................................................................................................361
Figure 6.134: Comparison of injector bottom-hole pressure without and with the
Figure 6.136: Pressure profile at 73 PV injected for R f ,max of 3 (Case GVR8) .............362
Figure 6.137: Pressure profile at 73 PV injected for R f ,max of 4 (Case GVR8) .............363
Figure 6.138: Pressure profile at 73 PV injected for R f ,max of 5 (Case GVR8) .............363
GVR8).........................................................................................................364
xxxvii
Figure 6.140: Sensitivity of producer oil rate to the maximum permeability resistance
Figure 6.142: Pressure profile at 73 PV injected for w as,max of 0.0013 (Case GVR8) ...365
Figure 6.143: Pressure profile at 73 PV injected for w as,max of 0.0015 (Case GVR8) ...366
Figure 6.144: Pressure profile at 73 PV injected for w as,max of 0.0020 (Case GVR8) ...366
Figure 6.146: Sensitivity of injector bottom-hole pressure to w as,max (Case GVR8) .....367
GVR8).........................................................................................................368
Figure 6.148: Pressure profile at 73 PV injected for vs of 0.8 litres/gmol (Case
GVR8).........................................................................................................368
Figure 6.149: Pressure profile at 73 PV injected for vs of 1.2 litres/gmol (Case
GVR8).........................................................................................................368
Figure 6.150: Sensitivity of average pressure to the solid molar volume (Case GVR8)369
Figure 6.151: Sensitivity of producer oil rate to the solid molar volume (Case GVR8) 369
Figure 6.152: Sensitivity of injector pressure to the solid molar volume (Case GVR8) 370
Figure 6.153: Comparison of average pressure between CMG GEM and GPAS with
Figure 6.154: Comparison of the oil rate between CMG GEM and GPAS (Case
GVR8).........................................................................................................371
waterflooding ..............................................................................................372
6.7) ..............................................................................................................372
xxxviii
Figure 6.158: Sensitivity of producer oil rate to the maximum permeability resistance
xxxix
Chapter 1: Introduction
1.1 INTRODUCTION
One of the most important phenomena in the oil industry is the precipitation of
heavy organic materials such as asphaltene in petroleum reservoirs and also equipment
for oil processing and transportation, which can cause several flow assurance problems
and undermine the economy and safety of the operation. For instance, asphaltene
precipitation in oil reservoirs can cause diffusivity reduction and wettability alteration in
reservoir rock and finally affect the oil production and economical efficiency.
precipitation include primary depletion, acid stimulation, gas-lift operations and miscible
Asphaltenes are found in most crude oils. Under normal conditions they are held
can alter their association with the resins. This can result in asphaltenes precipitating and
enough to achieve a clear picture of the condition and possible problems, as just doing the
experiments, besides involving high costs, is impossible in some cases. For a specific
project one can investigate the asphaltene flocculation process experimentally but this
1
Hence, there is a need for reservoir simulation of asphaltene precipitation.
should become through by which the above issues would be predicted with a reasonable
accuracy. Numerous models have been proposed based on different microscopic theories
asphaltene precipitation in petroleum reservoirs is, therefore, crucial for the economical
and safe operation of any petroleum production scenario. A key conclusion of the
findings is the ability to predict the deposition of asphaltenes in the reservoir without the
In this chapter, we first discuss the main research objectives of this work and then
The research work that was done, in this thesis, on predicting asphaltene
precipitation and deposition in oil and gas reservoirs has two main parts. The first part
simulator, GEM. The primary objective was to investigate the effects of asphaltene
precipitation, deposition and plugging on properties of the formation, and also the oil
addition, capability of reliably predicting the conditions and the amount of asphaltene
precipitation can significantly help to tackle the above mentioned issues. Another
objective of the first part of this research work was to study several commercial and
2
After studying many available models in the literature for asphaltene
precipitation, the second challenging part of this research dealt with implementation of
developed at the Center for Petroleum and Geosystems Engineering at The University of
Texas at Austin.
The ultimate and main goal of this research work was to add an asphaltene
equation-of-state module of GPAS. The simulator includes the IPARS framework, the
EOS compositional and the chemical modules. More specifically, the entire software,
which includes the framework and several modules for IOR, is called General Purpose
predicting asphaltene precipitation and plugging in oil and gas reservoirs was highly
desirable because it would allow the design of injection or production schemes such that
Chapter 2, which has two main parts, presents a literature review of the research
which was performed on asphaltene precipitation, flocculation and deposition in oil and
gas reservoirs. The first part of this chapter describes the nature, precipitation, adsorption,
flocculation and deposition of asphaltenes. The second part of the chapter discusses in
wettability.
3
called CMG GEM. First, it outlines the features of the models implemented in CMG
petroleum reservoirs. The assumptions and formulations are discussed in detail. Next, the
modeling of porosity alteration and permeability reduction due to asphaltenes are detailed
and presented. Then, the component transport equations are described. The integration of
the models and the solution method used are discussed next. In the last part of this
chapter, several cases are set up on CMG GEM to simulate the effect of asphaltenes on
the properties of rock and oil production, and finally the simulation results for each case
framework in detail, and then it discusses the assumptions and the important equations
for multiphase and multicomponent flow in porous medium which are referred to as the
governing equations of the simulator. In addition, the mathematical formulations for each
section are discussed in detail. Next, a brief description of phase behavior, phase stability
analysis and equations for flash calculation are presented. Phase identification and
tracking are reviewed, followed by a detailed discussion of the physical property models.
The different well models implemented in the simulator are described next. This chapter
also details the overall computation procedure of the simulator and outlines the executive
and work routines of the EOS compositional module of GPAS. The last part deals with a
brief description of the PETSc solver and the automatic time-step control of the
simulator.
into the fully implicit, EOS compositional module of the General Purpose Adaptive
Simulator. This chapter is one of the most important and challenging contributions of this
4
research and it describes, in detail and step by step, the methodology for choosing and
implementing an asphaltene precipitation model into GPAS. First, the available models
for asphaltene precipitation are reviewed and discussed and then a model selection
procedure for the implementation is proposed. The assumptions involved and the
mathematical formulations used for the approach are presented and discussed. Next, the
modeling procedure for the phase behavior of the solid asphaltene precipitate and the
methodology used for coupling it with the important routines of the simulator are
including the stability test for an additional solid phase is presented next. The models for
simulating the dynamic aspects of asphaltene precipitation include the solid adsorption
and the resistance factor for permeability reduction. The new independent variables, the
effect of asphaltene precipitation on the old governing equations and the new
derivatives of the governing equations with the effect of asphaltene precipitation for
constructing the new Jacobian matrix and the residuals of the governing equations are
described next. The final part of this chapter deals with describing the new Jacobian
matrix, the step-by-step solution procedure and the approach used for code development.
Chapter 6 presents in detail several cases that were set up to test and validate the
Model compositional reservoir simulator called GEM from the Computer Modelling
Group Ltd. (CMG Ltd.) was used as the benchmark for validation and comparison studies
and numerous test cases were set up and run on both CMG GEM and GPAS to
accomplish this goal. The models used for the validation and comparison studies between
5
CMG GEM and GPAS along with the asphaltic reservoir fluid are described. For each
case, the simulation results are presented and analyzed. Several sensitivity studies on the
parameters of the asphaltene precipitation model were performed and are addressed in
reservoirs.
6
Chapter 2: Literature Review
2.1 INTRODUCTION
and the related problems due to their formation in petroleum reservoirs. First we review
the research that has been conducted on the nature of asphaltenes, asphaltene
precipitation, flocculation and deposition in oil and gas reservoirs. Then we describe the
the effects of asphaltene formation on the properties of reservoir fluids and more
importantly on the oil production. Last, but not least, we briefly discuss some studies
Petroleum asphaltenes and resins are the polar fractions of crude oil and bitumen
that can be separated by the addition of low molecular weight alkanes. These fractions
paraffinic and naphthenic chains, as well as oxygen, nitrogen and sulfur as functional
the oil, stabilized by resins adsorbed on their surface (Hirschberg et al., 1984; Kawanaka
et al., 1989; Leontaritis et al., 1987). Changes in pressure, temperature and composition
7
may cause asphaltene precipitation. The nature of the precipitated asphaltene is still under
gaseous injectants are introduced, the colloidal suspension may become destabilized,
Recent research has shown that this precipitation process, whether it is due to
Peramanu et al., 2001). However, there can be significant hysteresis in the redissolution
process, that is, the time required for asphaltenes to go back into solution may be
considerably longer than the time required for the original precipitate to form.
reservoirs. The fluids in place are undersaturated light to medium crudes, usually
flocculate and depending on the flow dynamics may or may not deposit in the rock
matrix. Asphaltenes and other solids create production problems if they deposit onto the
wellbore and production facilities. Asphaltene precipitation also occurs frequently during
8
contaminated acid has recently been found to promote the precipitation of asphaltenes
when acidizing certain oil-bearing zones. This can cause severe formation damage.
maximum value around the saturation pressure, and decreases as pressure drops further.
In other words, further decrease in pressure from the bubble-point pressure gives rise to a
decrease in the amount of precipitate. Above the saturation pressure, the precipitation is
solely due to pressure, while below the bubble-point pressure both pressure and
composition affect the precipitation behavior. As the light components come out of the
difficult task. The onset of precipitation can be detected with changes in light intensity
(MacMillan et al., 1995), in viscosity (Escobedo and Mansoori, 1995; Turta et al., 1997),
laser intensity (Hammami et al., 1999; Hammami and Raines, 1999), and acoustic
asphaltene is a very challenging problem. These measurements take a long time and are
subject to a high degree of experimental error. Multiple tests are often performed to
1. The fluid in place is light to medium oil with small asphaltene content.
2. The initial reservoir pressure is much larger than the saturation pressure.
4. Heavier crudes that contain a large amount of asphaltene have very little
9
Precipitated asphaltenes that have not aggregated into larger particles may flow
with the reservoir fluids without any detrimental effects on production. Conversely, for
"in-situ upgrading" to have any beneficial effect in heavy oil recovery, the precipitated
asphaltenes must deposit onto the reservoir rock in sufficient quantity to lighten the
character of the produced fluid, but not to such an extent that production is impaired.
Nagel et al. (1990) and Novosad et al. (1990) reported that during solvent
injection into reservoirs containing medium crudes, asphaltene precipitation occurs at the
that the solvent enriched the oil and made it very light. Near the production wells, the
pressure drops and asphaltene precipitates as in the case of light oils during primary
depletion.
precipitation have been reported in the literature. These include the use of a liquid
et al, 1987), a thermodynamic micellization model (Pan et al., 1998), a colloidal activity
coefficient model (Zhou et al., 1996), a variation of a model for wax (MacMillan et al.,
1995; Thomas et al., 1992), or a pure solid model. Nghiem et al. (1999) also describe the
deposits causing problems such as formation damage, flow restriction due to partial
plugging of the production string or pipelines and limitations in the crude oil and
10
Asphaltenes are believed to exist in the crude oil partly dissolved and partly kept
in finely dispersed colloidal suspension form that may be stabilized by non-polar resin
fractions of the crude (Branco et al., 2001). In case of inadequate amount of resins in the
crude, the precipitated asphaltenes may flocculate to form much larger particles that are
likely to cause formation damage. The formation damage due to unstabilized and
flocculated colloidal asphaltene deposition has recently been the focus of intensive
research.
reversibility at high temperatures has been addressed by Hirshberg et al. (1984) and
that part of the precipitated asphaltene redissolved into solution and concluded that the
asphaltenes is a kinetically slow process and therefore the reversibility may require a
(Hirschberg et al., 1984; Kokal et al., 1992; Godbole et al., 1992) have shown the
Based on this evidence, one can conclude that the asphaltene precipitation process
The asphaltene precipitates can remain suspended in the oil phase, rather than
being adsorbed onto solid surfaces. Adsorption may be restricted to surfaces that were
11
made oil-wet by oil/brine/rock interactions prior to precipitation (Buckley, 1995).
The presence of asphaltene in a crude oil has been shown to affect rock
properties. Most of these effects have been recognized to be the result of asphaltene
adsorption and precipitation on the rock surface (Clementz, 1982). Previous studies
indicate that asphaltene adsorption leads to alteration of rock wettability. Piro et al.
phenomenon and does not reach saturation like conventional surface-active materials.
However, they did not report the effect of adsorption on rock permeability.
Collins and Melrose (1983), Dubey and Waxman (1991), and Gonzalez and
Travalloni-Louvisse (1973) showed that the asphaltene adsorption onto different rocks
The precipitated asphaltenes are fine particles that may form aggregates, which
are large enough to be retained at small pore throats. After asphaltene precipitates from
the oil, it can deposit onto the rock and cause plugging and changes in wettability.
Deposition begins with adsorption of flocculated asphaltene particles onto active sites on
terms of trapping and mechanical plugging which were sharply dependent on the flow
12
the coupling between the two mechanisms into a unified model has not been reported in
the past.
followed by retention or trapping mechanism (Ali et al., 1997; Turta et al., 1997). The
laboratories. The first step in the deposition process is the rapid adsorption of asphaltene
onto the active sites on the rock surface, particularly onto high specific area clayey
pore throats. In addition to adsorption, Minssieux et al. (1997) showed that the deposition
entrapment (also called plugging deposit as the deposition plugs the pore throat) is
complex.
Deposition of solid asphaltenes causes a reduction of the pore space available for
fluids. Other formation damage mechanisms may include permeability reduction and
alteration of rock wettability from water-wet to oil-wet (Kamath et al., 1993; Celementz
et al., 1982). The deposition may induce favorable changes in relative permeabilities and
evaluate the effect of asphaltene deposition on water flooding in both consolidated and
unconsolidated sand packs. They concluded that asphaltene deposition has an impact on
reservoir rock permeability and end-point saturations. Minssieux et al. (1997), Ali et al.
13
(1997), and Piro et al. (1996) report experimental observations on permeability reduction
Asphaltene precipitation has been the subject of many research papers; however,
research on the effect of this precipitation on porous media permeability is still scarce.
Until recently, there have been very few attempts to model formation damage caused by
organic scale deposition. Many of these reported models are one-dimensional, and are
based on the plugging and non-plugging parallel pathways approach of Gruesbeck and
Collings (Ali et al., 1997; Civan, 2000; Gruesbeck et al., 1982; Ring et al., 1994).
Gruesbeck and Collins divided the porous medium into pluggable and non-
pluggable pathways. Therefore, they presented the porous medium by two continuous
branches. One branch consists of small pores that have a significant variation in diameter.
These pores make a network of tortuous flow paths that are susceptible to complete
plugging. The other branch consists of large pores that make the non-pluggable pathways.
These smooth and large diameter flow paths involve surface deposition, and are
mechanical entrapment, i.e. by jamming and therefore blocking pore throats when several
particles approach narrow flow constrictions. Sticky and deformable asphaltene deposits
seal the flow constrictions. Conductivity of a flow path can diminish without filling the
pore space or by partial filling of the pore space. Therefore, the fluid seeks other
unblocked flow paths. As a consequence, the permeability diminishes, even though the
Using the Gruesbeck and Collins parallel pathways approach, Ali and Islam
(1997) developed a single-phase formation damage model for under-saturated oil. In their
representation, they included the effects of both adsorption and mechanical entrapment.
The permeability reduction in the plugging and non-plugging pathways was represented
14
by the Gruesbeck and Collins empirical expressions. However, models based on
Gruesbeck and Collins simplify the pore structure and do not take into account the rock
horizontal wells.
immiscible fluids in an oil reservoir and thus plays a key role in any oil recovery process.
One way that oil components are thought to alter wettability is by coating pore surfaces
with precipitated asphaltenes. The deposited asphaltene may cause alteration of rock
Wettability has been shown to affect relative permeabilities, irreducible water saturation,
residual oil saturation, capillary pressures, dispersion and electrical properties. The
alteration of relative permeabilities and the end points has the strongest influence on
displacement processes. Morrow (1990) reviewed results for core waterfloods showing
that the shift towards a less water-wet condition can range from being highly adverse to
highly beneficial to oil recovery. Huang and Holm (1988), Lin and Huang (1990), and
Yeh et al. (1992) presented results on the implication of wettability changes on Water-
Alternating-Gas (WAG) processes. Typical results for CO2 WAG processes indicate that
15
the amount of oil trapped in water-wet cores (45%) was much higher than that trapped in
The potential for asphaltenes to adsorb onto high-energy mineral surfaces and
thus to affect reservoir wettability has long been recognized. Previous studies indicated
that asphaltene adsorption leads to alteration of rock wettability. Collins and Melrose
(1983), Crocker and Marchin (1988) and Buckley et al. (1997) describe the change of
asphaltene onto the rock surface. A good summary of early work is provided by
Anderson (1986).
asphaltene adsorption. Crocker and Marchin (1988) and Buckley et al. (1997) studied
due to asphaltene deposition. More recently, there have been a number of studies on
al., 1996; Gonzalez et al., 1991; Pedroza et al., 1996; Toulhoat et al., 1994).
subject of active research. Data and models that describe the alteration of wettability due
to asphaltene adsorption and deposition and the subsequent effects on the displacement
16
Chapter 3: Compositional Reservoir Simulation of Asphaltene
Precipitation and Deposition in CMG GEM
3.1 INTRODUCTION
This chapter deals with the asphaltene precipitation, flocculation and deposition
precipitation and plugging in petroleum reservoirs. CMG GEM version 2004.10, which
difference, compositional simulator from the Computer Modeling Group (CMG Ltd.) that
simulator are discussed in detail in this chapter including the models for porosity
alteration and permeability reduction due to the formation of asphaltenes. The component
flow equations with the effect of asphaltene precipitation are also presented.
precipitation simulation. To take into account the effects, due to flocculation and
GEM (CMG GEM 2004.10), was modified to incorporate these new phenomena. So the
models for solid phase behavior of the simulator include precipitation, flocculation and
deposition.
The simulator uses a standard cubic equation-of-state (EOS) for the fluid phase
behavior. The Peng-Robinson equation-of-state (PR EOS) was used to model the fluid
properties of the oil and gas phases. Using CMG WinProp the values of the required
17
WinProp is CMG's equation-of-state, multiphase, equilibrium, property package
solids precipitation, and more. CMG WinProp version 2004.10 has been used in this
study.
This chapter also describes, in detail, the processes involved in the initial
precipitation of asphaltene from the reservoir fluid, the flocculation of these precipitates
into larger particles and the deposition of these particles in porous media. Models for
these processes and in a compositional reservoir simulator are then given. The alteration
of porosity and the impairment of permeability due to asphaltene deposition are also
investigated. The models results are compared to experimental data for an oil core flood
experiment.
By performing a sensitivity study, the effect of the parameters of the models for
heterogeneous reservoirs with grid refinement are also presented. The results are also
interpreted for the decrease in oil production due to asphaltene occurrence. A sample
input file for compositional simulation of asphaltene precipitation in CMG GEM can be
found in Appendix O.
In CMG GEM (versions 2004.10 and later), the asphaltene precipitate is modeled
as two solids: Solid 1, s1 , is thermodynamically reversible and is in the oil phase. Solid 2,
s 2 , is created from Solid s1 via a chemical reaction. Solid s 2 can be used to represent the
18
flocculation of smaller precipitated asphaltene particles into larger aggregates. This
aggregation can be made fully reversible, fully irreversible or partially irreversible. Solid
s1 flows as suspended particles in the oil phase, while Solid s 2 may flow with the oil or
Long Nghiems model (Nghiem et al., 1987) which is used in CMG GEM is
considered to be a solid model. Solid models treat the precipitating asphaltene as a single
component residing in the solid phase while oil and gas phases are modeled with a cubic
EOS (e.g. Peng-Robinson equation-of-state). Solid models may require many empirical
parameters and excessive tuning to match experimental data (Thomas et al., 1992).
pure dense phase and assumes that the heaviest component in oil can be split into two
considered to be asphaltene. These two components have identical critical properties and
acentric factors, but different interaction parameters with the light components in the
system. The precipitating component has larger interaction coefficients with the light
In a mixture of n c components, when the oil, gas, and solid phases coexist, the following
19
ln f n c o = ln f s1 (3.3.2)
Equation (3.3.1) expresses the equality of fugacity of i th component in the oil and
gas phases. Equation (3.3.2) expresses the equality of fugacity of the precipitating
component in the oil phase and in the precipitated solid s1 . The asphaltene component in
The oil and gas phases are modeled with an equation-of-state. Fugacities in the oil
and gas phases, f io and f ig , are calculated from the Peng-Robinson equation-of-state with
si bi P
ln f ij = ln f ijEOS + i = 1,..., n c j = o, g (3.3.3)
RT
where fij is the fugacity of i th component in jth phase, fijEOS is the fugacity with
the EOS b parameter for component i. The molar volume of phase j with volume shift
is
nc
v j = v EOS
j + x ijsi bi j = o, g (3.3.4)
i=1
The volume shift parameter was introduced to improve liquid density prediction.
This parameter is also crucial for modeling the effect of pressure on asphaltene
precipitation.
20
3.3.2 Thermodynamic Model for Solid Phase
vs1 ( P P* )
ln fs1 = ln f +
*
s1 (3.3.5)
RT
where fs1 is the fugacity of solid s1 at reservoir pressure, fs*1 is the reference solid
fugacity at P * , vs1 is the solid molar volume and P * is the pressure at which the
asphaltene just starts to precipitate. As the formation of the solid s1 is governed solely by
the above thermodynamic reversibility, any precipitated solid s1 will go back into
solution when the system is returned to a state outside the asphaltene precipitation
envelope.
can be estimated from volubility data at different pressures. P * , the highest pressure at
which asphaltenes are first observed to be coming out of solution for a given oil or
oil/solvent mixture, is referred to as the upper onset pressure. P * has to be obtained from
experimental data and is critical to the simulation of asphaltene precipitation. The
parameters ln f s*1 , vs1 and P * are input keywords in CMG GEM and have to be
21
3.3.4 Amount of Asphaltene Precipitation
The solid model given in Equation (3.3.5) can be used to predict the amount of
solid precipitate for isothermal cases because the current model implemented in CMG
GEM is not tailored to account for temperature variations (non-isothermal effects). The
molar volume of the solid affects the amount of asphaltene precipitation within the
asphaltene deposition envelope. Increasing the solid molar volume results in greater
amounts of solid precipitated. The existence of a solid phase satisfies the following
criterion:
ln f n c o ln fs1 (3.3.6)
If the fugacity of the n c th component in the oil phase is greater than the fugacity
of asphaltene in the solid phase, asphaltene will precipitate until both become equal as
given by the equilibrium condition in Equation (3.3.6) that also gives the amount of
asphaltene precipitated.
22
3.3.6 Keywords for Asphaltene Precipitation Model
The flocculation model describes a process that occurs when the pressure is
reduced below the onset pressure. This process is actually the flocculation of asphaltene
particles into larger aggregates.
The asphaltene precipitation model exhibits complete thermodynamic
reversibility; that is, the precipitated asphaltene will go back into solution if the system is
returned to a thermodynamic state outside the asphaltene precipitation envelope.
Irreversibility of solid precipitates is modeled by allowing solid s1 to be
transformed via a simple reversible chemical reaction into another solid, s 2 . This can be
viewed as the flocculation of smaller asphaltene particles into larger aggregates. The
reaction may be written as follows
s1 s 2 (3.4.1)
23
The reaction rate for the formation of s 2 is
where k 12 is the forward rate of formation of solid s 2 from s1 , k 21 is the reverse rate of
formation of solid s1 from solid s 2 , r is the reaction rate, Cs1 ,o is the concentration of
suspended solid s1 in oil phase and Cs2 ,o is the concentration of suspended solid s 2 in oil
phase.
Note that s 2 can go back into solution by first becoming s1 through the reverse
reaction, then dissolving into the oil phase through thermodynamic equilibrium. If k 21 is
zero, the reaction is irreversible and s 2 will not go back into solution. If k 21 << k12 , the
precipitation of s 2 is reversible, but may take a long time to complete. The above
*SOLID-CONV-RATE allows the user to enter forward and reverse rates for the
conversion of precipitated asphaltene to flocculated asphaltene. This conversion may be
made reversible, fully irreversible or partially irreversible as mentioned before.
Asphaltene flocs may deposit in the porous media as will be described in the next
section. This keyword controls the generation of flocculated solid particles from the
thermodynamic asphaltene precipitate model.
24
3.5 ASPHALTENE DEPOSITION MODEL
An asphaltene deposition model was first presented by Wang and Civan (2001).
This model is implied in an equation, which relates asphaltene deposition rate to the
primary physical deposition processes such as initial adsorption, pore-throat plugging and
re-entrainment. The deposition model, which incorporates the fundamental physical
phenomena associated with solids deposition in porous media, has been implemented in
CMG GEM.
In the implementation of the deposition model, only the flocculated particles
(solid s 2 ) are considered to deposit. Physically, this implies that the small asphaltene
precipitate particles are more likely to flow with the oil phase, while the larger
aggregates, which are formed according to the time dependent chemical reaction of
Equation (3.4.2), are more likely to deposit on the reservoir rock. The discretized form of
the deposition rate equation (Kohse and Nghiem, 2004) is
Vsnd +1 Vsnd
2 2
Csnf+1n+1 + Vsnd +1 ( v no v cr,o ) u on Csnf+1 = 0 (3.5.1)
t 2 2 2
where Vsd is the volume of deposited solid s 2 per gridblock volume, Csf is the
2 2
volumetric concentration of flowing solid s 2 per volume of oil, vo is the oil phase
interstitial velocity, v cr,o is the critical oil phase interstitial velocity, u o is the oil phase
Darcy velocity, is the surface deposition rate coefficient, is the entrainment rate
coefficient and is the pore throat plugging rate coefficient.
The surface deposition rate coefficient, , is a positive constant and is dependent
on the rock type. The entrainment rate coefficient is set to zero when the interstitial
velocity is less than the critical interstitial velocity, and may be set to a positive constant
25
otherwise. The pore-throat plugging coefficient is set to zero if the average pore-throat
diameter is larger than some critical value. If it is smaller, the coefficient is calculated as
(
= i 1 + Vsd
2
) (3.5.2)
where i is the instantaneous pore-throat plugging rate coefficient and is the snowball-
effect deposition constant. This formulation allows the plugging deposition rate to
increase proportionally with the total amount of deposits.
Before 2004, CMG GEM did not consider any change in porosity due to
asphaltene precipitation because with the optional solid adsorption model, adsorbed solid
is assumed to affect permeability only and not the porosity. However, in the new versions
(2004.10 and later) of the simulator, with the introduction of the asphaltene deposition
model, the instantaneous local porosity is equal to the initial porosity o minus the
= o Vsd (3.6.1)
2
26
In all versions of CMG GEM that are developed with asphaltene models, the
volume of precipitated solid is accounted for in the volume balance. With the asphaltene
deposition model, deposited solid affects the porosity, which is then related to
permeability reduction.
When simulating field-scale problems, the total volume of deposition within the
blocks is usually negligible, unless a very fine scale grid refinement exists around the
wells. In these cases the effect of asphaltene deposition on porosity is not important. So,
in conclusion, the effect of asphaltene formation on porosity will vary depending on the
simulation process.
Once the solid phase has deposited on the reservoir rock, partial plugging which
leads to damage of the formation is expected. The permeability resistance factor that
takes into account the permeability reduction due to asphaltene formation relates the
instantaneous permeability, k, to the original permeability, k o . The permeability
reduction is directly related to transmissibility reduction. The permeability resistance
factor can also be defined as the ratio of the original porosity to the instantaneous
porosity. The new permeability resistance factor in CMG GEM is
b
k o o
Rf = = (3.7.1)
k
Note that the instantaneous porosity, , is defined by Equation (3.6.1). The above
equation for R f is based on the power law model of permeability and porosity. Power-
law and exponential models may be used for permeability reductions of up to about 80%
27
due to asphaltene deposition (Reis and Acock, 1994). The power-law model relating
permeability and porosity is given by
k = cb (3.7.2)
The exponent b in Equation (3.7.1) can have values ranging from 3 to 7. The
chosen value for b in the current version of CMG GEM is 3, which was first suggested by
Wang and Civan (2001). Hence, to calculate the resistance factor in CMG GEM version
2004.10, according to the permeability reduction model of Wang and Civan the following
equation is being used:
3
o
Rf = o (3.7.3)
Vsd
2
Once R f is calculated from Equation (3.7.3), all the phase permeabilities, or more
generally phase mobilities and consequently the phase transmissibilities, are divided by
this permeability resistance factor to account for the reduced permeability due to the
asphaltene formation.
The resistance factor can be applied to the relative permeability of each phase.
The code has been written in CMG GEM to apply the resistance factor to the relative
permeability, so that in the future it would be possible to apply different factors to
different phases. Currently, the same factor is applied to the oil, gas and water phases.
28
3.8 COMPONENT TRANSPORT EQUATIONS
CMG GEM uses the following finite-difference equation for the flow of
components in the oil and gas phases (Kohse and Nghiem, 2004):
(3.8.1)
( k kSk Dik ) yikn +1 + qin +1 ( Nin +1 Nin ) = 0
A V
+
n +1
i = 1,..., n c
k = o,g l t
sectional area, l is the length of the gridblock, k is the molar density of phase k, Sk is
the saturation of phase k, Dik is the total dispersion coefficient for i th component in
phase k, qi is the well molar flow rate of i th component, V is the gridblock volume, t is
the time and N i is the moles of i th component per gridblock volume.
kA k rk k
Tk = (3.8.2)
l k
where k rk is the relative permeability of phase k and k is the viscosity of phase k. With
yz / x x direction
A
= zx / y y direction (3.8.3)
l
xy / z z direction
29
where x, y , and z are the gridblock sizes in x, y and z directions. Equation (3.8.1)
includes both the convective and dispersive fluxes. The main difference between the
mentioned equation and the component flow equation in a standard EOS compositional,
reservoir simulator is the presence of the terms, yis1 and yis2 which correspond to the
suspended solids in the oil phase. yio and yig are the mole fractions of i th component in
0 i nc
yis1 = (3.8.4)
N s1 / N o i = nc
where N s1 corresponds to the moles of the suspended solid phase, s1 , and N o is the
moles of the oil phase per gridblock volume. The flow of the water satisfies the following
discretized equation (Nghiem et al., 2001):
where Tw represents the transmissibility of the water phase, Pcow is the oil-water
capillary pressure, w is the gradient of the water phase defined by mass density of water
times g and N w is the moles of water per gridblock volume.
Also a material balance on solid s 2 gives
30
where N s2 corresponds to the moles of the suspended solid phase, s 2 , per gridblock
volume. Note that in Equation (3.8.6) the rate of formation of solid s 2 is included. CMG
GEM uses an adaptive implicit technique to discretize the above equations. The
superscripts n and n+1 denote the old time level and new time level, respectively. The
superscript m corresponds to n (IMPES formulation) for explicit gridblocks and n+1
(fully implicit formulation) for implicit gridblocks.
When only asphaltene precipitation and solid adsorption models are being used,
no changes are made to the implicitness as controlled by the *AIM and/or *AIMSET
input keywords. When the asphaltene flocculation and deposition models are used, the
above equations are treated implicitly at all times.
equation together with the phase equilibrium equations, the reaction rate equation and the
deposition rate equation provide the necessary equations for compositional simulation of
asphaltene precipitation and deposition processes.
31
3.10 ONE-DIMENSIONAL OIL CORE FLOOD SIMULATION
Two vertical wells are used for this simulation case. The first well is an injector
and the second well is a producer. This case was run in Fontainebleau sandstone which is
known as a homogenous porous medium. A schematic representation of the case is
shown in Figure 3.1. Note that in that figure, the numbers represent the gridblocks in the
x direction.
The core fluid used for studying asphaltene precipitation was obtained from a
Weyburn dead oil and the injection fluid is the same with known composition. The
Weyburn dead oil consists of 9 components which are N2 + C1, CO2, C2-C3, C4-C5,
C6-C9, C10-C19, C20-C29, C30A+, and C30B+.
Table 3.1 shows the composition of the Weyburn dead oil and the molecular
weight of the pseudo-components. Table 3.2 shows the core data for the oil injection
simulation. The parameters of the asphaltene precipitation and flocculation models were
set according to the following pattern: the onset pressure for the precipitation model to a
very high value (50 MPa) and to set the rate constants for the flocculation model as
k12 = 50, 000 day 1 and k 21 = 0 day 1 . The forward and reverse rate constants ( k12 and
32
k 21 ) are defined in Equation (3.4.2). The deposition model parameters used in the
3.5, which was obtained from CMG WinProp, shows the binary interaction parameters
table entries. These data define a section of CMG GEM, which is called Rock and Fluid
Data. Table 3.6 shows the liquid-gas relative permeability and capillary pressure data
for the simulation case, while Table 3.7 shows the same properties for the water-oil case,
which are dependent on water saturation. Figure 3.2 shows the liquid-gas relative
permeability curves and Figure 3.3 shows the water-oil relative permeability curves for
the oil core flood simulation case. CMG ModelBuilder has been used to plot these
graphs.
CMG ModelBuilder (CMG MB) is a visual interface based pre-processor
software for CMG's IMEX, GEM and STARS simulators. The new version (2004.11) has
a stronger user interface compared to the previous ones.
The Initial Reservoir Conditions section of the input file includes the following
information. Vertical equilibrium calculations were not performed for this case. The
keyword *VERTICAL that controls the vertical equilibrium calculations in CMG GEM
input files was set to be *OFF in this run. The initial reservoir pressure for the oil core
flood simulation is 1000 kPa. The water saturation is zero and finally the initial
composition of the fluid can be found in Table 3.1.
33
3.10.2 Results and Discussion
Figure 3.4 presents the result for the simulated case, in terms of the permeability
resistance factor as a function of core length for different values of PV injected. The
highest PV injected results in a higher resistance factor for permeability. The oil core
flood case was run in Fontainebleau sandstone, which has no clay and represents a very
homogeneous medium with regular grain size. In conclusion, one can say that the
permeability resistance factor of the core is uniform from inlet to outlet with a slight
decrease towards the outlet.
For simulating this case, which had an initial permeability of 77.4 md, only a
surface deposition rate coefficient of = 6.0 day 1 has been used. The other input
parameters i.e. , v cr,o , and that identify the deposition model in CMG GEM were
turned off. Figure 3.5 shows the permeability reduction ( k / k 0 ) with respect to the core
length. Note that k 0 represents the original permeability. The permeability reduction is
the inverse of the permeability resistance factor. A steady decline of overall permeability
with a slightly concave-up shape can be seen in this plot.
34
3.11.1 Simulation Input and Reservoir Fluid Data
A schematic representation of the case is shown in Figure 3.6. Note that in this
figure, the numbers represent the gridblocks in the x direction. The core fluid used for
studying asphaltene precipitation and deposition was obtained from a North Sea oil and
the injection fluid is a hydrocarbon gas with known composition. The North Sea oil
consists of 7 pseudo-components which are N2 + C1, C2-C5, C6-C9, C10-C20, C21-
C31, C32A+, and C32B+.
Table 3.8 and Table 3.9 show the pseudo-component representation, fluid
compositions and component molecular weights of the reservoir fluid together with
separator oil (dead oil) and separator gas compositions. The heaviest fraction, C32+, is
split into a non-precipitating component, C32A+, and a precipitating component, C32B+,
as shown in the tables. The precipitating component is considered to be asphaltene. The
oil in the system is created by recombining a North Sea dead oil with 35-mole percent
separator gas, and the injection gas is specified as having the separator gas composition.
Table 3.10 shows the data for the simulation of a typical gas core displacement
with the North Sea reservoir fluid. Also, the grid data can be found in this table. A
uniform of 30 1 1 grid was used. The width of each gridblock in the x direction was
a uniform of 0.02286 m. The porosity is 0.30 and the core had a uniform permeability of
500 md. For this simulation case, flow only in one direction was considered.
Table 3.11 shows the PVT properties of the North Sea reservoir fluid. In addition,
Table 3.12, which was obtained from CMG WinProp, shows the binary interaction
for the simulated case, while Table 3.14 shows the same properties for the water-oil case,
which are dependent on water saturation. The relative permeability and capillary pressure
35
data for the gas injection case were similar to the oil core flood simulation case. Figure
3.2 shows the liquid-gas relative permeability curves and Figure 3.3 shows the water-oil
relative permeability curves. The initial reservoir conditions section of the input file for
the gas injection core flood simulation is the same as that for the oil core flood
simulation.
Two vertical wells were used for this simulation case. The first well is an injector
and the second well is a producer. The details of the wells including geometry and
constraints can be found in a section of the input file called Well Data of the input file.
Figures 3.7 through 3.19 present the results of the gas injection core flood
simulation case. The user interface of CMG Results accepts the unit Days for time,
only. Therefore, as an example, the arbitrary dimensionless time of 0.65 PV injected
was converted to days. The calculation is as follows:
y = 8.10732E-03 m
z=1m
= 0 .3 Porosity
Therefore,
A = 8.10732E-03 m 2 and
36
qt
PV Injected = t D = = 0.65
AL
Hence
In all the runs which are related to the gas core flood simulation to facilitate
interpretation of the results, the pore-throat plugging, , and entrainment rate
coefficients, , of the deposition model were not used. Figures 3.7 to 3.9 correspond to
several runs which were performed initially with irreversible flocculation, k 21 = 0.0
(solid s 2 will not go back into solution), and no deposition, = 0.0. Values of k12 from
This plot shows a region of reduced interfacial tension behind the near-miscible gas front
where asphaltene precipitation is expected to be prevalent. Also it indicates the level of
oil saturation remaining behind the front. The value of k12 does not have any effect on
these profiles.
Figure 3.8 shows the amount of precipitated asphaltene, s1 , for different values of
k12 as a function of the core length. The lowest forward formation rate of solid s 2 from
solid s1 , will have the highest amount of precipitation. Figure 3.9 shows the profiles for
flocculated asphaltene, s 2 . Considering that in this set of runs the deposition model was
not counted for and there is no irreversibility (k 21 = 0.0); by increasing the forward rate
37
Figures 3.10 through 3.13 correspond to simulation runs that include the forward
and reverse reaction rates (partial or full reversibility of flocculated asphaltene) without
considering the effects of the deposition model. Figure 3.10 shows the precipitated
asphaltene profile for k12 = 10.0 day 1 with different values of k12 that range from 0.0 to
10.0 day 1 . Full reversibility can be implied from k12 = 10. Figure 3.11 is similar to
Figure 3.10 but it shows the results of the flocculation reaction of asphaltene.
The main difference between Figures 3.12 through 3.13 and Figures 3.10
through 3.11 is the value of k12 . The profiles in Figures 3.12 and 3.13 follow patterns
similar to those in Figures 3.10 and 3.11, respectively. In both cases, the results are as
expected; with the amount of precipitated asphaltene increasing and the amount of
flocculated asphaltene decreasing as the rate of the reverse reaction increases. Comparing
Figure 3.10 with Figure 3.12 one can say that an increase in k12 will reduce the amount
of precipitated asphaltene. On the other hand, when the profiles of Figures 3.11 and 3.13
are compared with each other, an increase in flocculation is observed. The deposition
model was turned off for Figures 3.10 through 3.13 and only the effects of the
precipitation and flocculation models were studied.
Figures 3.14 through 3.19 are sets of simulation runs with k12 = 10.0 day 1 , k 21
= 1 or 10.0 day 1 , and a surface deposition parameter of = 0.0 to 100 day 1 . These
plots represent three sets of runs with a certain choice of formation rates and a specific
surface deposition parameter. Figures 3.14 and 3.15 are similar, as they indicate the
precipitated asphaltene at 0.65 PV injected. The main difference between these two plots
is the reverse rate of formation of solid s1 from solid s 2 .
The plot of Figure 3.15 is known as the fully reversible run. It can be seen that
the surface deposition parameter changes only slightly the amount of precipitated
38
asphaltene when the reverse formation rate is low. On the other hand, the plot shows that
when both k12 and k 21 are high, increasing will reduce the amount of precipitation.
Figures 3.16 and 3.17 are similar as they show the flocculated asphaltene at 0.65
PV injected. The reverse rate of formation k 21 is higher for the run of Figure 3.17. These
plots follow the same pattern, that is, by increasing the deposition rate, , the amount of
flocculated asphaltene increases along the core. It can be concluded that increasing the
deposition rate will cause the flocculation reaction to go forward without considering the
effect of reverse rate of formation of solid s1 from solid s 2 .
Figures 3.18 and 3.19 show the deposited asphaltene at 0.65 PV injected for
studying the effects of surface deposition and formation rates. The reverse rate of
formation, k 21 , is lower for the run of Figure 3.18 compared to that in Figure 3.19. The
reverse formation rate will not have a great effect on the amount of deposited asphaltene
except in a run with = 10.0. This means that the highest deposition rate will cause a
higher amount of deposition of asphaltene. The effect of deposition model was not
considered in two runs of this simulation case (i.e. = 0.0). In conclusion, the deposited
39
3.12.1 Reservoir Model and Fluid Description
Table 3.15 presents the composition of the oil and molecular weights of the
pseudo-components, and Table 3.16 shows the two-dimensional radial model data for the
single-well, pressure depletion simulation. The grid data can be found in this table as
well. A uniform grid of 7 1 8 is used. The width of each gridblock in the r-direction
is variable. The porosity is 0.20 and the reservoir has a uniform horizontal permeability
of 30 md and a uniform vertical permeability of 15 md. The permeability in the -
direction is the same as that in the r-direction. This is a 2-D radial simulation case.
The parameters of the asphaltene deposition and flocculation models were set
using the following pattern: the onset pressure for the precipitation model to a very high
value (4500 psia) and to set the rate constants for the flocculation model as k12 = 0.1
day 1 and k 21 = 0.08 day 1 . The input parameters for flocculation and deposition models
used in the simulation runs are given in Table 3.17. These values are similar to those
used for the oil core flood simulation case.
40
Using CMG WinProp the values of the required parameters in PVT calculations
were obtained. Table 3.18 shows the PVT properties of the oil. Tables 3.19 through 3.22
are sets of relative permeability curves that are defined by table entries. These data define
a section of CMG GEM, which is called Rock and Fluid Data. Table 3.19 and Table
3.20 show the liquid-gas relative permeability and capillary pressure data for rock type 1
and rock type 2, respectively, while Table 3.21 and Table 3.22 show the same properties
for water-oil, which are dependent on water saturation.
Figure 3.22 and Figure 3.23 show the liquid-gas relative permeability curves for
rock type 1 and rock type 2 respectively. Figure 3.24 and Figure 3.25 show the water-oil
relative permeability curves for the two-dimensional radial simulation case. Figure 3.26
and Figure 3.27 show the liquid-gas capillary pressure curves for rock type 1 and rock
type 2, respectively. Figure 3.28 and Figure 3.29 show the water-oil curves. Using the
segregated model in CMG ModelBuilder, the three-phase oil relative permeability for the
two rock types were plotted in Figure 3.30 and Figure 3.31, respectively. CMG
ModelBuilder has been used to plot the graphs in Figures 3.22 through 3.31.
The initial reservoir conditions section of the input file includes the following
information. Vertical equilibrium calculations were performed in this case. The keyword
*VERTICAL which controls the vertical equilibrium calculations in CMG GEM input
files was set to be *COMP in this run. The initial reservoir pressure for the 2-D radial
simulation is 6092 psia. The water saturation is 0.0 and finally the initial composition of
the fluid in this run can be found in Table 3.15.
One vertical well is used for this simulation case. This well is a producer. The
details of the well including geometry and constraints can be found in a section of the
input file called Well Data. The parameters for the asphaltene precipitation model are
given in Table 3.23.
41
3.12.2 Results and Discussion
Figures 3.32 through 3.35, which were plotted with CMG Results Graph version
2004.11, present the results for the simulated case, 2-D radial model pressure depletion in
terms of the asphaltene deposited per unit bulk volume, permeability resistance factor and
pressure for the gridblock containing the deepest perforation in the well as a function of
time. The x axis in these figures represents the time in units of month. Considering
Figure 3.32 one can say that the asphaltene deposited per unit bulk volume of the
reservoir will be uniform after 5 months of production with a slight decrease towards a
value of less than 2, approximately one year and a half of depletion.
For simulating the 2-D radial model, single-well case, which had a horizontal
permeability of 30 md and a vertical permeability of 15 md, a surface deposition rate
coefficient of = 0.01 day 1 has been used. The rest of the parameters e.g. , v cr,o ,
and that identify the asphaltene deposition model were set, based on the oil core flood
simulation case. Figure 3.33 shows the permeability resistance factor ( k o / k ) with
gridblock, which contains the deepest perforation. For this case, the onset pressure of
asphaltene is 4500 psia and the initial reservoir pressure is about 6100 psia. This plot
illustrates that after approximately 5 months of production the asphaltene onset pressure
will be reached. In addition, the pressure continues to decrease further until it approaches
a value of 3500 psia after 19 months of depletion.
Figure 3.35, which shows the asphaltene deposited per unit bulk volume,
42
Figures 3.32 through 3.34. This plot indicates that after 5 months of production the
pressure will decrease below the upper onset pressure of asphaltene, which is
accompanied by an increase in the permeability resistance factor. In addition, for the
considered time period, there is a steady increase in the amount of deposited asphaltene.
Figure 3.36, which was plotted with CMG Results 3D (version 2004.11), shows
43
representations of the case are shown in Figures 3.37 and 3.38. In addition, Figure 3.39,
which was plotted with CMG WinProp, shows the phase envelope of the reservoir fluid.
Table 3.24 presents the composition of the oil and the molecular weights of the
asphaltene precipitation model are given in Table 3.25. The input parameters for the
deposition and flocculation models used in the simulation runs are given in Table 3.26
and Table 3.27, respectively. These values are similar to those used for the oil core flood
simulation case.
Table 3.28 shows the two-dimensional radial model data for the simulation with
grid refinement and heterogeneity. The grid data can be found in this table as well. A
uniform grid of 29 1 8 is used. The width of each gridblock in the r-direction is
variable and is presented in the table. The porosity is 0.20 and the reservoir has variable
horizontal and vertical permeabilities. The permeability in the -direction is the same as
that in the r-direction. This is a 2-D radial, heterogeneous simulation case with grid
refinement. The permeability of each layer is given in the table as well.
Using CMG WinProp, the values of the required parameters in PVT calculations
were obtained. Table 3.29 shows the PVT properties of the oil. Table 3.30 and Table
3.31 are sets of relative permeability curves that are defined by table entries. These data
define a section of CMG GEM, which is called Rock and Fluid Data. Table 3.30 shows
the liquid-gas relative permeability and capillary pressure data while Table 3.31 shows
the same properties for water-oil, which are dependent on water saturation.
44
Figure 3.40 shows the liquid-gas relative permeability curves and Figure 3.41
shows the water-oil relative permeability curves for the two-dimensional radial
simulation case. Figure 3.42 shows the liquid-gas capillary pressure curve and Figure 3.43
shows the water-oil curve. Using the segregated model in CMG ModelBuilder, the three-
phase oil relative permeability for rock type 1 was plotted in Figure 3.44.
CMG ModelBuilder has been used to plot the graphs in Figures 3.40 through
3.43. CMG ModelBuilder or MB (version 2004.11), which is the latest one, is a visual
interface based pre-processor software for CMG's IMEX, GEM and STARS simulators.
Compared to the previous version, the new package has a stronger user interface.
In addition, Table 3.32, which was obtained from CMG WinProp, shows the
binary interaction parameters for different components for the simulation case.
The initial reservoir conditions section of the input file includes the following
information. Vertical equilibrium calculations were performed in this case. The keyword
*VERTICAL which controls the vertical equilibrium calculations in CMG GEM input
files was set to be *COMP for this run. The initial reservoir pressure for the 2-D radial
simulation is 6092 psia. The water saturation is 0.0 and finally the initial composition of
the fluid in these runs can be found in Table 3.24.
One vertical well is used for this simulation case. This well is a producer. The
details of the well including geometry and constraints can be found in a section of the
input file called Well Data. This information can be found in Table 3.33.
Figures 3.45 through 3.48, which were plotted with CMG Results Graph version
2004.11, present the results for the simulated case, 2-D radial model pressure depletion in
terms of the asphaltene deposited per unit bulk volume, permeability resistance factor and
45
pressure for the grid block containing the deepest perforation in the well as a function of
time. The x axis in these figures represents the time in units of month. Considering
Figure 3.45, one can say that the asphaltene deposited per unit bulk volume of the
reservoir will be uniform after 5 months of production with a slight decrease towards a
value of less than 0.0130, approximately one year and a half of depletion.
For simulating the 2-D radial model, single-well case, which had a variable
horizontal permeability and a vertical permeability ranging from 10 to 150 md, a surface
deposition rate coefficient of = 0.01 day 1 has been used. The rest of the parameters,
e.g. , v cr,o , and , that identify the asphaltene deposition model were set based on the
oil core flood simulation. Figure 3.46 shows the permeability resistance factor ( k o / k )
with respect to the production time. A steady decline of overall permeability followed by
a uniform and constant pattern can be understood from this plot.
Figure 3.47 was plotted in order to show the pressure of the grid block, which
contains the deepest perforation. For this case, the onset pressure of asphaltene is 4500
psia and the initial reservoir pressure is about 6100 psia. This plot illustrates that after
approximately 5 months of production the asphaltene onset pressure will be reached. In
addition, the pressure continues to decrease further until it approaches a value of 3500
psia after 19 months of depletion.
Figure 3.48, which shows the asphaltene deposited per unit bulk volume,
pressure will decrease below the upper onset pressure of asphaltene, which is
accompanied by an increase in the permeability resistance factor. In addition, for the
considered time period, there is a steady increase in the amount of deposited asphaltene.
46
Figure 3.49, which was plotted with CMG Results 3D (version 2004.11), shows
Before 2004, the only model for simulation of problems related to the formation
of asphaltenes in petroleum reservoirs, in CMGs equation of state compositional,
reservoir simulator, was the precipitation model. Two new models were implemented in
this simulator, the flocculation and deposition models. In this chapter, in order to study
the new models, four main cases were set up and simulated, includimg the oil core flood
and the gas injection core flood simulations. The permeability resistance factor and
permeability reduction for the oil core flood case were calculated. The new permeability
reduction model is based on a porosity reduction model that incorporates plugging of
pores by solids deposition. The amounts of asphaltene precipitation, flocculation and
deposition during a typical gas injection core flood were simulated. The occurrence of
asphaltene flocculates reduces the amount of precipitation and increases the deposited
asphaltene.
A single-well, two-dimensional radial model was simulated in order to study the
amount of asphaltene precipitation, deposition and flocculation due to pressure depletion.
Asphaltene deposition and flocculation are the names of two new models, which were
added to CMG's compositional simulator, GEM, in 2004. It was noted that the amount of
asphaltene deposition is higher around the wellbore area. There is also a relation between
the amount of deposition, the permeability resistance factor and the reservoir pressure.
47
The effect of grid refinement and reservoir heterogeneity on asphaltene precipitation was
also investigated.
48
Table 3.1: Modeled fluid composition for Weyburn dead oil
Parameter Value
49
Table 3.3: Deposition model parameters for oil core flood simulation
Parameter Value
(day 1 ) 6.0
(m 1 ) 0.0
v cr,o (m / day) 0.0
(m 1 ) 0.0
0.0
50
Table 3.4: PVT properties of Weyburn dead oil
51
Table 3.5: Binary Interaction Parameters for different components for Weyburn fluid
52
Table 3.7: Water-oil relative permeability and capillary pressure table
Table 3.8: The fluid compositions and molecular weights of dead oil and separator gas
53
Table 3.9: The composition of core oil and injection gas
Property Value
54
Table 3.11: The PVT properties of North Sea fluid
Table 3.12: Binary interaction parameters for the North Sea fluid
55
Table 3.13: Liquid-gas relative permeability and capillary pressure table
56
Table 3.15: Modeled fluid composition for Burke Oil 1
Table 3.16: Two-dimensional radial model data for oil depletion simulation
Property Value
57
Table 3.17: Input parameters for the deposition and flocculation models
Parameter Value
(day 1 ) 0.01
(m 1 ) 0.00
v cr,o (m/day) 0.00
(m 1 ) 0.05
150
k12 (day 1 ) 0.10
k 21 (day 1 ) 0.08
Asphaltene onset pressure (psia) 4500
58
Table 3.18: The Burke oil PVT properties
59
Table 3.19: Liquid-gas relative permeability & capillary pressure table for rock 1
Table 3.20: Liquid-gas relative permeability & capillary pressure table for rock 2
60
Table 3.21: Water-oil relative permeability & capillary pressure table for rock 1
Table 3.22: Water-oil relative permeability & capillary pressure table for rock 2
Parameter Value
Reference fugacity (atm) -25.2053
Molar volume of the solid phase (litres/gmol) 0.9
Reference pressure (psia) 50000
Molar volume of the solid phase (litres/gmol) 0.9
61
Table 3.24: Modeled fluid composition for Burke Oil 1
Parameter Value
62
Table 3.26: Input parameters for the asphaltene deposition model
Parameter Value
(day 1 ) 0.01
(m 1 ) 0.00
v cr,o (m/day) 0.00
(m 1 ) 0.05
150
Parameter Value
k 12 (day 1 ) 0.10
k 21 (day 1 ) 0.08
Asphaltene onset pressure (psia) 4500
63
Table 3.28: 2-D radial model data for oil depletion simulation with grid refinement
Property Value
64
Table 3.29: The Burke Oil 1 PVT properties
65
Table 3.29: The Burke Oil 1 PVT properties (continued)
66
Table 3.30: Liquid-gas relative permeability & capillary pressure table
67
CO2 N2 C1 C2 C3 IC4 NC4 IC5 NC5 FC6 C7- C16- C26- C31A C31B
C15 C25 C30 + +
CO2 0
N2 2E-2 0
C1 1.35 3.1E- 0
E-1 2
C2 4.31 9.5E- 2.094 0
17E- 2 1E-3
C3 9.15 1.25E 1.15E 1.294 0
82E- -1 -2 2E-3
IC4 6.03 3.598 9.5E- 1.3E- 8.694 0
97E- 6E-3 2 1 4094E
NC4 2.02 6.594 9.346 1.610 9.5E- 1.03E 0
62E- E-3 2E-4 7E-2 2 -1
68
IC5 5.61 2.124 3.668 1.16E 6.684 1.3E- 4.2E- 0
67E- 9E-2 E-3 -3 7E-3 1 2
NC5 1.14 4.130 1.574 3.759 1.777 2.11E 1.238 6.652 0
29E- 064E- 88E-2 5E-3 E-4 -3 1E-5 8E-3
FC6 5.72 1.5E- 3.065 1.593 2.236 1.982 2.722 1.25E 4.273 0
5E-2 1 E-2 3E-2 1E-3 4E-4 E-4 -1 59E-3
C7- 4.13 4.835 1.2E- 3.184 1.263 1.5E- 1.5E- 4.007 9.5E- 6.744 0
C15 57E- 33E-2 1 6E-2 4E-2 1 1 2E-4 2 91E-4
C16- 2.24 1.5E- 4.866 1.126 2.510 4.298 1.2E- 1.2E- 5.579 1.629 1.3E- 0
C25 E-1 1 2E-2 5E-1 3E-2 2E-3 1 1 5E-7 3E-2 1
C26- 2.24 2.24E 1.2E- 4.298 8.738 2.533 1.5E- 6.154 3.473 1.5E- 6.806 9.1E- 0
Table 3.32: Binary interaction coefficients between the components
Property Value
DTMIN 0.01
DTMAX 30.0
DTWELL 0.50
WELL 1 Producer
Oil rate constraint of 754.773 bbl/day
Constraints
Pressure constraint of 101.5264 psia
Perforation Location Blocks (1,1,5) , (1,1,6) and (1,1,7)
Monitored Well Constraint
Maximum water-cut of 0.8
69
Figure 3.1: Schematic representation of the oil core flood simulation
70
Figure 3.2: The liquid-gas relative permeability curves
71
Figure 3.3: The water-oil relative permeability curves
72
Figure 3.4: Permeability resistance factor vs. length
73
Figure 3.6: Schematic representation of the gas injection core flood simulation
74
Figure 3.7: S g and interfacial tension, k12 = 0.0 day 1 and = 0.0 day 1
75
Figure 3.8: Precipitated asphaltene, k 21 = 0.0 day 1 and = 0.0 day 1
76
Figure 3.10: Precipitated asphaltene, k12 = 10.0 day 1 and = 0 day 1
77
Figure 3.12: Precipitated asphaltene, k12 = 100 day 1 and = 0 day 1
78
Figure 3.14: Precipitated asphaltene, k12 = 10 day 1 and k 21 = 1 day 1
79
Figure 3.16: Flocculated asphaltene, k12 = 10 day 1 and k 21 = 1 day 1
80
Figure 3.18: Deposited asphaltene, k12 = 10 day 1 and k 21 = 1 day 1
81
Figure 3.20: Schematic representation of the radial reservoir in 3-D viewpoint
Figure 3.21: Schematic of the radial reservoir including the production well
82
Figure 3.22: The liquid-gas relative permeability curves for rock type 1
Figure 3.23: The liquid-gas relative permeability curves for rock type 2
83
Figure 3.24: The water-oil relative permeability curves for rock type 1
Figure 3.25: The water-oil relative permeability curves for rock type 2
84
Figure 3.26: The liquid-gas capillary pressure curve for rock type 1
Figure 3.27: The liquid-gas capillary pressure curve for rock type 2
85
Figure 3.28: The water-oil capillary pressure curve for rock type 1
Figure 3.29: The water-oil capillary pressure curve for rock type 2
86
Figure 3.30: Three-phase oil relative permeability for rock type 1
87
Figure 3.32: Development of solid deposition for single-well simulation
88
Figure 3.34: Block pressure as a function of time for pressure depletion simulation
Figure 3.35: Deposited asphaltene, permeability resistance factor and block pressure
89
Figure 3.36: Deposited asphaltene (lb/cu. ft bulk vol.) after 1 year production
90
Figure 3.37: Schematic representation of the radial reservoir with grid refinement
Figure 3.38: Schematic of the radial reservoir with grid refinement including the well
91
Figure 3.39: Burke Oil 1 asphaltene modeling P-T Diagram
92
Figure 3.41: The water-oil relative permeability curves
93
Figure 3.43: The water-oil capillary pressure curve
94
Figure 3.45: Development of solid deposition for single-well with heterogeneity
Figure 3.46: Development of resistance factor for radial model with grid refinement
95
Figure 3.47: Block pressure for 2-D radial model with grid refinement
Figure 3.48: Deposited asphaltene, permeability resistance factor and block pressure
96
Figure 3.49: Deposited asphaltene (lb/cu. ft bulk vol.) after 1 year production
97
Chapter 4: Review of the General Purpose Adaptive Simulator
4.1 INTRODUCTION
98
approaches to benefit from the advantages of both models. The overall objective of
GPAS is to develop such technology using a computational framework that also allows
parallel processing. The initial stage of development involved the formulation of a fully
implicit, parallel, EOS compositional simulator (Wang et al., 1997). The description of
the framework approach used for modular code development and the application to gas
injection is given in Wang et al. (1999).
The need for a reservoir simulation framework that supports and eases physical
model development led to the development of the Integrated Parallel Accurate Reservoir
Simulator (IPARS) at The University of Texas at Austin (Parashar et al., 1997). The
computational framework of IPARS is used to separate the physical reservoir model
development from the code involving parallel processing, solvers and other auxiliary
functions. The IPARS framework supports three-dimensional, multiphase,
multicomponent, isothermal flow. It has encapsulated functions to perform the input
processing, memory allocation and management, domain decomposition, well
management, output generation and other functions like table lookups, interpolation, etc.
The framework natively supports parallel computation on both distributed and
shared memory computers using message passing. On multiprocessor computers, the
reservoir domain is divided over the y direction into several subdomains equal to the
number of processors allocated for the run. The computations associated with each of
these subdomains are distributed to individual processors. An additional layer of
gridblocks is added surrounding each subdomain assigned to a processor. The
computational framework provides a routine that updates data in this communication
layer to enable each processor to perform its calculations while communicating necessary
data with the other processors using the message passing interface (MPI).
99
The primary source of the solvers used in the framework is that provided by the
software package called PETSc (Portable Extensible Toolkit for Scientific Computation)
(Balay et al., 1997). Other solvers based on the Generalized Minimum Residual Method
(GMRES), Line Successive Over-relaxation (LSOR) and Pre-conditioned Conjugate
Gradient (PCG) methods have also been implemented as additional options in the
framework. All of these solvers provide the users with great flexibility and control of the
numerical methods used for the solutions.
Finite difference formulations with a block-centered grid are used in the
framework. The nonlinear difference equations are solved by either fully-implicit or
semi-implicit techniques. Both mass balance and volume balance are supported. Since
the portability of the simulator is very important, FORTRAN is used wherever possible.
For memory management and user interaction, classical C is used. Commercial libraries
are prohibited except in the graphics front end to the simulator. The simulator is
formulated for a distributed memory, message-passing machine. Free-format keyword
input is used for direct data input. The simulator uses a single set of units to solve the
partial differential equations. However, the user may choose any physically correct units
for the input variables and they will then be converted to the default internal unit using
appropriate conversion factor.
The overall structure of IPARS framework consists of 3 layers:
1. Executive layer that consists of routines that direct the overall course of
the simulation.
2. Work routines that are typically FORTRAN subroutines that perform grid
element computations.
3. Data-management layer that handles the distribution of grid across
processing nodes, local storage allocation, dynamic reallocation and
100
dynamic load balancing, and communication rescheduling. The data-
management layer is also responsible for checkpoint/restart, input/output
and visualization.
The fully-implicit EOS compositional formulation has already been implemented
into the IPARS framework and successfully tested. The Peng-Robinson EOS is used for
hydrocarbon phase behavior calculations. The linear solvers from the PETSc package are
used for the solution of underlying linear equations. The framework provides hooks for
implementing specific physical models. Such hooks bridge the models with the
framework. There are several executive routines, and any communications between the
processors and compositional model are performed in these routines. Many tests have
been performed using the EOS compositional simulator on a variety of computer
platforms such as IBM SP and a cluster of PCs (Wang et al., 1999; Uetani et al., 2002).
IPARS (Gropp et al., 1996; Parashar et al., 1997; Wheeler et al., 2000) was
developed as a framework for parallel reservoir simulation research. One of several
reservoir simulation models that has been developed and tested using this framework is
the compositional model EOSCOMP (Wang et al., 1997, 1999). Extensive testing of this
and other models has been done on both parallel supercomputers and clusters of PCs
(Abate et al., 1999) with excellent scaling on large numbers of processors running in
parallel.
101
4.2.1 Framework Characteristics
102
etc. Each of these phase outputs can be written out when the corresponding keyword is
used in the input file. From a developer standpoint, an option is available to print out the
values of many of the variables used in the code by including the debug keyword in the
input file. Every output statement in the simulator is assigned an output level and hence
based on the output level, that statement is either activated or not. The framework allows
for free-form keyword input with default values supplied for most of the input variables.
The framework is flexible in terms of selection of units to use. Internally the
simulator uses a single set of units for each physical quantity. The user may choose any
physically correct unit for a quantity and the framework will convert it to the internally
used unit. The framework provides a default set of units.
Two-dimensional utilities used to represent functions include:
1. Piecewise constant
2. Piecewise linear
3. Quadratic spline with optional poles
4. Cubic spline with optional poles
5. User-defined functions (FORTRAN code in the input data)
N-dimensional utilities include:
1. Bilinear interpolation (rectangular subdomains)
2. Quadratic splines (rectangular subdomains)
3. User-defined functions (FORTRAN code in the input data)
103
responsible. The master processor collects all the output and redirects it to the output
files.
IPARS framework is capable of domain decomposition over the y direction. The
framework divides the entire reservoir simulation domain so that each processor in the
parallel machines handles only a particular subdomain for computation. The
computations are decomposed on parallel machines to achieve computational efficiency.
Thus the framework treats the oil reservoir as a union of blocks. The interfaces between
the blocks are thin domains tied together by physically meaningful interface boundary
conditions that permit input and output from one block to neighboring blocks or domains.
The framework supports two array types. Some arrays, such as the binary
interaction coefficients and critical properties, contain values independent of the
gridblock location, while other arrays such as porosity, density and saturation depend on
the gridblock location. These array types are declared and defined in separate
subroutines. The framework allocates memory for the gridblock arrays. The first three
dimensions of the arrays represent the three coordinate directions. The component and
phase indices are specified in the fourth and fifth array dimensions. The user provides the
variable name, ID in the memory, and size of the additional dimensions. The IDs are
assigned by the framework using C language when creating the variables and stored in a
common block for use in different subroutines.
The message passing interface (MPI) functionality in the framework handles all
the necessary message sending/receiving between the processors. In the physical models,
the function CALL when revoked carries out the same task of message sending/receiving
when evaluating the residuals of the component mass-balance equations, averaging some
physical properties such as pressure and saturation, and collecting well data for output. In
the physical model, the framework provides a function to update the properties in the
104
overlapping regions of all processors. This is done by calling the function UPDATE
wherein the model developers provide the name and ID index in the memory for the
property variables in the argument list of the function. But all the necessary
communications during the solution of the linear equations are handled by the toolkit
PETSc.
The framework also handles some of the common calculations needed by almost
all of the physical models. These calculations include:
The identification of the overlapping regions of all processors
Calculating the constant portion of transmissibility at the interface of two
adjacent gridblocks
Extracting the data from the table lookups for relative permeability and
capillary pressure and computing their derivatives with respect to phase
saturations
Identifying the well locations
Calculating the productivity indices
Preprocessing includes dimensioning FORTRAN arrays for non-gridblock
variables, estimating the size of message in bytes to be needed for passing between
processors, and some dimensions for well specifications.
105
Darcy's law describes the multiphase flow of fluids through the porous
media.
Impermeable zones represented by the no-flow boundaries surround the
reservoir.
The injection and production of fluids are treated as source or sink terms.
The rock is slightly compressible and immobile.
Each hydrocarbon phase is composed of nc hydrocarbon components,
which may include the non-hydrocarbon components such as CO2, N2 or
H2S.
Instantaneous local thermodynamic equilibrium between hydrocarbon
phases exists.
The capillary pressure effects on hydrocarbon phase equilibrium are
negligible.
Water is slightly compressible and water viscosity is constant.
Radioactive decay does not occur.
106
With the assumption of local thermodynamic equilibrium for the hydrocarbon
phases, the criterion of phase equilibrium applies:
ln ( fig ) ln ( f io ) = 0 (4.4.1)
the mole fraction of component i in phase j. The following equations are used in the
solution of Equation (4.4.1):
nc
x
i =1
ij 1 = 0 j = 1,..., n p (4.4.2)
nc
z i ( K i 1)
1+ v (K
i =1 1)
=0 (4.4.3)
i
yi
The equilibrium ratio is defined as K i = , where x i and yi are the mole
xi
fractions of i th component in oil and gas phases, respectively. The solution to Equation
(4.4.1) satisfies the first and second conditions stated above and is the necessary
condition of the third criterion.
can be expressed as
107
{Rate of accumulation of i in V} = {Rate of i transported into V}
(4.4.4)
{Rate of i transported from V} + {Rate of production of i in V}
The differential form for the species conservation equation can be expressed as
Wi ur uur
+ Ni R i = 0 (4.4.5)
t
uur
where Wi is the overall concentration of i in units of mass of i per unit bulk volume, N i
is the flux vector of species i in units of mass of i per surface area-time and Ri is the mass
rate of production in units of mass of i per bulk volume-time.
The mass balance equation can be expressed in terms of moles per unit time by
defining each term of Equation (4.4.5) in terms of the porous media and fluid properties
such as porosity, permeability, density, saturations, compositions, rates, etc. The
accumulation term for a porous medium becomes
np
Wi = jS j x ij (4.4.6)
j=1
where is the porosity, j is the molar density of phase j, Sj is the saturation of phase j
The flux vector of i th component is a sum of the convective and the dispersive
flux, and can be expressed as
108
uur uur
uur
Where u j represents the superficial velocity or flux of phase j and K ij is the
dispersion tensor of i th component in phase j. The flux is evaluated using Darcy's law for
multiphase flow of fluids through porous media.
r rr ur ur
u j = k rj (Pj j D) (4.4.8)
p
n
r np r r rr r q
t j=1
( )
jS j x ij j j x ij Pj jD + jS jK ij x ij
V
i
=0 (4.4.9)
j=1 b
p ur n p ur ur uur ur
n
Vb jS j x ij Vb j j x ij (Pj j D) + jS j K ij x ij q i = 0 (4.4.10)
t j=1 j=1
109
For water, x ij = 1 , in the above equation. The pressure difference between phases
is evaluated using the capillary pressure. This equation also holds for water by inserting
the properties of the aqueous phase.
The above equation is written is terms of moles per unit time, in which q i is the
molar injection (positive) or production (negative) rate for component i. The mobility for
phase j is defined by
r
kk rj
j = (4.4.11)
j
The mass balance equations for each hydrocarbon component and water are
discretized using a fully implicit approximation with single-point upstream weighting for
the transmissibility terms. This results in a set of non-linear equations that are linearized
using Newton's procedure. Computing the derivatives of the governing equations with
respect to the independent variables generates the Jacobian matrix, which represents the
linear system. This linear system is then solved for the independent variables for all the
cells.
The volume constraint states that the pore volume in each of the cells must be
filled completely by the total fluid volume. This is expressed in a mathematical form as
nc np
Vb N i L j v j Vp = 0 (4.4.12)
i =1 j=1
110
where Ni is the number of moles of component i per unit bulk volume, Lj is the ratio of
moles in phase j to the total number of moles in the mixture, v j is the molar volume of
Some extensive studies on the development and use of the phase stability
principle can be found in the literature (Baker et al., 1982; Michelsen, 1982;
Trangenstein, 1987; Perschke, 1988; Chang, 1990). The phase stability test handles the
following two situations:
Single-phase fluid is checked to see whether a phase split occurs.
Previous two-phase fluid is checked to see if the fluid becomes a single
phase under current conditions.
One way of doing the phase stability analysis is given by Michelsen (1982). A
stability analysis on a mixture of overall hydrocarbon composition Z is a search for a
111
trial phase, taken from the original mixture that, when combined with the remainder of
the mixture, gives a value of Gibbs free energy that is lower than a single-phase mixture
of overall hydrocarbon composition, Z . If such a search is successful, an additional
phase must be added to the phase equilibrium calculation. This condition is expressed
mathematically as
nc
G = yi i (Y) i (Z) (4.6.1)
i =1
component i in the trial phase. Thus, if for any set of mole fractions the value of G at
constant temperature and pressure is greater than zero, then the phase will be stable. If a
composition can be found in which G < 0 , the phase will be unstable.
The phase stability analysis is to solve the following set of nonlinear equations for
the variables Yi :
where i is the fugacity coefficient of i th component. The mole fraction Y and the term
h i is related to these variables by
Yi
yi = nc
(4.6.3)
Y
k =1
k
112
where Yi is the unnormalized composition of i th component. The phase stability test
usually takes a significant portion of the total CPU time (Chang et al., 1990; Young,
1991). For single-hydrocarbon-phase cells, the phase change test is even more expensive
because of a poor initial guess of the trial phase composition. To reduce the
computational cost, a negative flash (Whitson et al., 1986) is likely to be a good choice
since the search for the solution can start with a very good initial guess except in the
stage of the initialization of a simulation.
The flash calculation is used for the initialization of a reservoir simulation. This
procedure is also used to generate the linear system for cells in which fluids change their
state from single-hydrocarbon phase to two-hydrocarbon phase during the iteration.
Once a mixture has been shown to split into more than one phase by the stability
calculation, the flash involves calculation of the mole fraction and composition of each
phase at the given temperature, pressure and overall composition of the fluid. The
governing equations for the flash require equality of component fugacities and mass
balance. The equilibrium solution must satisfy three conditions:
1. Mass conservation of each component in the mixture
2. Equality of chemical potentials for each component in all phases
3. Minimum Gibbs free energy at constant temperature and pressure
Fugacity is calculated using the Peng-Robinson equation-of-state. The phase
composition constraint, which states that the sum of the mole fraction of all the
components in a phase equals one, and the Rachford-Rice equation for determining the
phase amounts for two hydrocarbon phases, are used implicitly in the solution of the
fugacity equation.
113
The Rachford-Rice equation is used to determine the phase compositions and
amounts. This equation requires the values of the equilibrium ratios, K i , which are
defined as the ratio of the mole fractions of component i in oil and gas phases,
respectively. The K i values are determined by the equality of component fugacities in
each phase. The fugacity equality, the Rachford-Rice equation and the Peng-Robinson
equation-of-state are described in detail in the following sections.
One of the criteria for phase equilibrium is the equality of the partial molar Gibbs
free energies or the chemical potentials. Alternatively, this criterion can be expressed in
terms of fugacity (Sandler, 1999): with the assumption of local thermodynamic
equilibrium for the hydrocarbon phases, the criterion of phase equilibrium applies (Smith
and Van Ness, 1975), namely:
where phase l has been chosen as a reference phase. At a given temperature, the fugacity
of i th component in jth phase is taken as a function of pressure and phase composition:
114
nc
x
i =1
ij 1 = 0 (4.7.3)
n ij
x ij = i = 1,K , n c j = 2,K , n p (4.7.4)
nj
nc
(K i 1)zi
r(v) = =0 (4.7.5)
i =1 1 + v(K i 1)
where v is the mole fraction of gas in absence of water, K i is the equilibrium ratio, z i is
the overall mole fraction of component i in the feed and r(v) is the residual of the
Rachford-Rice equation.
The component mole fractions in the liquid and gas phases are then computed
from the equations:
zi
xi = (4.7.6)
1 + v(K i 1)
zi K i
yi = (4.7.7)
1 + v(K i 1)
115
The range for v is defined by
1
vl = <0
1 K max
(4.7.8)
1
vr = >0
1 K min
RT a
P= (4.7.9)
v b v(v + b) + b(v b)
R 2 Tc2
a = 0.45724 (T) (4.7.10)
Pc
T
= 1 + 1 (4.7.11)
Tc
116
RTc
b = 0.07780 (4.7.12)
Pc
For a multicomponent mixture, the mixing rules for the two parameters are
nc nc
a = x i x j a i a j (1 k ij ) (4.7.14)
i =1 j=1
nc
b = x i bi (4.7.15)
i =1
Z3 + Z2 + Z + = 0 (4.7.16)
Pv
where Z = is the compressibility factor, and the parameters are expressed as
RT
= 1 + B (4.7.17)
= A 3B2 2B (4.7.18)
117
= AB + B2 + B3 (4.7.19)
aP
A= (4.7.20)
(RT) 2
bP
B= (4.7.21)
RT
118
solves the Rachford-Rice equation for finding the phase composition and the phase
amounts.
Phase identification deals with the labeling of a phase as oil, gas, or aqueous at
the initial conditions and also when a new phase appears. After a phase has been
identified, phase tracking does the labeling of a phase during the simulation. Labeling
phases consistently is important because of the need to assign a consistent relative
permeability to each during a numerical simulation. Phase identification deals with the
following two situations (Trangenstein, 1987; Nghiem et al., 1979):
A multiphase fluid is found and the state of each equilibrium phase
remains to be known.
A single-hydrocarbon-phase fluid is detected by the phase stability test
and the state of this single-phase fluid remains to be known.
Perschke (1988) developed a method for phase identification and tracking in
which both phase mass density and phase composition are used. This is the procedure
followed in GPAS. Once a phase has been identified, it is tracked during simulation by
comparing the mole fraction value of a selected or key component in the equilibrium
phases at the new time step with the values at the old time step. The phases at the new
time step are labeled so that the mole fraction values are closest to the values at the old
time step.
Phase identification may be more difficult when a single-hydrocarbon-phase fluid
is present. Gosset et al. (1986) proposed an approach for this for a two-parameter EOS.
This procedure works well when single-phase fluids are not close to a phase boundary.
Wang and Baker (1996) noticed that, when applying in to determine the phase state of
119
fluids at different depths with different compositions, this procedure tends to identify a
dense gas as a light liquid phase when fluid is near its phase boundary.
The algorithm used in GPAS for naming a phase when the hydrocarbon mixture is
a single phase is similar to that proposed by Gosset et al. (1986). The parameters A and
B of a two-parameter cubic EOS are computed from
aP PTc2
A= = a (4.8.1)
(RT) 2 Pc T 2
bP PT
B= = b c (4.8.2)
RT Pc T
where
a = 0.4572355299
b = 0.077796074
A a Tc
= (4.8.3)
B b T
A a
(4.8.4)
B b
120
Or its molar volume to be greater than the critical molar volume, v > vc , which
implies
BZc
Z> (4.8.5)
b
GPAS identifies a single phase as oil or gas using the above method. An option is
also provided in the code to identify a single-phase by the conventional method: The
fluid is liquid when sum of zi K i = 1 , and the fluid is gas when the sum of z i / K i = 1 .
The physical properties are calculated for the hydrocarbon phases based on their
compositions. The aqueous phase properties are calculated separately. In this section, the
physical models implemented in GPAS to calculate the viscosities, interfacial tension,
relative permeability, capillary pressure, formation porosity and the hydrocarbon
solubility in water are described.
4.9.1 Viscosity
The aqueous phase viscosity is constant and is specified as user input. The gas
and oil viscosity is computed using the Lohrenz et al. (1964) correlation. An option is
also available to input the oil phase viscosity.
The Lohrenz et al. (1964) correlation combines several viscosity correlations as
described below. The steps involved in calculating the phase viscosity are given below
121
Computation of the low-pressure, pure-component viscosity
0.00034Tri0.94
Tri 1.5
) i
i = (4.9.1)
0.0001776(4.58Tri 1.67)
5/ 8
Tri > 1.5
i
where
5.44Tci1/ 6
i =
MWi1/ 2 Pci2 / 3
nc
)
x ij i MWi
=
*
j
i =1
nc
(4.9.2)
x
i =1
ij MWi
1/ 6
nc
5.44 x ijTci
j = i =1
1/ 2 2/3
nc
nc
x ijMWi x ijPci
i =1 i=1
122
The phase viscosity calculation at the desired pressure
* jr
j + 0.000205 jr 0.18
j
j = * (4.9.4)
j + ( j 1)
4
Where
The interfacial tension between two hydrocarbon phases is calculated from the
Macleod-Sudgen correlation as reported in Reid, Prausnitz and Poling (1987):
4
nc
jl = 0.016018 i ( j x ij l x il ) (4.9.5)
i =1
where i is the parachor of component i. In GPAS, the interfacial tension between gas
and oil for each gridblock and the derivatives of the interfacial tension are calculated in
the subroutine IFT.
The relative permeability models implemented in the code are in the form of both
lookup tables and Corey-type functions. The two-phase relative permeability is given as
tabular input. Industry practice is to assume the three-phase relative permeabilities of
123
water and gas are the same as two-phase relative permeabilities. Only oil relative
permeability is treated as a function of both water and gas saturations. The three-phase
relative permeability to water, oil and gas is calculated based on the two-phase relative
permeability data, using Stones method I or II.
There are currently three models in GPAS to calculate the three-phase relative
permeability for compositional simulations and one model that takes into account the
effect of trapping number, which is suitable for chemical processes. Corey-type
equations, Stone's model I with constant Sor , Stone's model I with variable Sor , Stone's
model II and Corey-type function with trapping number will be described in the
following sections.
k rj = k orjSj j
n
(4.9.6)
where k orj is the relative permeability endpoint for phase j and Sj is the normalized phase
saturation defined as
S j S jr
Sj = (4.9.7)
1 S jr S j'r
124
4.9.3.2 Normalized Stone's Model I with Constant Three-Phase Sor
The Stone Model I is normalized by the Aziz and Settary method (1979).
So k row k rog
k ro = (4.9.8)
k o
row (1 S ) (1 S )
w g
where k rj is the relative permeability of phase j and k rjb is the relative permeability of
So =
(S o Sor )
(4.9.9)
(1 S or Swr )
Sg
Sg = (4.9.10)
(1 S or Swr )
Sw =
(S w Swr )
(4.9.11)
(1 S wr Sor )
approximation (1982).
where
125
Sg
b = 1 (4.9.13)
(1 S wr Sorg )
Here we assume a value of 0.5 for b and the residual oil saturation is a constant as
The two-phase relative permeabilities, k rog and k row , are obtained from input
The Stone Model I is normalized by the Aziz and Settary method (1979).
So k row k rog
k ro = (4.9.15)
k o
row (1 S ) (1 S )
w g
where k rj is the relative permeability of phase j and k rjb is the relative permeability of
So =
(S o Sor )
(4.9.16)
(1 S or Swr )
Sg
Sg = (4.9.17)
(1 S or Swr )
126
Sw =
(S w Swr )
(4.9.18)
(1 S wr Sor )
approximation (1982).
where
Sg
b = 1
(1 S wr Sorg )
Letting
Sorg Sorw
c1 = (4.9.20)
(1 S wr Sorg )
then
127
4.9.3.4 Normalized Stone's Model II
k k rog
k ro = k oro row
o
+ k rw o
+ k rg ( k rw + k )
rg (4.9.22)
k ro k ro
where the oil/water and oil/gas two-phase relative permeability is obtained from the input
tables.
The subroutine RELPERM3EOS computes the three-phase relative permeability
to water, oil and gas based on the two-phase data.
rr r r
(
k l ' + g(l' l )D )
N Tl = (4.9.23)
ll '
rr
where k is the permeability tensor, is the flow potential, j is the mass density of
phase j, D is the depth from a reference datum plane and is the interfacial tension.
128
The change in residual saturations is modeled as a function of the trapping
number as shown below
SLow SHigh
Slr = min Sl ,SlrHigh + lr lr
1 + Tl N tl
where SlrHigh and SlrLow are the residual saturations for phase l at high and low trapping
numbers and Tl is the trapping number for phase l . This correlation was derived based
Low
Sl'r
High ( rl
k o High k orlLow )
Sl'r
k orl = k orlLow + (4.9.24)
Sl'r Sl'r
Low
Low
Sl'r
High ( rl )
Sl'r
n l = n lLow + n High n Low (4.9.25)
Sl 'r Sl'r
Low rl
where k orl is the relative permeability endpoint for phase l and n l is the relative
129
fully implicit EOS model formulation we need the following partial derivatives for the
relative permeability:
k rl
i = 1,..., n c
ln K i
k rl
i = 1,..., n c , n w
Ni
k rl
P
A Corey-type function for relative permeability is used with the trapping number
model. Without the trapping number, the relative permeability is a function of saturation
only. The trapping number changes the relationship because it depends on the pressure,
interfacial tension and densities. Also, the end point relative permeability and exponents
are not constant and change with the trapping number. The derivatives in this case can be
calculated applying the chain rule.
The phase pressure is related to the capillary pressure and a reference pressure,
Pref:
For np phases, there are (np-1) independent capillary equations. The capillary
pressure is a function of phase saturations and compositions:
130
r r
Pcref , j = Pcref , j (S, x) j = 1,K , n p (4.9.27)
The gas-oil and water-oil capillary pressure data are inputted as tables. The
capillary pressure at any saturation is interpolated from the tables.
where ref is the porosity at reference pressure, Pref, and is calculated at a pressure P.
The mutual solubility between hydrocarbon phases and the aqueous phase can be
treated using either:
Simplified approach, in which the solubility calculation is performed
separately from the flash calculations using a different model that that
used for the flash calculation.
Rigorous approach, in which the aqueous phase is considered as one of the
equilibrium phases and water is included in the flash calculations.
The solubility of the hydrocarbons in the water is calculated, separately from the
flash calculations, using Henrys law. The vaporization of water into hydrocarbon phases
131
is ignored. When the solubility calculations are treated separately from the flash
calculations, the component molar balance equations are expressed as
(Nih + Nia )
np ur ur q
j j x ij (Pj j D) i = 0 (4.9.29)
t j=1 Vb
component i in the aqueous phase and i the index for hydrocarbon components.
N ih is selected as the primary variable instead of the total number of moles. The
fia N ia
x ia = = nc a
(4.9.30)
Hi
N + Ni
a
w
i =1
where H i is Henrys constant for i th component. The mole fraction of water in the
aqueous phase is
nc
N aw
x aw = 1 x ia = nc a
(4.9.31)
i =1
N + Ni
a
w
i =1
x ia a
N ia = Nw (4.9.32)
x aw
132
Since N ia can be determined using the primary variables as shown in the above
equation, it is apparent that the inclusion of the solubility calculations doesnt increase
the number of primary variables.
The well model accounts for the source/sink terms in the mass conservation
equations. A reservoir simulator needs a well model to translate historical
production/injection data and the actual or desired field operating conditions and
constraints into acceptable controls for the reservoir model. This requires that the
operating constraints such as production and injection facility limits be imposed correctly
as boundary conditions for the individual gridblock representing part or all of a well in
the reservoir model. The well-management routine assigns user-specified well rates or
pressures to individual producing blocks in the simulator at specified times. The
application of a constant-pressure boundary condition will hold the bottom hole
production or injection pressure in the well constant. A well is located at the center of the
gridblock containing the well. The equations given below apply only for vertical wells.
The relationship between volumetric flow rate, flowing bottomhole pressure and
gridblock pressure is expressed as
Q j = PI j (Pwf Pj ) (4.10.1)
where PI j is the productivity index for phase j. For one-dimensional (x direction) and x-
133
k x k y yz rj
PI j = (4.10.2)
x
25.15*2
2
k x k y z rj
PI j = (4.10.3)
r
25.15ln o
rw
where kx and ky (md) are permeability in the x and y directions, x, y and z are
gridblock sizes (ft) in x, y and z directions, rj is relative mobility in cp-1, Qj is the well
flow rate of phase j in ft3/day and pressure is in psi. In Equation (4.10.3), the radius ro is
given by Peaceman's equation:
k
1/ 2
k
1/ 2
x x + x
2
y
2
k y
k
y
ro = 0.28 (4.10.4)
1/ 4
k
1/ 4
ky
+ x
kx k
y
134
where inj is the specific weight of the injected fluid at the well pressure. The
bottomhole reference depth for each well can be assigned in the input file. The
component flow rates for layer z are computed by
and
(Q t )z
(q t ) z = (4.10.7)
(v t )inj
where
np
and
f L L
1 inj
( )
(v t )inj = 1 + 1 ( f1 )inj 2 + 2
2 2 inj
(4.10.9)
inj
where ( j )inj is the molar density of phase j, (L j )inj is a ratio of moles in hydrocarbon
phase j to the total number of hydrocarbon moles in the injection fluid and ( f1 )inj is the
molar fraction of water component in the injection stream. The values of ( j )inj and
135
(L j )inj for j = 2 and 3 are determined by flash calculations at the time the well conditions
are specified. The molar density for the aqueous phase, which is assumed to be slightly
compressible, is calculated using
1 = 1o 1 + c1 (P P1o ) (4.10.10)
where 1o is the aqueous phase molar density at the reference pressure P1o .
the hydrocarbon composition of the injected fluid (zi)inj are specified. The volumetric
rates are converted to molar flow rates using the following equations
After computing the molar flow rates, the following allocation scheme is then
employed to distribute the molar injection rates into each layer.
For multiple layer simulations (cross-sectional and three-dimensional), the total
injection rates are allocated to the individual layers according to a total mobility
allocation scheme:
q i (PI t ) z
(q i ) z = zb
i = 1,..., n c , n c + 1 z = z t ,..., z b (4.10.12)
(PI )
m=zt
t m
136
where zt and zb are the top and bottom layer numbers of a well, respectively. The total
productivity index of a layer z is defined as
np
The denominator on the right side of Equation (4.10.12) is the summation of the
total productivity index over all communicating layers for a well. The values of zt and zb
do not have to be the first and last layers of the reservoir, respectively, and thus a well
can be specified as being partially completed. The relationship between volumetric and
molar flow rates is calculated as
3
(Q t )z = (Q j ) z = (q t ) z (v t )inj (4.10.14)
j=1
where
f L L
(v t )inj = ( 1 )inj + [1 (f1 )inj ][( 2 )inj + ( 3 )inj ] (4.10.15)
1 2 3
Here j is the molar density of phase j and (Lj)inj is a ratio of moles in hydrocarbon phase j
to the total number of hydrocarbon moles in the injection fluid. The values of (j)inj and
(Lj)inj for j = 2 and 3 are determined by flash calculations at the time the well conditions
are specified, and (j)inj is the molar density for the aqueous phase. The bottomhole
pressure is calculated using
(Q t )z
(Pwf )z = Pz + (4.10.16)
(PI t ) z
137
4.10.3 Constant Bottom Hole Flowing Pressure Producer
np
makes the fugacity equations more linear (Wang et al., 1995). The equilibrium ratio, K i
is defined as
yi
Ki = i = 1,..., n c (4.11.1)
xi
where x i and yi are the mole fractions of component i in oil and gas phases,
respectively.
The set of independent variables is further classified into the primary and
secondary variables. The primary variables are P, N1 , N 2 ,, N n c because they are
138
coupled between adjacent cells through the component mass-balance equations and need
to be solved simultaneously. The ln K i values are the secondary variables because they
are calculated from the equality of the component fugacities at given pressure,
temperature and total moles of all components.
A fully implicit solution method is used to solve the governing equations. The
equations are nonlinear and must be solved iteratively. A Newton procedure is used in
which the system of nonlinear equations is approximated by a system of linear equations.
The linearization is performed using the Jacobian matrix of the governing equations. The
Jacobian refers to the matrix whose elements are the derivatives of the governing
equations with respect to the independent variables.
The sequence of steps involved in the solution of the governing equations for the
independent variables over a timestep includes:
1. Initialization in Each Gridblock: The pressure, overall composition and
temperature of the fluids in each gridblock are specified. The initialization
and calculation of the initial fluid in place is done in the subroutine
INFLUID0. This subroutine is the main driver for the computation of the
initial fluid in place.
2. Phase identification and Physical Properties Calculation: The flash
calculations are performed in each gridblock and the phase saturations,
compositions and densities are determined. The phases are then identified
as gas, oil or aqueous phase. Phase viscosities and relative permeabilities
are subsequently computed. The flash calculations are performed in the
subroutine XFLASH and currently are limited to two phases. The
139
Rachford-Rice equation that determines the phase fractions is coded in the
subroutine SOLVE. All the fluid physical properties like the fluid
viscosity, relative permeability and phase density calculations are
determined in the PROP subroutine. The PROP subroutine calls separate
routines to determine the different physical properties. It calls the
subroutine LVISC2 to calculate the phase viscosity using the Lorenz
coefficient, the subroutine RELPERM3EOS to calculate the three-phase
relative permeability using Stone's model or calls the LOOKUP subroutine
to interpret the two-phase relative permeability from the relative
permeability tables.
3. Governing Equations Linearization: All the governing equations are
140
equilibrium relations and the linearized volume constraint are used to
eliminate the secondary variables and one of the overall component moles
from the linearized component mass balance equations. The subroutine
EOS_JACO forms the Jacobian for row elimination for two-phase cells.
5. Solution of the Reduced System of the Linear Equations for the Primary
Variables: The reduced system of linear equations is simultaneously
solved for pressure and the overall moles of n c 1 components per unit
141
Step 4. If the tolerance is met, a new timestep is then started by returning
to Step 3. The subroutine XSTEP is the contact routine between the
IPARS framework code and the EOSCOMP compositional model code.
The residuals are checked in XSTEP and if the tolerance is met, a new
timestep is started; otherwise another Newton-iteration is performed.
142
XIVDAT: Performs the model initialization before time iteration. The
PETSc linear solver is also initialized.
XSTEP: The main subroutine that performs all the calculations over a
timestep.
XQUIT: Exits from the simulation when it meets the maximum time,
production limits, or if an error occurs.
The most important routine for the EOS compositional model is XSTEP. It
handles the following operations at a given timestep:
1. Compute the dependent variables based on the independent
variables.
2. Update properties in the overlapping regions of all the processors
(communications between processors).
3. Evaluate the residuals for all the governing equations. For the
component mass-balance equations, it involves a summation of the
residuals from each of the processors. The function for doing so is
provided by the framework.
4. Select the maximum residuals for each type of the governing
equations among all of the processors.
5. Check if a convergence is reached on the master processor
(processor 0) and broadcast the outcome of the check to other
processors.
6. If the tolerances are met, output user-specified properties at this
current time level and then return to the framework for time-
stepping calculation for the next timestep.
143
7. If the tolerances are not met, evaluate the element of the Jacobian
and then call PETSc linear solver.
8. Update the independent variables and go back to step 2 for the
Newton iteration.
The communication between processors for the compositional model is performed
in the executive subroutines. There is no argument attached to these calls. Those
variables associated with grids are passed into these routines through pointers that are
stored in common block. These common blocks are included as header files in the
subroutines. The executive routines call the work routines to perform all the calculations.
The grid dimensions and variables are passed into these work routines through a C
routine called CALLWORK, which is handled by the framework. The CALLWORK
function passes the variables as an index argument list to the function being called.
144
JXMASS: This routine computes the derivatives of the flux term of mass
conservation equations with respect to the independent variables in x
direction.
JYMASS: This routine computes the derivatives of the flux term of mass
conservation equations with respect to the independent variables in y
direction.
JZMASS: This routine computes the derivatives of the flux term of mass
conservation equations with respect to the independent variables in z
direction.
JSOURCE: This routine computes the derivatives of the source term with
respect to the independent variables.
MRESIPW: Calculation of the residuals of mass conservation equations.
PORP: This routine computes the rock and fluid properties.
FLASH: This routine performs the flash calculation and computes the
derivatives of fugacity equations with respect to independent variables.
RESIDUAL: This routine computes the residuals of governing equations.
PETSc (Balay et al., 1997; Wang et al., 1999) is a large suite of parallel, general-
purpose, object-oriented solvers for the scalable solution of partial differential equations
discretized using implicit and semi-implicit methods. PETSc is implemented in C, and is
usable from C, FORTRAN, and C++. It uses MPI for communication across processors.
GPAS uses the linear solver component of PETSc to solve the linearized Newton system
of equations and uses the parallel data formats provided by PETSc to store the Jacobian
and the vectors.
145
The linear solver components of PETSc provides a unified interface to various
Krylov methods, such as conjugate gradient (CG), generalized minimal residual
(GMRES), biconjugate gradient, etc., and also to various parallel preconditioners such as
Jacobi, block preconditioners like block Jacobi, and domain decomposition
preconditioners like additive Schwartz. GPAS uses the biconjugate gradient stabilized
approach as the Krylov method and block Jacobi preconditioner, with point block
incomplete factorization (ILU) on the subdomain blocks. The point block refers to
treating all the variables associated with a single gridblock as a single unit. The number
of subdomain blocks for block Jacobi is chosen to match the number of processors used,
so that each processor gets a complete subdomain of the problem and does a single local
incomplete factorization on the Jacobian corresponding to this subdomain.
For three-phase flow, the compositional model EOSCOMP generates 2n c + 1
equations per gridblock causing the Jacobian to have a point-block structure, and a point-
block sparse storage format is used to store the matrix. These 2n c + 1 equations do not
result in complete coupling of all the variables across gridblocks. This causes the
Jacobian to have some n c + 1 point-block locations with zero values. Thus a block size
of n c + 1 is chosen for this matrix type eliminating the need to store the ( n c + 1) ( n c + 1)
blocks with zero values. The usage of the point-block sparse matrix storage leads to the
improvement in the performance of the matrix routines.
A new automatic time step control was added which is more stable and more
efficient than the one already available in the code based on the number of Newtonian
iterations. The new implementation is based on the maximum change in pressure, phase
146
saturation, and molar concentration of each species. The formulation is described below
as
(1 + ) i
t n +1 = t n (4.15.1)
i + i min over all gridblocks
where is the tuning factor and is between a value of zero and one, i is the maximum
relative change for each variable as an input parameter, and i is the computed relative
change of the variable in gridblock i during the time step t. The value in the bracket in
Equation (4.15.1) will be different depending on the variables pressure, saturation, and
species molar concentration used and the minimum will be used in the time step
selection. Additional input parameters added for the time step control option 2
(TIME_CONTROL = 2) are listed as below:
TUNE: tuning factor with a value between 0 and 1
DCMAX: maximum relative change of molar concentration
DPMAX: maximum relative change of pressure
DSPMAX: maximum relative change of saturation
DELTIM: initial time step in days
DTIMMAX: maximum time step, days
DTIMMIN: minimum time step, days
147
Chapter 5: Fully Implicit, EOS Compositional, Parallel Reservoir
Simulator with Asphaltene Precipitation Model
5.1 INTRODUCTION
This chapter presents a detailed; step-by-step description of the research that was
done in this study to develop the General Purpose Adaptive Simulator (GPAS) with a
model for compositional simulation of asphaltene precipitation problem in petroleum
reservoirs. The first section provides a summary of the models for asphaltene
precipitation currently available in the petroleum engineering literature. The second
section is an introduction on how to select an asphaltene precipitation model to be
implemented into an equation-of-state compositional, reservoir simulator.
The effect of temperature on modeling asphaltene precipitation in reservoirs will
be discussed briefly. The next section is a description of the model used in GPAS for
asphaltene precipitation and the assumptions made for its implementation. In this chapter
we also address the modeling of the phase behavior of solid precipitates and its coupling
with the important existing subroutines of the simulator. A multiphase-flash calculation
procedure for oil-gas-solid systems was used for the first time in the simulator. The
adsorption of asphaltenes affects physical properties of oil and rock. These phenomena
are described in a section for modeling the dynamic aspects of asphaltene precipitation in
porous media, which includes a model for taking into account the permeability reduction
due to the plugging effect by asphaltenes.
Compared to the old version of GPAS, the modeling of asphaltene precipitation
requires more independent variables to deal directly with the solid phase. As a result, the
addition of new governing equations in the simulator, to be used for solving the system of
148
equations for the unknowns, is mandatory. The set of independent variables, the effect of
asphaltene precipitation on the old governing equation and the new governing equations
implemented in the simulator are discussed in the next sections.
In order to construct the Jacobian matrix for the fully implicit formulations, we
need the derivatives of the governing equations with respect to the independent variables.
These are described in detail in this chapter, including the residuals of the governing
equations and also some different possible scenarios for the Jacobian matrix. A robust
procedure to solve the new Jacobian matrix is also presented. A new solver that can be
used for cases with and without asphaltene precipitation was implemented in GPAS for
this purpose. Last but not least, the final section of this chapter gives a brief description
of the subroutines which were modified directly during the code development related to
implementation of asphaltene precipitation into GPAS.
Thomas et al. (1992) and Gupta (1986) attempted the first solid model for
asphaltene precipitation which is based on a single-component approach. In this
149
approach, the precipitated asphaltene is considered as a pure solid phase while the
hydrocarbon fluid phases are modeled with a cubic equation-of-state (e.g. Peng-Robinson
EOS). The fugacity of the solid phase which consists of a single component can be
calculated using
vs ( P P * )
ln fs = ln f +
*
s (5.2.1)
RT
where fs is the fugacity of solid at reservoir pressure, fs* is the reference solid fugacity
at a reference pressure ( P * ), vs is the molar volume of the solid phase and P * is the
pressure at which the asphaltene just begins to precipitate from crude oil. It is also called
the reference pressure.
Thomas et al. found that this model is not able to give satisfactory results so a
new empirical model for calculation of fs (fugacity of solid) was proposed instead. Like
the old model, the new model is a function of pressure and temperature but it also takes
into account the overall composition of the mixture. The introduction of overall
composition in the model will result some conceptual problems because fluids with
various overall compositions might have the same solid, gas and oil composition. In
addition, the new model uses a large number of variables that require tuning for the
purpose of matching the experimental asphaltene precipitation data.
The representation of the solid asphaltene precipitate as a multi-component solid
phase was investigated by Thomas et al. as well. The new representation uses the solid-
liquid model which was initially developed by Won (1986) in order to study wax. The
new model was found to be successful and also suggested some fields for further
investigation and development including studying the behavior when the solvent
concentration increases. MacMillan et al. (1995) and Chung (1992) matched
150
experimental data with the new multi-component solid model. The specification of large
number of parameters is one of the main disadvantages of the multi-component solid
model for the asphaltene precipitate.
v a v l vl 2
ln ( a )max = 1
vl va RT
( a l ) (5.2.2)
151
where ( a ) max is the maximum volume fraction of the asphaltene precipitate, va is the
solvent/oil mixture, vl and l , can be obtained from the composition of the liquid phase
which is identified using the liquid-vapor equilibrium calculations. In addition, va and
a , are important parameters for this model. The molar volume is a function of density
and molecular weight. Anderson and Speight (1999) showed that most approaches for
calculation of molecular weight give data which is dependent on the aggregation effect.
Therefore, it is not possible to calculate the maximum solubility in the above equation
precisely. One way for determining the solubility parameter is by calculating the
solubility of asphaltenes in various solvents which have an increasing solubility. a can
be determined using that of the best solvent. The following correlation which uses two
constant parameters (a and b) suggests that the solubility parameter is a function of
temperature (Anderson and Speight, 1999):
= a + bT (5.2.3)
In order to take into account the fact that by increasing the temperature the
solubility parameter decreases, b is negative. This model was used by Burke et al. (1990),
Novosad and Costain (1990) and Hirschberg et al. (1984) but their degree of success was
limited. In fact Hirschberg et al. showed that the Flory-Huggins model cannot be used for
asphaltene and further studies are necessary. A development of this model is due to
Kanakawa et al. (1991). They suggested that the asphaltenes can be considered as
heterogeneous polymers while Hirschberg et al. were considering the asphaltenes to be
152
homogeneous polymers. The approach of Kanakawa et al. will enhance the fit but at the
same time will have higher number of parameters.
The approaches described in the previous sections are originated from molecular
thermodynamics. These approaches are useful for scenarios where the resin/asphaltene
micelles precipitate from crude oil with no alteration. Leontaritis and Mansoori (1987)
presented a mechanistic method which assumes that the asphaltenes can be found in the
oil as solid particles. These solid particles are in colloidal suspension and are stabilized
by the resins. In additions, the resins are adsorbed to the surface of the asphaltenes. This
method is more useful for conditions where the resin/asphaltene micelles are dissociated.
In this method, first, using an EOS, liquid-vapor equilibrium calculations are
performed in order to specify a liquid phase. The precipitation of asphaltenes may occur
in the liquid phase. The Flory-Huggins solution theory and experimental data for the
calculation of precipitation onset are used to obtain a critical chemical potential for the
resins. The critical chemical potential will then be used to calculate the precipitation
onset of asphaltenes at different situations.
153
computational calculations, hence, more developments and improvements are still
necessary.
The solid model which uses the same components being used in an equation-of-
state which is used to model the hydrocarbon phases is based on fugacities but the other
models presented in the previous discussions are all based on an activity-coefficient
approach (Prausnitz et al., 1986). The activity-coefficient approach, first, utilizes a two-
phase gas-oil flash in order to split the initial hydrocarbon mixture into two separate, gas
and oil phases. Further, the oil phase will be split into different components to model the
precipitation of asphaltenes from crude oil.
The solubility model of Hirschberg et al. (1984) mentioned earlier splits the oil
phase into two separate components. One component represents the deasphalted oil and
the other one represents the asphaltene component. The thermodynamic colloidal models
and the thermodynamic micellization models utilize other components to take into
account the resins and micelles.
The activity-coefficient approach does not take into account the fact that the
precipitation of asphaltenes will have an effect on the equilibrium of the oil and gas
phases since the activity-coefficient components do not have any relation with the
equation-of-state components. This fact will cause some probable errors in the phase-
behavior related calculations of the hydrocarbon phases because heavy components (i.e.
asphaltenes) affect the saturation pressure. Hence, the solubility model of Hirschberg et
al. which originates from the Flory-Huggins polymer solution is not precise. Based on
154
these facts, a method which utilizes three-phase gas-oil-asphaltene calculations is more
useful and desirable.
The main goal of using the activity-coefficient approach is describing and
modeling the phase behavior involved in the precipitation of asphaltenes from crude oils.
Thus, the primary goal is not its incorporation into compositional simulation in order to
model the precipitation of asphaltenes in reservoirs dynamically. More over,
implementation of phase behavior calculations related to asphaltene precipitation based
on the activity-coefficient approach will have conceptual difficulties considering that a
compositional simulator for asphaltenes has to solve the equations for asphaltene
precipitation, phase equilibrium and multiphase multicomponent flow simultaneously.
For a compositional simulator, it is crucial that the used components in the
equations mentioned earlier will be the same. This fact cannot be satisfied when using an
activity-coefficient model because it does not use the same EOS components but the solid
model for asphaltene precipitation follows this approach hence it is more desirable. The
solid model has another advantage as it is efficient from a computational viewpoint as
well which is of crucial importance because the oil-gas-solid equilibrium calculations are
called many times during different time steps in a compositional simulator.
In conclusion, this research aims to choose and implement a model for
precipitation of asphaltenes in crude oil, which satisfies the following requirements:
155
Considering the above, we choose the solid model approach because the main
goal is to implement the thermodynamic model into an equation-of-state compositional
simulator. Hence, the precipitated asphaltene will be modeled as a pure dense phase in
GPAS.
156
5.5.1 Nghiems Model for Asphaltene Precipitation
Nghiems model for asphaltene precipitation, which is a solid model, was selected
for the implementation of the asphaltene precipitation model into the General Purpose
Adaptive Simulator. The precipitated asphaltene is modeled as a pure solid, while the oil
and gas phases are modeled with an equation-of-state. Nghiem's model incorporates a
multiphase oil-gas-solid flash procedure to calculate the amount of solid precipitate and
the composition of the hydrocarbon phases at equilibrium. The multiphase oil-gas-solid
flash calculations will be described in the upcoming sections. In Chapter 3, Nghiems
model was presented and validated for description of asphaltene precipitation behavior.
Compared to the reported models, which we already reviewed in the previous
sections, this model is simpler to implement into an equation-of-state compositional
simulator. The calculations in the model are also based on thermodynamic methods. The
parameters that should be obtained from experimental studies or PVT utilities (e.g. CMG
WinProp) are:
In this study the above parameters were estimated using CMG WinProp version
2004.10. Commercial and academic compositional simulators (e.g. CMG GEM and
UTCOMP) indicate that compared to the experimental data, the prediction results of this
model are reasonable. A detailed discussion on Nghiems model for asphaltene
precipitation can be found in Chapter 3. Hence, Nghiems model was adopted for GPAS.
157
5.5.2 Assumptions
158
5.6 MULTIPHASE OIL-GAS-SOLID FLASH CALCULATIONS FOR ASPHALTENE
This section describes methods for performing flash calculations with a solid
phase. In a mixture of n c components (letting n c , the heaviest component, to be the
vs ( P P * )
ln f n cs = ln f *
ncs + (5.6.1)
RT
where f n cs is the fugacity of component n c or the heaviest component in the solid phase
at reservoir pressure, f n*cs is the reference fugacity at the onset pressure or P * , vs is the
molar volume of the solid phase and P * is the pressure at which the asphaltene just
begins to precipitate.
159
To check the existence of a solid asphaltene phase, the following criteria should
be satisfied. The solid phase or asphaltene will exist if
ln f n c ,o ln f n cs (5.6.2)
This implies that if the fugacity of the asphaltene component in the solid phase is
less than the fugacity of the n c th component in the oil phase, more asphaltene
precipitation will occur until both fugacities become equal. The model for asphaltene
must satisfy the above inequality and as a result the amount of asphaltene precipitate can
be obtained from the above equation. The solid phase does not exist if
ln f n c ,o < ln f n cs (5.6.3)
The procedure for testing the existence of the solid phase was implemented in the
subroutine STABLS.
pressure, P, and temperature, T. The equations that apply can be written as:
N io + Nig i nc
Ni =
N io + Nig +Nis i = nc
(5.6.4)
nc
NT = Ni (5.6.5)
i =1
160
Ni
zi = (5.6.6)
NT
where N ij is the moles of component i in phase j and N T is the total number of moles in
ln K ig + ln ig ln io = 0 i = 1,...,n c (5.6.7)
ln K n cs + ln n cs ln n co = 0 (5.6.8)
values are determined by the equality of component fugacities in each phase. The values
of K is result from the representation of the precipitate as a pure solid. The gas-oil
x ig
K ig = (5.6.9)
x io
0 i nc
x is
K is = = 1 (5.6.10)
x io i = nc
x io
161
where x io is the mole fraction of component i in oil phase, x ig is the mole fraction of
component i in gas phase and x is is the mole fraction of component i in solid phase. The
precipitated asphaltene is represented as a pure dense solid phase. The solid phase
consists of only one component called the asphaltene, hence
0 i nc
x is = (5.6.11)
1 i = nc
For oil and gas phases, the fugacity coefficient of component i in phase j, ij , can
fij
ij = (5.6.12)
x ijP
f n cs
n c s = (5.6.13)
P
For multiphase flash calculations and in conjunction with the above equations the
following material balance equation can be derived:
nc
(K ig 1)z i
1 + L (K
i =1 1) + Ls (K is 1)
=0 (5.6.14)
g ig
162
where z i is the feed composition of component i, Lg is the mole fraction of the gas phase
and Ls is the mole fraction of the solid phase. Additional information regarding the
derivation of the above equation is given in Appendix A. When the gas, oil and solid
phases coexist, the phase compositions can be evaluated from the following equations:
zi
x io = i = 1,..., n c
1 + Lg (K ig 1) + Ls (K is 1)
(5.6.15)
x ig = K ig x io i = 1,..., n c
(5.6.16)
163
using the permeability resistance factor model in an implicit form. In some cases
asphaltene precipitation may induce favorable changes in relative permeabilities and flow
diversion that improve the displacement efficiency.
To test the existence of a solid phase, the subroutine STABLS was implemented
in GPAS. Using this subroutine, STABLS, a solid stability test is performed to see
whether the system would be more stable with the formation of a solid phase. Additional
details on the procedure for testing the existence of the solid phase are provided later in
this chapter.
164
2.1.1 Test the existence of the solid phase using STABLS().
2.1.2 If the solid phase exists:
Two-phase oil-solid flash calculations are performed
because the single-phase oil system was unstable.
If the systems solid fraction is less than zero:
o Return to the original single-phase oil case.
o Exit.
165
o Return to the original oil-gas case.
o Exit.
The subroutine XWELL computes the well rates of the EOS compositional
module of GPAS and contributes to the residuals of the governing equations. For
gridcells containing wells, the implemented procedure for coupling the asphaltene
precipitation model and flash calculations in the subroutine XWELL is similar to that for
subroutine INFLUID0.
In GPAS, for a given time-step, the subroutine XUPDATE updates the phase
composition and the phase properties as phase density, viscosity, relative permeability
and determination of single-phase or two-phase in each gridcell. During each update of
the new set of independent variables, the phase stability test is performed for each
gridcell to check whether the fluid changes its phase number.
In the new implementation with asphaltene precipitation, for the case of fluid
changing from a single-phase to a two-phase hydrocarbon system, the flash calculation is
done only to determine the composition and density of each separate phase for initializing
the iteration for the next Newton step. Subroutines FLASHOS and FLASH3 were
implemented to be called by subroutine XUPDATE exclusively to determine the phase
composition. In the new implementation, the phase fractions of gas and solid phases, Lg
and Ls , are treated as independent variables and are updated in XUDATE, therefore it is
166
not necessary to solve the oil-gas-solid flash calculations for those independent variables
again.
The implemented procedure for coupling the asphaltene precipitation model and
flash calculations in the subroutine XUPDATE is described in the following. To perform
the asphaltene related calculations, the system is considered to be one of the following
two cases from a previous time step or Newton iteration:
1. First Case; Single-Phase Oil System with/without Asphaltene
At first, a stability test based on an analysis of the Gibbs free energy is
performed to see whether the system would be more stable by splitting
into two hydrocarbon phases.
1.1. If two hydrocarbon phases exist:
Test the existence of the solid phase using STABLS().
If solid phase exists:
o Three-phase oil-gas-solid flash calculations are performed
using subroutine FLASH3().
o If the systems solid fraction is less than zero:
167
the system would be more stable with the formation
of a third gas-phase.
o If a gas phase does not exist, then it is an oil-solid
case.
o If the test indicates that the addition of a gas phase
would yield a more stable system:
Three-phase oil-gas-solid flash calculations are
performed using subroutine FLASH3().
If the systems solid fraction is less than zero:
Return to the original oil-gas case and exit.
1.2.2 Else if the solid does not exist from the previous iteration:
Test the existence of the solid phase using STABLS().
If the solid phase exists:
o Two-phase oil-solid flash calculations are
performed using subroutine FLASHOS()
o If the systems solid fraction is less than zero:
168
If the systems solid fraction is less than
zero: Return to the original oil-gas case and
exit.
2. Second Case; Two-Phase Gas-Oil System with/without Asphaltene
2.1. If the solid phase exists from the previous iteration:
Test the existence of the solid phase using STABLS().
If the solid phase exists:
o Three-phase oil-gas-solid flash calculations are performed
using subroutine FLASH3().
o If the systems solid fraction is less than zero:
169
Asphaltene precipitation leads to formation plugging, reduction of permeability
and changes in wettability. Asphaltene deposition gives rise to wettability changes from a
water-wet reservoir to an oil-wet reservoir. More specifically, the presence of suspended
solid particles can affect the viscosity of the oil phase, while the presence of nonmobile
asphaltene particles can cause changes in relative wettability of the phases, induce
significant plugging of just the oil phase, and block all mobile phases approximately
equally. Equations describing the dynamics of asphaltene deposition and plugging are
given in the following sections. Permeability alteration due to the plugging is modeled
with a correlation.
After asphaltene precipitates from the oil, it can deposit onto the rock and cause
plugging and alteration of wettability. Recent investigations show that asphaltene
deposition is due to adsorption followed by mechanical entrapment. The first step in the
deposition is the rapid adsorption of asphaltene onto the active sites on the rock surface.
Given the overall composition of the fluid, z i , a multiphase oil-gas-solid flash
calculation at P and T gives the oil, gas, solid mole fractions and the composition of the
phases. Let N s be the moles of solid precipitate per pore volume
nc
N s = Ls N i
i =1 (5.8.1)
where Ls is the mole fraction of the solid phase and N i is the moles of i th component per
pore volume. In GPAS, we treat the total precipitated asphaltene or solid to be composed
of only a portion that adsorbs on the rock surface. In other words, the precipitated
170
asphaltene, no longer flows with the oil phase and can only adsorb onto active sites on
the rock surface, causing plugging and permeability impairment. A material balance
gives
N s = N n c N n c ,o N n c ,g = N as (5.8.2)
adsorbs on the rock surface. N as can be also be considered as the moles of solid that
deposit onto the rock surface through adsorption. The mass of adsorbed solid asphaltene
is related to the moles of adsorbed solid per pore volume, through the equation
N as M s
w as = (5.8.3)
(1-)R
where w as is the mass of adsorbed asphaltene per mass of rock, is the rock porosity,
R is the mass density of rock and M s is the molecular weight of the asphaltene
component. The subroutine PROP which is called during each Newton iteration,
performs the last part of the calculations related to the amount of adsorbed solid.
171
The relative permeability reduction is calculated using a resistance factor model.
This model, which is proposed by Nghiem et al. (1994), is used in the GPAS simulator to
compute the change in relative permeability affected by asphaltene adsorption and
plugging. The permeability resistance factor is calculated as
w as
1.0 + (R f ,max 1) w w as w as,max
Rf = as,max (5.8.4)
R w as > w as,max
f ,max
obtained from experimental data. The above equation corresponds to a linear relationship
between R f and w as , with a plateau at R f,max . Once R f is calculated, all the phase
permeabilities, or more generally phase mobilities (oil, gas and water mobilities), and
consequently the phase transmissibilities, are divided by this permeability resistance
factor to account for the reduced permeability due to asphaltene precipitation:
ko
k= (5.8.5)
Rf
172
phases. Thus, a different resistance factor may be given to each phase. The subroutine
PROP calculates the permeability resistance factor.
Several choices are available for the independent variables for a fully implicit,
compositional simulator, which is also able to model asphaltene precipitation. In GPAS,
the set of independent variables for solving the governing equations includes ln K1g ,
ln K 2g ,, ln K n cg , N1 , N 2 ,, N n c , P, N w , ln K n cs , Lg and Ls . Note that P is the
173
2. Equations constraining volume and component moles
3. Mass conservation equations
There is no conservation of momentum equation, although this may be important
for modeling fluid flow in and near the wellbore and in surface equipment.
Neglecting mutual solubility between water and hydrocarbon phases, for a system
consisting of hydrocarbon components and fluid phases (excluding the aqueous phase),
the above three types of equations are mathematically expressed for a control volume in
the upcoming sections.
With the introduction of asphaltene precipitation, many equations had to be
reformulated, modified and added to the simulator. To model the dynamic aspect of
asphaltene precipitation, the thermodynamic model for precipitation is incorporated into
GPAS, where equations for phase equilibrium, volume constraint equation, equations for
multiphase and multicomponent flow, multiphase flash equation, solid-oil equilibrium
ratio equation and equations for asphaltene deposition and plugging are solved
simultaneously. This allows the modeling of the precipitation with changes in pressure
and composition as they occur in the reservoir, because in GPAS the asphaltene
precipitation is affected solely by pressure and composition.
The new formulation was based on a fully implicit finite difference approach. The
Newton iteration method is used to solve the non-linear equations generated after the
finite differencing with the independent variables. The equations are linearized using
Newton's procedure. The Jacobian matrix representing the linear system is generated by
computing the derivatives of the governing equations with respect to the independent
variables. This linear system is then solved for the independent variables for all the cells.
The phase equilibrium calculations are performed to update physical properties. This
174
cycle is then repeated using the Newton solution scheme until the convergence criteria
based on the residual tolerance are met.
The fully implicit formulation allows us to take advantage of the larger time steps
in order to reduce the simulation time. The following sections describe the affect of
asphaltene precipitation on the governing equations of the General Purpose Adaptive
Simulator.
where f io and f ig are the component fugacities in the oil and gas phases calculated with
an EOS, and f n cs is the pure solid fugacity calculated from Nghiems model. Additional
details regarding the effect of asphaltene precipitation on phase equilibrium equations are
given in Appendix B and Appendix F.
The volume constraint equation expresses that the pore volume is equal to the
volume of all fluid phases plus the solid phase:
175
N w No Ng Ns
+ + + =1 (5.10.3)
w o g s
where N j is the total number of moles of jth phase per unit pore volume. Note that the
Ns
term , represents the effect of asphaltene precipitation on the volume constraint
s
equation. Additional details regarding the effect of asphaltene precipitation on the volume
constraint equation are given in Appendix C.
where M i(I,J,K)accum is the accumulation term of the mass conservation equation for a
gridblock, M i(I,J,K )flux is the flux term and M i(I,J,K)source is the source term. The mass
176
V
Mi = b
t
(( N )i
n +1 n
( Ni ) ) + ( Fi(I +1/ 2,J,K) Fi(I 1/ 2,J,K) ) +
(I,J,K )
n +1
(F Fi(I,J 1/ 2,K) ) + ( Fi(I,J +1/ 2,K ) Fi(I,J 1/ 2,K ) ) + ( Fi(I,J,K +1/ 2) Fi(I,J,K 1/ 2) ) (5.10.5)
n +1 n +1 n +1
i(I,J +1/ 2,K)
q i(I,J,K ) = 0
The dispersion term is not considered in the current version of the simulator. The
above equation is discretized using central differencing in space and backward
differencing in time. With
3
N i(I,J,K) = j(I,J,K )S j(I,J,K ) x ij(I,J,K ) (5.10.6)
j= 2
= r (1 + cf (P P o ) ) (5.10.7)
where N i is the moles of i th component per unit pore volume for a gridblock and r is
177
3
Fi(I +1/ 2) = Tij(I +1/ 2) v j(I+1/ 2) (5.10.8)
j= 2
3
Fi(I 1/ 2) = Tij(I1/ 2) v j(I 1/ 2) (5.10.9)
j= 2
where the phase transmissibilities, Tij(I) , which depend upon the relative permeabilities,
k rj j x ij k 0rj j x ij
Tij(I) = j x ij =
a
= (5.10.10)
j jR f
rj
In the above equation, the permeability resistance factor, R f , models the plugging
~
where k is the harmonic mean of permeability on a Cartesian grid. With
178
And j is the potential of phase j given by
Note that Pc(I) = 0 for the water phase. For one-point upstream weighting, we
have
3
Fi(I +1/ 2) Fi(I1/ 2) = ( Tij(I) v j(I+1/ 2) Tij(I1) v j(I 1/ 2) )
j=1
3
Fi(I +1/ 2) Fi(I 1/ 2) = ( Tij(I+1) v j(I+1/ 2) Tij(I1) v j(I1/ 2) )
j=1
3
Fi(I +1/ 2) Fi(I 1/ 2) = ( Tij(I+1) v j(I+1/ 2) Tij(I1) v j(I1/ 2) )
j=1
179
3
Fi(I +1/ 2) Fi(I1/ 2) = ( Tij(I) v j(I+1/ 2) Tij(I) v j(I 1/ 2) )
j=1
The mass conservation equation for the water component consists of three terms:
accumulation, flux and source function. This equation, with the effect of asphaltene
precipitation at a gridblock of (I,J,K), is as follows:
where M w (I,J,K )accum is the accumulation term of the water mass conservation equation for
a gridblock, M w (I,J,K )flux is the flux term and M w (I,J,K )source is the source term. This
180
V
Mw = b
t
(( N w )
n +1 n
( N w ) ) + ( Fw (I+1/ 2,J,K ) Fw (I 1/ 2,J,K) ) +
(I,J,K )
n +1
(5.10.12)
(F Fw (I,J 1/ 2,K ) ) + ( Fw (I,J,K +1/ 2) Fw (I,J,K 1/ 2) ) q
n +1 n +1
w (I,J +1/ 2,K ) w (I,J,K ) = 0
In the code, the water phase is numbered as 1, and n c + 1 the represents water
component. Here we use "w" instead, for clarity. Neglecting the solubility of water in oil
and gas phases, we have
x w1 = 1
w = constant
w = w (P)
k rw = k rw (Sw )
k 0rw w ~
Fw = Tw v w = k P (5.10.13)
jR f
In the above equation, the permeability resistance factor, R f , models the plugging
181
nc
zi (K im 1)
1+ =0 m = 2,..., n p j = 2,..., n p (5.10.14)
i =1 L j (K ij 1)
j
For the case of a three-phase system of oil, gas and solid, we will use the
following flash equation
nc
z i (K ig 1)
FE(Lg , Ls ) = =0 (5.10.15)
i =1 1 + Lg (K ig 1) + Ls (K is 1)
Lg and Ls are, respectively, the mole fractions of gas and solid in the
0 i = 1,..., n c 1
x is
K is = = 1 (5.10.16)
x io i = nc
x nco
The values of K is in the above equation result from the representation of the
precipitate as a pure solid. The mole fraction of component i in the solid phase is defined
by
182
0 i = 1,..., n c 1
x is =
1 i = nc
183
5.11.2 Derivatives of Component Mole Fractions
To build the Jacobian matrix for the fully implicit formulation in GPAS we need
the following partial derivatives, which represent the derivatives of the component mole
fractions with respect to the independent variables:
x ij
i = 1,..., n c i1 = 1,..., n c j = o, g
ln K i1g
x ij
i = 1,..., n c i1 = 1,..., n c j = o, g
N k
x ij
i = 1,..., n c j = o, g
ln K n cs
x ij
i = 1,..., n c j = o, g
Lg
x ij
i = 1,..., n c j = o, g
Ls
GPAS uses a cubic EOS to model oil and gas phases. The Peng-Robinson EOS is
used for the hydrocarbon phase behavior calculations in this thesis. More details
184
regarding the Peng-Robinson EOS can be found in Chapter 4. In addition, Appendix J
describes in detail the derivatives of the Peng-Robinson equation-of-state which are
essential for constructing the Jacobian matrix for the fully implicit formulation in GPAS.
At constant temperature
nc
Z j Z j
dZ j = dx ij + dP (5.11.2)
i =1 x ij P
To build the Jacobian matrix for the fully implicit formulation in GPAS we need
the following partial derivatives, which represent the derivatives of the compressibility
factor with respect to the independent variables:
Z j
i = 1,..., n c j = o, g
ln K ig
Z j
i = 1,..., n c j = o, g
Ni
Z j
i = 1,..., n c j = o, g
ln K n cs
185
Z j
i = 1,..., n c j = o, g
Lg
Z j
i = 1,..., n c j = o, g
Ls
The derivatives in this case can be calculated by applying the chain rule and
computing the derivatives of the component mole fraction with respect to the independent
variables. Appendix K describes in detail the derivatives of the compressibility factor
with respect to the ( 2n c + 5 ) primary unknowns per gridblock for multiphase and
The physical properties are calculated for the phases based on their compositions.
The phase equilibrium calculations are performed to update the physical properties used
in governing equations and evaluating the residuals. The fluid physical properties and
variables used in the mass balance equation are expressed as a function of independent
variables. The physical properties are discussed in detail in Chapter 4.
{ }
Let V = ln K ig , N i , P, N w , ln K n cs , Lg , Ls represent the independent variables in
the solution. The partial derivatives of molar density of phase j, phase saturation, relative
permeability and viscosity with respect to V, are required to build the Jacobian matrix for
the fully implicit formulation in GPAS.
The partial derivatives of the molar density of phase j, with respect to V, can be
calculated by applying the chain rule and computing the derivatives of the
compressibility factor:
186
P
j = j = o, g (5.11.3)
RTZ j
j P Z j
= (5.11.4)
x ij RTZ j2 x ij
To solve the governing equations for the independent variables over a time-step,
we first linearize the governing equations in terms of the independent variables and form
the Jacobian matrix. The Jacobian matrix consists of the derivatives of the residuals of
the governing equations with respect to the independent variables. In addition, the
residuals of the linear system are used to determine convergence. If a tolerance is
exceeded, the elements of the Jacobian matrix and the residuals of the governing
equations are then updated and an additional Newton iteration is performed. A detailed
description of the Jacobian matrix with the effect of asphaltene precipitation will be
presented later in this chapter. In this section, we present the residuals of the governing
equations of the General Purpose Adaptive Simulator.
187
5.12.1 Residuals of Phase Equilibrium Equations
The phase equilibrium Equations (5.10.1) and (5.10.2) can be rewritten in terms
of the K-values (equilibrium ratios) as follows:
ln K ig + ln ig ln io = 0 i = 1,...,n c (5.12.1)
ln K n cs + ln n cs ln n co = 0 (5.12.2)
R if = ln K ig + ln ig ln io i = 1,..., n c (5.12.3)
R fs = ln K n cs + ln n cs ln n co (5.12.4)
The derivatives of the residuals of the phase equilibrium equations, with respect
to the independent variables, can be found in Appendix B and Appendix F.
The residual of the volume constraint equation for each gridblock is given by the
following equation.
N w No Ng Ns
Rv = + + + 1 (5.12.5)
w o g s
188
The residual of the volume constraint equation can be written in the following
form. Note that the molar volume of the solid phase is constant.
v w N w + v o N o + v g N g + vs N s 1
Rv =
NT
(
= vw N w 1 ) N1 + v o L o + v g L g + v s Ls (5.12.6)
T
We can define the residual of the mass conservation equation for i th component at
a gridblock of (I,J,K) as
m
R i(I,J,K
Vb
) =
t
(( N ) i
n +1 n
( N i ) ) + ( Fi(I+1/ 2,J,K ) Fi(I1/ 2,J,K ) ) +
(I,J,K)
n +1
(F Fi(I,J 1/ 2,K) ) + ( Fi(I,J +1/ 2,K ) Fi(I,J 1/ 2,K ) ) + ( Fi(I,J,K +1/ 2) Fi(I,J,K 1/ 2) ) (5.12.7)
n +1 n +1 n +1
i(I,J +1/ 2,K)
q i(I,J,K )
The accumulation term in the residual of the mass conservation equation for
hydrocarbon components is dependent only on independent variables at its own
gridblock. The derivatives of the flux term for hydrocarbon components in the above
equation are more complicated because the flux term is dependent on primary variables at
six neighbor gridblocks as well as those at its own gridblock
189
The derivatives of the residual of the mass balance equation for hydrocarbon
components, with respect to the independent variables, can be found in Appendix D.
We can define the residual of the water mass conservation equation at a gridblock
of (I,J,K) as
w
R (I,J,K
Vb
) =
t
(( N w )
n +1 n
( N w ) ) + ( Fw (I +1/ 2,J,K) Fw (I1/ 2,J,K ) ) +
(I,J,K )
n +1
(5.12.8)
(F Fw (I,J 1/ 2,K ) ) + ( Fw (I,J,K +1/ 2) Fw (I,J,K 1/ 2) ) q
n +1 n +1
w (I,J +1/ 2,K ) w (I,J,K )
The accumulation term in the residual of the mass conservation equation for water
is dependent only on independent variables at its own gridblock. The derivatives of the
flux term for water in the above equation are more complicated because the flux term is
dependent on primary variables at six neighbor gridblocks as well as those at its own
gridblock.
The derivatives of the residual of the mass conservation equation for water with
respect to the independent variables can be found in Appendix E.
nc
zi (K ig 1)
R =
fe
(5.12.9)
i =1 1 + Lg (K ig 1) + Ls (K is 1)
190
The derivatives of the residual of the multiphase flash equation with respect to the
independent variables can be found in Appendix G.
The residual of the solid-oil equilibrium ratio for each gridcell is given by the
following equation:
1
R er = K n cs (5.12.10)
x nco
The derivatives of the residual of the solid-oil equilibrium ratio equation with
respect to the independent variables can be found in Appendix H.
The term Jacobian refers to the mathematical matrix that forms the system of
linear equations and whose elements are the derivatives of the residuals of the governing
equations with respect to the independent variables. An analytical method is used to
calculate the elements of the Jacobian matrix. The elements of the old Jacobian matrix of
GPAS were affected by asphaltene precipitation; and compared to the case without
considering the effect of asphaltene precipitation many elements were added to the new
Jacobian.
A Newton method is used, in which the system of nonlinear equations is
approximated by a system of linear equations. To linearize the governing equations in
terms of the independent variables, it is necessary to evaluate the following partial
derivatives for each gridblock.
191
J1,1 J1,2 ... J1,n b
J 2,1 J 2,2 ... J 2,n b
J= (5.13.1)
M M
J n b ,1 J n b ,2 ... J n b ,n b
where J is the Jacobian matrix, J i, j is the Jacobian matrix for i th gridblock with respect
to unknowns of jth gridblock and n b is the total number of gridblocks. To illustrate the
structure of the Jacobian matrix for different cases encountered in this research study, J1,1
(the Jacobian matrix for the first gridblock with respect to the unknowns of the same
gridblock) is presented in the following sections.
With no asphaltene precipitation, and if only oil and gas phases exist in a
gridblock, the derivatives with respect to the new independent variables, ln K n cs , Lg and
Ls are not needed for the Jacobian matrix. The structure of the Jacobian matrix for a
192
R1f R1f R1f R1f R1f R1f
L L 0 0 0 0
ln K1g ln K n c g N1 N n c P N w
M M M M M M M M M M M M
R fnc R f
nc R f
nc R f
nc R f
nc R fn c
L L 0 0 0 0
ln K1g ln K1g N1 N n c P N w
R R v R v R v R v R v
v
L L 0 0 0 0
ln K1g ln K n c g N1 N n c P N w
R1
m
R1m R1m R1m R1m R1m
ln K L L 0 0 0 0
ln K n c g N1 N n c P N w
J1,1 = 1g
M M M M M M M M M M M M
R nc R mnc R mnc R mnc R mn c R mn c
m
L L 0 0 0 0
ln K1g ln K n c g N1 N n c P N w
R w R w R w R w R w R w
L L 0 0 0 0
ln K1g ln K n c g N1 N n c P N w
0 L 0 0 L 0 0 0 1 0 0 0
0 L 0 0 L 0 0 0 0 1 0 0
0 L 0 0 L 0 0 0 0 0 1 0
0 L L 0 0 0 1
0 0 0 0 0
If only oil and solid phases exist in a gridblock, the derivatives with respect to
some independent variables, e.g. ln K ig and Lg , are not needed for the Jacobian matrix.
For single oil phase with asphaltene precipitation, the Jacobian matrix for a typical
gridblock is presented is as follows:
193
1 L 0 0 L 0 0 0 0 0 0 0
M
M M M M M M M M M M M
0 L 1 0 L 0 0 0 0 0 0 0
R v R v R v R v R v R v
0 L 0 L 0 0
N1 N n c P N w ln K n cs Ls
R1m R1m R1m R1m R1m R1m
0 L 0 L 0 0
N1 N n c P N w ln K n cs Ls
M M M M M M M M M M M M
R m
nc R m
nc R m
nc R m
nc R m
nc R mnc
J1,1 = 0 L 0 L 0 0
N1 N n c P N w ln K n cs Ls
0 R w R w R w R w R w R w
L 0 L 0 0
N1 N n c P N w ln K n cs Ls
R fs R fs R fs R fs R fs R fs
0 L 0 L 0 0
N1 N n c P N w ln K n cs Ls
0 L 0 0 L 0 0 0 0 1 0 0
0 R er R er R er R er R er R er
L 0 L 0 0
N1 N n c P N w ln K n cs Ls
0 L 0 0 L 0 0 0 0 0 0 1
Because the linearized system includes both the fugacity and volume constraint
equations, the gridblocks representing only oil (no gas) have their corresponding off-
diagonal elements in the Jacobian set to zero, and those on the diagonal are set to one.
The corresponding values in the right-hand side vector are set to zero.
The Jacobian structure for the general case of a multiphase oil-gas-solid system is
shown in the following:
194
R1f R1f R1f R1f R1f R1f R 1f R1f R1f
ln K L L 0
1g ln K n c g N1 N nc P N w ln K ncs L g Ls
M M M M M M M M M M M M
R fnc R f
nc R f
nc R f
nc R f
nc R f
nc R f
nc R f
nc R nf c
L L 0
ln K1g ln K1g N1 N nc P N w ln K ncs L g Ls
R v R v
R v
R v
R v
R v
R v
R v
R v
L L 0
ln K1g ln K n c g N1 N nc P N w ln K ncs L g Ls
R 1 R 1m R 1m R1m R1m R 1m R1m R1m R1m
0
m
ln K L L
ln K n c g N1 N nc P N w ln K ncs L g Ls
1g
M M M M M M M M M M M M
J1,1 = R mnc R m
nc R m
nc R m
nc R m
nc R m
nc R m
nc R m
nc R mn c
ln K L L 0
ln K n c g N1 N nc P N w ln K ncs L g Ls
1g
R w R w R w R w R w R w R w R w R w
L L 0
ln K1g ln K n c g N1 N nc P N w ln K ncs L g Ls
R R fs R fs R fs R fs R fs R fs R fs R fs
fs
L L 0
ln K1g ln K n c g N1 N nc P N w ln K ncs L g Ls
R fe R fe R fe R fe R fe R fe R fe R fe R fe
ln K L L 0
ln K n c g N1 N nc P N w ln K ncs L g Ls
1g
R er
R er R er R er R er R er R er R er R er
L L 0
ln K1g ln K n c g N1 N nc P N w ln K ncs L g Ls
0 L 0 0 L 0 0 0 0 0 0 1
The phase equilibrium equations, the volume constraint equation, the multiphase
flash equation and the solid-oil equilibrium ratio equation do not involve variables from
adjacent gridblocks, so the corresponding rows of the Jacobian matrix do not contain off-
diagonal elements. Before the Jacobian matrix is fed to the PETSc solver, some
processing can be done to simplify the matrix.
195
5.14 SOLUTION METHOD
The governing equations are solved simultaneously using a fully implicit method.
This method treats each term in the governing equations implicitly. These equations are
nonlinear and must be solved iteratively. To solve the nonlinear equations, Newtons
method is used.
The material balance equations need to be discretized using a proper scheme for a
given grid system that represents the geometry of the reservoir. The equations are
discretized using a forward in space and backward in time approximation. After the finite
differencing of the governing equations, we have ( 2n c + 5) n b nonlinear equations with
r r r
the same number of unknowns, x1 , x 2 ,..., x n b , for i th gridblock at new time level when
r
considering all the gridblocks. Where the unknowns-vector, xi , for i th gridblock is
r
(
x i = ln K1g ,..., ln K n cg , N1 ,..., N n c , P, N w , ln K n cs , Lg , Ls ) (5.14.1)
r
Residual vector for the method, R , consists of all the governing equations
r r r r r
( )
differentiated, and the unknown vector is x = x1 , x 2 ,..., x n b . The vector x is considered
r r r
as a solution vector at the new time level generally when it satisfies R(x) 0 . Another
criterion can be used for convergence based on the pressure and saturation changes being
r
sufficiently small for a given change of x by Newton iteration. This criterion is
preferred, especially when large saturation changes may occur for very small changes in
composition during the Newton iteration.
r
To search for the solution vector or to guess a new solution vector, x is updated
by
r new r old r
x = x + x (5.14.2)
196
r
where x is obtained from
r old r r old
J(x ) x = R(x ) (5.14.3)
r r
J1,1 J1,2 ... J1,n b x 1 R1
r r
J 2,1 J 2,2 ... J 2,n b x 2 R2
= (5.14.4)
M M M M
r
xr n R n b
J n b ,1 J n b ,2 ... J n b ,n b b
r
Where the residual vector, R i , for i th gridblock is
r
(
R i = R f1 ,..., R fn , R v , R 1m ,..., R mn , R w , R fs , R fe , R er
c c
) (5.14.5)
As can be seen from the above discussion, the number of linear equations to be
solved for one Newton iteration is dependent on the number of components and
gridblocks. Therefore, if we use a number of components and gridblocks for a precise
simulation with a single processor, computational memory may be insufficient or run
time may be very long, even if there is enough memory. This problem can be overcome
by parallel processing using multiple processors. More details can be found in Chapter 4.
Figure 5.2 shows the flowchart to search a solution vector at a new time level
with asphaltene precipitation using Newtons method. Bold letters represent the names of
the FORTRAN subroutines used in GPAS. The flowchart of the asphaltene code
describes the role of each subroutine.
197
As an example, in the case of single-phase oil with asphaltene precipitation we
must solve the following system
198
independent variables. To calculate the residual vector, we need to
r
evaluate variables that depend on x , such as porosity, molar density,
relative permeability, molar composition, phase viscosities, and source or
sink. A detailed discussion of how to evaluate several important dependent
variables can be found in Chapter 4.
3. Check for convergence
3.1. If the value of the residual is less than the tolerance, then the
convergence is achieved for the current timestep and the guessed
solution vector becomes the true solution vector. If the value of the
residual is more than the tolerance, then start a new Newton
iteration.
3.2. If convergence is not achieved, another solution vector is guessed.
Calculate the partial derivatives of the residuals with respect to the
independent variables to form the Jacobian matrix.
r old r r old r old
4. Solve the system J(x ) x = R(x ) where J(x ) is the Jacobian
r r old
matrix, x is the vector of unknowns and R(x ) is the residuals vector
199
new
ln K1g = ln K1g
old
+ ln K1g
M
n c g = ln K n c g + ln K n c g
ln K new old
N1new = N1old + N1
M
n c = N n c + N n c
N new old
P new = P old + P
N new
w = N old
w + N w
ln K nnew
cs
= ln K old
n cs + ln K n cs
Lnew
g = Lold
g + L g
Lnew
s = Lold
s + L s
To show the structure of the Jacobian matrix, we will present a simple one-
dimensional system with three gridblocks and three hydrocarbon components plus water.
( 2n c + 5 ) n b = ( 2 3 + 5 ) 3 = 33
r
The 33 unknowns form the vector of unknowns, x , namely:
1st Gridblock: ln K11g ln K12g ln K13g N11 N12 N13 P1 N1w ln K13s L1g L1s
2
2nd Gridblock: ln K1g ln K 22g 2
ln K 3g N12 N 22 N32 P2 N 2w ln K 3s2 L2g L2s
3rd Gridblock: ln K1g
3
ln K 32g 3
ln K 3g N13 N32 N 33 P3 N 3w 3
ln K 3s L3g L3s
200
We start with three gas-oil fugacity equations for the three components, then the
volume constraint equation followed by the three components mass balance equations,
and the water mass balance equation. Depending on whether or not there is asphaltene
precipitation, we add three more equations; the solid-oil fugacity equation, the flash
Note that for this system; because the phase equilibrium, the volume constraint
equation, the multiphase flash equation and the solid-oil equilibrium equation do not
involve variables from adjacent gridblocks, the corresponding rows for the general
precipitation model proposed in this research work was implemented primarily in the
subroutines as summarized in Table 5.1. This table describes the subroutines and GPAS
files involved with the implementation of the code for modeling asphaltene precipitation.
New keywords were added to allow the input of asphaltene precipitation model data and
related internal calculations of the simulator. These are detailed in Appendix M, along
with further details on the internal variables used. Appendix N presents sample code
201
development procedures and explains the steps taken in the modification of the GPAS
asphaltene code. The variables are dynamically allocated memory and the grid indexes
are in conformance with the parallelization requirement.
The input scalar data for the compositional model and consequently the
asphaltene precipitation model are read in the subroutine XISDAT. This subroutine
cannot be used to read the memory managed arrays. The asphaltene precipitation model
scalar input comprises the flag for turning on the asphaltene precipitation model,
ASPHALTENE, the maximum permeability resistance factor for the oil phase,
RFACTMAX, the maximum mass fraction of adsorbed solid, WASMAX, the mass
of the solid phase, VBS. These keywords are specified in an input-data file with the
appropriate units for a typical asphaltene precipitation case. The framework facilitates the
reading of the input using the subroutine GETVAL. Additional details can be found in
the subroutine XISDAT.
202
The asphaltene model scalar inputs, read in the subroutine XISDAT, are stored in
common blocks in the XGENDAT header file. The variables are accessible when
XGENDAT is attached to a specific subroutine as an include-file.
The variables required for the asphaltene precipitation code and related internal
calculations of GPAS are defined in an argument list. Each element of the argument list
contains the pointer of the variables to be passed. This is how the dynamic memory
allocation is used. The pointers are specified in XARRAY and are stored in an include-
file, XARYDAT, using a common statement. For the dynamic memory allocation in the
subroutine XARRAY, the grid element array variables need to have memory allocated by
The pointer variables defined in the subroutine XARRAY for the asphaltene
precipitation model are stored in common blocks in the subroutine XARYDAT. The
pointer variables are used in the index argument list in XSTEP and then passed from one
subroutine to another.
The subroutine XSTEP is the main subroutine for the compositional model
(EOSCOMP) which is able to model the asphaltene precipitation. For each Newton
iteration, XSTEP calls all the other subroutines involved with the compositional model
calculations. The asphaltene precipitation model, which incorporates many other
The subroutine STABLS is the main asphaltene subroutine. The name STABLS
stands for stability test for solid phase subroutine. The output from STABLS is the main
asphaltene flag, IASPR, which indicates whether solid precipitate exists in a gridblock or
not. This subroutine is called from INFLUID0, XWELL and XUPDATE. The
formulation of this subroutine is presented in the section, Stability Test for Solid Phase.
The subroutine XPRINT prints out the solution at one time level.
203
Table 5.1: Summary of code added to GPAS for modeling asphaltene precipitation
204
Generates the Jacobian for the EOS
PREROW rowpw.df compositional model.
205
This routine solves a linear system from 3D
JPETSC3DA xsolver.df cases using the PETSc package
206
Figure 5.1: The overall structure of GPAS with the capability of modeling asphaltene
precipitation
207
INFLUID0 Calculation of dependent variables and possible
Using initial Sj and P, calculate j and x asphaltene precipitation at t = 0
This x is considered as the first timestep solution
PROPIN
xn = xn-1
(just once before starting Newton iteration )
TRANSPORT (material)
RESIDUALS (volume, fugacities,
r r newflash eq, equilibrium eq. )
Calculation of new residuals for asphaltene
Calculation of R(x )
JACOBIAN
Set xnew to xold New Jacobian for modeling asphaltene
old
Calculate the new J (x )
SOLVERS
old old New solver for modeling asphaltene
Calculate x from J ( x ) x = R( x )
XDELTA
new old Calculate possible precipitation of
x r = x + x asphaltene using the new solution
new
Using x , calculate j, xij, Sj
208
Chapter 6: Compositional Simulation of Asphaltene Precipitation in
GPAS
6.1 INTRODUCTION
In this chapter, we present several case studies that were performed in order to
test and validate the newly developed code to model the phase behavior, dynamic aspects
asphaltene precipitation model including the phase behavior of the solid precipitate and;
second, to illustrate the effect of asphaltene precipitation on the rock properties and the
damage caused due to the adsorption of asphaltenes in porous media. In the next step, a
from the Computer Modelling Group Ltd. (CMG Ltd.), was used as the benchmark for
validation and comparison studies. Several test cases were set up and run on both CMG
GEM and GPAS to accomplish this goal. CMG GEM has been tested and compared
against experimental results, hence, it was chosen as the basis of comparison for
described in detail in the upcoming sections. For each simulation case, the obtained
simulation results are presented and analyzed. Several sensitivity studies on the
parameters of the asphaltene precipitation model are addressed in this chapter as well.
The sensitivity analyses were performed to illustrate the effect of asphaltene precipitation
209
parameters and to investigate the importance of different factors in various simulation
runs. More specifically, the goal was to study the sensitivity of the results to the
maximum permeability resistance factor, the maximum mass fraction of adsorbed solid
and the molar volume of the solid phase. Sections 6.1 through 6.3 present the results of
three one-dimensional simulation cases, which are GF1, GF3 and GVM5, respectively.
Sections 6.4 and 6.5, which discuss the results of cases GVM10 and GVR8, deal with
asphaltic reservoir fluid into a core. This case was set up and run in order to investigate
the possible precipitation of asphaltenes, and more importantly to test and validate the
asphaltene precipitation and the damage caused due to this phenomenon are also
the model is presented. Last but not least, in order to perform the validation study, case
GF1 was also set up and run on CME GEM and the simulation results of GPAS were
compared against the results of the CMG GEM simulator.
The input data for modeling the porous medium is given in Table 6.1. This case,
GF1, was simulated in a Fontainebleau sandstone. This type of rock represents a
homogeneous porous medium, which has a regular grain size and does not have any clay.
This homogeneous porous medium has an initial permeability of 107 md in all directions
and a porosity of 0.131. The initial pressure for this simulation case is 145.038 psi. Two
210
different grid systems were used in case GF1. Tables 6.2 and 6.3 show the grid data for
30-gridblock and 60-gridblock scenarios, respectively. The first scenario which was used
in most of the runs, uses a uniform of 30 1 1 grid arrangement to discretize the
porous medium, while the second scenario uses a finer grid system of 60 1 1 . The
length of each gridblock in x direction is uniform. The properties of water which were
required for setting up this case in GPAS, can be found in Table 6.4. A summary of the
characteristics of the asphaltic reservoir fluid considered is presented in Table 6.5. Based
on these data, which include the asphaltene content for the reservoir fluid considered, and
using CMG WinProp, the equation-of-state model for the asphaltic reservoir fluid and
parameters for the asphaltene precipitation model were developed. WinProp is CMG's
package for modeling the phase behavior and properties of reservoir fluids. The
composition of the modeled fluid is given in Table 6.6, the PVT properties including the
molecular weights are given in Table 6.7, and the Binary Interaction Coefficients
between different components are given in Table 6.8. Numerous calculations were
performed in order to convert the units of the properties obtained from CMG WinProp for
GPAS. The water-oil relative permeability data is given in Table 6.9. This table provides
the water relative permeability and oil relative permeability to water as a function of
water saturation. The liquid-gas relative permeability data is given in Table 6.10. This
table provides the gas relative permeability and oil relative permeability to gas as a
function of gas saturation. Two wells with different constraints were specified in case
GF1. Tables 6.11 and 6.12 describe the data for well specifications used in GPAS for the
30-gridblock and 60-gridblock scenarios, respectively. For both scenarios, the injection
well, which operates under a constant rate, is located at a gridblock with an index of
(1,1,1). The production well, which operates under a constant bottom-hole pressure, is
located in a gridblock with an index of (30,1,1) for the first scenario and at a gridblock
211
with an index of (60,1,1) for the second scenario. The composition of the asphaltic
reservoir fluid being injected is given in Table 6.13. The input parameters for the
asphaltene precipitation model including ln f n*cs , P* and vs which were measured for the
reservoir fluid using CMG WinProp, are presented in Table 6.14. The values used for the
sensitivity studies on the maximum permeability resistance factor and the maximum mass
fraction of adsorbed solid are also given. P* is the onset pressure for precipitation of
asphaltenes for a specific reservoir fluid, ln f n*cs is the reference fugacity at P* and
finally, vs represents the molar volume of the solid phase. A summary of all the
simulation runs of case GF1 that were performed for the comparative and sensitivity
studies is shown in Table 6.15. A total of 700 pore volumes were injected continuously
with a constant injection rate. A constant time-step size was used for the simulation runs
of case GF1.
A schematic representation of the discretized porous media used in case GF1 is
presented in Figure 6.1. The location of the injection and production wells used in case
GF1 is shown in Figure 6.2. The water-oil relative permeability curves are plotted in
Figure 6.3 and the liquid-gas relative permeability curves are plotted in Figure 6.4.
Using Stones first and second models in CMG Builder, the three-phase oil relative
permeabilities for rock type 1 were plotted in Figures 6.5 and 6.6, respectively. A
schematic representation of the fluid-flow pattern in three-dimensional viewpoint is
shown in Figure 6.7 and the one-dimensional fluid-flow vectors are presented in Figure
6.8. The static asphaltene precipitation curve in Figure 6.9, which was obtained from
specific temperature for the fluid considered. The comparison of average pressure as a
function of pore volumes injected, without and with considering the effect of asphaltene
precipitation, is shown in Figure 6.10. The average pressure with asphaltene precipitation
212
is higher than that without asphaltene precipitation. In other words, the average pressure
drops faster when there is no asphaltene precipitation. More over, the precipitation of
asphaltenes causes a reduction of permeability and plugs the pore space, which was
initially available for the movement of the fluid. As shown in Figure 6.11, the pressure
profile at 685 pore volumes of asphaltic reservoir fluid injected was compared against the
case without asphaltene precipitation. For the case with asphaltene precipitation, a very
high pressure around the injection cell can be seen, which is related to the plugging
effect. Further more, this implies that the precipitation of asphaltenes prevents the
pressure from dropping too fast along the porous medium. Figure 6.12 shows the
comparison of oil rate without and with considering the effect of asphaltene precipitation.
precipitation from that without asphaltene precipitation. As expected, the oil rate
considering the asphaltene precipitation is lower than that without any asphaltene
precipitation. The presence of a solid precipitate tends to decrease the mobility of the
fluid and thus causes a lower rate. A comparison of bottom-hole pressure for the injection
cell, both without and with a consideration of the effect of asphaltene precipitation is
shown in Figure 6.13. Asphaltene precipitation results into a higher bottom-hole pressure
for the injector or the injection cell.
The first parameter that was chosen for the sensitivity study was the maximum
permeability resistance factor. Figures 6.14 through 6.17 show the sensitivity of the
pressure profile at 685 PV injected to variation of the maximum permeability resistance
factor. This comparison shows that a higher permeability resistance factor, which implies
more plugging of the pores due to precipitation of asphaltenes and also more difficult
movement for the fluid, results in much less pressure drop along the considered medium.
213
Figure 6.18 shows the sensitivity of average pressure to the maximum permeability
resistance factor and compares the results to the case without asphaltene precipitation.
Increasing the permeability resistance factor will increase the average pressure,
proportionally. Figure 6.19 shows the sensitivity of the oil rate to the maximum
permeability resistance factor. Increasing the maximum permeability resistance factor
will decrease the oil rate. Figures 6.20 through 6.23 present the sensitivity of the pressure
profile at 685 PV injected to variation of the maximum mass fraction of adsorbed solid.
This comparison shows that the lowest mass fraction of adsorbed solid results into higher
values for pressure distribution along the considered medium. Figure 6.24 shows the
sensitivity of average pressure to the maximum mass fraction of adsorbed solid.
Increasing the maximum mass fraction of adsorbed solid will decrease the average
pressure.
effect of grid refinement on asphaltene precipitation. Figure 6.25 compares the average
pressure as a function of pore volumes injected with the effect of asphaltene precipitation
between the 30-gridblock and 60-gridblock scenarios, respectively. A finer grid has the
same average pressure. Figure 6.26 compares the oil rate as a function of pore volumes
injected with the effect of asphaltene precipitation between the 30-gridblock and 60-
gridblock scenarios, respectively. A finer grid has the same oil rate. Figure 6.27
compares the pressure profile at 685 pore volumes injected with the effect of asphaltene
214
oil rate as a function of pore volumes injected with consideration of the effect of
the possible precipitation of asphaltenes, and more importantly to test and validate the
implementation of the asphaltene precipitation model into GPAS. The effect of
asphaltene precipitation and the damage caused due to this phenomenon are illustrated in
this section as well. Sensitivity analysis on the important parameters of the model is also
presented. Last but not least, in order to perform the validation study, case GF3 was also
set up and run on CME GEM and the simulation results of GPAS were compared against
The input data for modeling the porous medium is given in Table 6.16. This case,
GF3, was simulated in a Fontainebleau sandstone. This type of rock represents a
homogeneous porous medium, has a regular grain size and does not have any clay. This
homogeneous porous medium has an initial permeability of 77.4 md in all directions and
a porosity of 0.137. The initial pressure for this simulation case is 145.038 psi. Two
different grid systems were used in case GF3. Tables 6.17 and 6.18 show the grid data
for 30-gridblock and 60-gridblock scenarios, respectively. The first scenario, which was
used in most of the runs, uses a uniform grid arrangement of 30 1 1 to discretize the
porous medium and the second scenario uses a finer grid system of 60 1 1 . The
length of each gridblock in x direction is uniform. The properties of water which were
required for setting up this case in GPAS, can be found in Table 6.19. A summary of the
characteristics of the considered asphaltic reservoir fluid is presented in Table 6.20.
215
Based on these data which include the asphaltene content for the reservoir fluid
considered, and using CMG WinProp, the equation-of-state model for the asphaltic
reservoir fluid and parameters for the asphaltene precipitation model were developed.
WinProp is CMG's package for modeling the phase behavior and properties of reservoir
fluids. The composition of the modeled fluid is given in Table 6.21, the PVT properties
including the molecular weights are given in Table 6.22 and the Binary Interaction
Coefficients between different components are given in Table 6.23. Numerous
calculations were performed in order to convert the units of the properties obtained from
CMG WinProp for GPAS. The water-oil relative permeability data is given in Table
6.24. This table provides the water relative permeability and oil relative permeability to
water as a function of water saturation. The liquid-gas relative permeability data is given
in Table 6.25. This table provides the gas relative permeability and oil relative
permeability to gas as a function of gas saturation. Two wells with different constraints
were specified in case GF3. Tables 6.26 and 6.27 describe the data for well specifications
used in GPAS for the 30-gridblock and 60-gridblock scenarios, respectively. For both
scenarios, the injection well which operates under a constant rate, is located at a
gridblock with an index of (1,1,1). The production well, which operates under a constant
bottom-hole pressure, is located at a gridblock with an index of (30,1,1) for the first
scenario and at a gridblock with an index of (60,1,1) for the second scenario. The
composition of the asphaltic reservoir fluid being injected is given in Table 6.28. The
input parameters for the asphaltene precipitation model including ln f n*cs , P* and vs
which were measured for the reservoir fluid using CMG WinProp, are presented in Table
6.29. The values used for the sensitivity studies on the maximum permeability resistance
factor and the maximum mass fraction of adsorbed solid are also given. P* is the onset
pressure for precipitation of asphaltenes for a specific reservoir fluid, ln f n*cs is the
216
reference fugacity at P* and finally, vs represents the molar volume of the solid phase. A
summary of all the simulation runs of case GF3 that were performed for the comparative
and sensitivity studies is shown in Table 6.30. A total of 80 pore volumes were injected
continuously with a constant injection rate. A constant time-step size was used for the
Using Stones first and second models in CMG Builder, the three-phase oil relative
permeabilities for rock type 1 were plotted in Figures 6.34 and 6.35, respectively. A
schematic representation of the fluid flow pattern in three-dimensional viewpoint is
shown in Figure 6.36 and the one-dimensional fluid-flow vectors are presented in Figure
6.37. The static asphaltene precipitation curve in Figure 6.38, which was obtained from
specific temperature for the fluid under consideration. The comparison of average
pressure as a function of pore volumes injected, both without and with considering the
effect of asphaltene precipitation, is shown in Figure 6.39. The average pressure with
asphaltene precipitation is higher than that without asphaltene precipitation. In other
words, the average pressure drops faster when there is no asphaltene precipitation. More
over, the precipitation of asphaltenes causes a reduction of permeability and plugs the
pore space, which was initially available for the movement of the fluid. As shown in
Figure 6.40, the pressure profile at 80 pore volumes of asphaltic reservoir fluid injected
was compared against the case without asphaltene precipitation. For the case with
asphaltene precipitation, a very high pressure around the injection cell can be seen which
217
is related to the plugging effect. Further more, this implies that the precipitation of
asphaltenes prevents the pressure from dropping too fast along the porous medium.
Figure 6.41 shows the comparison of the oil rate both without and with considering the
constant bottom-hole pressure constraint; this will help us distinguish the rate considering
the effect of asphaltene precipitation from that without asphaltene precipitation. As
expected, the oil rate considering the asphaltene precipitation is lower than that without
any asphaltene precipitation. The presence of solid precipitate tends to decrease the
mobility of the fluid and thus causes a lower rate. A comparison of bottom-hole pressure
for the injection cell, both without and with considering the effect of asphaltene
The first parameter chosen for the sensitivity study was the maximum
permeability resistance factor. Figures 6.43 through 6.46 show the sensitivity of the
pressure profile at 80 PV injected to variation of the maximum permeability resistance
factor. This comparison shows that a higher permeability resistance factor, which implies
more plugging of the pores due to precipitation of asphaltenes and also more difficult
movement for the fluid, results into much less pressure drop along the considered
medium. Figure 6.49 shows the sensitivity of average pressure to the maximum
permeability resistance factor and compares the results to the case with no asphaltene
precipitation. Increasing the permeability resistance factor will increase the average
pressure, proportionally. Figure 6.50 describes the sensitivity of the oil rate to maximum
permeability resistance factor. Increasing the maximum permeability resistance factor
will decrease the oil rate. Figure 6.51 shows the sensitivity of average pressure to the
218
maximum mass fraction of adsorbed solid. Increasing the maximum mass fraction of
between the 30-gridblock and 60-gridblock scenarios, respectively. A finer grid has the
same average pressure. Figure 6.53 compares the oil rate as a function of pore volumes
injected with the effect of asphaltene precipitation between the 30-gridblock and 60-
gridblock scenarios, respectively. A finer grid has the same oil rate. Figure 6.54
compares the pressure profile at 80 pore volumes injected with the effect of asphaltene
shown in Figure 6.55, the average pressure result of GPAS considering the effect of
asphaltene precipitation compared well with that of CMG GEM. Finally, Figure 6.56
shows that a good agreement was obtained between GPAS and CMG GEM in terms of
oil rate as a function of pore volumes injected, considering the effect of asphaltene
the possible precipitation of asphaltenes and more importantly to test and validate the
219
model is presented. Last but not least, in order to perform the validation study, case
GVM5 was also set up and run on CME GEM and the simulation results of GPAS were
compared against the results of the CMG GEM simulator.
The input data for modeling the porous medium is given in Table 6.31. This case,
GVM5, was simulated in a Vosges sandstone. This porous medium has an initial
direction is uniform. The properties of water which were required for setting up this case
in GPAS can be found in Table 6.34. A summary of the characteristics of the asphaltic
reservoir fluid considered is presented in Table 6.35. Based on these data, which include
the asphaltene content for the reservoir fluid considered, and using CMG WinProp, the
equation-of-state model for the asphaltic reservoir fluid and parameters for the asphaltene
precipitation model were developed. WinProp is CMG's package for modeling the phase
behavior and properties of reservoir fluids. The composition of the modeled fluid is given
in Table 6.36, the PVT properties including the molecular weights are given in Table
6.37 and the binary interaction coefficients between different components are given in
Table 6.38. Numerous calculations were performed in order to convert the units of the
properties obtained from CMG WinProp to GPAS. The water-oil relative permeability
data is given in Table 6.39. This table provides the water relative permeability and oil
relative permeability to water as a function of water saturation. The liquid-gas relative
permeability data is given in Table 6.40. This table provides the gas relative permeability
220
and oil relative permeability to gas as a function of gas saturation. Two wells with
different constraints were specified in case GVM5. Tables 6.41 and 6.42 give the data for
well specifications used in GPAS for the 30-gridblock and 60-gridblock scenarios,
respectively. For both scenarios, the injection well which operates under a constant rate,
is located at a gridblock with an index of (1,1,1). The production well, which operates
under a constant bottom-hole pressure, is located at a gridblock with an index of (30,1,1)
for the first scenario and at a gridblock with an index of (60,1,1) for the second scenario.
The composition of the asphaltic reservoir fluid being injected is given in Table 6.43.
The input parameters for the asphaltene precipitation model, including ln f n*cs , P* and vs
which were measured for the reservoir fluid using CMG WinProp, are presented in Table
6.44. The values used for the sensitivity studies on the maximum permeability resistance
factor and the maximum mass fraction of adsorbed solid are also given. P* is the onset
pressure for precipitation of asphaltenes for a specific reservoir fluid, ln f n*cs is the
reference fugacity at P* and finally, vs represents the molar volume of the solid phase. A
summary of all the simulation runs of case GVM5 that were performed for the
comparative and sensitivity studies is shown in Table 6.45. A total of 75 pore volumes
were injected continuously with a constant injection rate. A constant time-step size was
presented in Figure 6.57. The location of the injection and production wells used in case
GVM5 is shown in Figure 6.58. The water-oil relative permeability curves are plotted in
Figure 6.59 and the liquid-gas relative permeability curves are plotted in Figure 6.60.
Using Stones first and second models in CMG Builder, the three-phase oil relative
permeabilities for rock type 1 were plotted in Figures 6.61 and 6.62, respectively. A
schematic representation of the fluid flow pattern in three-dimensional viewpoint is
221
shown in Figure 6.63 and the one-dimensional fluid flow vectors are presented in Figure
6.64. The static asphaltene precipitation curve in Figure 6.65, which was obtained from
specific temperature for the fluid considered. The comparison of average pressure as a
function of pore volumes injected, both without and with considering the effect of
asphaltene precipitation, is shown in Figure 6.66. The average pressure with asphaltene
precipitation is higher than that without asphaltene precipitation. In other words, the
average pressure drops faster when there is no asphaltene precipitation. More over, the
precipitation of asphaltenes causes a reduction of permeability and plugs the pore space
which was initially available for the movement of the fluid. As shown in Figure 6.67, the
pressure profile at 67 pore volumes of asphaltic reservoir fluid injected was compared
against the case without asphaltene precipitation. For the case with asphaltene
precipitation, a very high pressure around the injection cell can be seen, which is related
to the plugging effect. Further more, this implies that the precipitation of asphaltenes
prevents the pressure from dropping quickly along the porous medium. Figure 6.68
shows the comparison of oil rate both without and with considering the effect of
injection cell, both without and with considering the effect of asphaltene precipitation is
222
The first parameter that was chosen for the sensitivity study was the maximum
permeability resistance factor. Figures 6.70 through 6.75 show the sensitivity of the
pressure profile at 67 PV injected to variation of the maximum permeability resistance
factor. This comparison shows that a higher permeability resistance factor, which implies
more plugging of the pores due to precipitation of asphaltenes and also more difficult
movement for the fluid, results into much less pressure drop along the considered
medium. Figure 6.76 shows the sensitivity of average pressure to the maximum
permeability resistance factor and compares the results with the case with no asphaltene
precipitation. Increasing the permeability resistance factor will increase the average
pressure, proportionally. Figure 6.77 describes the sensitivity of the oil rate to the
maximum permeability resistance factor. Increasing the maximum permeability
resistance factor will decrease the oil rate. Figures 6.78 through 6.81 present the
sensitivity of the pressure profile at 67 PV injected to varying the maximum mass
fraction of adsorbed solid. This comparison shows that the lowest mass fraction of
adsorbed solid, results into higher values for pressure distribution along the considered
medium. Figure 6.82 shows the sensitivity of average pressure to the maximum mass
fraction of adsorbed solid. Increasing the maximum mass fraction of adsorbed solid will
effect of grid refinement on asphaltene precipitation. Figure 6.83 compares the average
pressure as a function of pore volumes injected with the effect of asphaltene precipitation
between the 30-gridblock and 60-gridblock scenarios, respectively. A finer grid has the
same average pressure. Figure 6.84 compares the oil rate as a function of pore volumes
injected with the effect of asphaltene precipitation between the 30-gridblock and 60-
gridblock scenarios, respectively. A finer grid has the same oil rate. Figure 6.85
223
compares the pressure profile at 67 pore volumes injected with the effect of asphaltene
of oil rate as a function of pore volumes injected with considering the effect of asphaltene
precipitation in case GVM5.
asphaltic reservoir fluid into a porous medium. This case was set up and run in order to
investigate the possible precipitation of asphaltenes, and more importantly to test and
validate the implementation of the asphaltene precipitation model into GPAS. The effect
of asphaltene precipitation and the damage caused due to this phenomenon are illustrated
GVM10 was also set up and run on CME GEM and the simulation results of GPAS were
The input data for modeling the porous medium is given in Table 6.46. This case,
GVM10, was simulated in a Vosges sandstone. This porous medium has an initial
initial pressure for this simulation case is 145.038 psi. Table 6.47 shows the grid data
used for modeling the porous medium. Case GVM10 uses a uniform grid arrangement of
30 10 1 to discretize the porous medium. The length of each gridblock in x
224
direction and y direction is uniform. The properties of water which were required for
setting up this case in GPAS can be found in Table 6.48. A summary of the
characteristics of the asphaltic reservoir being considered fluid is presented in Table
6.49. Based on these data which include the asphaltene content for the reservoir fluid
considered and using CMG WinProp, the equation-of-state model for the asphaltic
reservoir fluid and parameters for the asphaltene precipitation model were developed.
WinProp is CMG's package for modeling the phase behavior and properties of reservoir
fluids. The composition of the modeled fluid is given in Table 6.50, the PVT properties
including the molecular weights are given in Table 6.51 and the binary interaction
coefficients between different components are given in Table 6.52. Numerous
calculations were performed in order to convert the units of the properties obtained from
CMG WinProp to GPAS. The water-oil relative permeability data is given in Table 6.53.
This table provides the water relative permeability and oil relative permeability to water
as a function of water saturation. The liquid-gas relative permeability data are given in
Table 6.54. This table provides the gas relative permeability and oil relative permeability
to gas as a function of gas saturation. Two wells with different constraints were specified
in case GVM10. Table 6.55 describes the data for well specifications used in GPAS. The
injection well, which operates under a constant rate, is located at a corner gridblock with
an index of (1,1,1). The production well which operates under a constant bottom-hole
pressure, is located at an opposite corner gridblock with an index of (30,10,1). The
composition of the asphaltic reservoir fluid being injected is given in Table 6.56. The
input parameters for the asphaltene precipitation model including ln f n*cs , P* and vs
which were measured for the reservoir fluid using CMG WinProp, are presented in Table
6.57. The values used for the sensitivity studies on the maximum permeability resistance
factor and the maximum mass fraction of adsorbed solid are also given. P* is the onset
225
pressure for precipitation of asphaltenes for a specific reservoir fluid, ln f n*cs is the
reference fugacity at P* and finally, vs represents the molar volume of the solid phase. A
summary of all the simulation runs of case GVM10 that were performed for the
comparative and sensitivity studies is shown in Table 6.58. A total of 75 pore volumes
were injected continuously with a constant injection rate. A constant time-step size was
relative permeabilities for rock type 1 were plotted in Figures 6.92 and 6.93,
respectively. A schematic representation of the fluid flow pattern in three-dimensional
viewpoint is shown in Figure 6.94 and the one-dimensional fluid flow vectors are
presented in Figure 6.95. The static asphaltene precipitation curve in Figure 6.96, which
was obtained from CMG WinProp, shows the amount of solid precipitate as a function of
pressure at a specific temperature for the fluid considered. The comparison of average
pressure as a function of pore volumes injected, both without and with considering the
effect of asphaltene precipitation, is shown in Figure 6.97. The average pressure with
asphaltene precipitation is higher than that without asphaltene precipitation. In other
words, the average pressure drops faster when there is no asphaltene precipitation. More
over, the precipitation of asphaltenes causes a reduction of permeability and plugs the
pore space which was initially available for the movement of the fluid. As shown in
Figure 6.98, the pressure profile at 68 pore volumes of asphaltic reservoir fluid injected
was compared against the case without asphaltene precipitation. For the case with
226
asphaltene precipitation, a very high pressure around the injection cell can be seen which
is related to the plugging effect. Further more, this implies that the precipitation of
asphaltenes prevents the pressure from dropping quickly along the porous medium.
Figure 6.99 shows the comparison of oil rate both without and with considering the
constant bottom-hole pressure constraint; this will help us distinguish the rate considering
the effect of asphaltene precipitation from that without asphaltene precipitation. As
expected, the oil rate with considering the asphaltene precipitation is lower than that
without any asphaltene precipitation. The presence of solid precipitate tends to decrease
the mobility of the fluid and thus causes a lower rate. A comparison of bottom-hole
pressure for the injection cell, both without and with considering the effect of asphaltene
The first parameter that was chosen for the sensitivity study was the maximum
permeability resistance factor. Figures 6.101 through 6.104 show the sensitivity of the
pressure profile at 68 PV injected to variation of the maximum permeability resistance
factor. This comparison shows that a higher permeability resistance factor, which implies
more plugging of the pores due to precipitation of asphaltenes and also more difficult
movement for the fluid, results in much less pressure drop throughout the considered
medium. Figure 6.105 shows the sensitivity of average pressure to the maximum
permeability resistance factor and compares the results to the case with no asphaltene
precipitation. Increasing the permeability resistance factor will increase the average
pressure, proportionally. Figure 6.106 describes the sensitivity of the oil rate to the
maximum permeability resistance factor. Increasing the maximum permeability
resistance factor will decrease the oil rate. Figure 6.107 through 6.110 present the
227
sensitivity of the pressure profile at 68 PV injected to variation of the maximum mass
fraction of adsorbed solid. This comparison shows that the lowest mass fraction of
adsorbed solid results in higher values for pressure distribution throughout the considered
medium. Figure 6.111 shows the sensitivity of average pressure to the maximum mass
fraction of adsorbed solid. Increasing the maximum mass fraction of adsorbed solid will
decrease the average pressure. Figure 6.112 describes the sensitivity of injector bottom-
hole pressure to the maximum permeability resistance factor. A lower maximum mass
fraction of adsorbed solid will have a higher bottom-hole pressure for the injection cell.
Figures 6.113 through 6.115 present the sensitivity of the pressure profile at 68 PV
injected to varying the molar volume of the solid phase. This comparison shows that a
higher solid molar volume results in higher values for pressure distribution throughout
the considered medium. Figure 6.116 shows the sensitivity of average pressure to the
molar volume of the solid phase. Increasing the solid molar volume will increase the
average pressure, proportionally. Figure 6.117 describes the sensitivity of the oil rate to
the molar volume of the solid phase. Increasing the solid molar volume will decrease the
oil rate. Figure 6.118 shows the sensitivity of injector bottom-hole pressure to the molar
volume of the solid phase. A higher solid molar volume will have a higher bottom-hole
pressure for the injection cell. As shown in Figure 6.119, the average pressure result of
GPAS with considering the effect of asphaltene precipitation compared well with that of
CMG GEM. Figure 6.120 shows that a good agreement was obtained between GPAS
and CMG GEM in terms of oil rate as a function of pore volumes injected considering the
228
6.6 TWO-DIMENSIONAL MODELING OF ASPHALTENE PRECIPITATION: CASE
GVR8
investigate the possible precipitation of asphaltenes, and more importantly to test and
validate the implementation of the asphaltene precipitation model into GPAS. The effect
of asphaltene precipitation and the damage caused due to this phenomenon are also
GVR8 was also set up and run on CME GEM and the simulation results of GPAS were
The input data for modeling the porous medium are given in Table 6.59. This
case, GVR8, was simulated in a Vosges sandstone. This porous medium has an initial
homogeneous permeability of 15.2 md in all directions and a porosity of 0.226. The
initial pressure for this simulation case is 145.038 psi. Table 6.60 shows the grid data
used for modeling the porous medium. Case GVR8 uses a uniform grid arrangement of
30 10 1 to discretize the porous medium. The length of each gridblock in x
direction and y direction is uniform. The properties of water which were required for
setting up this case in GPAS can be found in Table 6.61. A summary of the
characteristics of the considered asphaltic reservoir fluid is presented in Table 6.62.
Based on these data which include the asphaltene content for the reservoir fluid
considered and using CMG WinProp, the equation-of-state model for the asphaltic
reservoir fluid and parameters for the asphaltene precipitation model were developed.
WinProp is CMG's package for modeling the phase behavior and properties of reservoir
fluids. The composition of the modeled fluid is given in Table 6.63, the PVT properties
229
including the molecular weights are given in Table 6.64 and the Binary Interaction
Coefficients between different components are given in Table 6.65. Numerous
calculations were performed in order to convert the units of the properties obtained from
CMG WinProp to GPAS. The water-oil relative permeability data is given in Table 6.66.
This table provides the water relative permeability and oil relative permeability to water
to gas as a function of gas saturation. Two wells with different constraints were specified
in case GVR8. Table 6.68 describes the data for well specifications used in GPAS. The
injection well, which operates under a constant rate, is located at a corner gridblock with
an index of (1,1,1). The production well, which operates under a constant bottom-hole
pressure, is located at an opposite corner gridblock with an index of (30,10,1). The
composition of the asphaltic reservoir fluid being injected is given in Table 6.69. The
input parameters for the asphaltene precipitation model including ln f n*cs , P* and vs
which were measured for the reservoir fluid using CMG WinProp, are presented in Table
6.70. The values used for the sensitivity studies on the maximum permeability resistance
factor and the maximum mass fraction of adsorbed solid are also given. P* is the onset
pressure for precipitation of asphaltenes for a specific reservoir fluid, ln f n*cs is the
reference fugacity at P* and finally, vs represents the molar volume of the solid phase. A
summary of all the simulation runs of case GVR8 that were performed for the
comparative and sensitivity studies is shown in Table 6.71. A total of 85 pore volumes
were injected continuously with a constant injection rate. A constant time-step size was
presented in Figure 6.122. The location of the injection and production wells used in case
230
GVR8 is shown in Figure 6.123. The water-oil relative permeability curves are plotted in
Figure 6.124 and the liquid-gas relative permeability curves are plotted in Figure 6.125.
Using Stones first and second models in CMG Builder, the three-phase oil relative
permeabilities for rock type 1 were plotted in Figure 6.126 and Figure 6.127
respectively. A schematic representation of the fluid flow pattern in three-dimensional
viewpoint is shown in Figure 6.128 and the one-dimensional fluid flow vectors are
presented in Figure 6.129. The static asphaltene precipitation curve in Figure 6.130,
which was obtained from CMG WinProp, shows the amount of solid precipitate as a
function of pressure at a specific temperature for the fluid being considered. The
comparison of average pressure as a function of pore volumes injected, both without and
with considering the effect of asphaltene precipitation, is shown in Figure 6.131. The
average pressure with asphaltene precipitation is higher than that without asphaltene
precipitation. In other words, the average pressure drops faster when there is no
asphaltene precipitation. More over, the precipitation of asphaltenes causes a reduction of
permeability and plugs the pore space which was initially available for the movement of
the fluid. As shown in Figure 6.132, the pressure profile at 73 pore volumes of asphaltic
reservoir fluid injected was compared against the case without asphaltene precipitation.
For the case with asphaltene precipitation, a very high pressure around the injection cell
can be seen which is related to the plugging effect. Further more, this implies that the
precipitation of asphaltenes prevents the pressure from dropping quickly along the porous
medium. Figure 6.133 shows the comparison of oil rate both without and with
considering the effect of asphaltene precipitation. As mentioned earlier, the producer
operates under a constant bottom-hole pressure constraint; this will help us distinguish
the rate considering the effect of asphaltene precipitation from that without asphaltene
precipitation. As expected, the oil rate with considering the asphaltene precipitation is
231
lower than that without any asphaltene precipitation. The presence of solid precipitate
tends to decrease the mobility of the fluid and thus causes a lower rate. A comparison of
bottom-hole pressure for the injection cell, both without and with considering the effect
of asphaltene precipitation is shown in Figure 6.134. Asphaltene precipitation results into
a higher bottom-hole pressure for the injector or the injection cell.
The first parameter that was chosen for the sensitivity study was the maximum
permeability resistance factor. Figures 6.135 through 6.139 show the sensitivity of the
pressure profile at 73 PV injected to variation of the maximum permeability resistance
factor. This comparison shows that a higher permeability resistance factor, which implies
more plugging of the pores due to precipitation of asphaltenes and also more difficult
movement for the fluid, results into much less pressure drop throughout the considered
medium. Figure 6.139 shows the sensitivity of average pressure to the maximum
permeability resistance factor and compares the results to the case with no asphaltene
precipitation. Increasing the permeability resistance factor will increase the average
pressure, proportionally. Figure 6.140 describes the sensitivity of the oil rate to the
maximum permeability resistance factor. Increasing the maximum permeability
resistance factor will decrease the oil rate. Figures 6.141 through 6.144 present the
sensitivity of the pressure profile at 73 PV injected to variation of the maximum mass
fraction of adsorbed solid. This comparison shows that the lowest mass fraction of
adsorbed solid results in higher values for pressure distribution throughout the considered
medium. Figure 6.145 shows the sensitivity of average pressure to the maximum mass
fraction of adsorbed solid. Increasing the maximum mass fraction of adsorbed solid will
decrease the average pressure. Figure 6.146 describes the sensitivity of injector bottom-
hole pressure to the maximum permeability resistance factor. A lower maximum mass
fraction of adsorbed solid will have a higher bottom-hole pressure for the injection cell.
232
Figures 6.147 through 6.149 present the sensitivity of the pressure profile at 73 PV
injected to variation of the molar volume of the solid phase. This comparison shows that
a higher solid molar volume results into higher values for pressure distribution
throughout the considered medium. Figure 6.150 shows the sensitivity of average
pressure to molar volume of the solid phase. Increasing the solid molar volume will
increase the average pressure, proportionally. Figure 6.151 describes the sensitivity of
the oil rate to the molar volume of the solid phase. Increasing the solid molar volume will
decrease the oil rate. Figure 6.152 shows the sensitivity of injector bottom-hole pressure
to the molar volume of the solid phase. A higher solid molar volume will have a higher
bottom-hole pressure for the injection cell. As shown in Figure 6.153, the average
pressure result of GPAS with considering the effect of asphaltene precipitation compared
well with that of CMG GEM. Figure 6.154 shows that a good agreement was obtained
between GPAS and CMG GEM in terms of oil rate as a function of pore volumes injected
the most important parameters of the model is presented. This simulation case deals with
waterflooding in a quarter of a five spot. The input data for modeling the reservoir is
given in Table 6.72. This homogeneous reservoir has an initial permeability of 15.2 md
in all directions and a porosity of 0.226. The initial reservoir pressure is 5200 psi. Table
233
6.73 shows the grid data used for modeling the porous medium. The waterflood case uses
a uniform grid arrangement of 7 7 3 to discretize the porous medium. The length of
each gridblock in x and y directions is a uniform 80 ft. The 100-ft reservoir was modeled
using 3 vertical layers of 20, 30, and 50 feet thickness, respectively. A summary of the
considered and using CMG WinProp, the equation-of-state model for the asphaltic
reservoir fluid and parameters for the asphaltene precipitation model were developed.
WinProp is CMG's package for modeling the phase behavior and properties of reservoir
fluids. The composition of the modeled reservoir fluid is given in Table 6.75; the PVT
properties including the molecular weights are given in Table 6.76; and the Binary
Interaction Coefficients between different components are given in Table 6.77.
Numerous calculations were performed in order to convert the units of the properties
obtained from CMG WinProp to GPAS. The data given in Table 6.78 provides the water
relative permeability and oil relative permeability to water as a function of water
saturation. The data in Table 6.79 provides the gas relative permeability and oil relative
permeability to gas as a function of gas saturation. Two production and injection wells
with different constraints were specified. Table 6.80 describes the data for well
specifications used. The injection well, which operates under a constant rate, is located at
a corner gridblock with an index of (1,1,1). The production well, which operates under a
constant bottom-hole pressure, is located at the opposite corner of the reservoir. The
properties of water which were required for setting up the waterflood are listed in Table
6.81. The input parameters for the asphaltene precipitation model, including ln f n*cs , P* ,
and vs , which were measured for the reservoir fluid using CMG WinProp, are presented
in Table 6.82. P* is the onset pressure for precipitation of asphaltenes for a specific
234
reservoir fluid; ln f n*cs is the reference fugacity at P* ; and vs represents the molar volume
of the solid phase. A constant time-step size was used for the waterflood simulation. A
factor is shown in Figure 6.157. Increasing the permeability resistance factor will
increase the average reservoir pressure proportionally. Figure 6.158 describes the
sensitivity of the oil production rate to the maximum permeability resistance factor.
Increasing the maximum permeability resistance factor will decrease the oil rate. With
presenting the results of different cases in Sections 6.1 through 6.7, the verification of the
completed.
235
Table 6.1: Data for modeling the porous medium (Case GF1)
Table 6.2: Grid data for the 30-gridblock scenario (Case GF1)
236
Table 6.3: Grid data for the 60-gridblock scenario (Case GF1)
237
Table 6.5: Characteristics of fluid considered (Case GF1)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
Total - 1.0000000
238
Table 6.7: PVT properties for the modeled fluid (Case GF1)
239
Table 6.8: Binary Interaction Coefficients between different components (Case GF1)
Sw krw krow
0.2 0 1
0.2899 0.0022 0.6769
0.3778 0.0180 0.4153
0.4667 0.0607 0.2178
0.5556 0.1438 0.0835
0.6444 0.2809 0.0123
0.7 0.4089 0
0.7333 0.4855 0
0.8222 0.7709 0
0.9111 1 0
1 1 0
Sg krg krog
0 0 1
0.05 0 0.88
0.0889 0.001 0.7023
0.1778 0.010 0.4705
0.2667 0.030 0.2963
0.3556 0.050 0.1715
0.4444 0.100 0.0878
0.5333 0.200 0.0370
0.6222 0.350 0.0110
0.65 0.390 0
0.7111 0.560 0
0.8 1 0
240
Table 6.11: Well specifications for the 30-gridblock scenario (Case GF1)
241
Table 6.12: Well specifications for the 60-gridblock scenario (Case GF1)
242
Table 6.13: Injected fluid composition (Case GF1)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
9 Water 0.0000000
Total - 1.0000000
Table 6.14: Input parameters for the asphaltene precipitation model (Case GF1)
R f ,max 2, 3, 4, 5, 6 -
w as,max .0005, .00097, .001, .0015, .002 lb-solid/lb-rock
R 165 lb/ft 3
ln f n*cs -22.51768 psia
P* 7251.89 psia
vs 14.431 ft 3 /lbmol
243
Table 6.15: Summary of runs made for sensitivity and comparative studies (Case GF1)
Run Simulator Case Rock Perm. Porosity Nx Ny Nz NB R f ,max w as,max R ln f n*cs P* vs Qinj
3 3
No. type (md) (%) (lb/ft ) (atm) (psia) (litres/gmol) (cm / h)
1 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 - - - - - - 50
2 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 50
3 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 2 0.0005 165.43 -25.2052 7251.89 0.9 50
4 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 3 0.0005 165.43 -25.2052 7251.89 0.9 50
5 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 4 0.0005 165.43 -25.2052 7251.89 0.9 50
6 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 50
244
7 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 5 0.0020 165.43 -25.2052 7251.89 0.9 50
8 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 5 0.0015 165.43 -25.2052 7251.89 0.9 50
9 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 5 0.0010 165.43 -25.2052 7251.89 0.9 50
10 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 50
11 GPAS GF1 Fontainbleau 107 13.1 60 1 1 60 5 0.0005 165.43 -25.2052 7251.89 0.9 50
12 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 50
13 CMG GEM GF1 Fontainbleau 107 13.1 30 1 1 30 - - - - - - 50
14 CMG GEM GF1 Fontainbleau 107 13.1 30 1 1 30 6 0.00097 165.43 -25.2052 7251.89 0.9 50
15 GPAS GF1 Fontainbleau 107 13.1 30 1 1 30 6 0.00097 165.43 -25.2052 7251.89 0.9 50
Table 6.16: Data for modeling the porous medium (Case GF3)
Table 6.17: Grid data for the 30-gridblock scenario (Case GF3)
245
Table 6.18: Grid data for the 60-gridblock scenario (Case GF3)
246
Table 6.20: Characteristics of fluid considered (Case GF3)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
Total - 1.0000000
247
Table 6.22: PVT properties for the modeled fluid (Case GF3)
248
Table 6.23: Binary Interaction Coefficients between different components (Case GF3)
Sw krw krow
0.2 0 1
0.2899 0.0022 0.6769
0.3778 0.0180 0.4153
0.4667 0.0607 0.2178
0.5556 0.1438 0.0835
0.6444 0.2809 0.0123
0.7 0.4089 0
0.7333 0.4855 0
0.8222 0.7709 0
0.9111 1 0
1 1 0
Sg krg krog
0 0 1
0.05 0 0.88
0.0889 0.001 0.7023
0.1778 0.010 0.4705
0.2667 0.030 0.2963
0.3556 0.050 0.1715
0.4444 0.100 0.0878
0.5333 0.200 0.0370
0.6222 0.350 0.0110
0.65 0.390 0
0.7111 0.560 0
0.8 1 0
249
Table 6.26: Well specifications for the 30-gridblock scenario (Case GF3)
250
Table 6.27: Well specifications for the 60-gridblock scenario (Case GF3)
251
Table 6.28: Injected fluid composition (Case GF3)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
9 Water 0.0000000
Total - 1.0000000
Table 6.29: Input parameters for the asphaltene precipitation model (Case GF3)
R f ,max 2, 4, 5, 6, 8, 10 -
w as,max .00018, .0005, 001, .0015, .002 lb-solid/lb-rock
R 165 lb/ft 3
ln f n*cs -22.51768 psia
P* 7251.89 psia
vs 14.431 ft 3 /lbmol
252
Table 6.30: Summary of runs made for sensitivity and comparative studies (Case GF3)
Run Simulator Case Rock Perm. Porosity Nx Ny Nz NB R f ,max w as,max R ln f n*cs P* vs Qinj
3 3
No. type (md) (%) (lb/ft ) (atm) (psia) (litres/gmol) (cm / h)
1 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 - - - - - - 10
2 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
3 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 2 0.0005 165.43 -25.2052 7251.89 0.9 10
4 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 4 0.0005 165.43 -25.2052 7251.89 0.9 10
5 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
6 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 6 0.0005 165.43 -25.2052 7251.89 0.9 10
7 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 8 0.0005 165.43 -25.2052 7251.89 0.9 10
253
8 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 10 0.0005 165.43 -25.2052 7251.89 0.9 10
9 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 5 0.0020 165.43 -25.2052 7251.89 0.9 10
10 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 5 0.0015 165.43 -25.2052 7251.89 0.9 10
11 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 5 0.0010 165.43 -25.2052 7251.89 0.9 10
12 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
13 GPAS GF3 Fontainbleau 77.4 13.7 60 1 1 60 5 0.0005 165.43 -25.2052 7251.89 0.9 10
14 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
15 CMG GEM GF3 Fontainbleau 77.4 13.7 30 1 1 30 - - - - - - 10
16 CMG GEM GF3 Fontainbleau 77.4 13.7 30 1 1 30 2 0.00018 165.43 -25.2052 7251.89 0.9 10
17 GPAS GF3 Fontainbleau 77.4 13.7 30 1 1 30 2 0.00018 165.43 -25.2052 7251.89 0.9 10
Table 6.31: Data for modeling porous medium (Case GVM5)
Table 6.32: Grid data for the 30-gridblock scenario (Case GVM5)
254
Table 6.33: Grid data for the 60-gridblock scenario (Case GVM5)
255
Table 6.35: Characteristics of fluid considered (Case GVM5)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
Total - 1.0000000
256
Table 6.37: PVT properties for the modeled fluid (Case GVM5)
257
Table 6.38: Binary Interaction Coefficients between components (Case GVM5)
Sw krw krow
0.2 0 1
0.2899 0.0022 0.6769
0.3778 0.0180 0.4153
0.4667 0.0607 0.2178
0.5556 0.1438 0.0835
0.6444 0.2809 0.0123
0.7 0.4089 0
0.7333 0.4855 0
0.8222 0.7709 0
0.9111 1 0
1 1 0
Sg krg krog
0 0 1
0.05 0 0.88
0.0889 0.001 0.7023
0.1778 0.010 0.4705
0.2667 0.030 0.2963
0.3556 0.050 0.1715
0.4444 0.100 0.0878
0.5333 0.200 0.0370
0.6222 0.350 0.0110
0.65 0.390 0
0.7111 0.560 0
0.8 1 0
258
Table 6.41: Well specifications for the 30-gridblock scenario (Case GVM5)
259
Table 6.42: Well specifications for the 60-gridblock scenario (Case GVM5)
260
Table 6.43: Injected fluid composition (Case GVM5)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
9 Water 0.0000000
Total - 1.0000000
Table 6.44: Input parameters for the asphaltene precipitation model (Case GVM5)
R f ,max 2, 4, 5, 6, 8, 10 -
w as,max .00038, .00050, .001, .0015, .002 lb-solid/lb-rock
R 165 lb/ft 3
ln f n*cs -22.51768 psia
P* 7251.89 psia
vs 14.431 ft 3 /lbmol
261
Table 6.45: Summary of runs for sensitivity and comparative studies (Case GVM5)
Run Simulator Case Rock Perm. Porosity Nx Ny Nz NB R f ,max w as,max R ln f n*cs P* vs Qinj
3 3
No. type (md) (%) (lb/ft ) (atm) (psia) (litres/gmol) (cm / h)
1 GPAS GVM5 Vosges 29 24.7 30 1 1 30 - - - - - - 10
2 GPAS GVM5 Vosges 29 24.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
3 GPAS GVM5 Vosges 29 24.7 30 1 1 30 2 0.0005 165.43 -25.2052 7251.89 0.9 10
4 GPAS GVM5 Vosges 29 24.7 30 1 1 30 4 0.0005 165.43 -25.2052 7251.89 0.9 10
5 GPAS GVM5 Vosges 29 24.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
6 GPAS GVM5 Vosges 29 24.7 30 1 1 30 6 0.0005 165.43 -25.2052 7251.89 0.9 10
7 GPAS GVM5 Vosges 29 24.7 30 1 1 30 8 0.0005 165.43 -25.2052 7251.89 0.9 10
262
8 GPAS GVM5 Vosges 29 24.7 30 1 1 30 10 0.0005 165.43 -25.2052 7251.89 0.9 10
9 GPAS GVM5 Vosges 29 24.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
10 GPAS GVM5 Vosges 29 24.7 30 1 1 30 5 0.0010 165.43 -25.2052 7251.89 0.9 10
11 GPAS GVM5 Vosges 29 24.7 30 1 1 30 5 0.0015 165.43 -25.2052 7251.89 0.9 10
12 GPAS GVM5 Vosges 29 24.7 30 1 1 30 5 0.0020 165.43 -25.2052 7251.89 0.9 10
13 GPAS GVM5 Vosges 29 24.7 60 1 1 60 5 0.0005 165.43 -25.2052 7251.89 0.9 10
14 GPAS GVM5 Vosges 29 24.7 30 1 1 30 5 0.0005 165.43 -25.2052 7251.89 0.9 10
15 CMG GEM GVM5 Vosges 29 24.7 30 1 1 30 - - - - - - 10
16 CMG GEM GVM5 Vosges 29 24.7 30 1 1 30 2 0.00038 165.43 -25.2052 7251.89 0.9 10
17 GPAS GVM5 Vosges 29 24.7 30 1 1 30 2 0.00038 165.43 -25.2052 7251.89 0.9 10
Table 6.46: Data for modeling the porous medium (Case GVM10)
263
Table 6.48: Properties of water (Case GVM10)
264
Table 6.49: Characteristics of fluid considered (Case GVM10)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
Total - 1.0000000
265
Table 6.51: PVT properties for the modeled fluid (Case GVM10)
266
Table 6.52: Binary Interaction Coefficients between components (Case GVM10)
Sw krw krow
0.2 0 1
0.2899 0.0022 0.6769
0.3778 0.0180 0.4153
0.4667 0.0607 0.2178
0.5556 0.1438 0.0835
0.6444 0.2809 0.0123
0.7 0.4089 0
0.7333 0.4855 0
0.8222 0.7709 0
0.9111 1 0
1 1 0
Sg krg krog
0 0 1
0.05 0 0.88
0.0889 0.001 0.7023
0.1778 0.010 0.4705
0.2667 0.030 0.2963
0.3556 0.050 0.1715
0.4444 0.100 0.0878
0.5333 0.200 0.0370
0.6222 0.350 0.0110
0.65 0.390 0
0.7111 0.560 0
0.8 1 0
267
Table 6.55: Well specifications (Case GVM10)
268
Table 6.56: Injected fluid composition (Case GVM10)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
9 Water 0.0000000
Total - 1.0000000
Table 6.57: Input parameters for the asphaltene precipitation model (Case GVM10)
R f ,max 2, 3, 4, 5 -
w as,max .00045, .0005, .0010, .0013, .0015, .0020 lb-solid/lb-rock
R 165 lb/ft 3
ln f n*cs -22.51768 psia
P* 7251.89 psia
vs 9.611, 12.815, 14.431, 16.019, 19.222 ft 3 /lbmol
269
Table 6.58: Summary of runs for sensitivity and comparative studies (Case GVM10)
Run Simulator Case Rock Perm. Porosity Nx Ny Nz NB R f ,max w as,max R ln f n*cs P* vs Qinj
3 3
No. type (md) (%) (lb/ft ) (atm) (psia) (litres/gmol) (cm / h)
1 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 - - - - - - 10
2 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 2 0.0005 165.43 -25.2052 7251.89 0.9 10
3 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 0.9 10
4 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 4 0.0005 165.43 -25.2052 7251.89 0.9 10
5 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 3 0.0005 165.43 -25.2052 7251.89 0.9 10
6 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 2 0.0005 165.43 -25.2052 7251.89 0.9 10
7 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0010 165.43 -25.2052 7251.89 0.9 10
270
8 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0013 165.43 -25.2052 7251.89 0.9 10
9 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0015 165.43 -25.2052 7251.89 0.9 10
10 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0020 165.43 -25.2052 7251.89 0.9 10
11 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 0.6 10
12 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 0.8 10
13 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 1 10
14 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 1.2 10
15 CMG GEM GVM10 Vosges 12.2 24.3 30 10 1 300 - - - - - - 10
16 CMG GEM GVM10 Vosges 12.2 24.3 30 10 1 300 2 0.00045 165.43 -25.2052 7251.89 0.9 10
17 GPAS GVM10 Vosges 12.2 24.3 30 10 1 300 2 0.00045 165.43 -25.2052 7251.89 0.9 10
Table 6.59: Data for modeling the porous medium (Case GVR8)
271
Table 6.61: Properties of water (Case GVR8)
272
Table 6.62: Characteristics of fluid considered (Case GVR8)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
Total - 1.0000000
273
Table 6.64: PVT properties for the modeled fluid (Case GVR8)
274
Table 6.65: Binary Interaction Coefficients between components (Case GVR8)
Sw krw krow
0.2 0 1
0.2899 0.0022 0.6769
0.3778 0.0180 0.4153
0.4667 0.0607 0.2178
0.5556 0.1438 0.0835
0.6444 0.2809 0.0123
0.7 0.4089 0
0.7333 0.4855 0
0.8222 0.7709 0
0.9111 1 0
1 1 0
Sg krg krog
0 0 1
0.05 0 0.88
0.0889 0.001 0.7023
0.1778 0.010 0.4705
0.2667 0.030 0.2963
0.3556 0.050 0.1715
0.4444 0.100 0.0878
0.5333 0.200 0.0370
0.6222 0.350 0.0110
0.65 0.390 0
0.7111 0.560 0
0.8 1 0
275
Table 6.68: Well specifications (Case GVR8)
276
Table 6.69: Injected fluid composition (Case GVR8)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
9 Water 0.0000000
Total - 1.0000000
Table 6.70: Input parameters for the asphaltene precipitation model (Case GVR8)
R f ,max 2, 3, 4, 5 -
w as,max .000417, .0005, .0010, .0013, .0015, .0020 lb-solid/lb-rock
R 165 lb/ft 3
ln f n*cs -22.51768 psia
P* 7251.89 psia
vs 9.611, 12.815, 14.431, 16.019, 19.222 ft 3 /lbmol
277
Table 6.71: Summary of runs for sensitivity and comparative studies (Case GVR8)
Run Simulator Case Rock Perm. Porosity Nx Ny Nz NB R f ,max w as,max R ln f n*cs P* vs Qinj
3 3
No. type (md) (%) (lb/ft ) (atm) (psia) (litres/gmol) (cm / h)
1 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 - - - - - - 10
2 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 2 0.0005 165.43 -25.2052 7251.89 0.9 10
3 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 0.9 10
4 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 4 0.0005 165.43 -25.2052 7251.89 0.9 10
5 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 3 0.0005 165.43 -25.2052 7251.89 0.9 10
6 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 2 0.0005 165.43 -25.2052 7251.89 0.9 10
7 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0010 165.43 -25.2052 7251.89 0.9 10
278
8 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0013 165.43 -25.2052 7251.89 0.9 10
9 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0015 165.43 -25.2052 7251.89 0.9 10
10 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0020 165.43 -25.2052 7251.89 0.9 10
11 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 0.6 10
12 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 0.8 10
13 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 1 10
14 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 5 0.0005 165.43 -25.2052 7251.89 1.2 10
15 CMG GEM GVR8 Vosges 15.2 22.6 30 10 1 300 - - - - - - 10
16 CMG GEM GVR8 Vosges 15.2 22.6 30 10 1 300 2 0.000417 165.43 -25.2052 7251.89 0.9 10
17 GPAS GVR8 Vosges 15.2 22.6 30 10 1 300 2 0.000417 165.43 -25.2052 7251.89 0.9 10
Table 6.72: Data for modeling the reservoir (Case 6.7)
Length 560 ft
Width 560 ft
Thickness 100 ft
Permeability in x direction 15.2 md
Permeability in y direction 15.2 md
Permeability in z direction 15.2 md
Porosity 22.6 %
Initial pressure 5200 psi
Rock compressibility 0.000005 1/psi
Ref. pressure for rock compressibility 14.700 psi
279
Table 6.74: Characteristics of reservoir fluid (Case 6.7)
1 N2 + C1 0.0000321
2 CO2 0.0000409
3 C2 - C3 0.0175432
4 C4 - C5 0.1114261
5 C6 - C9 0.3627861
6 C10 - C19 0.3516170
7 C20 - C29 0.1154219
8 C30+ 0.0411327
Total - 1.0000000
280
Table 6.76: PVT properties for the reservoir fluid (Case 6.7)
281
Table 6.77: Binary Interaction Coefficients between components (Case 6.7)
Sw krw krow
0.2 0 1
0.2899 0.0022 0.6769
0.3778 0.0180 0.4153
0.4667 0.0607 0.2178
0.5556 0.1438 0.0835
0.6444 0.2809 0.0123
0.7 0.4089 0
0.7333 0.4855 0
0.8222 0.7709 0
0.9111 1 0
1 1 0
Sg krg krog
0 0 1
0.05 0 0.88
0.0889 0.001 0.7023
0.1778 0.010 0.4705
0.2667 0.030 0.2963
0.3556 0.050 0.1715
0.4444 0.100 0.0878
0.5333 0.200 0.0370
0.6222 0.350 0.0110
0.65 0.390 0
0.7111 0.560 0
0.8 1 0
282
Table 6.80: Well specifications (Case 6.7)
283
Table 6.81: Properties of water (Case 6.7)
Table 6.82: Input parameters for the asphaltene precipitation model (Case 6.7)
R f ,max 2, 3, 5, 7 -
w as,max 0.013865 lb-solid/lb-rock
R 165 lb/ft 3
ln f n*cs -22.51768 psia
P* 7251.89 psia
vs 14.416 ft 3 /lbmol
284
Figure 6.1: Schematic representation of the discretized porous media used in Case GF1
Figure 6.2: Location of injection and production wells used in Case GF1
285
Figure 6.3: Water-oil relative permeability curves (Case GF1)
286
Figure 6.5: Three-phase oil relative permeability for rock type 1 by Stones first model
(Case GF1)
287
Figure 6.6: Three-phase oil relative permeability for rock type 1 by Stones second
model (Case GF1)
288
Figure 6.7: Schematic representation of the fluid flow pattern in 3-dimensional viewpoint
(Case GF1)
Figure 6.8: Schematic representation of the fluid flow vectors in areal viewpoint (Case
GF1)
289
Figure 6.9: Static asphaltene Precipitation curve for the reservoir fluid used (Case GF1)
Figure 6.10: Comparison of average pressure without and with the effect of asphaltene
precipitation (Case GF1)
290
Figure 6.11: Comparison of pressure profile without (top) and with (bottom) the effect of
asphaltene precipitation at 685 PV injected (Case GF1)
291
Figure 6.12: Comparison of oil rate without and with the effect of asphaltene (Case GF1)
Figure 6.13: Comparison of injector bottom-hole pressure without and with the effect of
asphaltene precipitation (Case GF1)
292
Figure 6.14: Pressure profile at 685 PV injected for R f ,max of 2 (Case GF1)
Figure 6.15: Pressure profile at 685 PV injected for R f ,max of 3 (Case GF1)
293
Figure 6.16: Pressure profile at 685 PV injected for R f ,max of 4 (Case GF1)
Figure 6.17: Pressure profile at 685 PV injected for R f ,max of 5 (Case GF1)
294
Figure 6.18: Sensitivity of average pressure to maximum permeability resistance factor
(Case GF1)
Figure 6.19: Sensitivity of oil rate to maximum resistance factor (Case GF1)
295
Figure 6.20: Pressure profile at 685 PV injected for w as,max of 0.0005 (Case GF1)
Figure 6.21: Pressure profile at 685 PV injected for w as,max of 0.0010 (Case GF1)
296
Figure 6.22: Pressure profile at 685 PV injected for w as,max of 0.0015 (Case GF1)
Figure 6.23: Pressure profile at 685 PV injected for w as,max of 0.0020 (Case GF1)
297
Figure 6.24: Sensitivity of average pressure to the maximum mass fraction of adsorbed
solid (Case GF1)
Figure 6.25: Average pressure under the effect of gridblock discretion (Case GF1)
298
Figure 6.26: Comparison of the oil rate under the effect of gridblock discretion with the
effect of asphaltene precipitation (Case GF1)
299
Figure 6.27: Comparison of the pressure profile under the effect of gridblock discretion
with the effect of asphaltene precipitation at 685 PV injected (Case GF1)
300
Figure 6.28: Comparison of the average pressure between CMG GEM and GPAS with
the effect of asphaltene precipitation (Case GF1)
Figure 6.29: Comparison of the oil rate between CMG GEM and GPAS (Case GF1)
301
Figure 6.30: Schematic representation of the discretized porous media used in Case GF3
Figure 6.31: Location of injection and production wells used in Case GF3
302
Figure 6.32: Water-oil relative permeability curves (Case GF3)
303
Figure 6.34: Three-phase oil relative permeability for rock type 1 by Stones first model
(Case GF3)
304
Figure 6.35: Three-phase oil relative permeability for rock type 1 by Stones second
model (Case GF3)
305
Figure 6.36: Schematic representation of the fluid flow pattern in 3-dimensional
viewpoint (Case GF3)
Figure 6.37: Schematic representation of the fluid flow vectors in areal viewpoint (Case
GF3)
306
Figure 6.38: Static asphaltene precipitation curve for the reservoir fluid used (Case GF3)
150
Without Asphaltene Precipitation
149
148.5
Average Pressure (psi)
148
147.5
147
146.5
146
145.5
145
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.39: Comparison of average pressure with and without the effect of asphaltene
precipitation (Case GF3)
307
Figure 6.40: Comparison of pressure profile without (top) and with (bottom) the effect of
asphaltene precipitation at 80 PV injected (Case GF3)
308
0.00152
0.0015
0.00148
0.00146
Oil Rate (bbl/day)
0.00144
0.00142
0.0014
0.00138
Figure 6.41: Comparison of oil rate without and with the effect of asphaltene (Case GF3)
152
With Asphaltene Precipitation Without Asphaltene Precipitation
151
150
Injector Bottom-hole Pressure (psi)
149
148
147
146
145
144
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.42: Comparison of the injector bottom-hole pressure without and with the effect
of asphaltene precipitation (Case GF3)
309
Figure 6.43: Pressure profile at 80 PV injected for R f ,max of 2 (Case GF3)
310
Figure 6.45: Pressure profile at 80 PV injected for R f ,max of 5 (Case GF3)
311
Figure 6.47: Pressure profile at 80 PV injected for R f ,max of 8 (Case GF3)
312
160
Rf,max = 10.0
Rf,max = 8.0
Rf,max = 6.0
Rf,max = 4.0
157
No Asphaltene Precipitation
Average Pressure (psi)
154
151
148
145
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
0.0020
No Asphaltene Precipitation
Rf,max = 4.0
0.0019
Rf,max = 6.0
Rf,max = 8.0
Rf,max = 10.0
0.0018
Oil Rate (bbl/day)
0.0017
0.0016
0.0015
0.0014
0.0013
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.50: Sensitivity of oil rate to the maximum resistance factor (Case GF3)
313
150
149.5
149
148.5
Average Pressure (psi)
148
147.5
147
146.5
146
was,max = 0.0005
was,max = 0.0010
145.5
was,max = 0.0015
was,max = 0.0020
145
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.51: Sensitivity of average pressure to the maximum mass fraction of adsorbed
solid (Case GF3)
160
140
120
Average Pressure (psi)
100
80
60
40
20
30 gridblocks
60 gridblocks
0
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.52: Average pressure under the effect of gridblock discretion (Case GF3)
314
0.002
0.0018
0.0016
0.0014
0.0012
Oil Rate (bbl/day)
0.001
0.0008
0.0006
0.0004
0.0002
30 gridblocks
60 gridblocks
0
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.53: Comparison of the oil rate under the effect of gridblock discretion with the
effect of asphaltene precipitation (Case GF3)
315
Figure 6.54: Comparison of the pressure profile under the effect of gridblock discretion
with the effect of asphaltene precipitation at 80 PV injected (Case GF3)
316
160
140
120
Average Pressure (psi)
100
80
60
40
20
CMG GEM
GPAS
0
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.55: Comparison of the average pressure between CMG GEM and GPAS with
the effect of asphaltene precipitation (Case GF3)
0.005
CMG GEM
GPAS
0.0045
0.004
0.0035
0.003
Oil Rate (bbl/day)
0.0025
0.002
0.0015
0.001
0.0005
0
0 10 20 30 40 50 60 70 80
Pore Volumes Injected
Figure 6.56: Comparison of the oil rate between CMG GEM and GPAS (Case GF3)
317
Figure 6.57: Schematic representation of the discretized porous media used in Case
GVM5
Figure 6.58: Location of injection and production wells used in Case GVM5
318
Figure 6.59: Water-oil relative permeability curves (Case GVM5)
319
Figure 6.61: Three-phase oil relative permeability for rock type 1 by Stones first model
(Case GVM5)
320
Figure 6.62: Three-phase oil relative permeability for rock type 1 by Stones second
model (Case GVM5)
321
Figure 6.63: Schematic representation of the fluid flow pattern in 3-dimensional
viewpoint (Case GVM5)
Figure 6.64: Schematic representation of the fluid flow vectors in areal viewpoint (Case
GVM5)
322
Figure 6.65: Static asphaltene precipitation curve for the reservoir fluid (Case GVM5)
180
160
140
120
Average Pressure (psi)
100
80
60
40
Figure 6.66: Comparison of average pressure without and with the effect of asphaltene
precipitation (Case GVM5)
323
Figure 6.67: Comparison of the pressure profile without (top) and with (bottom) the
effect of asphaltene precipitation at 67 PV injected (Case GVM5)
324
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
0.0004
Figure 6.68: Comparison of the oil rate without and with the effect (Case GVM5)
200
180
160
Injector Bottom-hole Pressure (psi)
140
120
100
80
60
40
Figure 6.69: Comparison of the injector bottom-hole pressure without and with the effect
of asphaltene precipitation (Case GVM5)
325
Figure 6.70: Pressure profile at 67 PV injected for R f ,max of 2 (Case GVM5)
326
Figure 6.72: Pressure profile at 67 PV injected for R f ,max of 5 (Case GVM5)
327
Figure 6.74: Pressure profile at 67 PV injected for R f ,max of 8 (Case GVM5)
328
214
Rf,max = 10.0
Rf,max = 8.0
Rf,max = 6.0
204
Rf,max = 4.0
No Asphaltene Precipitation
194
Average Pressure (psi)
184
174
164
154
144
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
0.00152
No Asphaltene Precipitation
Rf,max = 6.0
Rf,max = 10.0
0.00146
0.00144
Oil Rate (bbl/day)
0.00142
0.0014
0.00138
0.00136
0.00134
0.00132
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.77: Sensitivity of oil rate to maximum resistance factor (Case GVM5)
329
Figure 6.78: Pressure profile at 67 PV injected for w as,max of 0.0005 (Case GVM5)
Figure 6.79: Pressure profile at 67 PV injected for w as,max of 0.0010 (Case GVM5)
330
Figure 6.80: Pressure profile at 67 PV injected for w as,max of 0.0015 (Case GVM5)
Figure 6.81: Pressure profile at 67 PV injected for w as,max of 0.0020 (Case GVM5)
331
180
160
140
120
Average Pressure (psi)
100
80
60
40
was,max = 0.0005
20 was,max = 0.0010
was,max = 0.0015
was,max = 0.0020
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.82: Sensitivity of average pressure to the maximum mass fraction of adsorbed
solid (Case GVM5)
180
160
140
120
Average Pressure (psi)
100
80
60
40
20
30 grid cells
60 grid cells
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.83: Average pressure under the effect of gridblock discretion (Case GVM5)
332
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
0.0004
0.0002
30 grid cells
60 grid cells
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.84: Comparison of the oil rate under the effect of gridblock discretion with
asphaltene precipitation (Case GVM5)
333
Figure 6.85: Comparison of the pressure profile under the effect of gridblock discretion
with the effect of asphaltene precipitation at 67 PV injected (Case GVM5)
334
180
CMG GEM
GPAS
160
140
120
Average Pressure (psi)
100
80
60
40
20
0
0 5 10 15 20 25 30 35 40
Pore Volumes Injected
Figure 6.86: Comparison of the average pressure between CMG GEM and GPAS with
the effect of asphaltene precipitation (Case GVM5)
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
0.0004
0.0002
CMG GEM
GPAS
0
0 5 10 15 20 25 30 35 40
Pore Volumes Injected
Figure 6.87: Comparison of the oil rate between CMG GEM and GPAS (Case GVM5)
335
Figure 6.88: Schematic representation of the discretized porous media used in Case
GVM10
Figure 6.89: Location of injection and production wells used in Case GVM10
336
Figure 6.90: Water-oil relative permeability curves (Case GVM10)
337
Figure 6.92: Three-phase oil relative permeability for rock type 1 by Stones first model
(Case GVM10)
338
Figure 6.93: Three-phase oil relative permeability for rock type 1 by Stones second
model (Case GVM10)
339
Figure 6.94: Schematic representation of the fluid flow pattern in 3-dimensional
viewpoint (Case GVM10)
Figure 6.95: Schematic representation of the fluid flow vectors in areal viewpoint (Case
GVM10)
340
Figure 6.96: Static asphaltene precipitation curve for reservoir fluid used (Case GVM10)
180
160
140
120
Average Pressure (psi)
100
80
60
40
Figure 6.97: Comparison of average pressure without and with the effect of asphaltene
precipitation (Case GVM10)
341
Figure 6.98: Comparison of pressure profile without (top) and with (bottom) the effect of
asphaltene precipitation at 68 PV injected (Case GVM10)
342
0.002
0.0018
0.0016
0.0014
0.0012
Oil Rate (bbl/day)
0.001
0.0008
0.0006
0.0004
Figure 6.99: Comparison of producer oil rate without and with the effect (Case GVM10)
200
180
160
Injector Bottom-hole Pressure (psi)
140
120
100
80
60
40
Figure 6.100: Comparison of injector bottom-hole pressure without and with the effect of
asphaltene precipitation (Case GVM10)
343
Figure 6.101: Pressure profile at 68 PV injected for R f ,max of 2 (Case GVM10)
344
Figure 6.103: Pressure profile at 68 PV injected for R f ,max of 4 (Case GVM10)
345
250
200
Average Pressure (psi)
150
100
50 Rf,max = 5.0
Rf,max = 4.0
Rf,max = 3.0
Rf,max = 2.0
No Asphaltene Precipitation
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
Rf,max = 2.0
Rf,max = 3.0
0.0002
Rf,max = 4.0
Rf,max = 5.0
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.106: Sensitivity of oil rate to the maximum resistance factor (Case GVM10)
346
Figure 6.107: Pressure profile at 68 PV injected for w as,max of 0.0010 (Case GVM10)
Figure 6.108: Pressure profile at 68 PV injected for w as,max of 0.0013 (Case GVM10)
347
Figure 6.109: Pressure profile at 68 PV injected for w as,max of 0.0015 (Case GVM10)
Figure 6.110: Pressure profile at 68 PV injected for w as,max of 0.0020 (Case GVM10)
348
200
180
160
140
Average Pressure (psi)
120
100
80
60
40
was,max = 0.0010
was,max = 0.0013
20
was,max = 0.0015
was,max = 0.0020
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
250
200
Injector Bottom-hole Pressure (psi)
150
100
50
was,max = 0.0010
was,max = 0.0013
was,max = 0.0015
was,max = 0.0020
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
349
Figure 6.113: Pressure profile at 68 PV injected for vs of 0.6 litres/gmol (Case GVM10)
Figure 6.114: Pressure profile at 68 PV injected for vs of 0.8 litres/gmol (Case GVM10)
Figure 6.115: Pressure profile at 68 PV injected for vs of 1.2 litres/gmol (Case GVM10)
350
300
250
200
Average Pressure (psi)
150
100
50
vs = 0.6 litres/gmol
vs = 0.8 litres/gmol
vs = 1.2 litres/gmol
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.116: Sensitivity of average pressure to the solid molar volume (Case GVM10)
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
0.0004
vs = 0.6 litres/gmol
vs = 1.2 litres/gmol
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.117: Sensitivity of producer oil rate to the solid molar volume (Case GVM10)
351
400
350
300
Injector Bottom-hole Pressure (psi)
250
200
150
100
vs = 0.6 litres/gmol
50 vs = 0.8 litres/gmol
vs = 1.2 litres/gmol
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
Pore Volumes Injected
Figure 6.118: Sensitivity of bottom-hole pressure to solid molar volume (Case GVM10)
200
CMG GEM
GPAS
180
160
140
Average Pressure (psi)
120
100
80
60
40
20
0
0 5 10 15 20 25 30 35 40 45
Pore Volumes Injected
Figure 6.119: Comparison of the average pressure between CMG GEM and GPAS with
the effect of asphaltene precipitation (Case GVM10)
352
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
0.0004
0.0002
CMG GEM
GPAS
0
0 5 10 15 20 25 30 35 40 45
Pore Volumes Injected
Figure 6.120: Comparison of the producer oil rate between CMG GEM and GPAS with
the effect of asphaltene precipitation (Case GVM10)
250
CMG GEM
GPAS
200
Injector Bottom-hole Pressure (psi)
150
100
50
0
0 5 10 15 20 25 30 35 40 45
Pore Volumes Injected
353
Figure 6.122: Schematic representation of the discretized porous media used in Case
GVR8
.
Injector
.
Producer
Figure 6.123: Location of injection and production wells used in Case GVR8
354
Figure 6.124: Water-oil relative permeability curves (Case GVR8)
355
Figure 6.126: Three-phase oil relative permeability for rock type 1 by Stones first model
(Case GVR8)
356
Figure 6.127: Three-phase oil relative permeability for rock type 1 by Stones second
model (Case GVR8)
357
Figure 6.128: Schematic representation of the fluid flow pattern in 3-dimensional
viewpoint (Case GVR8)
Figure 6.129: Schematic representation of flow vectors in areal viewpoint (Case GVR8)
358
6.00
122 deg F
5.50
5.00
Asphaltene Precipitate (wt % of reservoir fluid)
4.50
4.00
3.50
3.00
2.50
2.00
1.50
1.00
0.50
0.00
145 645 1145 1645 2145 2645 3145 3645 4145 4645 5145 5645 6145 6645 7145 7645
Pressure (psi)
Figure 6.130: Static asphaltene precipitation curve for reservoir fluid used (Case GVR8)
180
160
140
120
Average Pressure (psi)
100
80
60
40
Figure 6.131: Comparison of the average pressure without and with the effect of
asphaltene precipitation (Case GVR8)
359
Figure 6.132: Comparison of pressure profile without (top) and with (bottom) the effect
of asphaltene precipitation at 73 PV injected (Case GVR8)
360
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
0.0004
Figure 6.133: Comparison of producer oil rate without and with the effect (Case GVR8)
200
180
160
Injector Bottom-hole Pressure (psi)
140
120
100
80
60
40
Figure 6.134: Comparison of injector bottom-hole pressure without and with the effect of
asphaltene precipitation (Case GVR8)
361
Figure 6.135: Pressure profile at 73 PV injected for R f ,max of 2 (Case GVR8)
362
Figure 6.137: Pressure profile at 73 PV injected for R f ,max of 4 (Case GVR8)
363
250
200
Average Pressure (psi)
150
100
Rf,max = 5.0
50
Rf,max = 4.0
Rf,max = 3.0
Rf,max = 2.0
No Asphaltene Precipitation
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
Pore Volumes Injected
Figure 6.139: Sensitivity of average pressure to maximum resistance factor (Case GVR8)
0.002
0.0018
0.0016
0.0014
0.0012
Oil Rate (bbl/day)
0.001
0.0008
0.0006
No Asphaltene Precipitation
Rf,max = 3.0
0.0002 Rf,max = 4.0
Rf,max = 5.0
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
Pore Volumes Injected
Figure 6.140: Sensitivity of producer oil rate to the maximum permeability resistance
factor (Case GVR8)
364
Figure 6.141: Pressure profile at 73 PV injected for w as,max of 0.0010 (Case GVR8)
Figure 6.142: Pressure profile at 73 PV injected for w as,max of 0.0013 (Case GVR8)
365
Figure 6.143: Pressure profile at 73 PV injected for w as,max of 0.0015 (Case GVR8)
Figure 6.144: Pressure profile at 73 PV injected for w as,max of 0.0020 (Case GVR8)
366
200
180
160
140
Average Pressure (psi)
120
100
80
60
was,max = 0.0010
40 was,max = 0.0013
was,max = 0.0015
20
was,max = 0.0020
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
Pore Volumes Injected
0.0014175
0.001417
0.0014165
Oil Rate (bbl/day)
0.001416
0.0014155
0.001415
367
Figure 6.147: Pressure profile at 73 PV injected for vs of 0.6 litres/gmol (Case GVR8)
Figure 6.148: Pressure profile at 73 PV injected for vs of 0.8 litres/gmol (Case GVR8)
Figure 6.149: Pressure profile at 73 PV injected for vs of 1.2 litres/gmol (Case GVR8)
368
250
200
Average Pressure (psi)
150
100
50
vs = 0.6 litres/gmol
vs = 0.8 litres/gmol
vs = 1.2 litres/gmol
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
Pore Volumes Injected
Figure 6.150: Sensitivity of average pressure to the solid molar volume (Case GVR8)
0.0016
0.0014
0.0012
0.001
Oil Rate (bbl/day)
0.0008
0.0006
0.0004
vs = 0.6 litres/gmol
vs = 1.2 litres/gmol
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
Pore Volumes Injected
Figure 6.151: Sensitivity of producer oil rate to the solid molar volume (Case GVR8)
369
300
250
Injector Bottom-hole Pressure (psi)
200
150
100
vs = 0.6 litres/gmol
50 vs = 0.8 litres/gmol
vs = 1.2 litres/gmol
0
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85
Pore Volumes Injected
Figure 6.152: Sensitivity of injector pressure to the solid molar volume (Case GVR8)
200
CMG GEM
GPAS
180
160
140
Average Pressure (psi)
120
100
80
60
40
20
0
0 5 10 15 20 25 30 35 40 45
Pore Volumes Injected
Figure 6.153: Comparison of average pressure between CMG GEM and GPAS with the
effect of asphaltene precipitation (Case GVR8)
370
0.0025
CMG GEM
GPAS
0.002
0.0015
Oil Rate (bbl/day)
0.001
0.0005
0
0 5 10 15 20 25 30 35 40 45
Pore Volumes Injected
Figure 6.154: Comparison of the oil rate between CMG GEM and GPAS (Case GVR8)
250
CMG GEM
GPAS
200
Injector Bottom-hole Pressure (psi)
150
100
50
0
0 5 10 15 20 25 30 35 40 45
Pore Volumes Injected
371
Figure 6.156: Schematic representation of the discretized reservoir used in waterflooding
6100
Rf,max = 2.0
6000 Rf,max = 3.0
Rf,max = 5.0
5900
Rf,max = 7.0
5800
5700
Average Pressure (psi)
5600
5500
5400
5300
5200
5100
5000
5 35 65 95 125 155 185 215 245 275 305 335 365
Time (days)
Figure 6.157: Sensitivity of average pressure to maximum resistance factor (Case 6.7)
372
1600
1400
1200
1000
Oil Rate (bbl/day)
800
600
Rf,max = 5.0
200 Rf,max = 3.0
Rf,max = 2.0
0
5 35 65 95 125 155 185 215 245 275 305 335 365
Time (days)
Figure 6.158: Sensitivity of producer oil rate to the maximum permeability resistance
factor (Case 6.7)
373
Chapter 7: Summary, Conclusions and Recommendations
the direction of future research work which can be found at the end of this chapter.
7.1 SUMMARY
The work in this thesis can be divided into two main parts. The first part deals
most difficult problems encountered during the exploitation of oil reservoirs. Asphaltene
precipitation can occur during normal or primary depletion, miscible or immiscible
flooding operations, transportation of oil or more commonly, during well stimulation
activities. Asphaltenes exist as colloidal particles held in suspension with associated resin
molecules, which act as surfactants to stabilize the colloidal suspension in crude oils.
Changing the prevalent pressure, temperature and crude oil composition can alter the
association of asphaltenes with resins, resulting in asphaltenes precipitating out of the oil.
The presence of asphaltenes in crude oils has been shown to affect rock properties and as
374
a result decrease the oil production. Most of these effects have been recognized as the
precipitation that are used in CMG GEM are discussed in detail. Furthermore, the
formation of asphaltenes in oil reservoirs leads to formation damage. The most important
rock properties that are affected by asphaltene precipitation are porosity and permeability.
The models for reduction of reservoir porosity and permeability are also presented. The
accuracy for oil and gas production when asphaltenes are suspected of forming in
petroleum reservoirs. The modeling technique is based on the representation of the
precipitated asphaltene as a pure dense phase while the oil and gas phases modeled with
an equation-of-state. The integration of the thermodynamic model in GPAS is fully
described.
375
To take advantage of the larger time steps with the fully implicit formulation and
to reduce the simulation time, we developed a fully implicit model for asphaltene
precipitation with the relevant physical properties. The formulation and the derivatives of
the Jacobian matrix for this implementation are reported in detail. The effect of
The multiphase oil-gas-solid flash calculation algorithm was tested using a batch
flash example. Several test cases in different dimensions were created for GPAS. These
simulation cases have been run to test the implemented asphaltene precipitation model
simulations of core flood were performed using GPAS. Several two-dimensional cases
with different permeability and porosity were also created and tested for validation
purposes. The simulation results indicate that by introducing dynamic asphaltene
precipitation into an oil reservoir we will have different results compared to a case
considering the asphaltene precipitation model, the algorithm takes too much
computational time for the phase behavior calculation when the model is invoked.
7.2 CONCLUSIONS
376
Compositional simulation results for a one-dimensional oil core flood
using CMG GEM to investigate asphaltene precipitation, flocculation and
The precipitated asphaltene moves with the flood front and occupies a
sizeable portion of the core.
Simulation of a single-well depletion process with and without
permeability impairment.
General field observations, which indicate the majority of asphaltene
In GPAS, all the precipitated asphaltene adsorbs to the rock, but in CMG
GEM, just part of the precipitated asphaltene adsorbs to the rock and the
377
The thermodynamic representation of the precipitated asphaltene as a pure
solid offers an efficient method for modeling asphaltene in GPAS.
Validation work was carried out on GPAS. A batch flash calculation case
378
7.3 RECOMMENDATIONS FOR FUTURE WORK
Based on this study we make the following recommendations for future research
in this field:
experimental cases. The asphaltic reservoir fluid used for the cases is
different and they also differ in core type, permeability, porosity and
379
Allowing the precipitated asphaltene to be converted to larger flocculated
particles according to a chemical reaction can enhance the precipitation
model of GPAS.
The compositional simulators described in this thesis incorporate some
important dynamic aspects of asphaltene: precipitation, adsorption and
depth validation work needs to be carried out. The scope may include
380
Appendix A: Derivation of the Three-Phase Flash Equation
For multiphase flash calculations, the following equation can be defined. This
nc
zi (K im 1)
=0 m = 2, ..., n p j = 2, ..., n p
i =1
1 + L j (K ij 1)
j
In this appendix, it is aimed to derive the flash equation for a three-phase case of
oil-gas-solid.
1 oil
j = 2 gas
3 solid
np
Solve L
j=1
j 1 = 0 for L1 , Hence,
L1 = 1 L 2 L3
Substitute L1 into
np
zi = L x
j=1
j ij i = 1, , nc
L1x i1 = zi L 2 x i2 L3 x i3
zi x x
L1 = L 2 i2 L3 i3
x i1 x i1 x i1
zi x x
1 L 2 L3 = L 2 i2 L3 i3
x i1 x i1 x i1
381
Use the definition of K-values
x i2 x i3
K i2 = K i3 = i = 1, , nc
x i1 x i1
zi
1 L 2 L3 = L2 K i2 L3 K i3
x i1
zi
1 L 2 L3 + L 2 K i2 + L3 K i3 =
x i1
Hence
zi
x i1 =
1 L 2 L3 + L 2 K i2 + L3 K i3
nc nc
x
i =1
i 2 x i1 = 0
i =1
We have
nc nc
x i1K i2 x i1 = 0
i =1 i =1
nc
x
i =1
i1 (K i2 1) = 0
nc
zi
1 L (K i2 1) = 0
i =1 2 L 3 + L 2 K i2 + L 3 K i3
Hence
nc
zi (K i2 1)
1 + L (K =0
i =1 2 i2 1) + L 3 (K i3 1)
382
nc nc
x x
i =1
i3
i =1
i1 =0
nc
z i (K i3 1)
1 + L (K =0
i =1 2 i2 1) + L 3 (K i3 1)
383
Appendix B: Derivatives of Gas-Oil Fugacity Equations
In this and the following appendices, because only one gridblock is involved in
the derivatives, we can drop grid indices (I, J, K) . At constant pressure and temperature
we have
r r
ij = f (K, K n cs , N, Lg , Ls ) i = 1,..., n c j = o, g (.1)
Where
r
K = (K1g , K 2g ,, K n c g )
r
N = (N1 , N 2 ,, N n c )
nc
ln ij ln ij
d ln ij = d ln K kg + d ln K n cs +
k =1 ln K kg
ln K n s r r
N,K m ,K ncs ,Lg ,Ls
r r
c N,K,L ,L
g s
(B.2)
nc
ln ij ln ij ln ij
r r
k =1 N k N ,K,K ,L ,L
dN k +
r r
dLg + r r dLs
m n cs g s Lg N,K,K ,L
n s s c
Ls N,K,K
n cs ,L g
Where
r
K m = (K1g , K 2g ,, K (k-1)g , K (k+1)g ,..., K n cg )
r
N m = (N1 , N 2 ,, N k-1 , N k+1 , , N n c )
The equations for thermodynamic equilibrium between the oil and gas phases are
l n ( x ig ig ) ln ( x io io ) = 0 i = 1,..., n c
384
Hence
R if = ln K ig + ln ig ln io = 0 i = 1,..., n c (B.3)
R if ln K ig ln ig ln io
= +
ln K kg ln K kg ln K kg
ln K kg N,K
r r
m ,K n cs ,L g ,Ls
N,K
r r
m ,K ncs ,Lg ,Ls
N,K
r r
m ,K n cs ,Lg ,Ls
N,K
r r
m ,K n cs ,Lg ,Ls
Hence
ln ig ln io
1 +
ln K kg r r
i=k
R if ln K kg N,K r r
,K ,L ,L N,K m ,K ncs ,Lg ,Ls
=
m n cs g s
ln K kg N,K
r r
ln ig ln io
ln K r r ik
ln K kg r r
m ,K n cs ,Lg ,Ls
Note that i and k are used to represent component index. At this point we need
ln ig ln io
and
ln K kg r r
.
ln K kg N,K
r r
m ,K n c s ,L g ,Ls
N,K m ,K n c s ,Lg ,Ls
r r
Dividing Equation (B.2) by ln K kg while holding N, K n cs , Lg , Ls and K m constant, for
the gas phase, then
ln ig ln ig ln ig ln K n cs
= +
ln K ln K n s r r
ln K kg N,K
r r
m ,K n cs ,L g ,Ls
kg N,K
r r
m ,K ncs ,L g ,L s
c N,K ,L ,L
m g s
ln K kg N,K
r r
m ,Lg ,Ls
ln ig Lg ln ig Ls
+ + r r
L Ls N,K,K ,L ln K kg
g N,K,K
r r
ncs ,Ls
ln K kg N,K
r r
m ,K ncs ,Ls
ncs g N,K
r r
m ,K n cs ,Lg
ln ig x kg
=
x kg
N,K
r r
m ,K n cs ,L g ,L s
ln K kg N,K
r r
m ,K n cs ,Lg ,Ls
where
385
x kg z k K kg 1 Lg + Ls (K ks 1)
=
ln K kg
2
N,K
r r
m ,K nc s ,L g ,L s
1 + L g (K kg 1) + L s (K ks 1)
ln io ln io ln io ln K n cs
= +
ln K kg ln K n s r r
ln K kg N,K
r r
m ,K n cs ,L g ,Ls
N,K
r r
m ,K ncs ,L g ,L s
c N,K ,L ,L
m g s
ln K kg N,K
r r
m ,Lg ,Ls
ln io Lg ln io Ls
+ + r r
L ln K kg r r Ls N,K,K ,L ln K kg
g N,K,K
r r
n cs ,Ls
N,K,K ncs ,Ls ncs g N,K,K
r r
ncs ,L g
ln io x ko
= r r
x ko N,K m ,K ncs ,Lg ,Ls ln K kg N,K
r r
m ,K n cs ,Lg ,Ls
Where
x ko z k Lg K kg
=
ln K kg 1 + Lg ( K kg 1) + Ls (K ks 1)
2
N,K
r r
m ,K nc s ,L g ,Ls
R if ln K ig ln ig ln io
r r = r r + r r r
N k Nm ,K,K ncs ,Lg ,Ls N k Nm ,K,K ncs ,Lg ,Ls N k N m ,K,K ncs ,Lg ,Ls N k Nr m ,K,K n cs ,L g ,Ls
with
ln K ig
r =0
N k Nr m ,K,K n cs ,L g ,L s
386
Note that i and k are used to represent component index. At this point we need to
ln ig ln io
know r r and r .
N k N m ,K,K ncs ,Lg ,Ls N k Nr m ,K,K n cs ,L g ,L s
r r
Dividing Equation (B.2) by N k while holding K, K n cs , Lg , Ls and N m constant, we
have
ln ig ln ig ln ig Lg
r = r + r
N k Nr m ,K,K n cs ,L g ,L s
N k Nr ,K,K
m n cs ,L g ,L s Lg Nr m ,K,K
r
n cs ,Ls
N k Nr m ,K,K n cs ,Ls
ln ig Ls ln ig x kg
+ r r r r = r r
Ls N,K,K ncs ,Lg N k N m ,K,K ncs ,Lg x kg K,
r r
N,K n cs ,Lg ,Ls
N k K,N
m ,K n cs ,Lg ,Ls
where
x ig K ig (1 z i )
r r =
N i K,Nm ,K ncs ,Lg ,Ls 1 + Lg (K ig 1) + Ls (K is 1) N T
ln io ln io ln io Lg
r r = r r + r r
N k K,N m ,K ncs ,Lg ,Ls N k K,N m ,K ncs ,Lg ,Ls Lg K,N r r
m ,K ncs ,Ls
N k K,N m ,K ncs ,Ls
ln io Ls ln io x ko
+ r r r r = r r r r
Ls N,K,K ncs ,Lg N k N m ,K,K ncs ,Lg x ko K,N ,K ncs ,Lg ,Ls N k K,N m ,K n cs ,L g ,Ls
where
x io
=
(1 zi )
r r
N i K,N m ,K ncs ,Lg ,Ls 1 + Lg (K ig 1) + Ls (K is 1) N T
387
R if ln K ig ln ig ln io
r r = r r + r r r r
P N,K,K ncs ,Lg ,Ls P N,K m ,K ncs ,Lg ,Ls P N,K,K ncs ,Lg ,Ls P N,K,K n cs ,Lg ,Ls
ln ig ln io
= r r r r
P N,K,K ncs ,Lg ,Ls P N,K,K n cs ,Lg ,Ls
ln ij ln ij
Note that r r and are derived from Peng-Robinson
P N,K,K ,L ,L x kj r r
n cs g s N,K,K n cs ,Lg ,Ls
R if ln K ig ln ig ln io
= +
ln K n s r r ln K n s r r ln K n s
ln K n cs N,K,L
r r
g ,Ls
c N,K,L ,L
g s
c N,K,L ,L
g s
c N,K,L
r r
g ,Ls
ln ig ln io
At this point we need and
ln K n s r r
.
ln K n s r r
c N,K,L ,L
g s
c N,K,L ,L
g s
ln ij nc
ln ij x ij
= i = 1,..., n c j = o, g
ln K x ij ln K n s r r
n c N,K,L ,L
s r r
g s
i =1 c N,K,L ,L
g s
0 i nc
x ig
= zi K ig Ls K is
i = nc
ln K n cs N,K,Lg ,Ls 1 + L ( K 1) + L (K 1) 2
r r
g ig s is
388
0 i nc
x io
= z i Ls K is
ln K n s r r i = nc
c N,K,L ,L 1 + L ( K 1) + L (K 1) 2
g s
g ig s is
Hence
R if nc
ln ig x ig nc
ln io x io
=
ln K n cs N,K,L
r r
g ,Ls
i =1 x ig ln K n cs r r
N,K,Lg ,Ls
i =1 x io ln K n cs N,K,L
r r
g ,Ls
R if ln K ig ln ig ln io
= +
Lg r r Lg r r
Lg N,K,K
r r
n cs ,Ls
N,K,K ncs ,Ls Lg N,K,K
r r
,L
n cs s
N,K,K ncs ,Ls
Note that i and k are used to represent component index. At this point we need
ln ig ln io
and
Lg r r
.
Lg N,K,Kr r
n cs ,Ls
N,K,K ncs ,Ls
ln ij nc
ln ij x ij
=
Lg r r
i = 1,..., n c j = o, g (B.4)
Lg N,K,Kr r
,L
n cs s
i =1 x ij
N,K,K ncs ,Ls
Where
x ig zi K ig (K ig 1)
= (B.5)
Lg
2
N,K,K
r r
ncs ,L s
1 + L g (K ig 1) + L s (K is 1)
x io zi (K ig 1)
= (B.6)
Lg
2
N,K,K
r r
nc s ,Ls
1 + Lg (K ig 1) + Ls (K is 1)
Substituting Equation (B.5) into Equation (B.4), for the gas phase, we have
389
ln ig nc
ln ig z i K ig (K ig 1)
= i = 1,..., n c
Lg N,K,K i =1 x ig 1 + L (K 1) + L (K 1)
2
r r
n cs ,Ls g ig s is
Substituting Equation (B.6) into Equation (B.4), for the oil phase, we have
ln io nc
ln io zi (K ig 1)
= i = 1,..., n c
Lg N,K,K i =1 x io 1 + L (K 1) + L (K 1)
2
r r
n cs ,Ls g ig s is
R if nc
ln ig x ig nc
ln io x io
=
Lg r r Lg r r
Lg N,K,K
r r
n cs ,Ls
i =1 x ig
N,K,K ncs ,Ls
i =1 x io
N,K,K n cs ,Ls
R if ln K ig ln ig ln io
r r = r r + r r r r
Ls N,K,K ncs ,Lg Ls N,K,K ncs ,Lg Ls N,K,K ncs ,Lg Ls N,K,K ncs ,L g
Note that i and k are used to represent component index. At this point we need
ln ig ln io
r r and r r .
Ls N,K,K ncs ,Lg Ls N,K,K ncs ,Lg
nc
ln ij ln ij x ij
r r = i = 1,..., n c j = o, g (B.7)
Ls N,K,K ncs ,Lg i =1 x ij Ls N,K,K r r
n cs ,L g
Where
x ig zi K ig (K is 1)
r r = (B.8)
Ls N,K,K nc s ,Lg 1 + Lg (K ig 1) + Ls (K is 1)
2
390
x io zi (K is 1)
r r = (B.9)
Ls N,K,K nc s ,Lg 1 + Lg (K ig 1) + Ls (K is 1)
2
ln ig nc
ln ig z i K ig (K is 1)
r r = i = 1,..., n c j = o, g
Ls N,K,K ncs ,Lg i =1 x ig
2
1 + Lg (K ig 1) + Ls (K is 1)
ln io nc
ln io zi (K is 1)
r r = i = 1,..., n c j = o, g
Ls N,K,K ncs ,Lg i =1 x io
2
1 + Lg (K ig 1) + Ls (K is 1)
nc
R if ln ig x ig nc
ln io x io
r r = r r
Ls N,K,K ncs ,Lg i=1 x ig Ls N,K,K r r
ncs ,L g
i =1 x io Ls N,K,K
n cs ,L g
391
Appendix C: Derivatives of Volume Constraint Equation
Knowing that
vw
=0
ln K ig
N w
=0
ln K ig
vs
=0
ln K ig
We have
R v vo Lo vg Lg Ls
= Lo + vo + Lg + vg + vs
ln K ig ln K ig ln K ig ln K ig ln K ig ln K ig
RT Zo Zg Lo
= Lo + Lg + v o
P ln K ig ln K ig ln K ig
Using
Lo + Lg + Ls = 1
R v RT Zo Zg (1 Lg Ls )
= Lo + Lg + v o
ln K ig P ln K ig ln K ig ln K ig
thus
R v RT Zo Zg
= Lo + Lg
ln K ig P ln K ig ln K ig
392
C.2 DERIVATIVES WITH RESPECT TO N i
N w v w
= =0 i = 1...n c
N i Ni
then
1
R v
= vw N w 1 T + L v o + v Lo + L v g + v Lg + L vs + v Ls
( )
N
Ni Ni N i N i N i N i N i N i
o o g g s s
Using
Z j RT
vj = j = o, g
P
Lo + Lg + Ls = 1
nc
NT = Ni
1
R v N w 1 RT Zo Zg (1 Lg Ls )
= 1 2 + Lo + Lg + vo
Ni w NT P N i Ni N i
R v N w 1 RT Zo Zg
= 1 2 + Lo + Lg
Ni w NT P N i N i
Knowing that
393
N w Lo Lg Ls vs
= = = = =0
P P P P P
We have
R v v 1 v vg
= N w w + Lo o + Lg
P P N T P P
Zg Zo
P Z P Zo
vw 1 P
g
P
= N w + RT Lg + Lo
P N T P2 P2
R v RT 3 Z j Z j v 1
P
= Lj
P j= 2 P
+ N w w
P P N T
R v
(
vw N w 1 ) N1 vo Lo vg Lg vs Ls
= T
+ Lo + vo + Lg + vg + Ls + vs
N w N w N w N w N w N w N w N w
with
vg vo vs
= = =0
N w N w N w
n wg = n wo = n ws = 0
394
Zw RT
v w P
= =0
N w N w
P,T
R v 1 1
= vw =
N w NT w N T
Knowing that
vw
=0
ln K n cs
N w
=0
ln K n cs
vs
=0
ln K n cs
then
R v vg Lg vo Lo Ls
= Lg + vg + Lo + vo + vs
ln K n cs ln K n cs ln K n cs ln K n cs ln K n cs ln K n cs
RT Zo Zg L o
= Lo + Lg + vo
P ln K n cs ln K n cs
ln K n cs
R v RT Zo Zg
= Lo + Lg
ln K n cs P ln K n cs ln K n cs
395
C.6 DERIVATIVES WITH RESPECT TO Lg
Knowing that
vw
=0
Lg
N w
=0
Lg
vs
=0
Lg
We have
R v v L v L L v v L
= L g g + v g g + L o o + v o o + vs s = L g g + L o o + vg + vo o =
Lg L g Lg Lg Lg L g Lg Lg
Lg
using
Lo + Lg + Ls = 1
RT Zo Z (1 Lg Ls ) RT Zo Z
L o + Lg g + vg + vo = Lo (
+ Lg g + vg vo
Lg
)
P Lg Lg Lg P Lg
Hence
R v RT Zo Zg
= Lo + Lg + Zg Zo
Lg P Lg Lg
Knowing that
396
vw
=0
Ls
N w
=0
Ls
vs
=0
Ls
We have
R v v L v L L v v L
= L g g + v g g + L o o + v o o + vs s = L g g + L o o + v o o + vs =
Ls Ls Ls Ls Ls
Ls Ls
Ls Ls
using
Lo + Lg + Ls = 1
RT Zo Z (1 Lg Ls ) RT Z Z
Lo
P Ls
+ Lg g + vo
Ls Ls
+ vs =
P Ls Ls
(
L o o + L g g + vs v o )
R v RT Zo Zg
= Lo + Lg Zo + v s
Ls P Ls Ls
397
Appendix D: Derivatives of Mass Conservation Equation for
Hydrocarbon Components
For the convection term, neglecting the effect of the change in ln K ig on capillary
pressure, then
v j(I)
=0
ln K ig(I)
Knowing that
k arj(I)
a
=
j(I)
rj(I)
398
Therefore
k arj(I) j(I)
j(I) k arj(I)
T a
k a
x i1 j(I) j(I) ln K i2g(I) ln K i2g(I)
= j(I) + x i1 j(I) + x i1 j(I) j(I)
i1 j(I) rj(I)
Using the definition of permeability resistance factor for the oil phase to take into account
the change of the relative permeability due to asphaltene precipitation
k 0rj(I)
R f (I) =
k arj(I)
Thus
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I) +
ln K i2g(I) j(I) R f (I) ln K i2g(I) ln K i2g(I) 2j(I) R f (I) ln K i2g(I)
k0
rj(I)
x i1 j(I) j(I) R f (I)
j(I)
2 j(I)
ln K i2g( I)
Thus
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I) +
ln K i2g(I) j(I) R f (I) ln K i2g(I) ln K i2g(I) 2j(I) R f (I) ln K i2g(I)
x i1 j(I) j(I) 1 k 0rj(I) k 0rj(I) R f (I )
j(I) R f (I) ln K i2g (I) R f (I) 2 ln K i2g(I)
399
R f (I)
Focusing on and using the linear model for permeability resistance factor
ln K i2g(I)
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Therefore
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
ln K i2g (I) ln K i2 g(I) w sa,max(I) ln K i2 g(I)
Thus
w sa (I)
Focusing on and knowing that w sa , mass of adsorbed asphaltene per mass of
ln K i2g(I)
rock is defined as
Hence
400
Tia1 j(I) k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I) +
ln K i2g(I) j(I) R f (I) ln K i2g(I) ln K i2g(I) 2j(I) R f (I) ln K i2g(I)
N s(I)
To get let N s be the moles of asphaltene that precipitate from the heaviest
ln K i2g(I)
component n c in crude oil. A material balance gives
nc
N s = Ls N T =Ls N i
i =1
Hence
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I)
ln K i2g(I) j(I) R f (I) ln K i2g(I) ln K i2g (I) 2j(I) R f (I) ln K i2g (I)
(D.1)
x i1 j(I) j(I) k 0rj(I)
+
j(I) R f (I) ln K i2g(I)
1. = v j(I +1/ 2)
ln K i2g(I) ln K i2g(I)
2. = v j(I 1/ 2)
ln K i2 g(I) ln K i2g(I)
401
M aconv
3. =0
ln K i2 g(I)
k arj(I) j(I)
1 ( f w ) 3 k a
q i(I) ln K i2g(I) ln K i2g(I)
a j(I) rj(I)
inj P P
ln K i2g (I)
= c(I)
( Vt )inj j=1 j(I)
2 ( wf j(I) )
Using
k 0rj(I)
R f (I) =
k arj(I)
k 0rj(I)
R f (I) k 0
rj(I) j(I)
1 f 3 j(I)
q i(I) ( w )inj ln K i2g(I) R f (I) ln K i2g(I)
a
ln K i2 g(I)
= c(I)
( Vt )inj 2j(I)
(P
wf Pj(I) )
j=1
A rearrangement gives
k 0rj(I)
1 ( f w ) 3
q i(I)
a
1 0
j(I)
inj R f (I) k rj(I)
ln K i2g (I)
= c(I)
( Vt )inj R f (I) 2j(I) ln K i2g(I)
( Pwf Pj(I) )
j=1 j(I) ln K i 2 g(I)
Focusing on
k0 k 0rj(I) R f (I)
rj(I) R f (I) k 0
R ln K i2 g(I)
rj(I)
ln K i2 g(I)
f (I) =
ln K i2g (I) 2
R f (I)
402
Thus
q i(I)
a 1 ( f w )
= c(I) inj
ln K i2 g(I) ( Vt )inj
3 k 0rj(I) R f (I) k 0rj(I) j(I)
( Pwf Pj(I) )
1
j=1 j(I) R f (I)
2
R
f (I) ln K i g(I)
k 0
rj(I)
ln K i2g(I) R f (I) 2j(I) ln K i2g(I)
2
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
ln K i2g (I) ln K i2 g(I) w sa,max(I) ln K i2 g(I)
Thus
q i(I)
a 1 ( f w )
= c(I)
inj
ln K i2g (I) ( Vt )inj
3 k 0rj(I) (R f ,max(I) 1) w sa (I) 0
k rj(I) j(I)
( Pwf Pj(I) )
1
2 f (I)
j=1 j(I) R f (I)
R
ln K i2 g(I)
k 0
rj(I)
w sa,max(I) ln K i2g(I) R f (I) j(I) ln K i2 g(I)
2
with
Therefore
403
N s(I) M s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
ln K i2g (I) ln K i2g(I) (1-(I) ) R(I) ln K i2g(I)
and
q i(I)
a 1 ( f w )
= c(I)
inj
ln K i2g(I) ( Vt )inj
3 k 0rj(I) (R f ,max(I) 1) M s(I) (I) N s(I) k 0rj(I) j(I)
1
R f (I) k 0rj(I) ( P Pj(I ) )
j=1 j(I) R f (I)
2
ln K i2 g(I) w sa,max(I) (1-(I) ) R(I) ln K i2g(I) R f (I) 2j(I) ln K i 2g(I) wf
Where
nc
N s = Ls N T =Ls N i
i =1
Hence
So finally we have
q i(I)
a 1 ( f w ) 3 k rj(I)
0
k 0rj(I) j(I)
= c(I)
inj
( Pwf Pj(I) )
1
ln K i2g(I)
( Vt )inj j=1 j(I) R f (I) ln K i2g(I) R f (I) j(I) ln K i2g(I)
2
M a M accum M conv
a
M source
a
= +
ln K i2g(I1) ln K i2g(I1) ln K i2g(I 1) ln K i2g (I 1)
404
For the accumulation term, we have
For the cell to the left side of diagonal in x direction, the four scenarios are
1. = v j(I1/ 2)
ln K i2g(I 1) ln K i2 g(I1)
M aconv
2. =0
ln K i2g(I 1)
3. = v j(I1/ 2)
ln K i2g(I 1) ln K i2 g(I1)
M aconv
4. =0
ln K i2g(I 1)
Tia1 j(I1)
Substituting (I) with (I-1) in Equation (D.1), we can get the terms for oil and
ln K i2g(I 1)
gas phases.
Similarly, for the cell to the right side of diagonal in x direction, we have
M aconv
1. =0
ln K i2g(I +1)
2. = v j(I +1/ 2)
ln K i2g(I+1) ln K i2 g(I+1)
3. = v j(I +1/ 2)
ln K i2g(I+1) ln K i2 g(I+1)
405
M aconv
4. =0
ln K i2g(I +1)
M source
a
q ia1 (I)
= =0
ln K i2g(I1) ln K i2 g(I1)
For the convection term, if neglecting the effect of the change in N i on capillary
pressure we have
v j(I)
=0
N i(I)
406
Tia1 j(I) x i1 j(I) j(I) arj(I) x i1 j(I) j(I) arj(I)
= = arj(I) j(I) + x i1 j(I) rj(I)
a
+ x i1 j(I) j(I)
Ni2 (I) N i2 (I) Ni2 (I) N i2 (I) N i2 (I)
k arj(I)
a
=
j(I)
rj(I)
Therefore
k arj(I) j(I)
j(I) k arj(I)
Tia1 j(I) k arj(I) x i1 j(I) j(I) N i2 (I) Ni2 (I)
= j(I) + x i1 j(I) + x i1 j(I) j(I)
Ni2 (I) j(I) Ni2 (I) Ni2 (I) j(I)
2
Using the definition of permeability resistance factor to take into account the change of
the relative permeability due to asphaltene precipitation
k 0rj(I)
R f (I) =
k arj(I)
Hence
k 0rj(I)
R k 0
Tia1 j(I) k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I)
j(I)
f (I)
= j(I) + x i1 j(I) +
rj(I) j(I)
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
407
Therefore
j(I)
2j(I) R f (I) 2 R f (I) N i2 (I)
Hence
A rearrangement gives
Ns(I)
=?
Ni2 (I)
408
Let N s be the moles of asphaltene that precipitate from the heaviest component n c in
crude oil. A material balance gives
nc
N s = Ls N T =Ls N i
i =1
Therefore
nc
N i1 (I)
Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) i1 =1 =L
nc
N i1 (I)
= = N T(I) + Ls(I) = Ls(I) s(I) = Ls(I)
Ni2 (I) Ni 2 (I) Ni 2 (I) N i2 (I) N i2 (I) i =1 N i 2 (I)
Tia1 j(I) j(I) k 0rj(I) x i1 j(I) x i1 j(I) k 0rj(I) j(I) x i1 j(I) j(I) k 0rj(I) x i1 j(I) j(I) k 0rj(I) j(I)
= + +
Ni2 (I) j(I) R f (I) Ni2 (I) j(I) R f (I) Ni2 (I) j(I) R f (I) N i2 (I) 2j(I) R f (I) N i2 (I)
k 0 (R 1)M s(I) Ls(I) (I)
x i1 j(I) j(I) rj(I) f ,max(I) (D.2)
j(I) R f (I) 2 w sa,max(I) (1-(I) ) R(I)
1. = v j(I+1/ 2)
Ni2 (I) Ni2 (I)
M aconv
3. =0
Ni2 (I)
M conv
a
Tia1 j(I) Ti1aj(I)
4. = v j(I +1/ 2) v j(I1/ 2)
Ni2 (I) N i2 (I) Ni2 (I)
( q ) = [1 f ] ( z ) ( q )
a
i z w i
a
t z
409
If i1 i 2
q ia1 (I)
=0
N i2 (I)
If i1 = i 2 = i
3 a
q i(I)
a 1 ( f w ) rj(I) ( Pwf Pj(I) )
= c(I) inj j=1
N i(I) ( Vt )inj N i(I)
1 ( f w ) 3 a
inj
= c(I) rj(I)
Using
k 0rj(I)
R f (I) =
k arj(I)
k0
q i(I) 1 ( f w ) 3 rj(I)
R f (I) k 0 ( Pwf Pj(I) )
a
inj rj(I)
N i(I)
= c(I)
( Vt )inj j=1 j(I) N i(I)
R
N
j(I)
2j(I)
f (I) i(I)
410
k 0rj(I) R f (I)
1 ( f w ) 3 R f (I) k 0rj(I)
inj Ni(I) Ni(I) k 0rj(I) j(I) ( Pwf Pj(I) )
( Vt )inj
= c(I) j(I)
R f (I)
j=1
R f2(I) N i(I)
2j(I)
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
and
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Ni(I) N i(I) w sa,max(I) N i(I)
Thus
N i(I)
= c(I)
( Vt )inj j=1 0
R f2(I) 2j(I)
k rj(I) j(I)
R f (I) N i(I)
with
and
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) Ns(I)
N i(I) Ni(I) (1-(I) ) R(I) Ni(I)
411
Hence
( Vt )inj
= c(I)
j(I)
R 2
Ni(I) j=1
f (I)
2j(I)
k rj(I) j(I)
0
R f (I) Ni(I)
where
nc
N s = Ls N T =Ls N i
i =1
Thus
nc
N i(I)
N s(I) (Ls(I) N T(I) ) Ls(I) N T(I) Ls(I) i =1 =L
= = N T(I) + Ls(I) = N T(I) + Ls(I)
Ni(I) N i(I) Ni(I) Ni(I) Ni(I) Ni(I)
s(I)
1 k 0rj(I) 0
k rj(I) j(I)
2
q i(I)
a 1 ( f w ) 3 j(I) R f (I) N i(I) j(I) R f (I) N i(I)
( Pwf Pj(I) )
inj
= c(I) 0
Ni(I) ( Vt )inj j=1 k rj(I) (R f ,max(I) 1)M s(I) (I) Ls(I)
j(I) R f (I) w sa ,max(I) (1-(I) ) R(I)
2
412
Vb(I) (I) Ni1 (I)
M accum t =0
=
N i2 (I1) Ni2 (I1)
For convection term, the derivatives of the four scenarios for the cell to the left side of
the diagonal in x direction are
M aconv Tiaj(I1)
1. = 1 v j(I1/ 2)
N i2 (I 1) Ni2 (I1)
M aconv
2. =0
N i2 (I 1)
M aconv Tiaj(I1)
3. = 1 v j(I1/ 2)
N i2 (I 1) Ni2 (I1)
M aconv
4. =0
N i2 (I 1)
Tia1 j(I 1)
Substituting (I) with (I-1) in Equation (D.2), we can get the terms for oil and gas
N i2 (I 1)
phases.
Similarly, for the cell to the right side of the diagonal in x direction, we have
M aconv
1. =0
N i2 (I +1)
413
M aconv
4. =0
N i2 (I +1)
Tia1 j(I+1)
Substituting (I) with (I+1) in Equation (D.2), we can get the terms for oil and
N i2 (I+1)
gas phases.
q ia1 (I)
=0
N i2 (I 1)
M a M accum M conv
a
M source
a
= +
P(I) P(I) P(I) P(I)
V N
b(I) (I) i(I)
M accum
=
t = Vb(I) cf 0(I) N i(I)
P(I) P(I) t
For the convection term, the derivative of transmissibility with respect to pressure with
the effect of asphaltene precipitation is
Tij(I)
a
x ij(I) j(I) arj(I) x ij(I) j(I) arj(I)
= = a
j(I) + x ij(I) a
+ x ij(I) j(I)
P(I) P(I) P(I) P(I) P(I)
rj(I) rj(I)
414
x ij(I)
=0
P(I)
Knowing that
k arj(I)
a
=
j(I)
rj(I)
Therefore
k arj(I) j(I)
j(I) k arj(I)
T a
k a
j(I) P(I) P(I)
ij(I)
= x ij(I) rj(I)
+ x ij(I) j(I)
P(I) j(I) P(I) 2
j(I)
Using the definition of permeability resistance factor to take into account the change of
relative permeability due to asphaltene precipitation
k 0rj(I)
R f (I) =
k arj(I)
Hence
k 0rj(I)
0
Tij(I) k rj(I) j(I) R f (I)
k rj(I) j(I)
a 0
=
x ij(I)
P(I) 2j(I) j(I) R P
+ j(I)
P(I)
j(I)
R f (I) P(I)
f (I) (I)
k 0rj(I) R f (I)
0 R k 0rj(I)
k rj(I) j(I) + P(I) P(I) k rj(I) j(I)
f (I) 0
x ij(I)
= j(I) R
2j(I) P j(I) R
f (I) P(I)
j(I)
R f2(I)
f (I) (I)
415
k 0rj(I) R f (I)
R f (I) k rj(I)
0
x ij(I) 0 j(I) P(I) P(I) j(I)
= 2 j(I) k rj(I) + j(I) j(I) k rj(I) P
0
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Therefore
Tij(I)
a
x ij(I) j(I) k 0rj(I)
= 2 j(I) k rj(I) + j(I) j(I)
0
Thus
Tij(I)
a
x ij(I) j(I) k 0rj(I)
=
j(I) rj(I)
k 0
+
P(I) o(I) P(I) P(I)
2 j(I) j(I)
R f (I)
(R f ,max(I) 1) N s(I) M s(I) (I)
j(I) j(I) k rj(I)
0
(1-(I) ) R(I) k 0 j(I)
w sa ,max(I)
P(I) P(I)
j(I) rj(I)
R f (I)
416
A rearrangement gives
Tij(I)
a
x ij(I) j(I) k 0rj(I)
= 2 j(I) k rj(I)
0
+ j(I) j(I)
P(I) j(I) R f (I) P(I) P(I)
(R 1)
j(I) j(I) k 0rj(I) f ,max(I)
w sa,max(I) M s(I) (I) Ns(I) j(I)
k 0
Focusing on
N s(I)
=?
P(I)
Let N s be the moles of asphaltene that precipitate from the heaviest component n c in
crude oil. A material balance gives
nc
N s = Ls N T =Ls N i
i =1
nc
N i(I)
Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1 =L
nc
N i(I)
= = N T(I) + Ls(I) = Ls(I) s(I) =0
P(I) P(I) P(I) P(I) P(I) i =1 P(I)
Tij(I)
a
x ij(I) j(I) k rj(I)
0
j(I)
= j(I) k 0rj(I) + j(I) j(I) k rj(I)
0
(C.3)
P(I) 2
R f (I) P(I) P(I) P(I)
j(I)
M aconv Tij(I)
a
1. = v j(I +1/ 2)
P(I) P(I)
417
M aconv Tij(I)
a
2. = v j(I1/ 2)
P(I) P(I)
M conv
3. =0
P(I)
M aconv Tij(I)
a
Tij(I)
a
k arj(I) j(I)
1 ( f w ) 3 j(I) P k rj(I) P
a
q i(I)
a
inj
a
k rj(I)
P(I)
= c(I)
( Vt )inj
(I)
2j(I)
(I)
( Pwf Pj(I) )
j=1
j(I)
Using
k 0rj(I)
R f (I) =
k arj(I)
Thus
k 0rj(I)
R f (I) k 0 k 0rj(I)
rj(I)
1 ( f w ) 3 j(I)
j(I)
q i(I)
a
P(I) R f (I) P(I)
inj R f (I)
= c(I)
( Vt )inj
(P Pj(I) )
P(I) j=1 j(I)
2 wf
j(I)
Focusing only on the terms that will be affected by asphaltene precipitation we will have
k0 k 0 R f (I)
ro(I) R f (I) ro(I) k 0ro(I)
R f (I) P(I) P(I)
=
P(I) 2
R f (I)
418
Thus
k 0rj(I) R f (I)
R k 0rj(I)
P(I) P(I) k 0rj(I) j(I)
f (I)
k 0rj(I)
1 ( f w ) 3 j(I)
q i(I)
a
inj R f2(I) R f (I) P(I) R
P(I)
= c(I)
( Vt )inj j=1
j(I)
2 ( Pwf Pj(I) ) f (I)
j(I)
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Therefore,
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
P(I) P(I) w sa,max(I) P(I)
Hence,
k 0rj(I) (R 1) w sa (I)
R k 0rj(I) f ,max(I)
P(I) P(I) k 0rj(I) j(I)
f (I)
w sa,max(I)
q i(I)
a 1 ( f w ) 3 j(I) R 2
R f (I) P(I)
( Vt )inj
= c (I)
inj f (I)
P(I) j=1 2j(I)
k 0rj(I)
( wf
P P j(I) )
R f (I) j(I)
with
Therefore
419
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
P(I) P(I) (1-(I) ) R(I) P(I)
k 0rj(I) (R 1) M s(I) (I) N s(I)
R f (I) k 0ro(I) f ,max(I)
P(I) w sa,max(I) (1-(I) ) R(I) P(I) k 0rj(I) j(I)
q i(I)
a 1 ( f w ) 3 j(I) R f2(I)
R f (I) P(I)
inj
= c (I)
P(I) ( Vt )inj j=1 j(I)
2
k 0rj(I)
( Pwf Pj(I) )
R f (I) j(I)
Where,
nc
N s = Ls N T =Ls N i
i =1
Thus,
nc
N i(I)
Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1 =0
= = N T(I) + Ls(I) = Ls(I)
P(I) P(I) P(I) P(I) P(I)
k 0rj(I) j(I)
1 ( f w ) 3 k 0
q i(I) P(I) P(I)
a j(I) rj(I)
inj k 0rj(I)
P(I)
= c(I)
( Vt )inj R f (I) 2j(I)
( Pwf Pj(I) ) R
j=1
f (I) j(I)
M a M accum M conv
a
M source
a
= +
P(I1) P(I1) P(I1) P(I1)
420
For the accumulation term
M accum
=0
P(I1)
For the convection term, the derivatives of the four scenarios for the cell to the left side
of the diagonal in x direction are
M conv
a
Tij(I
a
1)
1. = v j(I1/ 2)
P(I1) P(I 1)
M aconv
2. =0
P(I1)
M conv
a
Tij(I
a
1)
3. = v j(I1/ 2)
P(I1) P(I 1)
M aconv
4. =0
P(I1)
Tij(I
a
1)
Substituting (I) with (I-1) in Equation (D.3), we can get the terms for oil and gas
P(I 1)
phases.
Similarly, for the cell to the right side of the diagonal in x direction, we have
M aconv
1. =0
P(I+1)
M aconv Tij(I
a
+1)
2. = v j(I +1/ 2)
P(I+1) P(I +1)
M aconv Tij(I
a
+1)
3. = v j(I +1/ 2)
P(I+1) P(I +1)
M aconv
4. =0
P(I+1)
421
Tij(I
a
+1)
Substituting (I) with (I+1) in Equation (D.3), we can get the terms for oil and gas
P(I+1)
phases.
M source
a
=0
P(I 1)
M a M accum M conv
a
M source
a
= +
ln K n cs(I) ln K n cs(I) ln K n cs(I) ln K n cs(I)
For the convection term, neglecting the effect of the change in ln K n cs on capillary
pressure, then
v j(I)
=0 i = nc
ln K is(I)
Knowing that
422
k arj(I)
a
=
j(I)
rj(I)
Therefore,
k arj(I) j(I)
j(I) k arj(I)
T a
k a
x i1 j(I) j(I) ln K n cs(I) ln K n cs(I)
= j(I) + x i1 j(I) + x i1 j(I) j(I)
i1 j(I) rj(I)
Using the definition of permeability resistance factor for the oil phase to take into account
the change of the relative permeability due to asphaltene precipitation
k 0rj(I)
R f (I) =
k arj(I)
Thus,
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I)
ln K ncs(I) j(I) R f (I) ln K ncs(I) ln K ncs(I) 2j(I) R f (I) ln K ncs(I)
k0
rj(I)
x i j(I) j(I) R f (I)
+ 1 2
j(I) j(I)
ln K ncs( I)
Thus,
423
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k rj(I)
0
j(I)
= j(I) + x i1 j(I)
ln K ncs(I) j(I) R f (I) ln K ncs(I)
ln K ncs(I) j(I) R f (I) ln K ncs(I)
2
R f (I)
Focusing on and using the linear model for permeability resistance factor
ln K n cs(I)
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Therefore,
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
ln K n cs(I) ln K n cs(I) w sa,max(I) ln K n cs(I)
Thus,
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k rj(I)
0
j(I)
=
j(I) + x
ln K ncs(I) j(I) R f (I) ln K ncs(I) ln K ncs(I) j(I) R f (I) ln K ncs(I)
i1 j(I) 2
w sa (I)
Focusing on and knowing that w sa , mass of adsorbed asphaltene per mass of
ln K n cs(I)
rock is defined as
Hence,
424
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
ln K n cs(I) ln K n cs(I) (1-(I) ) R(I) ln K ncs(I)
And,
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I)
ln K ncs(I) j(I) R f (I) ln K ncs(I) ln K ncs(I) 2j(I) R f (I) ln K ncs(I)
Ns(I)
To get , let N s be the moles of asphaltene that precipitate from the heaviest
ln K n cs(I)
component n c in crude oil. A material balance gives
nc
N s = Ls N T =Ls N i
i =1
Hence,
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k rj(I)
0
j(I)
= j(I) + x i1 j(I)
ln K ncs(I) j(I) R f (I) ln K ncs(I) ln K ncs(I) 2j(I) R f (I) ln K ncs(I)
(D.4)
x i1 j(I) j(I) k 0rj(I)
+
j(I) R f (I) ln K n cs(I)
425
M aconv Ti1 j(I) a
1. = v j(I+1/ 2)
ln K n cs(I) ln K n cs(I)
2. = v j(I1/ 2)
ln K n cs(I) ln K n cs(I)
M aconv
3. =0
ln K n cs(I)
k arj(I) j(I)
1 ( f w ) 3 j(I) ln K k arj(I)
q a
inj ln K n cs(I) P P
= c(I) ( wf j(I) )
i(I) n cs(I)
Using
k 0ro(I)
R f (I) =
k aro(I)
k 0rj(I)
R k 0
f (I) rj(I) j(I)
q i(I)
a 1 ( f w ) 3 j(I) ln K n cs(I) R f (I) ln K n cs(I)
inj
ln K n cs(I)
= c(I)
( Vt )inj 2j(I)
(P
wf Pj(I) )
j=1
A rearrangement gives
426
k 0rj(I)
1 ( f w ) 3
q i(I)
a
R k 0
ln K n cs(I)
= c(I)
V
inj
( t )inj j=1 j(I)
1
ln K
f (I) rj(I) j(I)
Focusing on
k0 k 0rj(I) R f (I)
rj(I) R f (I) k 0
R f (I) ln K n cs(I)
rj(I)
ln K n cs(I)
=
ln K n cs(I) 2
R f (I)
Thus
q i(I)
a 1 ( f w )
= c(I)
inj
ln K n cs(I) ( Vt )inj
3 k 0rj(I) R f (I) k 0rj(I) j(I)
R f (I) 2j(I) ln K n s(I) ( wf
P Pj(I) )
1
2
j=1 j(I) R f (I)
R f (I)
ln K n cs(I)
k 0rj(I)
ln K n cs(I)
c
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence,
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I) w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
ln K n cs(I) ln K n cs(I) w sa,max(I) ln K n cs(I)
Thus
427
1 f
q i(I) ( w )inj
a
= c(I)
ln K n cs(I) ( Vt )inj
3 k 0rj(I) (R f ,max(I) 1) w sa (I) k 0rj(I) j(I)
( Pwf Pj(I) )
1
R f (I)
j=1 j(I) R f (I) ln K n cs(I)
k rj(I)
0
w sa ,max(I) ln K n cs(I)
R f (I) j(I) ln K n cs(I)
2 2
with
Therefore,
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
ln K n cs(I) ln K n cs(I) (1-(I) ) R(I) ln K ncs(I)
and
q i(I)
a 1 ( f w )
= c(I) inj
ln K n cs(I) ( Vt )inj
1 k 0rj(I) (R f ,max(I) 1) M s(I) (I) Ns(I) k 0rj(I) j(I)
R k 0
( )
3
f (I) ln K n cs(I)
rj(I)
2 2
R w 1- ln K R ln K
j(I) f (I)
sa,max(I) (I) R(I) n c s(I)
f (I) j(I) n c s(I)
j=1
(P wf Pj( I) )
where
nc
N s = Ls N T =Ls N i
i =1
Hence,
428
nc
Ni(I)
Ls(I) i =1 =L
nc
N i(I)
= N T(I) + Ls(I) s(I) =0
ln K n cs(I) ln K n cs(I) i =1 ln K n cs(I)
So finally we have
1 f 3
q i(I) ( w )inj k rj(I) j(I)
a 0 0
k rj(I)
( Pwf Pj(I) )
1
ln K n cs(I)
= c(I)
( Vt )inj j=1 j(I) R f (I) ln K ncs(I) R f (I) j(I) ln K ncs(I)
2
M a M accum M conv
a
M source
a
= +
ln K n cs(I1) ln K n cs(I1) ln K n cs(I1) ln K n cs(I1)
For the cell to the left side of diagonal in x direction, the four scenarios are
M aconv
2. =0
ln K n cs(I 1)
M aconv
4. =0
ln K n cs(I 1)
429
Tia1 j(I 1)
Substituting (I) with (I-1) in Equation (D.4), we can get the terms for oil and
ln K n cs(I1)
gas phases.
Similarly, for the cell to the right side of diagonal in x direction, we have
M aconv
1. =0
ln K n cs(I +1)
M aconv
4. =0
ln K n cs(I +1)
M source
a
q ia1 (I)
= =0
ln K n cs(I 1) ln K n cs(I 1)
430
For the accumulation term, we have
For the convection term, the derivative of transmissibility with respect to mole fraction
of gas phase with the effect of asphaltene precipitation is
Knowing that
k arj(I)
arj(I) =
j(I)
Therefore
k arj(I) j(I)
j(I) k arj(I)
T a
k a
x i j(I) j(I) L g(I) Lg(I)
= j(I) 1 + x i1 j(I) + x i1 j(I) j(I)
i1 j(I) rj(I)
Using the definition of permeability resistance factor for the oil phase to take into account
the change of the relative permeability due to asphaltene precipitation
k 0rj(I)
R f (I) =
k arj(I)
Thus
431
k 0rj(I)
Tia1 j(I) k 0rj(I) x i j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I) x i1 j(I) j(I) R
f (I)
= j(I) 1 + x i1 j(I) + j(I)
Lg (I) j(I) R f (I) Lg (I) Lg(I) 2
R L 2j(I) Lg(I)
j(I) f (I) g (I)
k0 k 0 R f (I)
rj(I) R f (I) rj(I) k rj(I)
0
R f (I) Lg(I) Lg(I) 1 k rj(I) k rj(I) R f (I)
0 0
= =
Lg(I) R f (I) 2 R f (I) L g(I) R f (I) 2 Lg(I)
Thus
R f (I)
Focusing on and using the linear model for permeability resistance factor
Lg(I)
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Therefore
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Lg(I) Lg(I) w sa,max(I) Lg(I)
Thus
432
Tia1 j(I) k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I)
Lg (I) j(I) R f (I) Lg (I) Lg(I) 2j(I) R f (I) Lg(I)
x i1 j(I) j(I) 1 k 0rj(I) k 0rj(I) (R f ,max(I) 1) w sa (I)
+
j(I) R f (I) Lg(I) R f (I) 2 w sa,max(I) Lg(I)
w sa (I)
Focusing on and knowing that w sa , mass of adsorbed asphaltene per mass of
Lg(I)
rock is defined as
Hence
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) Ns(I)
L g(I) Lg(I) (1-(I) ) R(I) Lg(I)
and
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
=
j(I) + x i1 j(I)
Lg (I) j(I) R f (I) Lg (I) Lg(I) 2j(I) R f (I) Lg(I)
Ns(I)
To get let N s be the moles of asphaltene that precipitate from the heaviest
Lg (I)
component n c in crude oil. A material balance gives
nc
N s = Ls N T =Ls N i
i =1
Hence
433
nc
Ni(I)
Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1 =L
nc
Ni(I)
= = N T(I) + Ls(I) = Ls(I) s(I) =0
Lg (I) Lg(I) Lg(I) Lg(I) Lg(I) i =1 L g(I)
1. = v j(I+1/ 2)
Lg(I) Lg(I)
M aconv
3. =0
Lg(I)
4. = v j(I+1/ 2) 1 v j(I 1/ 2)
Lg(I) Lg(I) Lg(I)
k arj(I) j(I)
1 ( f w ) 3 j(I) L k rj(I) L
a
q a
inj P P
( wf j(I) )
= c(I)
i(I) g(I) g(I)
Using
434
k 0rj(I)
R f (I) =
k arj(I)
k 0rj(I)
R
k rj(I) j(I)
0
f (I)
q i(I)
a 1 ( f w ) 3 j(I) Lg (I) R f (I) Lg (I)
inj
Lg(I)
= c(I)
( Vt )inj 2j(I)
(P
wf Pj(I) )
j=1
A rearrangement gives
k 0rj(I)
1 ( f w ) 3
q i(I) 1 R f (I) k 0rj(I) j(I)
a
inj
Lg (I)
= c(I)
( Vt )inj
R f (I) 2j(I) Lg(I)
( Pwf Pj(I) )
j=1 j(I) Lg(I)
Focusing on
Thus
q i(I)
a 1 ( f w )
= c(I) inj
Lg (I) ( Vt )inj
3 k 0rj(I) R f (I) k 0rj(I) j(I)
( Pwf Pj(I) )
1
R f (I)
j=1 j(I) R f (I)
2
Lg(I)
k rj(I)
0
Lg(I) R f (I) 2j(I) Lg(I)
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence,
435
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Lg(I) Lg(I) w sa,max(I) Lg(I)
Thus
q i(I)
a 1 ( f w )
= c(I) inj
Lg (I) ( Vt )inj
3 k 0rj(I) (R f ,max(I) 1) w sa (I) k 0rj(I) j(I)
( Pwf Pj(I) )
1
j=1 j(I) R f (I)
R
Lg(I)
k 0
w sa,max(I) Lg(I)
R f (I) j(I) Lg(I)
2 f (I) rj(I) 2
with
Therefore
N s(I) M s(I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) Ns(I)
Lg(I) L g(I) (1-(I) ) R(I) Lg(I)
and
qi(I)
a 1 ( f w )
= c(I)
inj
L g(I) ( Vt )inj
3 k 0rj(I) (R f ,max(I) 1) M s(I) (I) Ns(I) k 0rj(I) j(I)
( Pwf Pj(I) )
1
j=1 j(I) R f (I)
2
R f (I)
L g(I)
k 0
rj(I)
w sa,max(I) (1-(I) ) R(I) Lg(I) R f (I) 2j(I) L g(I)
where
nc
N s = Ls N T =Ls N i
i =1
Hence,
436
nc
Ni(I)
Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1 =L
nc
Ni(I)
= = N T(I) + Ls(I) = Ls(I) s(I) =0
Lg (I) Lg(I) Lg(I) Lg(I) Lg(I) i =1 L g(I)
So finally we have
q i(I)
a 1 ( f w ) 3 k 0rj(I) 0
j(I)
= c(I)
inj k rj(I)
(P P )
1
L g(I)
( Vt )inj j=1 j(I) R f (I) Lg (I) R f (I) j(I) Lg(I) wf j(I)
2
M a M accum M conv
a
M source
a
= +
Lg(I1) Lg(I1) L g(I1) Lg(I 1)
For the cell to the left side of diagonal in x direction, the four scenarios are
M aconv
2. =0
Lg(I 1)
M aconv Tiaj(I 1)
3. = 1 v j(I 1/ 2)
Lg(I1) Lg(I 1)
M aconv
4. =0
Lg(I 1)
437
Tia1 j(I 1)
Substituting (I) with (I-1) in Equation (D.5), we can get the terms for oil and gas
Lg(I1)
phases.
Similarly, for the cell to the right side of diagonal in x direction, we have
M aconv
1. =0
Lg(I +1)
2. = v j(I+1/ 2)
Lg(I+1) Lg(I+1)
3. = v j(I+1/ 2)
Lg(I+1) Lg(I+1)
M aconv
4. =0
Lg(I +1)
M source
a
qia1 (I)
= =0
Lg(I 1) Lg(I 1)
438
Vb(I) (I) N i1 (I)
M accum t
= =0
Ls(I) Ls(I)
For the convection term, the derivative of transmissibility with respect to mole fraction
of gas phase with the effect of asphaltene precipitation is
Knowing that
k arj(I)
a
=
j(I)
rj(I)
Therefore
k arj(I) j(I)
j(I) k rj(I)
a
T a
k a
x i j(I) j(I) Ls(I) Ls(I)
= j(I) 1 + x i1 j(I) + x i1 j(I) j(I)
i1 j(I) rj(I)
Using the definition of permeability resistance factor for the oil phase to take into account
the change of the relative permeability due to asphaltene precipitation
k 0rj(I)
R f (I) =
k arj(I)
Thus
k0
rj(I)
T a 0
x i j(I) j(I) x i1 j(I) j(I) k j(I) x i1 j(I) j(I)
0 R
k f (I)
= j(I) 1 + x i1 j(I) + j(I)
i1 j(I)
rj(I) rj(I)
Ls(I) j(I) R f (I) Ls(I) Ls(I) 2j(I) R f (I) Ls(I) 2j(I) Ls(I)
439
k0 k 0 R f (I)
rj(I) R f (I) rj(I) k 0rj(I)
R f (I) Ls(I) Ls(I) 1 k rj(I) k rj(I) R f (I)
0 0
= =
Ls(I) R f (I) 2 R f (I) Ls(I) R f (I) 2 Ls(I)
Thus
R f (I)
Focusing on and using the linear model for permeability resistance factor
Ls(I)
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Therefore,
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Ls(I) Ls(I) w sa,max(I) Ls(I)
Thus
w sa (I)
Focusing on and knowing that w sa , mass of adsorbed asphaltene per mass of
Ls(I)
rock is defined as
440
Ns(I) M s(I) (I)
w sa(I) =
(1- )
(I) R(I)
Hence,
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) Ns(I)
Ls(I) Ls(I) (1-(I) ) R(I) Ls(I)
and
Tia1 j(I)
k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
=
j(I) + x
Ls(I) j(I) R f (I) Ls(I) Ls(I) 2j(I) R f (I) Ls(I)
i1 j(I)
N s(I)
To get let N s be the moles of asphaltene that precipitate from the heaviest
Ls(I)
component n c in crude oil. A material balance gives
nc
N s = Ls N T =Ls N i
i =1
Hence,
nc
N i(I)
N s(I) Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1
= = = N T(I) + Ls(I) = N T(I) + Ls(I)
Ls(I) Ls(I) Ls(I) Ls(I) Ls(I) Lg (I)
nc
Ni(I)
=N T(I) + Ls(I) = N T(I)
i =1 Lg(I)
441
Tia1 j(I) k 0rj(I) x i1 j(I) j(I) x i1 j(I) j(I) k 0rj(I) j(I)
= j(I) + x i1 j(I)
Ls(I) j(I) R f (I) Ls(I) Ls(I) 2j(I) R f (I) Ls(I)
(D.6)
x i1 j(I) j(I) k 0rj(I) x i1 j(I) j(I) k 0rj(I) (R f ,max(I ) 1)M s(I) (I) N T(I)
+
j(I) R f (I) Ls(I) R f (I) 2 j(I) w sa,max(I) (1-(I) ) R(I)
1. = v j(I+1/ 2)
Ls(I) Ls(I)
M aconv Ti j(I) a
2. = 1 v j(I1/ 2)
Ls(I) Ls(I)
M aconv
3. =0
Ls(I)
4. = v j(I+1/ 2) 1 v j(I 1/ 2)
Ls(I) Ls(I) Ls(I)
k arj(I) j(I)
1 ( f w ) 3 j(I) L k rj(I) L
a
q a
inj P P
( wf j(I) )
= c(I)
i(I) s(I) s(I)
Using
k 0rj(I)
R f (I) =
k arj(I)
k 0rj(I)
R k 0
f (I) rj(I)
1 ( f w ) 3 j(I)
j(I)
q i(I)
a
inj Ls(I) R f (I) Ls(I)
Ls(I)
= c(I)
( Vt )inj 2j(I)
(P wf Pj(I) )
j=1
442
A rearrangement gives
k 0rj(I)
1 ( f w ) 3
q i(I)
a
R f (I) k 0rj(I) j(I)
Ls(I)
= c(I)
( Vt )inj
inj
1
Ls(I)
( Pwf Pj(I) )
j=1 j(I) Ls(I) R f (I) 2j(I)
Focusing on
k0 k 0rj(I) R f (I)
rj(I) R f (I) k rj(I)
0
R f (I) Ls(I) Ls(I)
=
Ls(I) 2
R f (I)
Thus
q i(I)
a 1 ( f w ) 3 k 0rj(I) R f (I) k 0rj(I) j(I)
= c(I)
inj
R 2 L ( wf
P Pj(I) )
1
( Vt )inj
R
f (I) L
k 0
Ls(I) j=1 j(I) R f (I)
2 rj(I)
s(I) L s(I) f (I) j(I) s(I)
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence,
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Ls(I) Ls(I) w sa,max(I) Ls(I)
Thus,
443
q i(I)
a 1 ( f w )
= c(I) inj
Ls(I) ( Vt )inj
3 k 0rj(I) (R f ,max(I) 1) w sa (I) k 0rj(I) j(I)
( Pwf Pj(I) )
1
R f (I)
j=1 j(I) R f (I)
2
k rj(I)
0
2
L s(I) w sa,max(I) L s(I) R f (I) j(I) L s(I)
with
Therefore
N s(I) M s(I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) Ns(I)
Ls(I) Ls(I) (1-(I) ) R(I) Ls(I)
and
q i(I)
a 1 ( f w )
= c(I) inj
Ls(I) ( Vt )inj
3 k 0rj(I) (R f ,max(I) 1) M s(I) (I) N s(I) k 0rj(I) j(I)
( Pwf Pj(I) )
1
j=1 j(I) R f (I)
2
R f (I)
Ls(I)
k 0
rj(I)
w sa ,max(I) (1-(I) ) R(I) Ls(I) R f (I) 2j(I) Ls(I)
where
nc
N s = Ls N T =Ls N i
i =1
Hence
nc
N i(I)
N s(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1
= = N T(I) + Ls(I) = N T(I) + Ls(I)
Ls(I) Ls(I) Ls(I) Ls(I) Ls(I)
444
nc
Ni(I)
= N T(I) + Ls(I) = N T(I)
i =1 Ls(I)
So finally we have
q i(I)
a 1 ( f w )
= c(I) inj
Ls(I) ( Vt )inj
3 k 0rj(I) k 0rj(I) j(I) k 0rj(I) (R f ,max(I) 1)M s(I) (I) N T(I)
( Pwf Pj(I) )
1
j=1 j(I) R f (I) Ls(I)
R f (I) 2j(I) Ls(I) j(I) R f2(I) w sa ,max(I) (1-(I) ) R(I)
M a M accum M conv
a
M source
a
= +
Ls(I 1) Ls(I1) Ls(I 1) Ls(I1)
For the cell to the left side of diagonal in x direction, the four scenarios are
M aconv Tiaj(I 1)
1. = 1 v j(I 1/ 2)
Ls(I1) Ls(I 1)
M aconv
2. =0
Ls(I1)
M aconv
4. =0
Ls(I1)
445
Tia1 j(I 1)
Substituting (I) with (I-1) in Equation (D.6), we can get the terms for oil and gas
Ls(I1)
phases.
Similarly, for the cell to the right side of diagonal in x direction, we have
M aconv
1. =0
Ls(I+1)
2. = v j(I+1/ 2)
Ls(I+1) Ls(I+1)
3. = v j(I+1/ 2)
Ls(I+1) Ls(I+1)
M aconv
4. =0
Ls(I+1)
M source
a
q ia1 (I)
= =0
Ls(I 1) Ls(I 1)
446
Appendix E: Derivatives of Mass Conservation Equation for Water
The derivative of the convection term of the water mass balance with respect to ln K ig
equation is zero.
M conv
=0
ln K ig(I)
k arj(I) j(I)
j(I) k arj(I)
q w (I) ( f w )inj ln K ig(I) ln K ig(I)
Pwf Pj(I) )
3
ln K ig(I)
= c(I)
( Vt )inj j(I)
2 (
j=1
Using
k 0rj(I)
R f (I) =
k arj(I)
Thus
447
k 0rj(I)
R f (I) k 0
j(I) rj(I) j(I)
k 0ro(I) R f (I)
f (I)
R k ro(I)
0
ln K ig(I) ln K ig(I) k rj(I) j(I)
0
j(I) 2
R f (I)
R f (I) ln K ig(I)
( f w )inj 3
= c(I)
( Vt )inj
2j(I)
( Pwf P )
j(I)
j=1
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa ,max(I) (R f ,max(I) 1) w sa (I)
= =
ln K ig(I) ln K ig(I) w sa ,max(I) ln K ig(I)
with
Therefore
448
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) Ns(I)
ln K ig(I) ln K ig(I) (1-(I) ) R(I) ln K ig(I)
where
nc
N s = Ls N T =Ls N i
i =1
Hence
Hence
k 0ro(I) j(I)
j(I) k 0rj(I)
q w (I) ( f w )inj 3
ln K ig(I) ln K i2g (I)
ln K ig(I)
= c(I)
( Vt )inj R f (I) j(I)
2 ( Pwf Pj(I) )
j=1
q w (I)
Note that in Peng's code = 0.
ln K ig(I)
449
M M accum M conv M source
= +
ln K ig (I 1) ln K ig(I 1) ln K ig(I1) ln K ig(I1)
The derivative of the convection term of the water mass balance equation with respect to
ln K ig is zero.
M conv
=0
ln K ig (I 1)
M source q w (I)
= =0
ln K ig(I 1) ln K ig (I1)
M a M accum M conv
a
M source
a
= +
N w (I) N w (I) N w (I) N w (I)
V N
b(I) (I) w (I)
M accum t = Vb(I) (I)
=
N w (I) N w (I) t
450
M conv
a ( Tw (I) v w (I 1/ 2) ) ( aw (I) w (I) v w (I 1/ 2) ) v w (I 1/ 2) k rw
a
= = = w (I) (I)
Using the definition of permeability resistance factor to take into account the change of
the relative permeability due to asphaltene precipitation
k 0rj(I)
R f (I) =
k arj(I)
So we have
k 0rw (I)
R f (I)
k = 1 R k rw (I) k 0 R f (I) = 1 k rw (I) k rw (I) R f (I)
a 0 0 0
= f (I)
rw (I)
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
And
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I) w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Sw (I) Sw (I) w sa,max(I) Sw (I)
Hence
= 2
Sw (I) R f (I) Sw (I) R f (I) w sa,max(I) Sw (I)
451
Ns(I) M s(I) (I)
w sa(I) =
(1- )
(I) R(I)
Therefore
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
Sw (I) Sw (I) (1-(I) ) R(I) Sw (I)
Hence
= 2
Sw (I) R f (I) Sw (I) R f (I) w sa,max(I) (1-(I) ) R(I) Sw (I)
Let N s be the moles of asphaltene that precipitate from the heaviest component n c in
crude oil. A material balance gives
nc
N s = Ls N T =Ls N i
i =1
Thus
nc
N i(I)
N s(I) (Ls(I) N T(I) ) Ls(I) N T(I) Ls(I) i =1
= = N T(I) + Ls(I) = N T(I) + Ls(I)
Sw (I) Sw (I) Sw (I) Sw (I) Sw (I) Sw (I)
Ls(I) nc
Ni(I)
= N T(I) + Ls(I) =0
Sw (I) i =1 Sw (I)
=
Sw (I) R f (I) Sw (I)
452
M conv
a
v w (I +1/ 2) k arw (I)
1. =
N w (I) w (I) Sw (I)
M aconv v w (I1/ 2) k rw
a
=
(I)
2.
N w (I) w (I) Sw (I)
M aconv
3. =0
N w (I)
4. =
N w (I) w (I) Sw (I) w (I) Sw (I)
(q ) = (f ) (q )
a
w z w inj
a
t z
With
(Q ) w
(q ) (V )
a
t z =
t z
t inj
where
np
( Q ) = ( PI ) ( P ) ( P )
a
t z
a
j z wf z j z
j=1
PIaj is the productivity index of phase j with the effect of asphaltene precipitation and is
defined as
k x k y z rja
( PI )
a
j z =
r
25.145ln 0
rw
453
1 1
2
k x x 2 k x y 2
2
k k y
y
r0 = 0.28 1 1
ky 4 kx 4
+
kx ky
and
f w L L
( Vt )inj = + 1 ( f w )inj o + g
w inj inj
o inj g
Lo , Lg , o , and g are mole fractions and mole densities of oil and gas phases and are
obtained from flash calculation.
3
PI j(I) ( Pwf Pj(I) )
q w (I) ( f w )inj j=1 =c ( f w )inj k arw (I) Sw (I)
=
N w (I) ( Vt )inj N w (I)
(I)
( Vt )inj w (I) Sw (I) N w (I)
From the calculations in the convection section
=
Sw (I) R f (I) Sw (I)
and
and
454
Hence
= c(I)
N w (I) ( Vt )inj w (I) R f (I) Sw (I) w (I)
For the derivatives of the source term with respect to N i (hydrocarbon components), we
have
Using
k 0rj(I)
R f (I) =
k arj(I)
Thus
k0
rj(I)
q aw (I) ( f w )inj 3 R k 0 ( Pwf Pj(I) )
rj(I)
( Vt )inj
f (I)
= c(I) j(I) R N
j(I)
( Vt )inj
= c(I) j(I)
R f2(I) R f (I) N i(I) 2j(I)
j= 2
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence
455
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Ni(I) Ni(I) w sa,max(I) Ni(I)
Thus
k 0rj(I) (R 1) w sa (I)
R f (I) k 0rj(I) f ,max(I)
Ni(I) w sa,max(I) Ni(I)
q aw (I) ( f w )inj 3 j(I) ( Pwf Pj(I) )
( Vt )inj
2
= c(I) R f (I)
Ni(I) 2j(I)
j= 2
k 0
rj(I) j(I)
R f (I) Ni(I)
with
and
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
N i(I) Ni(I) (1-(I) ) R(I) Ni(I)
Hence
where
nc
N s = Ls N T =Ls N i
i =1
456
Thus
nc
N i(I)
N s(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1 =L
nc
N i(I)
= = N T(I) + Ls(I) = Ls(I) s(I) = Ls(I)
Ni(I) N i(I) Ni(I) N i(I) Ni(I) i =1 N i(I)
q
Note that in Peng's code the term w (I) is zero.
N i(I)
i w
M a M accum M conv
a
M source
a
= +
N w (I1) N w (I 1) N w (I1) N w (I 1)
For the convection term, the derivatives of the four scenarios for the cell to the left side
of the diagonal in x direction are
457
M aconv
2. =0
N w (I1)
M aconv v k a
3. = w (I 1/ 2) rw (I)
N w (I1) w (I1) Sw (I) (I 1)
M aconv
4. =0
N w (I1)
Similarly, the derivatives of the four scenarios for the cell to the left side of the diagonal
in x direction are
M aconv
1. =0
N w (I+1)
M aconv v + k a
2. = w (I 1/ 2) rw (I)
N w (I+1) w (I+1) Sw (I) (I+1)
M aconv
4. =0
N w (I+1)
M source
a
q aw (I)
= =0
N w (I1) N w (I1)
458
M a M accum M conv
a
M source
a
= +
P(I) P(I) P(I) P(I)
V N
M accum
b(I) (I) w (I)
=
t V N
= b(I) w (I) (
r(I) 1 + cf (P(I) P(I) ) V N c
o
)
= b(I) w (I) r(I) f
P(I) P(I) t P(I) t
For the convection term of the water mass balance equation we have
v w (I +1/ 2) ~
= k (I+1/ 2)
P(I)
v w (I1/ 2) ~
= k (I 1/ 2)
P(I)
Twa (I+1)
=0
P(I)
Twa (I1)
=0
P(I)
=
Sw (I) R f (I) Sw (I)
459
Twa (I) 1 1 k rw (I) vw (I) k 0rw w (I)
0
= N +
P(I) w (I) R f (I) Sw (I) P(I) R f P(I)
w (I)
v w (I) w
Note that is used in the code instead of .
P P
1. =
P(I) P(I)
Twa (I) ~ ~
= v w (I +1/ 2) k (I +1/ 2) Twa (I) k (I1/ 2) Twa (I 1)
P(I)
M aconv T + a
~ T ~
a
~ Twa (I) ~
= k (I +1/ 2) Twa (I+1) v w (I1/ 2) k (I1/ 2) Twa (I)
P(I)
M aconv ~ ~
3. = k (I +1/ 2) Twa (I+1) k (I 1/ 2) Twa (I1)
P(I)
M conv
a
Twa (I) ~ Twa (I) ~
4. = v w (I +1/ 2) k (I+1/ 2) Tw (I) v w (I 1/ 2)
a
k (I1/ 2) Twa (I)
P(I) P(I) P(I)
Where
k arw 1 k 0rw
Twa = arw w = w = w
w R f w
460
k arj(I)
j(I) k arj(I) j(I)
q aw (I) ( f w )inj 3 P(I) P(I) k arj(I)
P(I)
= c(I)
( Vt )inj 2j(I)
( Pwf Po(I) )
j=1
j(I)
Using
k 0rj(I)
R f (I) =
k arj(I)
Hence
k 0rj(I)
R f (I) k 0 k 0rj(I)
rj(I) j(I)
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
and
461
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I)
w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
P(I) P(I) w sa,max(I) P(I)
Thus
k 0rj(I) (R 1) w sa (I)
R f (I) k 0rj(I) f ,max(I)
P(I) w P(I) k 0rj(I) j(I)
sa,max(I)
j(I) 2
R f (I)
R f (I) P(I)
q aw (I) ( f w )inj 3
= c(I)
P(I) ( t )inj j=1
V
2j(I)
( Pwf Pj(I) )
k 0ro(I)
R
f (I) o(I)
with
and
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) Ns(I)
P(I) P(I) (1-(I) ) R(I) P(I)
Thus
462
k 0 (R 1) M s(I) (I) N s(I)
R f (I) rj(I) k 0rj(I) f ,max(I)
P(I) w sa ,max(I) (1-(I) ) R(I) P(I) k 0
j(I) rj(I)
j(I)
where
nc
N s = Ls N T =Ls N i
i =1
Thus
nc
Ni(I)
Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) Ls(I)
+ Ls(I) =0
i =1
= = N T(I) + Ls(I) = N T(I)
P(I) P(I) P(I) P(I) P(I) P(I)
k 0
j(I) rj(I) k 0rj(I) j(I)
q aw (I) ( w )inj
f 3 P(I) P(I) 0
k rj(I)
P(I)
= c(I)
( Vt )inj R f (I) 2j(I)
( Pwf Pj(I) ) R
j=1
f (I) j(I)
M a M accum M conv
a
M source
a
= +
P(I1) P(I1) P(I1) P(I1)
( o
M accum Vb(I) N w (I) r(I) 1 + cf (P(I) P(I) ) Vb(I) N w (I)
= =
)
r(I) cf
P(I)
=0
P(I1) t P(I 1) t P(I 1)
463
For the convection term, with the cell to the left side of the diagonal in x direction we
have
v w (I +1/ 2)
=0
P(I1)
v w (I 1/ 2) ~
= k (I 1/ 2)
P(I1)
Twa (I+1)
=0
P(I 1)
Twa (I)
=0
P(I1)
Twa (I 1) ~
= v w (I+1/ 2) + k (I1/ 2) Twa (I 1)
P(I 1)
~
= k (I1/ 2) Twa (I)
464
M aconv Twa (I+1) v w (I+1/ 2) Twa (I1) v w (I 1/ 2)
3. = v w (I +1/ 2) + Tw (I +1)
a
v w (I1/ 2) Twa (I+1)
P(I 1) P(I 1) P(I 1) P(I1) P(I 1)
Twa (I1) ~
= v w (I1/ 2) + k (I1/ 2) Twa (I 1)
P(I1)
~
= k (I1/ 2) Twa (I)
where
k arw k0
Twa (I) = arw w = w = rw w
w R f w
Similarly, for the cell to the right side of the diagonal in x direction we have
v w (I+1/ 2) ~
= k (I+1/ 2)
P(I+1)
v w (I1/ 2)
=0
P(I +1)
Twa (I1)
=0
P(I +1)
Twa (I)
=0
P(I+1)
465
M aconv Twa (I) v w (I+1/ 2) Twa (I1) v w (I1/ 2)
1. = v w (I +1/ 2) + Tw (I)
a
v w (I1/ 2) Twa (I1)
P(I+1) P(I+1) P(I+1) P(I1) P(I+1)
~
= k (I+1/ 2) Twa (I)
~ Twa (I+1) ~
= k (I 1/ 2) T a
= v w (I +1/ 2) + k (I1/ 2) Twa (I+1)
P(I+1)
w (I)
Twa (I+1) ~
= v w (I +1/ 2) + k (I+1/ 2) Twa (I +1)
P(I +1)
~
= k (I+1/ 2) Twa (I)
where
k arw k0
Twa = rw
a
w = w = rw w
w R f w
M source
a
q aw (I)
= =0
P(I1) P(I 1)
466
E.4 DERIVATIVES WITH RESPECT TO lnK n cs
The derivative of the convection term of the water mass balance equation with respect to
ln K n cs is zero.
M conv
=0
ln K n cs(I)
k arj(I) j(I)
k arj(I)
q w (I) ( f w )inj 3
j(I)
ln K n cs(I) ln K n cs(I)
ln K n cs(I)
= c(I)
( Vt )inj 2j(I)
( Pwf Pj(I) )
j=1
Using
k 0rj(I)
R f (I) =
k arj(I)
Thus
467
k 0rj(I)
R f (I) k 0
j(I) rj(I) j(I)
ln K n cs(I)
= c(I)
( Vt )inj
2j(I)
( Pwf Pj(I) )
j=1
k 0ro(I) R f (I)
R f (I) k ro(I)
0
ln K n cs(I) ln K n cs(I) k rj(I) j(I)
0
j(I) 2
R f (I) R ln K
f (I) n c s(I)
( f w )inj 3
= c(I)
( Vt )inj
2j(I)
( wf j(I) )
P P
j=1
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I) w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
ln K n cs(I) ln K ncs(I) w sa ,max(I) ln K n cs(I)
with
Therefore
468
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
ln K n cs(I) ln K n cs(I) (1-(I) ) R(I) ln K ncs(I)
Where
nc
N s = Ls N T =Ls N i
i =1
Hence
Hence
k 0ro(I) j(I)
k 0rj(I)
q w (I) ( f w )inj 3
j(I)
ln K n cs(I) ln K n cs(I)
ln K n cs(I)
= c(I)
( Vt )inj R f (I) 2j(I)
( Pwf Pj(I) )
j=1
469
Vb(I) (I) N w (I)
M accum t
= =0
ln K n cs(I 1) ln K n cs(I 1)
The derivative of the convection term of the water mass balance equation with respect to
ln K n cs is zero.
M conv
=0
ln K n cs(I 1)
M source q w (I)
= =0
ln K n cs(I 1) ln K n cs(I1)
V N
b(I) (I) w (I)
M accum t
= =0
Lg(I) Lg (I)
= = = w (I) rw (I)
Lg(I) Lg(I) Lg(I) w (I) Lg(I)
470
v w (I1/ 2) k arw (I) Sw (I)
= w (I) =0
w (I) Sw (I) Lg(I)
k arj(I) j(I)
k arj(I)
q w (I) ( f w )inj 3 Lg(I)
j(I)
Lg(I)
Lg(I)
= c(I)
( Vt )inj 2 ( Pwf Pj(I) )
j=1
j(I)
Using
k 0rj(I)
R f (I) =
k arj(I)
Thus
k 0rj(I)
R f (I) k 0
j(I) rj(I) j(I)
q w (I) ( f w )inj
3 Lg(I) R f (I) Lg(I)
= c(I)
( Vt )inj
( wf j(I) )
P P
Lg(I) j=1 2j(I)
k 0rj(I) R f (I)
f (I)
R k 0rj(I)
Lg(I) Lg(I) k rj(I) j(I)
0
j(I)
2
R f (I) R f (I) Lg(I)
( f w )inj 3
= c(I)
( Vt )inj j=1
j(I)
2 ( Pwf Pj(I) )
Using
471
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I) w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Lg(I) Lg(I) w sa,max(I) Lg(I)
with
Therefore
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
Lg(I) Lg(I) (1-(I) ) R(I) Lg(I)
where
nc
N s = Ls N T =Ls N i
i =1
Hence
nc
Ni(I)
Ns(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1 =L
nc
Ni(I)
= = N T(I) + Ls(I) = Ls(I) s(I) =0
Lg (I) Lg(I) Lg(I) Lg(I) Lg(I) i =1 L g(I)
Hence
472
k 0rj(I) j(I)
j(I) k 0rj(I)
q w (I) ( f w )inj 3 Lg(I) Lg(I)
= c(I) ( Pwf Pj(I) )
Lg(I)
( Vt )inj j=1 R f (I) j(I)
2
V N
b(I) (I) w (I)
M accum t
= =0
Lg (I 1) Lg(I 1)
The derivative of the convection term of the water mass balance equation with respect to
Lg is zero.
M conv
=0
Lg(I1)
M source q w (I)
= =0
Lg(I1) Lg(I1)
473
For the accumulation term, we have
V N
b(I) (I) w (I)
M accum t
= =0
Ls(I) Ls(I)
= = = w (I) rw (I)
Ls(I) Ls(I) Ls(I) w (I) Ls(I)
v w (I1/ 2) k arw (I) Sw (I)
= w (I) =0
w (I) Sw (I) Ls(I)
k arj(I) j(I)
j(I) k rj(I)
a
q w (I) ( f w )inj 3 Ls(I) Ls(I)
= c(I) ( Pwf Pj(I) )
Ls(I) V
( t )inj j=1 2
j(I)
Using
k 0rj(I)
R f (I) =
k arj(I)
Thus
k0
rj(I)
R f (I) k 0
rj(I) j(I)
474
k 0rj(I) R f (I)
R f (I) k 0rj(I)
Ls(I) Ls(I) k rj(I) j(I)
0
j(I) 2
R f (I) R f (I) Ls(I)
( f w )inj 3
= c(I)
( Vt )inj
2j(I)
( Pwf Pj(I) )
j=1
Using
w sa (I)
R f (I) = 1.0 + (R f ,max(I) 1)
w sa,max(I)
Hence
w sa (I)
1.0 + (R f ,max(I) 1)
R f (I) w sa,max(I) (R f ,max(I) 1) w sa (I)
= =
Ls(I) Ls(I) w sa,max(I) Ls(I)
with
Therefore
N M
s(I) s(I) (I)
w sa (I) (1-(I) ) R(I)
= = M s(I) (I) N s(I)
Ls(I) Ls(I) (1-(I) ) R(I) Ls(I)
Where
nc
N s = Ls N T =Ls N i
i =1
475
Hence
nc
N i(I)
N s(I) (Ls(I) N T(I) ) Ls(I) N T(I) i =1
= = N T(I) + Ls(I) = N T(I) + Ls(I)
Ls(I) Ls(I) Ls(I) Ls(I) Ls(I)
nc
Ni(I)
= N T(I) + Ls(I) = N T(I)
i =1 Ls(I)
Hence
q w (I) ( f w )inj 3 1 k 0rj(I) k 0rj(I) j(I) k 0rj(I) (R f ,max(I) 1)M s(I) (I) N T(I)
= c (I)
( Vt )inj
j(I) R 2f (I) w sa,max(I) (1-(I) ) R(I)
( P P )
Ls(I) j=1 j(I) R f (I) Ls(I) 2j(I) R f (I) Ls(I)
wf j(I)
476
V N
b(I) (I) w (I)
M accum t
= =0
Ls(I 1) Ls(I1)
The derivative of the convection term of the water mass balance equation with respect to
Ls is zero.
M conv
=0
Ls(I1)
M source q w (I)
= =0
Ls(I 1) Ls(I 1)
477
Appendix F: Derivatives of Solid-Oil Fugacity Equation
Fs = f n cs f n co = 0
( ) (
ln x n cs n cs ln x n co n co = 0 )
Hence
R fs = ln K n cs + ln n cs ln n c o = 0 (F.1)
R fs ln K n cs ln n cs ln n co
= +
ln K ig G G ln K ig G G
ln K ig N,K
G G
m ,K ncs ,Lg ,Ls
N,K m ,K ncs ,Lg ,Ls ln K ig N,K m ,K ncs ,Lg ,Ls
G G
N,K m ,K ncs ,Lg ,Ls
With
ln n co nc
ln n co x jo
=
ln K x jo ln K ig G G
ig N,K m ,K ncs ,Lg ,Ls
G G j=1 N,K m ,K ncs ,Lg ,Ls
And
ln n cs
=0
ln K ig N,K m ,K ncs ,Lg ,Ls
G G
Since
478
fs fs
n cs = n cs (P) = = x n cs = 1
x n cs P P
and
fs = f s (P)
vs (P P* )
ln fs = ln fs* + T = constant
RT
R fs nc
ln n c o x jo
=
x jo ln K ig G G
ln K ig N,K
G G
m ,K n cs ,Lg ,Ls
j=1 N,K m ,K ncs ,Lg ,Ls
R fs ln K n cs ln n cs ln n c o
G G = G G + G G G
N i Nm ,K,K ncs ,Lg ,Ls Ni Nm ,K,K ncs ,Lg ,Ls N i N m ,K,K ncs ,Lg ,Ls Ni NG m ,K,K n cs ,L g ,Ls
With
ln K n cs
r r =0
N k N m ,K,K ncs ,Lg ,Ls
ln n cs
r =0
N k Nr m ,K,K n cs ,L g ,Ls
479
nc
R fs ln n c o ln n co x jo
= =
G G
N i Nm ,K,K ncs ,Lg ,Ls
G G x jo N i G G
Ni K,Nm ,K ncs ,Lg ,Ls j=1 K,Nm ,K ncs ,Lg ,Ls
R fs ln K n cs ln n cs ln n c o
r r = r r + r r r r
P N,K m ,K ncs ,Lg ,Ls P N,K m ,K ncs ,Lg ,Ls P N,K m ,K ncs ,Lg ,Ls P N,K m ,K n cs ,L g ,Ls
ln n cs ln n c o
= r r r r
P N,K m ,K ncs ,Lg ,Ls P N,K m ,K n cs ,Lg ,Ls
ln n cs
At this point we need the term r r .
P N,K m ,K ncs ,Lg ,Ls
fs fs
n cs = n cs (P) = = x n cs = 1
x ncs P P
Hence
ln n cs ( ln f s ln P ) ln fs ln P
r r = r r = r r r r
P N,K,K ncs ,Lg ,Ls P N,K,K ncs ,Lg ,Ls P N,K,K ncs ,Lg ,Ls P N,K,K ncs ,Lg ,Ls
Using
vs (P P* )
ln fs = ln f +
*
s T = constant
RT
Therefore
ln n cs ln f s 1 v 1
r r = = s
P N,K,K ncs ,Lg ,Ls P N,K,K ncs ,Lg ,Ls P RT P
r r
480
R fs v 1 ln n c o
r r = s r r
P N,K m ,K ncs ,Lg ,Ls RT P P N,K m ,K n cs ,L g ,Ls
R fs ln K n cs ln n cs ln n co ln n co
= + = 1
ln K n s r r ln K n s r r ln K n s r r ln K n s r r ln K n s r r
c N,K,L ,L
g s
c N,K,L ,L
g s
c N,K,L ,L
g s
c N,K,L ,L
g s
c N,K,L ,L
g s
R fs nc
ln n co x jo
ln K n s
G G
= 1
x jo ln K n s G G
c N,K,Lg ,Ls j=1 c N,K,L ,L
g s
R fs ln K n cs ln n cs ln n co
= +
Lg r r Lg r r Lg r r
Lg N,K,K
r r
n cs ,Ls
N,K,K n cs ,Ls N,K,K n cs ,Ls N,K,K ncs ,Ls
ln n c o nc
ln n c o x jo
= =
Lg r r x jo Lg r r
N,K,K ncs ,Ls j=1 N,K,K ncs ,Ls
With
ln n cs
=0
L g N,K,K
r r
ncs ,Ls
Since
fs fs
n cs = n cs (P) = = x n cs = 1
x n cs P P
481
and
fs = f s (P)
vs (P P* )
ln fs = ln fs* + T = constant
RT
R fs ln K n cs ln n cs ln n c o
r r = r r + r r r r
Ls N,K,K ncs ,Lg Ls N,K,K ncs ,Lg Ls N,K,K ncs ,Lg Ls N,K,K ncs ,Lg
nc
ln n c o ln n co x jo
= =
r r x jo Ls r r
Ls N,K,K ncs ,Lg j=1 N,K,K ncs ,Lg
with
ln n cs
r r =0
Ls N,K,K ncs ,L g
Since
fs fs
n cs = n cs (P) = = x n cs = 1
x n cs P P
And
fs = f s (P)
vs (P P* )
ln fs = ln f + *
s T = constant
RT
482
Appendix G: Derivatives of Multiphase Flash Equation
nc z i (K ig 1) z i (K ig 1)
R fe i =1 1 + Lg (K ig 1) + Ls (K is 1) n c 1 + L g (K ig 1) + Ls (K is 1)
= =
ln K ig ln K ig i =1 ln K ig
zi (K ig 1)
n
zi [1 + Ls (K is 1) ]
1 + Lg (K ig 1) + Ls (K is 1) K ig
nc
=
c
= K ig
K ig ln K ig i =1 1 + L (K 1) + L (K 1)
2
i =1
g ig s is
Hence,
R fe nc
zi K ig [1 + Ls (K is 1) ]
=
ln K ig i =1 1 + L (K 1) + L (K 1) 2
g ig s is
nc z k (K kg 1) z k (K kg 1)
R fe k =1 1 + L g (K kg 1) + Ls (K ks 1) n c 1 + Lg (K kg 1) + Ls (K ks 1)
= =
Ni Ni k =1 N i
Nk
(K kg 1)
NT
1 + Lg (K kg 1) + Ls (K ks 1) Nk
nc
nc
(K kg 1) N T
= =
k =1 Ni
k =1 1 + L g (K kg 1) + L s (K ks 1) Ni
1 (K ig 1) 1 nc N k (K kg 1)
=
N T 1 + Lg (K ig 1) + Ls (K is 1) N T2
k =1 1 + L g (K kg 1) + L s (K ks 1)
Hence,
483
R fe 1 (K ig 1) nc
z k (K kg 1)
=
Ni N T 1 + Lg (K ig 1) + Ls (K is 1) k =1 1 + Lg (K kg 1) + Ls (K ks 1)
R fe
=0
P
nc zi (K ig 1) zi (K ig 1)
R fe i =1 1 + Lg (K ig 1) + Ls (K is 1) n c 1 + Lg (K ig 1) + Ls (K is 1)
= =
ln K is ln K is i =1 ln K is
zi (K ig 1)
n
1 + Lg (K ig 1) + Ls (K is 1) K is zi (K ig 1)Ls
nc
=
c
= K is
K is ln K is i =1 1 + L (K 1) + L (K 1)
2
i =1
g ig s is
Hence,
zi (K ig 1)Ls K is
R fe 2
i = nc
= 1 + L g (K ig 1) + Ls (K is 1)
ln K is
0 i nc
nc zi (K ig 1) zi (K ig 1)
R fe i =1 1 + L (K 1) + L (K 1) n c 1 + L (K 1) + L (K 1)
= =
g ig s is g ig s is
Lg Lg i =1 Lg
484
Hence,
R fe nc
zi (K ig 1)2
=
Lg i =1 1 + L (K 1) + L (K 1)
2
g ig s is
nc zi (K ig 1) zi (K ig 1)
R fe i =1 1 + Lg (K ig 1) + Ls (K is 1) n c 1 + Lg (K ig 1) + Ls (K is 1)
= =
Ls Ls i =1 Ls
nc
z i (K ig 1)(K is 1)
= 2
i =1 1 + L (K 1) + L (K 1)
g ig s is
485
Appendix H: Derivatives of Solid-Oil Equilibrium Ratio Equation
R er
=0
lnK ig
1 1 x
nco
R er K x x Ni 1 x n c o
c = c =
n o n o
= =
ncs
N i Ni N i Ni x n co 2 x n co 2 N i
1 1
x n c o
R er K n cs xn o xn o
= c = c = P 2 = 0
P P P P x n co
1 1 x n c o
R er K n cs xn o xn o ln K n cs x n co
c = K ncs c = K ncs +
1
= = K n cs +
ln K n cs ln K n cs ln K n cs ln K n cs x n co 2
x n co ln K n cs
2
486
H.1.5 Derivatives with respect to Lg
R er
=0
Lg
1 1 x
nco
R er K x x Ls 1 x n c o
c = c =
n o n o
= =
ncs
Ls Ls Ls Ls x n co 2
x n co 2 Ls
1 1 x n co
R er K n cs xn o xn o ln K ig 1 x n c o
= c = c = =
ln K ig ln K ig ln K ig ln K ig x n co 2
x n c o 2 ln K ig
1 1 x
nco
R er K n cs xn o xn o Ni 1 x n c o
= c = c = =
N i Ni N i Ni x n co 2
x n co 2 N i
487
H.2.3 Derivatives with respect to P
1 1
x n c o
R er K n cs xn o xn o
= c = c = P 2 = 0
P P P P x n co
1 1 x n c o
R er K n cs xn o xn o ln K n cs x n co
c = K ncs c = K ncs +
1
= = K n cs +
ln K n cs ln K n cs ln K n cs ln K n cs x n co 2
x n co ln K n cs
2
1 1 x n o
c
R er K n cs x x Lg 1 x n c o
c = c =
n o n o
= =
Lg L g Lg Lg x n co 2
x n co 2 Lg
1 1 x
nco
R er K x x Ls 1 x n c o
c = c =
n o n o
= =
ncs
Ls Ls Ls Ls x n co 2 x n co 2 Ls
488
Appendix I: Derivatives of Component Mole Fraction
x ig = z i i = 1, , nc
N
i
x ig
= T =0
N
ln K kg N,K
r r
m ,K ncs ,Lg ,Ls
ln K kg
If i = k , then
N
i
x ig N N (1 zi )
= T= T 2 i =
N
r r
N i K,N m ,K n cs ,L g ,Ls
N i NT NT
If i k , then
N
i
x ig Ni
= T=
N z
r r = i
N k K,N N k 2
NT NT
m ,K n cs ,L g ,Ls
Hence,
489
(1 zi )
i=k
x ig NT
r =
N k Nr m ,K,K ncs ,Lg ,Ls zi ik
N T
N
i
x ig
= T =0
N
ln K n c N,K,L ,L
s r r ln K n cs
g s
N
i
x ig
= T =0
N
L g N,K,K
r r Lg
n cs ,Ls
N
i
x ig
= T =0
N
r r
Ls N,K,K n cs ,Lg
Ls
(1 Ls ) x io i nc
z i = Ls x is + (1 Ls ) x io =
Ls + (1 Ls ) x io i = nc
490
0 i nc
x is =
1 i = nc
Hence,
zi
1 L i nc
x io =
s
(I.1)
z i Ls i = nc
1 Ls
x io
=0
ln K kg N,K ,L ,L
r
n cs g s
Ni
N
T
zi 1 L Ni
1
s
x io
=
1 L s
= = (1 Ls ) N T = N T Ls N T (1 Ls )N i
r r
N i K,N Ni N i N i ( N T Ls N T )
2
m ,K n cs ,Lg ,Ls
=
N T Ls N T N i + Ls N i
=
1 Ls z i + Ls z i
=
(1 Ls ) zi (1 Ls ) = 1 zi i nc
N T (1 Ls )
2 2
N T (1 Ls )
2
N T (1 Ls )
2
N T (1 Ls )
491
Case 2: i = k and when i = n c :
Ni
N Ls
T Ni Ls N T
zi Ls 1 Ls
x io 1 Ls
1
(1 Ls ) N T
r r = = =
N i K,N m ,K n cs ,Lg ,Ls
Ni N i N i
(1 Ls ) N T (1 Ls )( N i Ls N T ) (1 Ls ) NT ( Ni Ls N T ) = N T Ls NT Ni + Ls NT
2
= =
(1 Ls )
2
NT 2
(1 Ls ) N T 2 (1 Ls ) N T 2
N T Ni 1 zi
= = i = nc
(1 Ls ) NT N T (1 Ls )
2
Ni
N
T
zi 1 Ls Ni
1
x io
= 1 Ls
= = (1 Ls ) N T
r r
N k K,N m ,K n cs ,L g ,Ls
N k N k N k
(1 Ls ) N i zi zi
= = = i nc
N T (1 Ls )
2 2
N T (1 Ls ) N T (1 Ls )
Ni
N Ls
T N i Ls N T
z i Ls 1 Ls
x io 1 Ls
1
(1 Ls ) NT
r r = = =
N k K,N m ,K n cs ,L g ,Ls
N k N k N k
Ls (1 Ls ) N T (1 Ls )( Ni Ls N T ) Ls N T N i + Ls N T z i
= = = i = nc
N T 2 (1 Ls )
2
N T (1 Ls )
2
N T (1 Ls )
Hence,
492
1 zi
N (1 L ) i=k
x io T s
r =
N k Nr m ,K,K z i
n cs ,Lg ,Ls ik
N T (1 Ls )
Method 1
0 i nc
x n cs
K is = = 1
x nco i = nc
x
n co
Hence
0 i nc
x io
= 1
i = nc
ln K n cs N,K,L
r r
K
g ,Ls
n cs
Since
1
x n c o K n s
= c =
1
ln K n cs ln K n cs K n cs
Using
1 de u
ln K n cs = u K n cs = e u = eu = e u
K n cs du
Method 2
493
x io
=0
ln K n c N,K,L ,L
s r r
g s
x
io =0
Lg N,K,K
r r
n cs ,Ls
z
i
x io 1 Ls
=
zi
r r = i nc
Ls N,K,K Ls (1 Ls )
2
ncs ,Lg
z Ls
i
x io 1 L s 1 + L s + z i L s z 1
r r = = = i i = nc
Ls N,K,K Ls (1 Ls ) (1 Ls )
2 2
ncs ,Lg
Hence
zi
i nc
(1 Ls )
2
x io
r r =
Ls N,K,K ncs ,Lg zi 1 i = nc
(1 Ls )2
For the case of three-phase compositions of oil, solid and gas, we have
zi
x io = i = 1, , nc
1 + Lg (K ig 1) + Ls (K is 1)
494
K ig zi
x ig = K ig x io = i = 1, , nc
1 + L g (K ig 1) + Ls (K is 1)
K is z i
x is = K is x io = =1 i = nc
1 + L g (K ig 1) + Ls (K is 1)
x ij x ij
dx ij = d ln K kg + d ln K n cs
ln K kg ln K n s r r
N,K
r r
m ,K ncs ,Lg ,Ls
c N,K,Lg ,Ls
x ij x x
+ r r dN k + ij dLg + ij dLs
N k N m ,K,K ncs ,Lg ,Ls Lg
N,K,K ncs ,Ls
r r L s r r
N,K,K n cs ,Lg
zi
x io 1 + Lg (K ig 1) + Ls (K is 1)
=
ln K kg N,K
r r
m ,K n cs ,Lg ,Ls
ln K kg
zi Lg K ig
i=k
= 1 + Lg ( K ig 1) + Ls (K is 1)
2
0 ik
495
For gas phase
zi K ig
x ig 1 + Lg (K ig 1) + Ls (K is 1)
=
ln K kg N,K
r r
m ,K n cs ,Lg ,Ls
ln K kg
z i K ig 1 Lg + Ls (K is 1)
i=k
= 1 + Lg (K ig 1) + Ls (K is 1)
2
0 ik
zi N
i
x io 1 + L g (K ig 1) + Ls (K is 1)
= NT
1
r r =
N i K,N m ,K n c s ,L g ,Ls
N i 1 + Lg (K ig 1) + Ls (K is 1) N i
=
1 N T Ni
=
(1 zi )
1 + Lg (K ig 1) + Ls (K is 1) N T2 1 + Lg (K ig 1) + Ls (K is 1) N T
And if i k , then
zi N
i
x io 1 + Lg (K ig 1) + Ls (K is 1)
= NT
1
r r =
N k K,N m ,K n cs ,Lg ,Ls
N k 1 + Lg (K ig 1) + Ls (K is 1) N k
Ni 1 zi
= 2 =
1 + Lg (K ig 1) + Ls (K is 1) N T 1 + Lg (K ig 1) + Ls (K is 1) N T
496
(1 zi ) i=k
x io 1 + Lg (K ig 1) + Ls (K is 1) N T
r =
N k Nr m ,K,K ncs ,L g ,Ls zi
ik
1 + Lg (K ig 1) + Ls (K is 1) N T
K ig (1 zi )
i=k
x ig 1 + Lg (K ig 1) + Ls (K is 1) N T
r =
N k Nr m ,K,K K ig zi
ncs ,L g ,Ls
ik
1 + L (K 1) + L (K 1) N
g ig s is T
zi
z i Ls K is
x io i = nc
1 + Lg (K ig 1) + Ls (K is 1)
= 1 + Lg ( K ig 1) + Ls (K is 1)
2
=
ln K n s r r ln K n cs
c N,K,L ,L
g s
0 i nc
z i K ig
zi K ig Ls K is
x ig 1 + Lg (K ig 1) + Ls (K is 1) i = nc
= 1 + Lg ( K ig 1) + Ls (K is 1)
2
=
ln K n cs N,K,L
r r
g ,Ls
ln K n cs
0 i nc
497
zi
x 1 + Lg (K ig 1) + Ls (K is 1) zi (K ig 1)
= =
io
Lg N,K,K Lg 2
r r
n cs ,Ls
1 + Lg (K ig 1) + Ls (K is 1)
zi K ig
x ig 1 + Lg (K ig 1) + Ls (K is 1) zi K ig (K ig 1)
= =
Lg L g 2
N,K,K
r r
n cs ,Ls
1 + Lg (K ig 1) + Ls (K is 1)
zi
x io 1 + Lg (K ig 1) + Ls (K is 1) z i (K is 1)
= =
r r
Ls N,K,K Ls 2
n cs ,L g
1 + Lg (K ig 1) + Ls (K is 1)
z i K ig
x ig 1 + Lg (K ig 1) + Ls (K is 1) zi K ig (K is 1)
= =
r r
Ls N,K,K Ls 2
ncs ,L g
1 + Lg (K ig 1) + Ls (K is 1)
498
Appendix J: Derivatives of the Peng-Robinson EOS
Z Z
J.1 DERIVATION OF AND
x io P
Z3 (1 B ) Z2 + ( A 3B2 2B ) Z ( AB B2 B3 ) = 0
Where
aP
A=
(RT) 2
bP
B=
RT
nc nc
a = x io x jo (1 k ij ) a i a j
i =1 j=1
nc
b = x io bi
i =1
( RT )
2
c
ai = 0.45724 (T)
Pc
RTc
bi = 0.07780
Pc
where
499
T
= 1 + 1
Tc
0.37464+1.54226-0.26992 2
< 0.49
=
0.379640 + 1.485030 - 0.164423 + 0.016666 0.49
2 3
So we have
nc
(x )
P
A= x1o a i1 + x i x 2 a i2 + L + x io x n co a in c
( RT )
2 io
i =1
=
P
( ) (
x1o x1o a11 + x1o x 2o a12 + L + x1o x n o a1n + x 2o x1o a 21 + x 2o x 2o a 22 + L + x 2o x n o a 2n
)
( RT )
2 c c c c
(
+ L + x n co x1o a n c 1 + x n c o x 2o a n c 2 + L + x n co x n c o a n c n c )
Therefore,
A 2P nc
=
x io ( RT )2
x
m =1
a
mo mi
B Pbi
=
x io RT
and
Z Z Z B A B B
3Z2 2Z (1 B ) + ( A 3B2 2B ) + Z2 +Z 6BZ 2z
x io x io x io x io x io x io x io
A B B B
B +A + 2B + 3B2 =0
x io x io x io x io
Z A F
= ( B Z ) + A 2B 3B2 + 2 ( 3B + 1) Z Z 2
x io x io Z
And
500
Z 1 F
= A ( B Z ) + B ( A 2B 3B2 + 2 ( 3B + 1) Z Z2 )
P P Z
where
F
= 3Z2 2Z (1 B ) + ( A 3B2 2B )
Z
ln ij =
bi
Z 1 ln Z B
A j 2 nc
( j ) ( j j ) 2 2B a mj im b x a ln
( )
bi Z j + 1 + 2 B j
b j j m =1 ( )
Z j + 1 2 B j
= ln Cij + Dij + E ij ln G j
where
1
Cij =
( Zj Bj )
Dij =
bi
bj
( Z j 1)
Aj 2 nc b
E ij = x mja im i
2 2B j a j m =1 b
Gj =
( )
Zj + 1+ 2 Bj
Z + (1 2 ) B
j j
Hence,
501
ln ij 1 2Cij Dij E E G j
= + + ln G j ij + ij
x kj Cij x kj x kj x kj G j x kj
where
Z j B j
Cij x kj x kj
=
x kj (Z Bj )
2
j
Dij Z j
b k ( Z j 1)
bi
= b j
x kj b j2 x kj
E ij 1 A j B j A j
nc
1
= j i a b 2b j x mg a mi
Bj Aj
x kj 2 2a jb jB j B j m =1 x kj x kj a jb j
2 nc nc
2
4bj x mja mi x mja mk 2a jb j a ik bi b k a j
2
m =1 m =1
and
G j 2 2 B j Z j
= Z B
x kj Z j + 1 2 B j x kj
( ) x kj
2 j j
Z j
is defined earlier, and
x kj
A j 2P nc
= x a
x kj ( RT )
2 mj mk
m =1
and
B j Pb k
=
x kj RT
502
J.2.2 Derivatives with respect to P
ln ij 1 Cij Dij E ij G j
= + + (Holding phase makes fraction constant)
P Cij P P G j P
where
Cij Z j B j
=
P P P
Dij bi Z j
=
P b j P
and
G j 2 2 B j Z j
= Zj Bj
P
( )
Z j + 1 2 B j P P
2
Z j
is defined earlier.
P
and
B j bj
=
P RT
503
Appendix K: Derivatives of the Compressibility Factor
At constant temperature
Z j = f(x1j , x 2j , ..., x n c j , P) j = o, g
nc
Z j Z j
dZ j = dx ij + dP (K.1)
i =1 x ij P
Z j nc
Z j x i1 j
= i = 1,..., n c
ln K ig i1 =1 x i1 j ln K ig
constant, we have
Z j nc
Z j x i1 j
= i = 1,..., n c
Ni i1 =1 x i1 j Ni
504
Z j nc
Z j x ij
=
ln K n cs i =1 x ij ln K n cs
we have
Z j nc
Z j x ij
=
Lg i =1 x ij Lg
have
Z j nc
Z j x ij
=
Ls i =1 x ij Ls
Z j Z j
K.6 RELATIONSHIP BETWEEN AND
x ij n ij
(
Z j = f x1j , x 2 j ,..., x n c j )
(
x ij = f n1j , n 2 j ,..., n n c j )
nc
Z
dZ j = j dx kj (K.2)
k =1 x kj
n mj
Where
505
(
n mj = n1j , n 2 j ,..., n (k 1) j , n (k +1) j ,..., n n c j )
and
(
x mj = x1j , x 2 j ,..., x (k 1) j , x (k +1) j ,..., x n c j )
Dividing Equation (K.2) by n ij while holding n mj constant, we get
Z j nc
Z j x kj
=
n ij k =1 x kj n ij
nk nk
x kj = =
n j n1j + n 2 j + ... + n kj + ... + n n c j
1 n kj
2 i=k
x kj n j n j
=
n ij n kj
ik
n j2
Hence,
Z j Z j x1j Z j x 2 j Z j x ij Z j x n c j nc
Z j n kj 1 Z j
= + + ..... + + ..... + = +
n ij x1j n ij x 2 j n ij x ij n ij x n c j n ij k =1 x kj n j
2
n j x ij
506
Appendix L: Derivatives of Physical Properties
P
j = j = o, g
RTZ j
j P Z j
=
x ij RTZ j2 x ij
j P nc
Z j x i1 j
ln K ig
=
RTZ j2
x
i1 =1 ln K ig
i = 1...n c
i1 j
j P nc
Z j x i1 j
Ni
=
RTZ j2
x
i1 =1 N i
i = 1...n c
i1 j
j P nc
Z j x ij
ln K n cs
=
RTZ j2
x
i =1 ln K n cs
ij
j P nc
Z j x ij
Lg
=
RTZ j2
x
i =1 L g
ij
507
L.1.5 Derivatives with respect to Ls
j P nc
Z j x ij
Ls
=
RTZ j2
x
i =1 Ls
ij
S j
=
(
Nj vj ) = N (L v ) = N
j j
v
L j
+ L
v j
ln K ig ln K ig
T
ln K ig
T
j ln K ig j
ln K
ig
RTZ j L j RT Z j N T RT L j Z j
= NT + Lj = Zj + Lj
P ln K Pj ln K ig Pj ln K ig ln K ig
j ig
Hence,
Sw
=0
ln K ig
Sg N T RT Lg Zg N T RT Zg
= Zg + Lj = Lg
ln K ig Pg ln K ig ln K ig Pg ln K ig
So N RT Zo Lo
= T Lo + Zo
ln K ig Po ln K ig ln K ig
Since,
Lo + Lg + Ls = 1
So N RT Zo Lg Ls
= T (1 Lg Ls ) Zo Zo
ln K ig Po ln K ig ln K ig ln K ig
Hence,
508
So N RT Zo
= T (1 Lg Ls )
ln K ig Po ln K ig
S j
=
(
NT L j v j ) = L v + N L j
+ NT L j
v j RT
= L jZ j + NT Z j
L j
+ NT L j
Z j
vj
Ni Ni Ni N i Pj N i Ni
j j T
Thus
Sw
=0
N i
Sw 1
=
N w w (I)
So RT Lo Z
= L o Zo + N T Zo + N T Lo o
Ni Po Ni N i
Since
Lo + Lg + Ls = 1
Hence
So RT Lg Ls Zo RT Z
= L o Zo N T Z o + + N T Lo = L o Zo + N T o
Ni Po Ni Ni N i Po N i
Sg RT Z
= L g Zg + N T g
Ni Pg Ni
509
S j
=
(
Nj vj ) = N (L v ) = N
j j L j
vj + Lj
v j
P P
T
P
T
P P
with
L j
=0
P
Hence,
Z RT
j
S j v j P RTN Z Z
= NT L j =
j
= NT L j j = o, g
j j j
P P P P P P
Sw (N w v w ) v c
= = N w w = N w w 0 2w
P P P w
S j
=
(
Njvj ) = N (L v ) = N j j
vj
L j
+ Lj
v j
ln K n cs ln K n cs
T
ln K n cs
T
ln K n s ln K
c n c
s
RTZ j L j RT Z j N T RT L j Z j
= NT + Lj = Z j + Lj
Pj ln K n s Pj ln K n cs Pj ln K n cs ln K n cs
c
Therefore,
Sw
=0
ln K n cs
Sg N T RT Zg
= Lg
ln K n cs Pg ln K n cs
510
So N RT Zo Lo
= T L o + Zo
ln K n cs Po ln K n cs ln K n cs
Since
Lo + Lg + Ls = 1
N T RT Zo Lg Ls
= (1 Lg Ls ) Zo Zo
Po ln K n cs ln K n cs ln K n cs
Hence,
So N RT Zo
= T (1 Lg Ls )
ln K n cs Po ln K n cs
S j ( )=N
L j
NT L j v j v j RTZ j L j RT Z j
= T vj + Lj = N T + Lj
Lg Lg Lg Lg
Pj Lg Pj Lg
N RT L j Z j
= T Z j + Lj j = o, g
Pj Lg Lg
Thus,
Sw
=0
Lg
So N T RT Lo Z
= Zo + Lo o
Lg Po Lg Lg
Since
Lo + Lg + Ls = 1
Therefore,
511
So N T RT (1 Lg Ls ) Z N RT Z
= Zo + Lo o = T Zo + Lo o
Lg Po Lg Lg Po Lg
Sg N T RT Lg Z N T RT Zg
= Zg + Lg g = Zg + Lg
Lg Pg Lg Lg Pg Lg
S j
=
( v
)=N
L j
NT L j v j
+ L
v j
= N
RTZ j L j
+ L
RT Z j
T
Ls Ls j Ls Ls Pj Ls Pj Ls
T j j
N RT L j Z j
= T Zj + Lj j = o, g
Pj Ls Ls
Thus,
Sw
=0
Ls
So N T RT Lo Z
= Zo + Lo o
Ls Po Ls Ls
Since
Lo + Lg + Ls = 1
Therefore,
So N T RT (1 Lg Ls ) Z N RT Zo
= Zo + Lo o = T Zo + L o
Ls Po Ls Ls Po Ls
Sg N T RT Lg Zg N T RT Zg
= Zg + Lg = Lg
Ls Pg Ls Ls Pg Ls
512
L.3 DERIVATIVES OF RELATIVE PERMEABILITY
k rw = k rw (S w )
k rg = k rg ( Sg )
k ro = k ro ( Sg ,So ,Sw )
Sw
=0
ln K ig
k rw k Sw
= rw =0
ln K ig Sw ln K ig
k rg k rg Sg
=
ln K ig Sg ln K ig
k ro k Sw k So k Sg k So k Sg
= ro + ro + ro = ro + ro
ln K ig Sw ln K ig So ln K ig Sg ln K ig So ln K ig Sg ln K ig
k rw k rw Sw 1 k rw
= =
N w Sw N w w (I) Sw
k rw
=0
N i
513
k rg k rg Sg
=
N i S g N i
k ro k ro Sw k ro So k ro Sg k ro So k ro Sg
= + + = +
N i Sw N i So Ni Sg Ni So N i Sg N i
k rg k rg S g
=
P S g P
k ro k ro Sg k ro So k ro Sw
= + +
P Sg P So P Sw P
k rw k rw Sw
=
P Sw P
Sw
=0
ln K n cs
k rw k Sw
= rw =0
ln K n cs Sw ln K n cs
k rg k rg Sg
=
ln K n cs Sg ln K n cs
k ro k Sw k So k Sg k So k Sg
= ro + ro + ro = ro + ro
ln K n cs Sw ln K n cs So ln K n cs Sg ln K n cs So ln K n cs Sg ln K n cs
514
L.3.5 Derivatives with respect to Lg
Sw
=0
Lg
k rw k rw Sw
= =0
Lg Sw Lg
k rg k rg Sg
=
Lg Sg Lg
k ro k ro Sw k ro So k ro Sg k ro So k ro Sg
= + + = +
Lg Sw Lg So Lg Sg Lg So Lg Sg Lg
Sw
=0
Ls
k rw k rw Sw
= =0
Ls Sw Ls
k rg k rg Sg
=
Ls Sg Ls
k ro k ro Sw k ro So k ro Sg k ro So k ro Sg
= + + = +
Ls Sw Ls So Ls Sg Ls So Ls Sg Ls
515
* jr
j + 0.000205 jr 0.18
j
j = *
j + ( j 1)
4
nc
)
x ij i MWi
=
*
j
i =1
nc
x
i =1
ij MWi
0.00034T0.94
ri Tri 1.5
) i
i =
0.0001776(4.58Tri 1.67)5 / 8
Tri > 1.5
i
where
1/ 6
5.44Tci
i =
MWi Pci2 / 3
nc
jr = j x ij Vci
i =1
and
1
nc 6
5.44 x ijTci
j = i =1
1 2
nc 2 nc 3
ij x MWi ij ci
x P
i =1 i=1
516
and
Hence
* j jr jr j
j x ij x ij
x + 0.00025 jr 0.18
j2
j ij
=
x ij
j + 4 3 j j * + ( 4 1)
*
x ij x ij x ij
j j j j
jr > 0.18
104 j2
where
( ) ( )
n n
) )
i MWi x ij MWi MWi x iji MWi
c c
*j
= i =1 i =1
x ij nc
2
x ij MWi
i=1
jr nc
j
= x ijVci + jr Vci
x ij i =1 x ij
nc
5 1 2
nc 2 nc
x ijMWi x ij Pci
6 3
0.907Tci x ijTci
i =1 i =1 i =1
j
=
x ij nc 1 2 2
x MW x P
2 nc 3
i =1
ij i ij ci
i=1
517
nc 1
nc 2
x ijPci
2 3
1 x ijMWi i=1
2 1
nc 6 i =1 nc
3 nc
2
5.44 x ijTci x ijPci + x ijMWi
i =1 x ij i =1 i =1 x ij
2 2
nc 1
x MW x P
2 nc 3
i =1
ij i ij ci
i =1
where
nc 1
x ijMWi
2
i=1
= MWi
x ij nc
x MW
i =1
ij i
And
nc 2
x ijPci
3
i=1 2
= P nc
3
ci x ij Pci
x ij i =1
Also
j jr
= ( 0.2336 + 1.17066 jr 1.22274 jr 2 + 0.28328 jr 3 )
x ij x ij
j nc
j x ij
= k = 1,..., n c
ln K kg i =1 x ij ln K kg
518
L.4.2 Derivatives with respect to N i
j nc
j x ij
= k = 1,..., n c
N k i =1 x ij N k
j
x ijVc 0.000205 / j j = 0 jr 0.18
P P
j
=
P
4 j
j P
104 jr > 0.18
j
j nc
j x ij
=
ln K n cs i =1 x ij ln K n cs
j nc
j x ij
=
Lg i =1 x ij Lg
j nc
j x ij
=
Ls i =1 x ij Ls
519
Appendix M: Code Variables for Modeling Asphaltene Precipitation in
GPAS
The new variables for GPAS with the ability to model the effect of asphaltene
precipitation are given in this appendix. The three new primary independent variables are
ln K n cs , Lg and Ls so we will have a total of ( 2n c + 5 ) independent variables for each
R if
Rv
Negative residual of volume constraint equation at a gridcell which is defined by
ARV(I,J,K) in the old code. Keyword: not necessary but R v was modified.
R im
Negative residual of the mass balance equation for component i at a gridcell that
is defined by ARM(I,J,K,i) in the old code. Keyword: not necessary but R im was
modified.
520
Rw
Negative residual of water mass balance equation at a gridcell defined by
ARW(I,J,K) in the old code. Keyword: not necessary but R w was modified.
R fs (new)
Negative residual of the solid-oil fugacity equation for n c th component at a
R fe (new)
R er (new)
Negative residual of the solid-oil equilibrium ratio equation for n c th component at
R fi R fi R if
, ,
ln K n cs ln L g ln Ls
521
1 derivative w.r.t. lnK n cs
j = 2 derivative w.r.t. L g
3 derivative w.r.t. Ls
R v R v R v
, ,
ln K n cs ln L g ln Ls
AVKLL(I,J,K ,j).
R im R im R im
, ,
ln K n cs(I) Lg (I) Ls(I)
AMKLL(I,J,K,i,j).
522
R im R im R im
, ,
ln K n cs(I 1) Lg (I 1) Ls(I 1)
R w R w R w
, ,
ln K n cs(I) Lg(I) Ls(I)
M W = M accum
W
+ M conv
W
M source
W
. Keyword: AWKLL(I,J,K,j).
523
R w R w R w
, ,
ln K n cs(I 1) Lg(I1) Ls(I1)
AWKLL6(I,J,K,j,M).
R fs
ln K ig
R fs R fs
,
ln N i P
R fs R fs R fs
, ,
ln K n cs ln L g ln Ls
524
1 derivative w.r.t. lnK n cs
j = 2 derivative w.r.t. L g
3 derivative w.r.t. Ls
R fe R fe R fe R fe R fe
, , , ,
ln K ig N i ln K n cs ln L g ln Ls
AFEKNKLL(I,J,K,i).
R er R er R er R er R er
, , , ,
ln K ig N i ln K n cs ln L g ln Ls
Keyword: AERKNKLL(I,J,K,i).
525
1...n c derivative w.r.t. lnK ig
n c + 1...2n c derivative w.r.t. N i
i = 2n c + 1 derivative w.r.t. lnK n cs
2n c + 2 derivative w.r.t. Lg
2n + 3
c derivative w.r.t. Ls
i = 1...n c
1 aqueous phase
j = 2 oil phase
3
gas phase
x ij x ij x ij
, ,
ln K n cs ln Lg ln Ls
526
i = 1...n c
1 aqueous phase
j = 2 oil phase
3
gas phase
Z j Z j Z j
, ,
ln K n cs Lg Ls
Keyword: DZFKLL(I,J,K,i,j).
1 aqueous phase
j = 2 oil phase
3
gas phase
j j j
, ,
lnK n cs Lg Ls
Keyword: DROKLL(I,J,K,i,j).
527
1 derivative w.r.t. lnK n cs
i = 2 derivative w.r.t. Lg
3 derivative w.r.t. Ls
1 aqueous phase
j = 2 oil phase
3
gas phase
S j S j S j
, ,
lnK n cs Lg Ls
Keyword: DSATKLL(I,J,K,i,j).
1 aqueous phase
j = 2 oil phase
3
gas phase
k rj k rj k rj
, ,
lnK n cs Lg Ls
528
1 aqueous phase
j = 2 oil phase
3
gas phase
j j j
, ,
lnK n cs Lg Ls
Keyword: DVISKLL(I,J,K,i,j).
1 aqueous phase
j = 2 oil phase
3
gas phase
K n cs (new)
ln K n cs (new)
Natural logarithm of the solid-oil equilibrium ratio for the asphaltene component.
Keyword: ZXYS(I,J,K,2).
Lg
529
Mole fraction of gas phase which is defined by RATIO(I,J,K,3) in the old code.
Keyword: already defined.
Ls (new)
z i , x ij , ln K i , K i
n +
c 1...2n c x io
i1 = 2n c + 1...3n c x ig
3n c + 1...4n c lnK ig
4n + 1...5n K ig values
c c
K ig
Gas-oil equilibrium ratio for component i which can be represented by the same
notation as of that for K i in the old code or ZXY(I,J,K, 4n c + 1...5n c ). Keyword: not
necessary.
ln K ig
NT
530
Total number of moles of all components per pore volume which is the same as
PVMOL(I,J,K,4) in the old code. Keyword: already defined.
k arj(I)
permeability of phase j without the effect of asphaltene precipitation. In the old code,
k rj(I) is represented by REL(I,J,K,j).
R f (new)
w as (new)
N s (new)
Total number of moles of asphaltene component in solid phase per pore volume.
Keyword: PVMOLS(I,J,K).
x n cs (new)
ln n cs (new)
531
Fugacity coefficient of the asphaltene component in the solid phase. Keyword:
PHINCS(I,J,K).
f n cs (new)
ln f n cs (new)
Ms
Molecular weight of asphaltene component which is the same as that for the
heaviest component in the oil phase, WM( n c ). Keyword: already defined.
R f ,max (new)
w as,max (new)
R (new)
ln f n*cs (new)
532
Natural logarithm of reference fugacity. Keyword: FASS.
f n*cs (new)
P* (new)
The highest pressure at which asphaltenes are first observed to be coming out of
solution or the reference pressure. Keyword: PSTAR.
vs (new)
533
M.2 LIST OF NEW GRID ELEMENT VARIABLES
534
i Derivative of transmissibility term for phase j at a
DTRANKLL(I,J,K,i, 1 ,j) gridcell
535
M.3 LIST OF NEW SCALAR VARIABLES
Keyword Description
536
Appendix N: Sample Code Development Guide to Model Asphaltene
Precipitation in GPAS
Filename: xstep.df
Location: GPAS\eoscomp\drive
Filename: xsolve.df
Location: GPAS\eoscomp\solver
SUBROUTINE SOLVERS(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,NPH,P,REL,AWW6,AMK6,AMNP6,AFK,AFW,AFNP,AVK,
> AVW,AVNP,RF,ARV,AMK,AMNP,AWW,ARM,ARW,IDX,AMW,AWKN,AMW6,AWKN6,
> PVMOL
C WALEED 6/8/2006 added asphaltene variables
> AFKLL,AVKLL,AMKLL,AMKLL6,AWKLL,AFSK,AFSNP,AFSKLL,
> AFEKNKLL,AERKNKLL,ARFS,ARFE,ARER)
-
-
-
C WALEED introduced asphaltene variables for solvers
REAL*8 AFKLL(IDIM,JDIM,KDIM,NC,3),
+ AVKLL(IDIM,JDIM,KDIM,3),
+ AMKLL(IDIM,JDIM,KDIM,NC,3),
+ AMKLL6(IDIM,JDIM,KDIM,NC,3,6),
+ AWKLL(IDIM,JDIM,KDIM,3),
+ AFSK(IDIM,JDIM,KDIM,NC),
537
+ AFSNP(IDIM,JDIM,KDIM,NC+1),
+ AFSKLL(IDIM,JDIM,KDIM,3),
+ AFEKNKLL(IDIM,JDIM,KDIM,2*NC+3),
+ AERKNKLL(IDIM,JDIM,KDIM,2*NC+3),
+ ARFS(IDIM,JDIM,KDIM),
+ ARFE(IDIM,JDIM,KDIM),
+ ARER(IDIM,JDIM,KDIM)
C WALEED ~END~
-
-
-
$PETSC CALL XSOLVER(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
$PETSC > AFK,AFW,AFNP,AVK,AVW,AVNP,RF,ARV,AMK,AMNP,AWW,ARM,ARW,
$PETSC > IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,KL2,KEYOUT,
$PETSC > IDX,AMW,AWKN,AMW6,AWKN6,PVMOL,
C WALEED 6/8/2006 added asphaltene variables
$PETSC > AFKLL,AVKLL,AMKLL,AMKLL6,AWKLL,AFSK,AFSNP,AFSKLL,
$PETSC > AFEKNKLL,AERKNKLL,ARFS,ARFE,ARER)
-----------------------------------------------------------------------
Filename: xsolver.df
Location: GPAS\eoscomp\solver
SUBROUTINE XSOLVER(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
+ AFK,AFW,AFNP,AVK,AVW,AVNP,ARF,ARV,AMK,AMNP,AWW,ARM,ARW,
+ NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,IDX,AMW,AWKN,
+ AMW6,AWKN6,PVMOL,
C WALEED 6/2/2006
+ AFKLL,AVKLL,AMKLL,AMKLL6,AWKLL,AFSK,AFSNP,AFSKLL,
+ AFEKNKLL,AERKNKLL,ARFS,ARFE,ARER)
-
-
-
C WALEED 6/2/2006 introduced variables
REAL*8 AFKLL(NX,NY,NZ,NC,3),
+ AVKLL(NX,NY,NZ,3),
+ AMKLL(NX,NY,NZ,NC,3),
+ AMKLL6(NX,NY,NZ,NC,3,6),
+ AWKLL(NX,NY,NZ,3),
+ AFSK(NX,NY,NZ,NC),
+ AFSNP(NX,NY,NZ,NC+1),
+ AFSKLL(NX,NY,NZ,3),
+ AFEKNKLL(NX,NY,NZ,2*NC+3),
+ AERKNKLL(NX,NY,NZ,2*NC+3),
+ ARFS(NX,NY,NZ),
+ ARFE(NX,NY,NZ),
+ ARER(NX,NY,NZ)
C WALEED ~END~
-
-
-
C WALEED 5/25/2006
C IF(IMPSURF .EQ. .FALSE.) THEN
C CALL JPETSC3D(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
C + AFK,AFW,AFNP,AVK,AVW,AVNP,ARF,ARV,AMK,AMNP,AWW,ARM,ARW,
C + NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,IDX,AMW,AWKN,
C + AMW6,AWKN6,NA)
C ELSE
C CALL JPETSC3DT(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
C + AFK,AFW,AFNP,AVK,AVW,AVNP,ARF,ARV,AMK,AMNP,AWW,ARM,ARW,
538
C + NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,IDX,AMW,AWKN,
C + AMW6,AWKN6,NA,PVMOL)
C ENDIF
IF(IMPSURF .EQ. .FALSE.) THEN
IF (IASPR .EQ. .TRUE.) THEN
CALL JPETSC3DA(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
+ AFK,AFW,AFNP,AVK,AVW,AVNP,ARF,ARV,AMK,AMNP,AWW,ARM,ARW,
+ NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,IDX,AMW,AWKN,
+ AMW6,AWKN6,NA,
+ AFKLL,AVKLL,AMKLL,AMKLL6,AWKLL,AFSK,AFSNP,AFSKLL,
+ AFEKNKLL,AERKNKLL,ARFS,ARFE,ARER)
ELSE IF (IASPR .EQ. .FALSE.) THEN
CALL JPETSC3D(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
+ AFK,AFW,AFNP,AVK,AVW,AVNP,ARF,ARV,AMK,AMNP,AWW,ARM,ARW,
+ NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,IDX,AMW,AWKN,
+ AMW6,AWKN6,NA)
END IF
ELSE IF (IMPSURF .EQ. .TRUE.)
CALL JPETSC3DT(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
+ AFK,AFW,AFNP,AVK,AVW,AVNP,ARF,ARV,AMK,AMNP,AWW,ARM,ARW,
+ NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,IDX,AMW,AWKN,
+ AMW6,AWKN6,NA,PVMOL)
ENDIF
C WALEED ~END~
-
-
-
C WALEED 5/31/2006 added subroutine jpetsc3da
-
-
-
SUBROUTINE JPETSC3DA(NC,NP,NPH,P,REL,AWW6,AMK6,AMNP6,
+ AFK,AFW,AFNP,AVK,AVW,AVNP,ARF,ARV,AMK,AMNP,AWW,ARM,ARW,
+ NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,IDX,AMW,AWKN,
+ AMW6,AWKN6,NA,
C WALEED 6/2/2006
+ AFKLL,AVKLL,AMKLL,AMKLL6,AWKLL,AFSK,AFSNP,AFSKLL,
+ AFEKNKLL,AERKNKLL,ARFS,ARFE,ARER)
-
-
-
C WALEED 5/25/2006
C INTEGER LC(7*(2*NC+2)*(2*NC+2)),
C + IROW((2*NC+2)*NB),
INTEGER LC(7*(2*NC+6)*(2*NC+6)), ! changed lc & irow
+ IROW((2*NC+6)*NB),
C WALEED ~END~
-
-
-
C WALEED 5/25/2006
C REAL*8 BB(7*(2*NC+2)*(2*NC+2)),
C + RHS((2*NC+2)*NB)
REAL*8 BB(7*(2*NC+6)*(2*NC+6)), ! changed bb & rhs
+ RHS((2*NC+6)*NB)
C WALEED ~END~
-
-
-
539
C WALEED 6/2/2006 introduced variables
REAL*8 AFKLL(NX,NY,NZ,NC,3),
+ AVKLL(NX,NY,NZ,3),
+ AMKLL(NX,NY,NZ,NC,3),
+ AMKLL6(NX,NY,NZ,NC,3,6),
+ AWKLL(NX,NY,NZ,3),
+ AFSK(NX,NY,NZ,NC),
+ AFSNP(NX,NY,NZ,NC+1),
+ AFSKLL(NX,NY,NZ,3),
+ AFEKNKLL(NX,NY,NZ,2*NC+3),
+ AERKNKLL(NX,NY,NZ,2*NC+3),
+ ARFS(NX,NY,NZ),
+ ARFE(NX,NY,NZ),
+ ARER(NX,NY,NZ)
C WALEED ~END~
-
-
-
C WALEED 5/25/2006
C nblock = 2*NC+2
C NV = ITWO * NC + ITWO
nblock = 2*NC+6
NV = ITWO * NC + 6 ! changed nblock & nv
C WALEED ~END~
-
-
-
C WALEED 5/31/2006 ! no change in the section below
-
-
-
C WALEED 5/31/2006 added 3 variables to g/o f
L = L + IONE
BB(L) = AFKLL(I,J,K,IC,1) ! afkll
LC(L) = IDX(I,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AFKLL(I,J,K,IC,2)
LC(L) = IDX(I,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AFKLL(I,J,K,IC,3)
LC(L) = IDX(I,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 5/31/2006 added 3 variables to vc
L = L + IONE
BB(L) = AVKLL(I,J,K,1) ! avkll
LC(L) = IDX(I,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AVKLL(I,J,K,2)
LC(L) = IDX(I,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AVKLL(I,J,K,3)
LC(L) = IDX(I,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
540
LC(L) = IDX(I,J,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to mass
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,1,5)
LC(L) = IDX(I,J,K-1) + (NC2+3) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,2,5)
LC(L) = IDX(I,J,K-1) + (NC2+4) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,3,5)
LC(L) = IDX(I,J,K-1) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K-1) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to mass
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,1,3)
LC(L) = IDX(I,J-1,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,2,3)
LC(L) = IDX(I,J-1,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,3,3)
LC(L) = IDX(I,J-1,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J-1,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to mass
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,1,1)
LC(L) = IDX(I-1,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,2,1)
LC(L) = IDX(I-1,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,3,1)
LC(L) = IDX(I-1,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I-1,J,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to mass
L = L + IONE
BB(L) = AMKLL(I,J,K,IC,1) ! amkll
LC(L) = IDX(I,J,K) + (NC2+3) - IONE
541
L = L + IONE
BB(L) = AMKLL(I,J,K,IC,2)
LC(L) = IDX(I,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AMKLL(I,J,K,IC,3)
LC(L) = IDX(I,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to mass
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,1,2)
LC(L) = IDX(I+1,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,2,2)
LC(L) = IDX(I+1,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,3,2)
LC(L) = IDX(I+1,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I+1,J,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to mass
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,1,4)
LC(L) = IDX(I,J+1,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,2,4)
LC(L) = IDX(I,J+1,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,3,4)
LC(L) = IDX(I,J+1,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J+1,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to mass
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,1,6) ! amkll6
LC(L) = IDX(I,J,K+1) + (NC2+3) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,2,6)
LC(L) = IDX(I,J,K+1) + (NC2+4) - IONE
L = L + IONE
BB(L) = AMKLL6(I,J,K,IC,3,6)
LC(L) = IDX(I,J,K+1) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J+1,K) + (NC2+6) - IONE
542
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to water
DO JC = 1 , 4
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K-1) + (NC2P2+JC) - IONE
END DO
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to water
DO JC = 1 , 4
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J-1,K) + (NC2P2+JC) - IONE
END DO
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to water
DO JC = 1 , 4
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I-1,J,K) + (NC2P2+JC) - IONE
END DO
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to water
L = L + IONE
BB(L) = AWKLL(I,J,K,1) ! awkll
LC(L) = IDX(I,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AWKLL(I,J,K,2)
LC(L) = IDX(I,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AWKLL(I,J,K,3)
LC(L) = IDX(I,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + (NC2+6) - IONE
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to water
DO JC = 1 , 4
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I+1,J,K) + (NC2P2+JC) - IONE
END DO
C WALEED ~END~
-
-
543
-
C WALEED 6/1/2006 added 3 variables to water
DO JC = 1 , 4
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J+1,K) + (NC2P2+JC) - IONE
END DO
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 added 3 variables to water
DO JC = 1 , 4
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K+1) + (NC2P2+JC) - IONE
END DO
C WALEED ~END~
-
-
-
C WALEED 5/25/2006 defined s/o fugacity eq. for solver
DO IC = 1 , NC
L = L+IONE
BB(L) = AFSK(I,J,K,IC) ! afsk
LC(L) = IDX(I,J,K) + IC - IONE
END DO
DO IC = 1 , NC
L = L+IONE
BB(L) = AFSNP(I,J,K,IC) ! afsnp
LC(L) = IDX(I,J,K) + NC + IC - IONE
END DO
L = L + IONE
BB(L) = AFSNP(I,J,K,NCP1)
LC(L) = IDX(I,J,K) + NC2P1 - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + NC2P2 - IONE
L = L + IONE
BB(L) = AFSKLL(I,J,K,1) ! afskll
LC = IDX(I,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AFSKLL(I,J,K,2)
LC = IDX(I,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AFSKLL(I,J,K,3)
LC = IDX(I,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC = IDX(I,J,K) + (NC2+6) - IONE
IROW(IW+IONE) = NV
N = N + IONE
RHS(N) = ARFS(I,J,K)
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 defined fe for solver
! need to fix the 2/3 phases
544
DO IC = 1 , NC
L = L+IONE
BB(L) = AFEKNKLL(I,J,K,IC) ! afeknkll
LC(L) = IDX(I,J,K) + IC - IONE
END DO
DO IC = 1 , NC
L = L+IONE
BB(L) = AFEKNKLL(I,J,K,IC+NC)
LC(L) = IDX(I,J,K) + NC + IC - IONE
END DO
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + NC2P1 - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + NC2P2 - IONE
L = L + IONE
BB(L) = AFEKNKLL(I,J,K,NC2P1)
LC = IDX(I,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AFEKNKLL(I,J,K,NC2P2)
LC = IDX(I,J,K) + (NC2+4) - IONE
L = L + IONE
BB(L) = AFEKNKLL(I,J,K,NC2+3)
LC = IDX(I,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC0
LC = IDX(I,J,K) + (NC2+6) - IONE
IROW(IW+ITWO) = NV
N = N + IONE
RHS(N) = ARFE(I,J,K)
C WALEED ~END~
-
-
-
C WALEED 6/1/2006 defined er for solver
DO IC = 1 , NC
L = L+IONE
BB(L) = AERKNKLL(I,J,K,IC) ! aerknkll
LC(L) = IDX(I,J,K) + IC - IONE
END DO
DO IC = 1 , NC
L = L+IONE
BB(L) = AERKNKLL(I,J,K,NC+IC)
LC(L) = IDX(I,J,K) + NC + IC - IONE
END DO
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + NC2P1 - IONE
L = L + IONE
BB(L) = RC0
LC(L) = IDX(I,J,K) + NC2P2 - IONE
L = L + IONE
BB(L) = AERKNKLL(I,J,K,NC2P1)
LC = IDX(I,J,K) + (NC2+3) - IONE
L = L + IONE
BB(L) = AERKNKLL(I,J,K,NC2P2)
LC = IDX(I,J,K) + (NC2+4) - IONE
L = L + IONE
545
BB(L) = AERKNKLL(I,J,K,NC2+3)
LC = IDX(I,J,K) + (NC2+5) - IONE
L = L + IONE
BB(L) = RC1
LC = IDX(I,J,K) + (NC2+6) - IONE
IROW(IW+3) = NV
N = N + IONE
RHS(N) = ARER(I,J,K)
IROW(IW+4) = NV
N = N + IONE
RHS(N) = RC0
C WALEED ~END~
-
-
-
C WALEED 6/8/2006 updating the primary variables
ARFS(I,J,K) = RHS(IDX(I,J,K)-RSTART+2*NC+3)
ARFE(I,J,K) = RHS(IDX(I,J,K)-RSTART+2*NC+4)
ARER(I,J,K) = RHS(IDX(I,J,K)-RSTART+2*NC+5)
C WALEED ~END~
-----------------------------------------------------------------------
-----------------------------------------------------------------------
Filename: xstep.df
Location: GPAS\eoscomp\drive
CALL JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,KL2,
+ KEYOUT,NBLK,POR,TCOFX,TCOFY,TCOFZ,SAT,P,PORI,VP,VB,RATIO,W,
+ NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,TRAPN,DTRAPN,
+ RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,AFNP,AVK,AVW,
+ AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,AWW6,X,ZXY,DEPTH,
+ ROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,DRELS,DVISS,
+ DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,ZPERM,
c print*, "out of Jacobian"
c Marcondes added cross transmisibilities 12/07/04
+ tcofxe,tcofxg,tcofyk,tcofyg,tcofzk,tcofze,XPERM,YPERM,RKARY,^M
+ fpk,fpe,fpg,
C WALEED 2/14/2006 added asphaltene variables for calling jacobian
+ RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
+ DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL,DTRANKLL,
+ AFKLL,AVKLL,AERKNKLL,AFEKNKLL,AFSKLL,AFSNP,AFSK,
+ FAS)^M
-----------------------------------------------------------------------
Filename: jacobian.df
Location: GPAS\eoscomp\jcobian
SUBROUTINE JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,POR,XPERM,YPERM,ZPERM,SAT,P,PORI,VP,VB,
> RATIO,W,NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,
> TRAPN,DTRAPN,RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,
> AFNP,AVK,AVW,AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,
> AWW6,X,ZXY,DEPTH,KROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,
546
> DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL,DTRANKLL
> AFKLL,AVKLL,AERKNKLL,AFEKNKLL,AFSKLL,AFSNP,AFSK,
> FAS)^M
-
-
-
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS(NX,NY,NZ),
> AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),
> AMKLL(NX,NY,NZ,NC,3),
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),
> DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> ZXYS(NX,NY,NZ,2),
> DROKLL(NX,NY,NZ,3,3),
> DTRANKLL(NX,NY,NZ,NC,3,NP),
> AFKLL(NX,NY,NZ,NC,3),AVKLL(NX,NY,NZ,3),
> AERKNKLL(NX,NY,NZ,2*NC+3),
> AFEKNKLL(NX,NY,NZ,2*NC+3),
> AFSKLL(NX,NY,NZ,3),
> AFSNP(NX,NY,NZ,NC+1),AFSK(NX,NY,NZ,NC),
> FAS(NX,NY,NZ)
-
-
-
CALL PREROW(NP,NC,NPH,TEMPR,P,VB,VP,TMOLR,PVMOL,ZXY,RATIO,ZF,DZF,
> TC,PC,VC,WM,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,AD,BD,
> PARA,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,RF,PHI,AFK,AFW,AFNP,DFV,AVK,
> AVW,AVNP,ARV,DTRAN,XPERM,YPERM,ZPERM,AMK,AMNP,AWW,AMK6,AMNP6,
> AWW6,NUMWEL,DELTIM,X,POR,PORI,DEPTH,W,IDIM,JDIM,KDIM,LDIM,IL1,
> IL2,JL1V,JL2V,KL1,KL2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,
> DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,PERMZ,
c Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
c Marcondes 12/07/04
C WALEED 3/9/2006 added asphaltene variables for calling prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL,DTRANKLL,
> AFKLL,AVKLL,AERKNKLL,AFEKNKLL,AFSKLL,AFSNP,AFSK,
> FAS))^M
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
SUBROUTINE PREROW(NP,NC,NPH,TEMP,P,VB,VP,TMOLR,PVMOL,ZXY,
> RATIO,ZF,DZF,
> TC,PC,VC,WT,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,
> AD,BD,PARACH,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,
547
> ARF,PHI,AFK,AFW,AFNP,DFV,AVK,AVW,AVNP,ARV,DTRAN,
> XTRM,YTRM,ZTRM,AMK,AMNP,AWW,AMK6,AMNP6,AWW6,NWELL,
> TD,X,POR,PORI,DEPTH,W,NX,NY,NZ,LDIM,I1,
> I2,J1,J2,K1,K2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,
> VISCW,DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,ZXYS,DROKLL,DTRANKLL,
> AFKLL,AVKLL,AERKNKLL,AFEKNKLL,AFSKLL,AFSNP,AFSK,
> FAS)^M
-
-
-
C WALEED 3/9/2006 added asphaltene variables to prerow
REAL*8 RATIOS(NX,NY,NZ),AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),AMKLL(NX,NY,NZ,NC,3),
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> ZXYS(NX,NY,NZ,2),DROKLL(NX,NY,NZ,3,NP),
> DTRANKLL(NX,NY,NZ,NC,3,NP),
> AFKLL(NX,NY,NZ,NC,3),AVKLL(NX,NY,NZ,3),
> AERKNKLL(NX,NY,NZ,2*NC+3),
> AFEKNKLL(NX,NY,NZ,2*NC+3),
> AFSKLL(NX,NY,NZ,3),
> AFSNP(NX,NY,NZ,NC+1),AFSK(NX,NY,NZ,NC),
> FAS(NX,NY,NZ)
C WALEED ~END~
-
-
-
CALL JACO1(ISTART,IEND,NC,NPH(I,J,K,1:NP),P(I,J,K),
> PVMOL(I,J,K,1:NP+2),VP(I,J,K),
> ZXY(I,J,K,1:5*NC),RATIO(I,J,K,1:NP),ZF(I,J,K,1:NP),
> DZF(I,J,K,1:NC+1,1:NP),DZN(1:NC,1:NP),
> DZFKN(1:2*NC+1,1:NP),PHI(I,J,K,1:NC,1:NP),
> DEN(I,J,K,1:NP),
> RR,DRR(1:2*NC+1),XYZ(1:NC),
> AFK(I,J,K,1:NC+NA,1:NC+NA),AFW(I,J,K,1:NC+NA),
> AFNP(I,J,K,1:NC+NA,1:NC+NA+1,1:NP),DFV(I,J,K,1:NC),
> AVK(I,J,K,1:NC+NA),AVW(I,J,K),
> AVNP(I,J,K,1:NC+NA+1),ARV(I,J,K),NP,NB,
> AQCDEN(I,J,K,1:NA+1),DDEN(I,J,K,1:2*NC+1,1:NP),
> X(I,J,K,1:NC+NA+1)
C WALEED 6/7/2006 added asphaltene variables
> DXYDKLL(I,J,K,1:NC,1:3,1:NP),
> AFKLL(I,J,K,1:NC,1:3),
> AVKLL(I,J,K,1:3),
> DZFKLL(I,J,K,1:3,1:NP),
> AERKNKLL(I,J,K,1:2*NC+3),
> AFEKNKLL(I,J,K,1:2*NC+3),
> ZXYS(I,J,K,1:2),
> RATIOS(I,J,K),AFSKLL(I,J,K,1:3),
> AFSNP(I,J,K,1:NC+1),
> AFSK(I,J,K,1:NC),FAS(I,J,K))
548
-----------------------------------------------------------------------
Filename: eos_jaco.f
Location: GPAS\eoscomp\jacobian
SUBROUTINE JACO1(ISTART,IEND,NC,NPH,P,PVMOL,VP,ZXY,RATIO,ZF,
+ DZF,DZN,DZFKN,PHI,DEN,RR,DRR,XYZ,AFK,AFW,AFNP,
+ DFV,AVK,AVW,AVNP,ARV,NP,NB,AQCDEN,DDEN,X,
C WALEED added asphaltene variables
+ DXYDKLL,AFKLL,AVKLL,DZFKLL,AERKNKLL,AFEKNKLL,
+ ZXYS,RATIOS,AFSKLL,AFSNP,AFSK,FAS)
-
-
-
C WALEED 6/7/2006 added variables
REAL*8 SUMC, EKM1, EKM2, TERM1, TERM2,
> C2,
> DXYDKLL(NC,3,NP,NB), AFKLL(NC,3,NB),
> AVKLL(3,NB), DZFKLL(3,NP,NB),
> AERKNKLL(2*NC+3,NB), AFEKNKLL(2*NC+3,NB),
> ZXYS(2,NB), RATIOS(NB),
> AFSKLL(3,NB), AFSNP(NC+1,NB),
> AFSK(NC,NB), FAS(NB)
C WALEED ~END~
-
-
-
C WALEED 4/10/2006 modified avnp for 1 phase
C no change for p
IF (IASPR) THEN
AVNP(I,K) = RTP*DZFKN(I+NC,J,K) + C1
GO TO 3
END IF
C WALEED ~END~
-
-
-
C WALEED 4/5/2006 defined afkll for 1 phase
C no change for afk/afnp for 1 phase
IF (IASPR) THEN
IF (NPH(2,K).NE.IZERO) THEN
SUMB = RC0
DO 5 J = 1 , NC
SUMB = SUMB + AFNP(I,J,2,K)*DXYDKLL(J,1,2,K)
5 CONTINUE
AFKLL(I,1,K) = -SUMB
SUMB = RC0
DO 6 J = 1 , NC
SUMB = SUMB + AFNP(I,J,2,K)*DXYDKLL(J,2,2,K)
6 CONTINUE
AFKLL(I,2,K) = -SUMB
SUMB = RC0
DO 7 J = 1 , NC
SUMB = SUMB + AFNP(I,J,2,K)*DXYDKLL(J,3,2,K)
7 CONTINUE
AFKLL(I,3,K) = -SUMB
END IF
IF (NPH(3,K).NE.IZERO) THEN
AFKLL(I,1,K) = RC0
AFKLL(I,2,K) = RC0
549
AFKLL(I,3,K) = RC0
END IF
END IF
C WALEED ~END~
-
-
-
C WALEED 4/11/2006 defined avkll for 1 phase
IF (IASPR) THEN
IF (NPH(3,K).EQ.IZERO) THEN
AVKLL(2,K) = RC0
ELSE IF (NPH(3,K).NE.IZERO) THEN
AVKLL(2,K)=RTP*(DZFKLL(2,3,K)-ZF(3,K))
END IF
IF (NPH(2,K).EQ.IZERO) THEN
AVKLL(1,K) = RC0
AVKLL(3,K) = RC0
ELSE IF (NPH(2,K).NE.IZERO) THEN
AVKLL(1,K) = RTP * DZFKLL(1,2,K)
AVKLL(3,K) = RTP * (RATIO(2,K)*DZFKLL(3,2,K)-
+ ZF(2,K)) + VBS
END IF
END IF
C WALEED ~END~
-
-
-
C WALEED 4/13/2006 defined aerknkll for 1 phase
IF (IASPR) THEN
DO 15 I = 1 , NC
AERKNKLL(I,K) = RC0
AERKNKLL(NC+I,K) = RC0
15 CONTINUE
AERKNKLL(NC2P1,K)= RC0
AERKNKLL(NC2P2,K)= RC0
AERKNKLL(NC2P2+1,K)= RC0
END IF
C WALEED ~END~
-
-
-
C WALEED 4/13/2006 defined afeknkll for 1 phase
IF (IASPR) THEN
IF (NPH(3,K).EQ.IONE) THEN
DO 16 I = 1 , NC
AFEKNKLL(I,K) = RC0
AFEKNKLL(NC+I,K) = RC0
16 CONTINUE
AFEKNKLL(NC2P1,K) = RC0
AFEKNKLL(NC2P2,K) = RC0
AFEKNKLL(NC2P2+1,K) = RC0
END IF
IF (NPH(2,K).EQ.IONE) THEN
DO 18 I = 1 , NC
AFEKNKLL(I,K) = RC0
SUMA = RC0
DO 17 JC = 1 , NC
IF (JC.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (JC.NE.NC) THEN
550
EKM2 = -RC1
END IF
TERM1 = ZXY(JC,K)*EKM2
TERM2 = 1 + RATIOS(K)*EKM2
SUMA = SUMA + TERM1/TERM2
17 CONTINUE
IF (I.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (I.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = RC1/PVMOL(4,K)
TERM2 = 1 + RATIO(3,K)* EKM1 + RATIOS(K) * EKM2
AFEKNKLL(I,K) = TERM1 * ( EKM2/TERM2 - SUMA)
18 CONTINUE
EKM2 = EXP(ZXYS(2,K)) - RC1
TERM1 = ZXY(NC,K)*(EKM2+RC1)
TERM2 = 1 + RATIOS(K)*EKM2
AFEKNKLL(NC2P1,K) = TERM1/(TERM2*TERM2)
AFEKNKLL(NC2P2,K) = RC0
SUMA = RC0
DO 19 JC = 1 , NC
IF (JC.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (JC.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = ZXY(J,K) * EKM2 * EKM2
TERM2 = 1 + RATIOS(K)*EKM2
SUMA = SUMA + TERM1/(TERM2*TERM2)
19 CONTINUE
AFEKNKLL(NC2P2+1,K) = -SUMA
END IF
END IF
C WALEED ~END~
-
-
-
C WALEED 4/10/2006 modified avk & avnp for 2 hc
IF (IASPR) THEN
AVK(I,K) = RTP * SUMA
TERM = (RC1-TMPV(1)/DEN(1,K)) / (TMPV(4)*TMPV(4))
AVNP(I,K) = RTP * SUMB + TERM
GO TO 50
END IF
C WALEED ~END~
-
-
-
C WALEED 4/5/2006 modified afk & afnp for 2 hc
IF (IASPR) THEN
DO 54 I = 1 , NC
DO 53 J = 1 , NC
AFK(I,J,K) = AFNP(I,J,NP,K)*DXYDKN(I,J,3,K)-
+ AFNP(I,J,NP-1,K)*DXYDKN(I,J,2,K)
IF ( I.EQ.J ) AFK(I,I,K) = AFK(I,I,K) + RC1
AFNP(I,J,1,K) = AFNP(I,J,NP,K)*DXYDKN(I,J,6,K)-
+ AFNP(I,J,NP-1,K)*DXYDKN(I,J,5,K)
551
53 CONTINUE
AFW(I,K) = RC0
AFNP(I,NC+1,1,K) = AFNP(I,NCP1,NP,K)-
+ AFNP(I,NCP1,NP-1,K)
54 CONTINUE
END IF
C WALEED ~END~
-
-
-
C WALEED 4/11/2006 defined afkll for 2 hc
IF (IASPR) THEN
DO 59 I = 1 , NC
AFKLL(I,1,K) = RC0
AFKLL(I,2,K) = RC0
AFKLL(I,3,K) = RC0
SUMA = RC0
SUMB = RC0
DO 55 J = 1 , NC
SUMA = SUMA + AFNP(I,J,3,K)*DXYDKLL(J,1,3,K)
SUMB = SUMB + AFNP(I,J,2,K)*DXYDKLL(J,1,2,K)
55 CONTINUE
AFKLL(I,1,K) = SUMA - SUMB
SUMA = RC0
SUMB = RC0
DO 56 J = 1 , NC
SUMA = SUMA + AFNP(I,J,3,K)*DXYDKLL(J,2,3,K)
SUMB = SUMB + AFNP(I,J,2,K)*DXYDKLL(J,2,2,K)
56 CONTINUE
AFKLL(I,2,K) = SUMA - SUMB
SUMA = RC0
SUMB = RC0
DO 57 J = 1 , NC
SUMA = SUMA + AFNP(I,J,3,K)*DXYDKLL(J,3,3,K)
SUMB = SUMB + AFNP(I,J,2,K)*DXYDKLL(J,3,2,K)
57 CONTINUE
AFKLL(I,3,K) = SUMA - SUMB
59 CONTINUE
END IF
C WALEED ~END~
-
-
-
C WALEED 4/6/2006 defined afsk, afsnp & afskll for 2 hc
C do i need this for 1 phase?
IF (IASPR) THEN
AFSKLL(1,K) = RC0
AFSKLL(2,K) = RC0
AFSKLL(3,K) = RC0
AFSNP(NC+1,K) = RC0
DO 62 I = 1 , NC
AFSK(I,K) = RC0
AFSNP(I,K) = RC0
SUMA = RC0
DO 60 J = 1 , NC
SUMA = SUMA + AFNP(NC,J,2,K)*DXYDKN(J,I,2,K)
60 CONTINUE
AFSK(I,K) = -SUMA
SUMA = 0
DO 61 J = 1 , NC
552
SUMA = SUMA + AFNP(NC,J,2,K)*DXYDKN(J,I,5,K)
61 CONTINUE
AFSNP(I,K) = -SUMA
62 CONTINUE
SUMA = VBS/(EXP(FAS(K))*RGASR*TEMPR)
AFSNP(NC+1,K) = SUMA-(RC1/P(K))-AFNP(NC,NCP1,2,K)
SUMA = RC0
DO 63 J = 1 , NC
SUMA = SUMA + AFNP(NC,J,2,K)*DXYDKLL(J,1,2,K)
63 CONTINUE
AFSKLL(1,K) = 1 - SUMA
SUMA = RC0
DO 64 J = 1 , NC
SUMA = SUMA + AFNP(NC,J,2,K)*DXYDKLL(J,2,2,K)
64 CONTINUE
AFSKLL(2,K) = -SUMA
SUMA = RC0
DO 65 J = 1 , NC
SUMA = SUMA + AFNP(NC,J,2,K)*DXYDKLL(J,3,2,K)
65 CONTINUE
AFSKLL(3,K) = -SUMA
GO TO 102
END IF
C WALEED ~END~
-
-
-
C WALEED 4/10/2006 defined avkll for 2 hc
IF (IASPR) THEN
SUMA = RC0
SUMB = RC0
SUMC = RC0
DO 125 J = 2 , NP
SUMA = SUMA + RATIO(J,K) * DZFKLL(1,J,K)
SUMB = SUMB + RATIO(J,K) * DZFKLL(2,J,K)
SUMC = SUMC + RATIO(J,K) * DZFKLL(3,J,K)
125 CONTINUE
AVKLL(1,K) = RTP * SUMA
AVKLL(2,K) = RTP * (SUMB + ZF(3,K) - ZF(2,K))
AVKLL(3,K) = RTP * (SUMC - ZF(2,K)) + VBS
END IF
C WALEED ~END~
-
-
-
C WALEED 4/13/2006 defined aerknkll for 2 hc
IF (IASPR) THEN
C2 = RC1/(ZXY(NC2,K)*ZXY(NC2,K))
DO 130 I = 1 , NC
AERKNKLL(I,K) = C2*DXYDKN(NC,I,2,K)
AERKNKLL(NC+I,K) = C2*DXYDKN(NC,I,5,K)
130 CONTINUE
AERKNKLL(NC2P1,K)= RC1/(EXP(ZXYS(2,K))+C2*DXYDKLL(NC,1,2,K)
AERKNKLL(NC2P2,K)= C2*DXYDKLL(NC,2,2,K)
AERKNKLL(NC2P2+1,K)= C2*DXYDKLL(NC,3,2,K)
END IF
C WALEED ~END~
-
-
-
553
C WALEED 4/13/20006 defined afeknkll for 2 hc
IF (IASPR) THEN
DO 135 I = 1 , NC
SUMA = RC0
DO 132 J = 1 , NC
EKM1 = EXP(ZXY(NC3+J,K)) - RC1
IF (J.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (J.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = ZXY(J,K)*(EKM1+RC1)*(1 + RATIOS(K)*EKM2)
TERM2 = 1 + RATIO(3,K)*EKM1 + RATIOS(K)*EKM2
SUMA = SUMA + TERM1/(TERM2*TERM2)
132 CONTINUE
AFEKNKLL(I,K) = SUMA
SUMA = RC0
DO 133 J = 1 , NC
EKM1 = EXP(ZXY(NC3+J,K)) - RC1
IF (J.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (J.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = ZXY(J,K)*EKM1
TERM2 = 1 + RATIO(3,K)*EKM1 + RATIOS(K)*EKM2
SUMA = SUMA + TERM1/TERM2
133 CONTINUE
EKM1 = EXP(ZXY(NC3+I,K)) - RC1
IF (I.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (I.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = RC1/PVMOL(4,K)
TERM2 = 1 + RATIO(3,K)* EKM1 + RATIOS(K) * EKM2
AFEKNKLL(NC+I,K) = TERM1 * (EKM1/TERM2 - SUMA)
135 CONTINUE
EKM1 = EXP(ZXY(NC3+NC,K)) - RC1
EKM2 = EXP(ZXYS(2,K)) - RC1
TERM1 = -ZXY(NC,K)*EKM1*RATIOS(K)*(EKM2+RC1)
TERM2 = 1 + RATIO(3,K)*EKM1 + RATIOS(K)*EKM2
AFEKNKLL(NC2P1,K) = TERM1/(TERM2*TERM2)
SUMA = RC0
DO 136 J = 1 , NC
EKM1 = EXP(ZXY(NC3+J,K)) - RC1
IF (J.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (J.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = ZXY(J,K) * EKM1 * EKM1
TERM2 = 1 + RATIO(3,K)*EKM1 + RATIOS(K)*EKM2
SUMA = SUMA + TERM1/(TERM2*TERM2)
136 CONTINUE
AFEKNKLL(NC2P2,K) = -SUMA
SUMA = RC0
554
DO 137 J = 1 , NC
EKM1 = EXP(ZXY(NC3+J,K)) - RC1
IF (J.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (J.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = ZXY(J,K) * EKM1 * EKM2
TERM2 = 1 + RATIO(3,K)*EKM1 + RATIOS(K)*EKM2
SUMA = SUMA + TERM1/(TERM2*TERM2)
137 CONTINUE
AFEKNKLL(NC2P2+1,K) = -SUMA
END IF
C WALEED ~END~
found a new ARV in this file but it seems that it's not being used
-----------------------------------------------------------------------
Filename: xstep.df
Location: GPAS\eoscomp\drive
Filename: jacobian.df
Location: GPAS\eoscomp\jcobian
SUBROUTINE JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,POR,XPERM,YPERM,ZPERM,SAT,P,PORI,VP,VB,
> RATIO,W,NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,
> TRAPN,DTRAPN,RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,
> AFNP,AVK,AVW,AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,
> AWW6,X,ZXY,DEPTH,KROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,
> DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL,DTRANKLL)
-
-
-
555
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS(NX,NY,NZ),
> AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),
> AMKLL(NX,NY,NZ,NC,3),
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),
> DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> ZXYS(NX,NY,NZ,2),
> DROKLL(NX,NY,NZ,3,3),
> DTRANKLL(NX,NY,NZ,NC,3,NP)
-
-
-
CALL PREROW(NP,NC,NPH,TEMPR,P,VB,VP,TMOLR,PVMOL,ZXY,RATIO,ZF,DZF,
> TC,PC,VC,WM,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,AD,BD,
> PARA,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,RF,PHI,AFK,AFW,AFNP,DFV,AVK,
> AVW,AVNP,ARV,DTRAN,XPERM,YPERM,ZPERM,AMK,AMNP,AWW,AMK6,AMNP6,
> AWW6,NUMWEL,DELTIM,X,POR,PORI,DEPTH,W,IDIM,JDIM,KDIM,LDIM,IL1,
> IL2,JL1V,JL2V,KL1,KL2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,
> DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,PERMZ,
c Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
c Marcondes 12/07/04
C WALEED 3/9/2006 added asphaltene variables for calling prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL,DTRANKLL)^M
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
SUBROUTINE PREROW(NP,NC,NPH,TEMP,P,VB,VP,TMOLR,PVMOL,ZXY,
> RATIO,ZF,DZF,
> TC,PC,VC,WT,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,
> AD,BD,PARACH,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,
> ARF,PHI,AFK,AFW,AFNP,DFV,AVK,AVW,AVNP,ARV,DTRAN,
> XTRM,YTRM,ZTRM,AMK,AMNP,AWW,AMK6,AMNP6,AWW6,NWELL,
> TD,X,POR,PORI,DEPTH,W,NX,NY,NZ,LDIM,I1,
> I2,J1,J2,K1,K2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,
> VISCW,DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,ZXYS,DROKLL,DTRANKLL)^M
-
-
-
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS(NX,NY,NZ),AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),AMKLL(NX,NY,NZ,NC,3),
556
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> ZXYS(NX,NY,NZ,2),DROKLL(NX,NY,NZ,3,NP),
> DTRANKLL(NX,NY,NZ,NC,3,NP)
-
-
-
CALL JACO2(NC,NPH(I,J,K,1:NP),ZXY(I,J,K,1:5*NC),
> AMK6(I,J,K,1:NC,1:NC,1:6),DEN(I,J,K,1:NP),
> VIS(I,J,K,1:NP),DVIS(I,J,K,1:2*NC+1,1:NP),
> DROKN(1:2*NC+1,1:NP),REL(I,J,K,1:NP),
> DREL(I,J,K,1:2*NC+2,1:NP),
> DTRAN(I,J,K,1:2*NC+1,1:NC,1:NP),NP,1),
C WALEED 2/14/2006 added ashphaltene variables for calling jaco2
> RKARY(I,J,K),POR(I,J,K),WT(1:NC),RATIOS(I,J,K),
> DTRANKLL(I,J,K,1:NC,1:3,1:NP),
> DXYDKLL(I,J,K,1:NC,1:3,1:NP),
> DRELKLL(I,J,K,1:3,1:NP),DROKLL(I,J,K,1:3,1:NP),
> DVISKLL(I,J,K,1:3,1:NP))
-----------------------------------------------------------------------
Filename: jaco2pw.f
Location: GPAS\eoscomp\Jacobian
SUBROUTINE JACO2(NC,NPH,ZXY,DXYDKN,DEN,VISC,
> DVIS,DROKN,REL,DREL,DTRAN,NP,NB,
C WALEED 3/11/2006 added asphaltene variables to jaco2
> RKARY,POR,WM,RATIOS,DTRANKLL,DXYDKLL,
> DRELKLL,DROKLL,DVISKLL)
-
-
-
C WALEED 3/11/2006 added asphaltene variables to jaco2
> RKARY(NB), POR(NB),
> WM(NC), RATIOS(NB),
> DTRANKLL(NC,3,NP,NB), DXYDKLL(NC,3,NP,NB),
> DRELKLL(3,NP,NB), DROKLL(3,NP,NB),
> DVISKLL(3,NP,NB)
-
-
-
CALL FLOWLKN(TM,NC,ZXY(1,K),VISC(J,K),DEN(J,K),REL(J,K),
> DXP,DXYDKN(1,1,J,K),DXYDKN(1,1,JP,K),DREL(1,J,K),
> DROKN(1,J,K),DVIS(1,J,K),DTRAN(1,1,J,K),J,
> NTYPE,
C WALEED 3/10/2006 added asphaltene variables for calling
> RKARY(K),POR(K),WM(1),RATIOS(K),
> DTRANKLL(1,1,J,K),DXYDKLL(1,1,J,K),DRELKLL(1,J,K),
> DROKLL(1,J,K),DVISKLL(1,J,K))
-
-
-
C WALEED 3/10/2006 added variables
REAL*8 RKARY, POR,
> WM(NC), RATIOS,
> DTRANKLL(NC,3), DXYDKLL(NC,3),
> DRELKLL(3), DROKLL(3),
> DVISKLL(3)
-
557
-
-
C WALEED 3/10/2006 added variables
REAL*8 RKARY, POR,
> WM(NC), RATIOS,
> DTRANKLL(NC,3), DXYDKLL(NC,3),
> DRELKLL(3), DROKLL(3),
> DVISKLL(3)
-
-
-
C WALEED 4/4/2006 defined dtrankll for no hc
DTRANKLL(I,1) = RC0
DTRANKLL(I,2) = RC0
DTRANKLL(I,3) = RC0
C WALEED ~END~
-
-
-
C WALEED 4/4/2006 defined dtrankll for g only
IF (IASPR) THEN
UW3 = RC1/RKARY
UW5 = RC1/(WASMAX*(1-POR)*ROCKMDEN)
DTRANKLL(I,1) = RC0
DTRANKLL(I,2) = U * (ROTREL*DXYDKLL(I,2)*UW3+CONS1
> *DRELKLL(2)*UW3+CONS2*DROKLL(2)*UW3)-
> CONS3*DVISKLL(2)*UW3
DTRANKLL(I,2) = DTRANKLL(I,2) * RU2 * TM
DTRANKLL(I,3) = RC0
END IF
C WALEED ~END~
-
-
-
C WALEED 4/4/2006 defined dtrankll for o only
IF (IASPR) THEN
UW3 = RC1/RKARY
UW5 = RC1/(WASMAX*(1-POR)*ROCKMDEN)
DTRANKLL(I,1) = U * (ROTREL*DXYDKLL(I,1)*UW3+CONS1
> *DRELKLL(1)*UW3+CONS2*DROKLL(1)*UW3)-
> CONS3*DVISKLL(1)*UW3
DTRANKLL(I,1) = DTRANKLL(I,1) * RU2 * TM
DTRANKLL(I,2) = RC0
DTRANKLL(I,3) = U * (ROTREL*DXYDKLL(I,3)*UW3+CONS1
> *DRELKLL(3)*UW3+CONS2*DROKLL(3)*UW3)-
> X(JM1+I)*ROTREL*(RKMAX-
1)*WM(NC)*PVMOL(4)*UW3*UW3*UW5)
> - CONS3*DVISKLL(3)*UW3
DTRANKLL(I,3) = DTRANKLL(I,3) * RU2 * TM
END IF
C WALEED ~END~
-
-
-
C WALEED 4/2/2006 defined dtrankll for 2 hc
IF (IASPR) THEN
UW3 = RC1/RKARY
UW5 = RC1/(WASMAX*(1-POR)*ROCKMDEN)
DTRANKLL(I,1) = U * (ROTREL*DXYDKLL(I,1)*UW3+CONS1
> *DRELKLL(1)*UW3+CONS2*DROKLL(1)*UW3)-
558
> CONS3*DVISKLL(1)*UW3
DTRANKLL(I,1) = DTRANKLL(I,1) * RU2 * TM
DTRANKLL(I,2) = U * (ROTREL*DXYDKLL(I,2)*UW3+CONS1
> *DRELKLL(2)*UW3+CONS2*DROKLL(2)*UW3)-
> CONS3*DVISKLL(2)*UW3
DTRANKLL(I,2) = DTRANKLL(I,2) * RU2 * TM
DTRANKLL(I,3) = U * (ROTREL*DXYDKLL(I,3)*UW3+CONS1
> *DRELKLL(3)*UW3+CONS2*DROKLL(3)*UW3)-
> X(JM1+I)*ROTREL*(RKMAX-
1)*WM(NC)*PVMOL(4)*UW3*UW3*UW5)
> - CONS3*DVISKLL(3)*UW3
DTRANKLL(I,3) = DTRANKLL(I,3) * RU2 * TM
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: xstep.df
Location: GPAS\eoscomp\drive
-
-
-
CALL JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,KL2,
+ KEYOUT,NBLK,POR,TCOFX,TCOFY,TCOFZ,SAT,P,PORI,VP,VB,RATIO,W,
+ NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,TRAPN,DTRAPN,
+ RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,AFNP,AVK,AVW,
+ AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,AWW6,X,ZXY,DEPTH,
+ ROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,DRELS,DVISS,
+ DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,ZPERM,
c print*, "out of Jacobian"
c Marcondes added cross transmisibilities 12/07/04
+ tcofxe,tcofxg,tcofyk,tcofyg,tcofzk,tcofze,XPERM,YPERM,RKARY,^M
+ fpk,fpe,fpg,
C WALEED 2/14/2006 added asphaltene variables for calling jacobian
+ RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
+ DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL)^M
-----------------------------------------------------------------------
Filename: jacobian.df
Location: GPAS\eoscomp\jcobian
SUBROUTINE JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,POR,XPERM,YPERM,ZPERM,SAT,P,PORI,VP,VB,
> RATIO,W,NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,
> TRAPN,DTRAPN,RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,
> AFNP,AVK,AVW,AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,
> AWW6,X,ZXY,DEPTH,KROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,
> DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL)
-
-
559
-
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS(NX,NY,NZ),
> AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),
> AMKLL(NX,NY,NZ,NC,3),
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),
> DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> ZXYS(NX,NY,NZ,2),
> DROKLL(NX,NY,NZ,3,3)
-
-
-
CALL PREROW(NP,NC,NPH,TEMPR,P,VB,VP,TMOLR,PVMOL,ZXY,RATIO,ZF,DZF,
> TC,PC,VC,WM,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,AD,BD,
> PARA,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,RF,PHI,AFK,AFW,AFNP,DFV,AVK,
> AVW,AVNP,ARV,DTRAN,XPERM,YPERM,ZPERM,AMK,AMNP,AWW,AMK6,AMNP6,
> AWW6,NUMWEL,DELTIM,X,POR,PORI,DEPTH,W,IDIM,JDIM,KDIM,LDIM,IL1,
> IL2,JL1V,JL2V,KL1,KL2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,
> DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,PERMZ,
c Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
c Marcondes 12/07/04
C WALEED 3/9/2006 added asphaltene variables for calling prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL)^M
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
SUBROUTINE PREROW(NP,NC,NPH,TEMP,P,VB,VP,TMOLR,PVMOL,ZXY,
> RATIO,ZF,DZF,
> TC,PC,VC,WT,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,
> AD,BD,PARACH,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,
> ARF,PHI,AFK,AFW,AFNP,DFV,AVK,AVW,AVNP,ARV,DTRAN,
> XTRM,YTRM,ZTRM,AMK,AMNP,AWW,AMK6,AMNP6,AWW6,NWELL,
> TD,X,POR,PORI,DEPTH,W,NX,NY,NZ,LDIM,I1,
> I2,J1,J2,K1,K2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,
> VISCW,DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS,DROKLL)^M
-
-
-
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS(NX,NY,NZ),AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),AMKLL(NX,NY,NZ,NC,3),
560
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> ZXYS(NX,NY,NZ,2),
> DROKLL(NX,NY,NZ,3,3)
-
-
-
CALL RODER(NC,NPH(I,J,K,1:NP),P(I,J,K),
> ZXY(I,J,K,1:5*NC),ZF(I,J,K,1:NP),
> DZF(I,J,K,1:NCP1,1:NP),AMK6(I,J,K,1:NC,1:NC,1:6),
> DZN(1:NC,1:NP),
> DROKN(1:2*NC+1,1:NP),DROX(1:NC,1:NP),
> NP,NB,
C WALEED 6/6/6 added variables
> DROKLL(I,J,K,1:3,1:NP),DXYDKLL(I,J,K,1:NC,1:3,1:3))
-----------------------------------------------------------------------
Filename: roderiv.f
Location: GPAS\eoscomp\jacobian
SUBROUTINE RODER(NC,NPH,P,ZXY,ZF,DZF,DXYDKN,DZN,
+ DROKN,DROX,NP,NB,
C WALEED 6/6/6 added variables
+ DROKLL,DXYDKLL)
-
-
-
C WALEED 6/6/6 added variables
REAL*8 DROKLL(3,NP,NB), DXYDKLL(NC,3,3,NB)
-
-
-
C WALEED 4/17/2006 defined drokll for 1 phase
IF (IASPR) THEN
IF (NPH(3,K).EQ.IONE) THEN
DROKLL(1,J,K) = RC0
DROKLL(2,J,K) = RC0
DROKLL(3,J,K) = RC0
DO 41 I = 1 , NC
DROKLL(2,J,K) = DROKLL(2,J,K)+
> DROX(I,J,K)*DXYDKLL(I,2,J,K)
41 CONTINUE
END IF
IF (NPH(2,K).EQ.IONE) THEN
DROKLL(1,J,K) = RC0
DROKLL(2,J,K) = RC0
DROKLL(3,J,K) = RC0
DO 42 I = 1 , NC
DROKLL(1,J,K) = DROKLL(1,J,K)+
> DROX(I,J,K)*DXYDKLL(I,1,J,K)
DROKLL(3,J,K) = DROKLL(3,J,K)+
> DROX(I,J,K)*DXYDKLL(I,3,J,K)
42 CONTINUE
END IF
END IF
C WALEED ~END~
-
-
561
-
C WALEED 4/1/2006 defined drokll for 2 hc
IF (IASPR) THEN
DO 35 I = 1 , NC
DROKLL(1,J,K) = RC0
DROKLL(2,J,K) = RC0
DROKLL(3,J,K) = RC0
35 CONTINUE
DO 36 I1 = 1 , 3
DO 36 I = 1 , NC
DROKLL(I1,J,K) = DROKLL(I1,J,K)+
> DROX(I,J,K)*DXYDKLL(I,I1,J,K)
36 CONTINUE
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: xstep.df
Location: GPAS\eoscomp\drive
Filename: jacobian.df
Location: GPAS\eoscomp\jcobian
SUBROUTINE JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,POR,XPERM,YPERM,ZPERM,SAT,P,PORI,VP,VB,
> RATIO,W,NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,
> TRAPN,DTRAPN,RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,
> AFNP,AVK,AVW,AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,
> AWW6,X,ZXY,DEPTH,KROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,
> DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS)
-
-
-
C WALEED 3/9/2006 added asphaltene variables to jacobian
562
> RATIOS(NX,NY,NZ),
> AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),
> AMKLL(NX,NY,NZ,NC,3),
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),
> DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> ZXYS(NX,NY,NZ,2)
-
-
-
CALL PREROW(NP,NC,NPH,TEMPR,P,VB,VP,TMOLR,PVMOL,ZXY,RATIO,ZF,DZF,
> TC,PC,VC,WM,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,AD,BD,
> PARA,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,RF,PHI,AFK,AFW,AFNP,DFV,AVK,
> AVW,AVNP,ARV,DTRAN,XPERM,YPERM,ZPERM,AMK,AMNP,AWW,AMK6,AMNP6,
> AWW6,NUMWEL,DELTIM,X,POR,PORI,DEPTH,W,IDIM,JDIM,KDIM,LDIM,IL1,
> IL2,JL1V,JL2V,KL1,KL2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,
> DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,PERMZ,
c Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
c Marcondes 12/07/04
C WALEED 3/9/2006 added asphaltene variables for calling prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS)
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
SUBROUTINE PREROW(NP,NC,NPH,TEMP,P,VB,VP,TMOLR,PVMOL,ZXY,
> RATIO,ZF,DZF,
> TC,PC,VC,WT,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,
> AD,BD,PARACH,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,
> ARF,PHI,AFK,AFW,AFNP,DFV,AVK,AVW,AVNP,ARV,DTRAN,
> XTRM,YTRM,ZTRM,AMK,AMNP,AWW,AMK6,AMNP6,AWW6,NWELL,
> TD,X,POR,PORI,DEPTH,W,NX,NY,NZ,LDIM,I1,
> I2,J1,J2,K1,K2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,
> VISCW,DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL,ZXYS)^
-
-
-
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS(NX,NY,NZ),AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),AMKLL(NX,NY,NZ,NC,3),
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
563
> DVISKLL(NX,NY,NZ,3,NP),
> ZXYS(NX,NY,NZ,2)
-
-
-
CALL EOSBASIC(NP,NC,NPH(I,J,K,1:NP),RATIO(I,J,K,1:NP),
> ZXY(I,J,K,1:5*NC),XYZ(1:NC),YMXZ,
> RR,SXY2Z,AMK6(I,J,K,1:NC,1:NC,1:6),
> PVMOL(I,J,K,1:NP+2),NB,
C WALEED 6/6/6 added variables
> ZXYS(I,J,K,2),RATIOS(I,J,K),
> DXYDKLL(I,J,K,1:NC,1:3,1:3)
-----------------------------------------------------------------------
Filename: xeosbas.f
Location: GPAS\eoscomp\eos
SUBROUTINE EOSBASIC(NP,NC,NPH,RATIO,ZXY,XYZ,YMXZ,RR,SXY2Z,
+ DXYDKN,PVMOL,NB,
C WALEED 6/6/6 added variables
+ ZXYS,RATIOS,DXYDKLL)
-
-
-
C WALEED 6/6/6 added variables
REAL*8 ZXYS(2,NB),RATIOS(NB),DXYDKLL(NC,3,3,NB),EKM2
-
-
-
C WALEED 3/29/2006 defined dxydkll & modified dxydkn only 4 o+g
IF (IASPR) THEN
IF (NPH(2,K).EQ.IONE.AND.NPH(3,K).EQ.IONE) THEN
DO 5 I = 1 , NC
ZXY(NC4+I,K) = EXP ( ZXY(NC3+I,K) )
EKM1 = ZXY(NC4+I,K) - RC1
IF (I.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
ELSE IF (I.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = RC1+RATIO(3,K)*EKM1+RATIOS(K)*EKM2
DO 5 J = 1 , NC
IF ( I.EQ.J ) THEN
CTERM1 = RC1/(TERM1*TERM1)
DXYDKN(I,J,2,K) = -ZXY(I,K)*RATIO(3,K)*
+ ZXY(NC4+I,K)*CTERM1
TERM2 = RC1-RATIO(3,K)+RATIOS(K)*EKM2
DXYDKN(I,J,3,K) = -ZXY(I,K)*RATIO(3,K)*TERM2*
+ CTERM1
CONST = (RC1-ZXY(I,K))/PVMOL(4,K)
DXYDKN(I,J,5,K) = CONST/TERM1
DXYDKN(I,J,6,K) = ZXY(NC4+I,K)*CONST/TERM1
ELSE IF ( I.NE.J ) THEN
DXYDKN(I,J,2,K) = RC0
DXYDKN(I,J,3,K) = RC0
DXYDKN(I,J,5,K) = ZXY(I,K)/(TERM1*PVMOL(4,K))
DXYDKN(I,J,6,K) = ZXY(I,K)*ZXY(NC4+I,K)/
+ (TERM1*PVMOL(4,K))
END IF
564
5 CONTINUE
DO 6 I = 1 , NC
ZXY(NC4+I,K) = EXP ( ZXY(NC3+I,K) )
EKM1 = ZXY(NC4+I,K) - RC1
IF (I.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K)) - RC1
CONST = EXP(ZXYS(2,K))
ELSE IF (I.NE.NC) THEN
EKM2 = -RC1
CONST = RC0
END IF
TERM1 = RC1+RATIO(3,K)*EKM1+RATIOS(K)*EKM2
CTERM1 = RC1/(TERM1*TERM1)
DXYDKLL(I,3,2,K)= -ZXY(I,K)*EKM2*CTERM1
DXYDKLL(I,3,3,K)= -ZXY(I,K)*ZXY(NC4+I,K)*EKM2*CTERM1
DXYDKLL(I,2,2,K)= -ZXY(I,K)*EKM1*CTERM1
DXYDKLL(I,2,3,K)= -ZXY(I,K)*ZXY(NC4+I,K)*EKM1*CTERM1
DXYDKLL(I,1,2,K)= -ZXY(I,K)*RATIOS(K)*CONST
DXYDKLL(I,1,3,K)= -ZXY(I,K)*ZXY(NC4+I,K)*
+ RATIOS(K)*CONST*CTERM1
6 CONTINUE
ELSE IF (NPH(2,K).EQ.IZERO.OR.NPH(3,K).EQ.IZERO) THEN
DO 9 I = 1 , NC
ZXY(NC3+I,K) = 0.D0
ZXY(NC4+I,K) = 0.D0
XYZ(I,K) = 0.D0
YMXZ(I,K) = 0.D0
DXYDKLL(I,2,2,K)= 0.D0
DXYDKLL(I,2,3,K)= 0.D0
IF (NPH(2,K).EQ.IONE.AND.NPH(3,K).EQ.IZERO) THEN
IF (I.EQ.NC) THEN
EKM2 = EXP(ZXYS(2,K))-RC1
ELSE IF (I.NE.NC) THEN
EKM2 = -RC1
END IF
TERM1 = (RC1 + RATIOS(K)*EKM2)*PVMOL(4,K)
DO 7 J = 1 , NC
DXYDKN(I,J,2,K) = 0.D0
DXYDKN(I,J,3,K) = 0.D0
IF (J.EQ.I) THEN
DXYDKN(I,J,5,K) = (RC1-ZXY(I,K))/TERM1
ELSE IF (J.NE.I) THEN
DXYDKN(I,J,5,K) = -ZXY(I,K)/TERM1
END IF
DXYDKN(I,J,6,K) = 0.D0
7 CONTINUE
CTERM1 = -ZXY(I,K)*EKM2
DXYDKLL(I,3,2,K)= CTERM1/(TERM1*TERM1)
DXYDKLL(I,3,3,K)= 0.D0
565
ELSE IF (NPH(2,K).EQ.IZERO.AND.NPH(3,K).EQ.1) THEN
DO 8 J = 1 , NC
DXYDKN(I,J,2,K) = 0.D0
DXYDKN(I,J,3,K) = 0.D0
IF (J.EQ.I) THEN
DXYDKN(I,J,6,K) = (RC1-ZXY(I,K))/PVMOL(4,K)
ELSE IF (J.NE.I) THEN
DXYDKN(I,J,6,K) = -ZXY(I,K)/PVMOL(4,K)
END IF
DXYDKN(I,J,5,K) = 0
DXYDKLL(I,1,2,K) = 0.D0
DXYDKLL(I,1,3,K) = 0.D0
DXYDKLL(I,3,2,K) = 0.D0
DXYDKLL(I,3,3,K) = 0.D0
8 CONTINUE
END IF
9 CONTINUE
END IF
GO TO 100
END IF
C WALEED ~END~
-
-
-
C WALEED found a bug here, xi instead of rc1
DXYDKN(I,J,5,K) = - ZXY(I,K) / PVMOL(4,K)
-
-
-
C WALEED found a bug here, yi instead of rc1
DXYDKN(I,J,6,K) = - ZXY(I,K) / PVMOL(4,K)
-----------------------------------------------------------------------
Filename: xstep.df
Location: GPAS\eoscomp\drive
CALL PROP(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,KL2,KEYOUT,
+ NBLK,SAT,P,NPH,DEN,VIS,DVIS,AMK6,VISCW,AQCOMPCD,POR,REL,CP,
+ DCP,DREL,ZXY,ROCK,X,PVMOL,TRAPN,RSAT,DSAT,DTRAPN,XPERM,YPERM,
+ ZPERM,CIJ,AQCDEN,CADS,RKARY,
C WALEED 3/28/2006
+ DXYDKLL,DVISKLL)
-----------------------------------------------------------------------
Filename: xprop.df
Location: GPAS\eoscomp\prop
SUBROUTINE PROP(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,SAT,P,NPH,DEN,VIS,DVIS,DXYDKN,VISCW,
> AQCOMPCD,POR,REL,CP,DCP,DREL,ZXY,KROCK,X,PVMOL,
> TRAPN,RSAT,DSAT,DTRAPN,XPERM,YPERM,ZPERM,CIJ,AQCDEN,CADS,
> RKARY,
C WALEED 3/28/2006
> DXYDKLL,DVISKLL)
-
-
566
-
> RKARY(IDIM,JDIM,KDIM), RK, RKMAX,
C WALEED 3/28/2005
> DXYDKLL(IDIM,JDIM,KDIM,NC,3,NP),
> DVISKLL(IDIM,JDIM,KDIM,3,NP)
-
-
-
CALL LVISC2(NC,NPH(I,J,K,1:NP),TC,PC,VC,WM,
> ZXY(I,J,K,1:5*NC),DEN(I,J,K,1:NP),VISPURE,
> VIS(I,J,K,1:NP),IDER,TEMPR,P(I,J,K),
> DROX(1:NC,1:NP),DXYDKN(I,J,K,1:NC,1:NC,1:6),
> DVIS(I,J,K,1:2*NC+1,1:NP),
> DROKN(1:2*NC+1,1:NP),NP,1,
C WALEED 3/28/2006
> DXYDKLL(I,J,K,1:NC,1:3,1:NP),DVISKLL(I,J,K,1:3,1:NP))
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
CALL LVISC2(NC,NPH(I,J,K,1:NP),TC,PC,VC,WT,
> ZXY(I,J,K,1:5*NC),DEN(I,J,K,1:NP),
> VISPURE,VIS(I,J,K,1:NP),IDER,TEMPR,P(I,J,K),
> DROX(1:NC,1:NP),AMK6(I,J,K,1:NC,1:NC,1:6),
> DVIS(I,J,K,1:2*NC+1,1:NP),DROKN(1:2*NC+1,1:NP),
> NP,1,
C WALLED 3/28/2006
> DXYDKLL(I,J,K,1:NC,1:3,1:NP),DVISKLL(I,J,K,1:3,1:NP))
Filename: vis.f
Location: GPAS\eoscomp\prop
SUBROUTINE LVISC2(NC,NPH,TC,PC,VC,WT,ZXY,DEN,VISPURE,
+ VIS,IDER,T,P,DROX,DXYDKN,DVIS,DROKN,NP,NB,
C WALEED 3/28/2005
+ DXYDKLL,DVISKLL)
-
-
-
C WALEED 3/28/2006
> DXYDKLL(NC,3,NP,NB),DVISKLL(3,NP,NB)
-
-
-
C WALEED 3/27/2006 zero out dviskll
IF (IASPR) THEN
DVISKLL(1,J,K) = RC0
DVISKLL(2,J,K) = RC0
DVISKLL(3,J,K) = RC0
END IF
C WALEED ~END~
-
-
-
567
C WALEED 3/27/2006 defined dviskll
IF (IASPR) THEN
DO 330 I = 1 , 3
DVISKLL(I,J,K) = RC0
330 CONTINUE
DO 340 I = 1 , NC
DVISKLL(1,J,K) = DVISKLL(1,J,K)+
+ DVISX(I)*DXYDKLL(I,1,J,K)
DVISKLL(2,J,K) = DVISKLL(2,J,K)+
+ DVISX(I)*DXYDKLL(I,2,J,K)
DVISKLL(3,J,K) = DVISKLL(3,J,K)+
+ DVISX(I)*DXYDKLL(I,3,J,K)
340 CONTINUE
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
CALL ZDER(ISTART,IEND,NC,NPH(I,J,K,1:NP),
> PVMOL(I,J,K,1:NP+2),ZXY(I,J,K,1:5*NC),
> RATIO(I,J,K,1:NP),ZF(I,J,K,1:NP),
> DZF(I,J,K,1:NC+1,1:NP),DZN(1:NC,1:NP),
> XYZ(1:NC),YMXZ,
> AMK6(I,J,K,1:NC,1:NC,1:6),
> DRR(1:2*NC+1),DZFKN(1:2*NC+1,1:NP),NP,NB),
C WALEED 3/25/2006 added asphaltene varibales
> DZFKLL(I,J,K,1:3,1:NP),DXYDKLL(I,J,K,1:NC,1:3,1:NP)
-----------------------------------------------------------------------
Why we have this part only for single phase?
Filename: zderiv.f
Location: GPAS\eoscomp\jacobian
SUBROUTINE ZDER(ISTART,IEND,NC,NPH,PVMOL,ZXY,RATIO,ZF,DZF,
+ DZN,XYZ,YMXZ,DXYDKN,DRR,DZFKN,NP,NB,
C WALEED 3/25/2006 added asphaltene varibales
+ DZFKLL,DXYDKLL)
-
-
-
C WALEED 3/25/2006
+ DZFKLL(3,NP,NB), DXYDKLL(NC,3,NP,NB)
-
-
-
C WALEED 3/25/2006 defined dzfkll (seems 1 phase!)
IF (IASPR) THEN
DZFKLL(1,J,K) = RC0
DZFKLL(2,J,K) = RC0
DZFKLL(3,J,K) = RC0
DO 50 I = 1 , NC
DZFKLL(1,J,K) = DZFKLL(1,J,K) +
+ DZF(I,J,K) * DXYDKLL(I,1,J,K)
DZFKLL(2,J,K) = DZFKLL(2,J,K) +
+ DZF(I,J,K) * DXYDKLL(I,2,J,K)
DZFKLL(3,J,K) = DZFKLL(3,J,K) +
568
+ DZF(I,J,K) * DXYDKLL(I,3,J,K)
50 CONTINUE
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
CALL RELDER(ISTART,IEND,NC,NPH(I,J,K,1:NP),
> PVMOL(I,J,K,1:NP+2),P(I,J,K),
> ZXY(I,J,K,1:5*NC),RATIO(I,J,K,1:NP),ZF(I,J,K,1:NP),
> DZF(I,J,K,1:NC+1,1:NP),DZN(1:NC,1:NP),
> DZFKN(1:2*NC+1,1:NP),DRR(1:2*NC+1),
> DSAT(I,J,K,1:2*NC+1,1:NP),DREL(I,J,K,1:2*NC+2,1:NP),
> SAT(I,J,K,1:NP),KROCK(I,J,K),NP,NB,
c > POR(I,J,K),PORI(I,J,K),TRAPN(I,J,K,1:NP)
c akjohn
> X(I,J,K,1:NC+NA+1),DEN(I,J,K,1:NP),TRAPN(I,J,K,1:NP),
> DTRAPN(I,J,K,1:NC2P1,1:NP),RSAT(I,J,K,1:NP),
> DDEN(I,J,K,1:NC2P1,1:NP),W(I,J,K,1:NP+1),
c akjohn
C WALEED 3/25/2006 added asphaltene variables
> DSATKLL(I,J,K,1:3,1:NP),DZFKLL(I,J,K,1:3,1:NP),
> DRELKLL(I,J,K,1:3,1:NP))
-
-
-
also added them to the prerow subroutine (details below).
-----------------------------------------------------------------------
Filename: relderiv.f
Location: GPAS\eoscomp\jacobian
SUBROUTINE RELDER(ISTART,IEND,NC,NPH,PVMOL,P,ZXY,RATIO,ZF,
+ DZF,DZN,DZFKN,DRR,DSAT,DREL,SAT,KROCK,NP,NB,
c + POR,PORI,TRAPN,DTRAPN,RSAT)
c akjohn
+ X,DEN,TRAPN,DTRAPN,RSAT,DDEN,W,
C WALEED 3/25/2006 added asphaltene variables
+ DSATKLL,DZFKLL,DRELKLL)
-
-
-
C WALEED 3/25/2006 added asphaltene variables
> DSATKLL(3,NP,NB),DZFKLL(3,NP,NB),DRELKLL(3,NP,NB)
-
-
-
C WALEED 3/21/2006 defined new terms for relperm for dlnkig
IF (IASPR) THEN
DSAT(I,J,K)=CON*(RATIO(J,K)*DZFKN(I,J,K))
GOTO 11
END IF
C WALEED ~END~
-
-
-
C WALEED 3/21/2006 defined new terms for relperm for dni
569
IF (IASPR) THEN
DSAT(NC+I,J,K)=RTP*(ZYV+TNV*DZFKN(NC+I,J,K))
GOTO 12
END IF
C WALEED ~END~
-
-
-
C WALEED 3/21/2006 defined dsatkll for 2 phases
IF (IASPR) THEN
IF (J.EQ.2) THEN
DSATKLL(1,J,K)=CON*(RATIO(J,K)*DZFKLL(I,J,K))
DSATKLL(2,J,K)=CON*(-ZF(J,K)+RATIO(J,K)*DZFKLL(2,J,K))
DSATKLL(3,J,K)=CON*(-ZF(J,K)+RATIO(J,K)*DZFKLL(3,J,K))
DRELKLL(1,J,K)=DREL(NC2P2,J,K)*DSATKLL(1,J,K)+ROSG*DSATKLL(1,J+1,K)
DRELKLL(2,J,K)=DREL(NC2P2,J,K)*DSATKLL(2,J,K)+ROSG*DSATKLL(2,J+1,K)
DRELKLL(3,J,K)=DREL(NC2P2,J,K)*DSATKLL(3,J,K)+ROSG*DSATKLL(3,J+1,K)
END IF
IF (J.EQ.3) THEN
DSATKLL(1,J,K)=CON*(RATIO(J,K)*DZFKLL(1,J,K))
DSATKLL(2,J,K)=CON*(ZF(J,K)+RATIO(J,K)*DZFKLL(2,J,K))
DSATKLL(3,J,K)=CON*(RATIO(J,K)*DZFKLL(3,J,K))
DRELKLL(1,J,K)=DREL(NC2P2,J,K)*DSATKLL(1,J,K)
DRELKLL(2,J,K)=DREL(NC2P2,J,K)*DSATKLL(2,J,K)
DRELKLL(3,J,K)=DREL(NC2P2,J,K)*DSATKLL(3,J,K)
END IF
END IF
C WALEED ~END~
-
-
-
C WALEED 3/23/2006 modification of dni for 1 phase
IF (IASPR) THEN
IF (J.EQ.2) THEN
DSAT(NC+I,J,K)=RTP*RATIO(J,K)*(ZF(J,K)+DZN(I,J,K))
DREL(I+NC,J,K) = DREL(NC2P2,J,K)*DSAT(NC+I,J,K)
GOTO 30
END IF
END IF
C WALEED ~END~
-
-
-
C WALEED 3/23/2006 defined dsatkll for 1 phase
IF (IASPR) THEN
IF (J.EQ.2) THEN
DSATKLL(1,J,K)=CON*(RATIO(J,K)*DZFKLL(I,J,K))
DSATKLL(2,J,K)=CON*(-ZF(J,K)+RATIO(J,K)*DZFKLL(2,J,K))
DSATKLL(3,J,K)=CON*(-ZF(J,K)+RATIO(J,K)*DZFKLL(3,J,K))
DRELKLL(1,J,K)=DREL(NC2P2,J,K)*DSATKLL(1,J,K)
DRELKLL(2,J,K)=DREL(NC2P2,J,K)*DSATKLL(2,J,K)
DRELKLL(3,J,K)=DREL(NC2P2,J,K)*DSATKLL(3,J,K)
END IF
END IF
570
C WALEED ~END~
-----------------------------------------------------------------------
needs careful attention
need to be defined for jmass
Filename: jmass.f
Location: GPAS\eoscomp\jacobian
571
-
-
-
C WALEED 3/14/2006 defined amkll for y conv terms
IF (IASPR) THEN
TKLL1 = DUMMY1 * DTRANKLL(I,L,K,IC,1,JP)
AMKLL(I,J,K,IC,1) = AMKLL(I,J,K,IC,1) + TKLL1
AMKLL6(I,J-1,K,IC,1,4) = AMKLL6(I,J-1,K,IC,1,4)-TKLL1
572
C WALEED 3/21/2006 initialization
DO IC = 1 , NC
AMKLL(I,J,K,IC,1) = RC0
AMKLL(I,J,K,IC,2) = RC0
AMKLL(I,J,K,IC,3) = RC0
END DO
AWKLL(I,J,K,1) = RC0
AWKLL(I,J,K,2) = RC0
AWKLL(I,J,K,3) = RC0
DO IC = 1 , NC
DO M = 1 , 6
AMKLL6(I,J,K,IC,1,M) = RC0
AMKLL6(I,J,K,IC,2,M) = RC0
AMKLL6(I,J,K,IC,3,M) = RC0
END DO
END DO
C WALEED ~END~
-
-
-
C WALEED 6/16/2006 defined amkll for constant p producer
IF (IASPR) THEN
DO IC = 1 , NC
AMKLL(LX,LY,LZ,IC,1) = -TERM*
+ ( DTRANKLL(LX,LY,LZ,IC,1,2) +
+ DTRANKLL(LX,LY,LZ,IC,1,3) )
AMKLL(LX,LY,LZ,IC,2) = -TERM*
+ ( DTRANKLL(LX,LY,LZ,IC,2,2) +
+ DTRANKLL(LX,LY,LZ,IC,2,3) )
AMKLL(LX,LY,LZ,IC,3) = -TERM*
+ ( DTRANKLL(LX,LY,LZ,IC,3,2) +
+ DTRANKLL(LX,LY,LZ,IC,3,3) )
END DO
END IF
C WALEED ~END~
-
-
-
C WALEED 3/13/2006 defined amkll for lnkncs.lg.ls for cons p inj
IF (IASPR) THEN
UW3 = RC1/RKARY(LX,LY,LZ)
UW4 = UW3 * UW3
UW5 = RC1/(WASMAX*(1-POR(LX,LY,LZ))*ROCKMDEN)
DO 126 JP = 1 , NP
DO 125 IC = 1 , NC
AMKLL(LX,LY,LZ,IC,1) = AMKLL(LX,LY,LZ,IC,1)-
+ ZW(IC,IW) * UT1 *
+ ( UW*DRELKLL(LX,LY,LZ,1,JP)/RKARY(LX,LY,LZ)
+ - UW2*REL(LX,LY,LZ,JP)*
+ DVISKLL(LX,LY,LZ,1,JP)/RKARY(LX,LY,LZ) )
AMKLL(LX,LY,LZ,IC,2) = AMKLL(LX,LY,LZ,IC,2)-
+ ZW(IC,IW) * UT1 *
+ ( UW*DRELKLL(LX,LY,LZ,2,JP)/RKARY(LX,LY,LZ)
+ - UW2*REL(LX,LY,LZ,JP)*
573
+ DVISKLL(LX,LY,LZ,2,JP)/RKARY(LX,LY,LZ) )
AMKLL(LX,LY,LZ,IC,3) = AMKLL(LX,LY,LZ,IC,3)-
+ ZW(IC,IW) * UT1 *
+ ( UW*DRELKLL(LX,LY,LZ,3,JP)/RKARY(LX,LY,LZ)
+ - UW2*REL(LX,LY,LZ,JP)*
+ DVISKLL(LX,LY,LZ,3,JP)/RKARY(LX,LY,LZ)
+ -UW*UW4*REL(LX,LY,LZ,JP)*(RKMAX-1)*WM(NC)
+ *PVMOLS(LX,LY,LZ)*UW5 )
125 CONTINUE
126 CONTINUE
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jaco2pw.f
Location: GPAS\eoscomp\jacobian
C WALEED 3/12/2006 added the effect on dtran for lnkig for 2 hc
C no change for dtran for oil only or gas only
IF (IASPR) THEN
UW3 = RC1/RKARY
DT(J,I) = U * (ROTREL*DX(I,J)*UW3+CONS1*DREL(J)*UW3+
> CONS2*DRO(J)*UW3)-
> CONS3*DU(J)*UW3
DT(J,I) = DT(J,I) * RU2 * TM
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jsource.df
Location: GPAS\eoscomp\jacobian
C WALEED 3/12/2006 seems for cons p prod for amk, amnp (ni+p) we need
dtran
-
-
-
C WALEED 3/12/2006 added the effect on amk for cons p inj
IF (IASPR) THEN
AMK(LX,LY,LZ,JC,IC) = AMK(LX,LY,LZ,JC,IC) -
+ ZW(IC,IW) * UT1 *
+ ( UW*DREL(LX,LY,LZ,JC,JP)
+ /RKARY(LX,LY,LZ)
+ - UW2*REL(LX,LY,LZ,JP)*
+ DVIS(LX,LY,LZ,JC,JP)
+ /RKARY(LX,LY,LZ) )
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jaco2pw.f
Location: GPAS\eoscomp\Jacobian
C WALEED 3/13/2006 added the effect on dtran for p for gas only
IF (IASPR) THEN
574
UW3 = RC1/RKARY
DT(2*NC+1,I) = ( U * (ROTREL*DXP+CONS1*DREL(2*NC+1)+
> CONS2*DRO(2*NC+1))-
> CONS3*DU(2*NC+1) )*RU2*TM*UW3
END IF
C WALEED ~END~
-
-
-
C WALEED 3/13/2006 added the effect on dtran for p for oil only
IF (IASPR) THEN
UW3 = RC1/RKARY
DT(2*NC+1,I) = ( U * (ROTREL*DXP+CONS1*DREL(2*NC+1)+
> CONS2*DRO(2*NC+1))-
> CONS3*DU(2*NC+1) )*RU2*TM*UW3
END IF
C WALEED ~END~
-
-
-
C WALEED 3/11/2006 added the effect on dtran for p for 2 hc
IF (IASPR) THEN
UW3 = RC1/RKARY
DT(2*NC+1,I) = ( U * (ROTREL*DXP+CONS1*DREL(2*NC+1)+
> CONS2*DRO(2*NC+1))-
> CONS3*DU(2*NC+1) )*RU2*TM*UW3
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jsource.df
Location: GPAS\eoscomp\jacobian
C WALEED 3/12/2006 seems for cons p prod for amk, amnp (ni+p) we need
dtran
-
-
-
C WALEED 3/11/2006 added the effect on amnp for p for cons p inj
IF (IASPR) THEN
DO 110 JP = 1 , NP
IF ( VIS(LX,LY,LZ,JP) .LE. TOLSAT ) GO TO 110
SUMKU = SUMKU + REL(LX,LY,LZ,JP)*UD(JP)/
+ RKARY(LX,LY,LZ)
DUMKU = DUMKU + UD(JP)*DREL(LX,LY,LZ,NC2P1,JP)/
+ RKARY(LX,LY,LZ)-
+ UD(JP)*UD(JP)*REL(LX,LY,LZ,JP)*
+ DVIS(LX,LY,LZ,NC2P1,JP)/RKARY(LX,LY,LZ)
110 CONTINUE
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jacobian.df
Location: GPAS\eoscomp\jacobian
SUBROUTINE JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,POR,XPERM,YPERM,ZPERM,SAT,P,PORI,VP,VB,
575
> RATIO,W,NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,
> TRAPN,DTRAPN,RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,
> AFNP,AVK,AVW,AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,
> AWW6,X,ZXY,DEPTH,KROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,
> DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,RKARY)^M
-
-
-
> RKARY(NX,NY,NZ)
-
-
-
CALL PREROW(NP,NC,NPH,TEMPR,P,VB,VP,TMOLR,PVMOL,ZXY,RATIO,ZF,DZF,
> TC,PC,VC,WM,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,AD,BD,
> PARA,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,RF,PHI,AFK,AFW,AFNP,DFV,AVK,
> AVW,AVNP,ARV,DTRAN,XPERM,YPERM,ZPERM,AMK,AMNP,AWW,AMK6,AMNP6,
> AWW6,NUMWEL,DELTIM,X,POR,PORI,DEPTH,W,IDIM,JDIM,KDIM,LDIM,IL1,
> IL2,JL1V,JL2V,KL1,KL2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,
> DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,PERMZ,
c Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
c Marcondes 12/07/04
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6)^M
-----------------------------------------------------------------------
WM is represented by WT in PREROW
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
CALL JACO2(NC,NPH(I,J,K,1:NP),ZXY(I,J,K,1:5*NC),
> AMK6(I,J,K,1:NC,1:NC,1:6),DEN(I,J,K,1:NP),
> VIS(I,J,K,1:NP),DVIS(I,J,K,1:2*NC+1,1:NP),
> DROKN(1:2*NC+1,1:NP),REL(I,J,K,1:NP),
> DREL(I,J,K,1:2*NC+2,1:NP),
> DTRAN(I,J,K,1:2*NC+1,1:NC,1:NP),NP,1),
C WALEED 2/14/2006 added ashphaltene variables for calling jaco2
> RKARY(I,J,K),POR(I,J,K),WM(1:NC),RATIOS(I,J,K)
-----------------------------------------------------------------------
Filename: jaco2pw.f
Location: GPAS\eoscomp\jacobian
SUBROUTINE JACO2(NC,NPH,ZXY,DXYDKN,DEN,VISC,
> DVIS,DROKN,REL,DREL,DTRAN,NP,NB,
C WALEED 3/11/2006 added asphaltene variables to jaco2
> RKARY,POR,WM,RATIOS)
-
-
-
576
REAL*8 ZXY(5*NC,NB), DXYDKN(NC,NC,6,NB),
> DEN(NP,NB),
> DVIS(2*NC+1,NP,NB), DROKN(2*NC+1,NP,NB),
> REL(NP,NB), DREL(2*NC+2,NP,NB),
> DTRAN(2*NC+1,NC,NP,NB), VISC(NP,NB),
C WALEED 3/11/2006 added asphaltene variables to jaco2
> RKARY(NB),POR(NB),WM(NC),RATIOS(NB)
-
-
-
CALL FLOWLKN(TM,NC,ZXY(1,K),VISC(J,K),DEN(J,K),REL(J,K),
> DXP,DXYDKN(1,1,J,K),DXYDKN(1,1,JP,K),DREL(1,J,K),
> DROKN(1,J,K),DVIS(1,J,K),DTRAN(1,1,J,K),J,
> NTYPE,
C WALEED 3/10/2006 added asphaltene variables
> RKARY(K),POR(K),WM,RATIOS(K))
-
-
-
C*********************************************************************
SUBROUTINE FLOWLKN(TM,NC,X,U,RO,REL,DXP,DX,DN,DREL,DRO,DU,
> DT,JP,NTYPE,
C WALEED 3/10/2006 added asphaltene variables
> RKARY,POR,WM,RATIOS)
C*********************************************************************
-
-
-
C WALEED 3/10/2006
> RKARY, POR,
> WM(NC), RATIOS
REAL*8 RU,RU2,ROTREL,CONS1,CONS2,CONS3,UW3,UW5
-
-
-
C WALEED 3/13/2006 added the effect on dtran for ni for gas only
IF (IASPR) THEN
UW3 = RC1/ RKARY
UW5 = RC1/(WASMAX*(1-POR)*ROCKMDEN)
DT(NC+J,I) = U * (ROTREL*UW3*DN(I,J)+CONS1*UW3*DREL(NC+J)+
> CONS2*UW3*DRO(NC+J)-
> X(JM1+I)*ROTREL*(RKMAX-1)*WM(NC)*RATIOS*UW3*UW3*UW5)
> - CONS3*DU(NC+J)
DT(NC+J,I) = DT(NC+J,I) * RU2 * TM
END IF
C WALEED ~END~
-
-
-
C WALEED 3/13/2006 added the effect on dtran for ni for oil only
IF (IASPR) THEN
UW3 = RC1/ RKARY
UW5 = RC1/(WASMAX*(1-POR)*ROCKMDEN)
DT(NC+J,I) = U * (ROTREL*UW3*DN(I,J)+CONS1*UW3*DREL(NC+J)+
> CONS2*UW3*DRO(NC+J)-
> X(JM1+I)*ROTREL*(RKMAX-1)*WM(NC)*RATIOS*UW3*UW3*UW5)
> - CONS3*DU(NC+J)
DT(NC+J,I) = DT(NC+J,I) * RU2 * TM
577
END IF
C WALEED ~END~
-
-
-
C WALEED 3/10/2006 added the effect on dtran for ni for 2 hc
IF (IASPR) THEN
UW3 = RC1/ RKARY
UW5 = RC1/(WASMAX*(1-POR)*ROCKMDEN)
DT(NC+J,I) = U * (ROTREL*UW3*DN(I,J)+CONS1*UW3*DREL(NC+J)+
> CONS2*UW3*DRO(NC+J)-
> X(JM1+I)*ROTREL*(RKMAX-1)*WM(NC)*RATIOS*UW3*UW3*UW5)
> - CONS3*DU(NC+J)
DT(NC+J,I) = DT(NC+J,I) * RU2 * TM
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jmass.f
Location: GPAS\eoscomp\jacobian
C WALEED 3/10/2006 the effect needs to reflected in dtran for x.y.z dir
TK1 = DUMMY1 * DTRAN(L,J,K,JC,IC,JP)
TN1 = DUMMY1 * DTRAN(L,J,K,NC+JC,IC,JP)
-----------------------------------------------------------------------
Filename: jsource.df
Location: GPAS\eoscomp\jacobian
C WALEED 3/12/2006 seems for cons p prod for amk, amnp (ni+p) we need
dtran
-
-
-
C WALEED 3/9/2006 added the effect on amnp for ni for cons p inj
IF (IASPR) THEN
UW3 = RC1/RKARY(LX,LY,LZ)
UW4 = UW3*UW3
UW5 = RC1/(WASMAX*(1-POR(LX,LY,LZ))*ROCKMDEN)
AMNP(LX,LY,LZ,JC,IC) = AMNP(LX,LY,LZ,JC,IC)
+ - ZW(IC,IW) * UT1 *
+ ( UW*UW3*DREL(LX,LY,LZ,JC+NC,JP)
+ - UW2*UW3*REL(LX,LY,LZ,JP)*
+ DVIS(LX,LY,LZ,JC+NC,JP)-
+ UW*UW4*REL(LX,LY,LZ,JP)*(RKMAX-1)*WM(NC)
+ *PVMOLS(LX,LY,LZ)*UW5 )
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jsource.df
Location: GPAS\eoscomp\jacobian
578
C only one term for (cons p inj/prod) derivative of qw wrt lnkig
IF (IASPR) THEN
AWKLL(LX,LY,LZ,1) = RC0
AWKLL(LX,LY,LZ,2) = RC0
AWKLL(LX,LY,LZ,3) = RC0
UW3 = RC1/RKARY(LX,LY,LZ)
UW4 = UW3 * UW3
UW5 = RC1/(WASMAX*(1-POR(LX,LY,LZ))*ROCKMDEN)
AWKN(LX,LY,LZ,JC) = AWKN(LX,LY,LZ,JC) -
+ ZW(NCP1,IW) * UT1 *
+ ( UW*UW3*DREL(LX,LY,LZ,JC,JP) -
+ UW2*UW3*REL(LX,LY,LZ,JP)*
+ DVIS(LX,LY,LZ,JC,JP) )
AWKLL(LX,LY,LZ,1) = AWKLL(LX,LY,LZ,1) -
+ ZW(NCP1,IW) * UT1 *( UW*UW3*DRELKLL(LX,LY,LZ,1,JP) -
+ UW2*UW3*REL(LX,LY,LZ,JP)*
+ DVISKLL(LX,LY,LZ,1,JP) )
AWKLL(LX,LY,LZ,2) = AWKLL(LX,LY,LZ,2) -
+ ZW(NCP1,IW) * UT1 *
+ ( UW*UW3*DRELKLL(LX,LY,LZ,2,JP) -
+ UW2*UW3*REL(LX,LY,LZ,JP)*
+ DVISKLL(LX,LY,LZ,2,JP) )
AWKLL(LX,LY,LZ,3) = AWKLL(LX,LY,LZ,3) -
+ ZW(NCP1,IW) * UT1 *
+ ( UW*UW3*DRELKLL(LX,LY,LZ,3,JP) -
+ UW2*UW3*REL(LX,LY,LZ,JP)*
+ DVISKLL(LX,LY,LZ,3,JP)-
+ UW*UW4*REL(LX,LY,LZ,JP)*(RKMAX-1)*WM(NC)
+ *PVMOLS(LX,LY,LZ)*UW5 )
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jmass.f
Location: GPAS\eoscomp\jacobian
579
-
-
-
C WALEED 3/3/2006 the effect for x-direction conv terms (on/off)
IF (IASPR) THEN
DKWDP = PVMOL(L,J,K,1) * DREL(L,J,K,NC2P2,1) *
> DZF(L,J,K,NCP1,1)*RKARY(L,J,K)
TMS = REL(L,J,K,JP)*DEN(L,J,K,JP)*DUMMY/RKARY(L,J,K)
TP1 = DUMMY * DPL * (DEN(L,J,K,JP)*DKWDP+REL(L,J,K,JP)*
> CW*DENW/RKARY(L,J,K))
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: jsource.df
Location: GPAS\eoscomp\jacobian
-----------------------------------------------------------------------
AMW! do I need to worry about this?
Filename: jsource.df
Location: GPAS\eoscomp\jacobian
-----------------------------------------------------------------------
580
Filename: xstep.df
Location: GPAS\eoscomp\drive
CALL JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,KL2,
+ KEYOUT,NBLK,POR,TCOFX,TCOFY,TCOFZ,SAT,P,PORI,VP,VB,RATIO,W,
+ NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,TRAPN,DTRAPN,
+ RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,AFNP,AVK,AVW,
+ AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,AWW6,X,ZXY,DEPTH,
+ ROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,DRELS,DVISS,
+ DDENS,D ,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,ZPERM,
c print*, "out of Jacobian"
c Marcondes added cross transmisibilities 12/07/04
+ tcofxe,tcofxg,tcofyk,tcofyg,tcofzk,tcofze,XPERM,YPERM,RKARY,^M
+ fpk,fpe,fpg,
C WALEED 2/14/2006 added asphaltene variables for calling jacobian
+ RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
+ DSATKLL,DZFKLL,DXYDKLL,DVISKLL)^M
-----------------------------------------------------------------------
Filename: jacobian.df
Location: GPAS\eoscomp\jacobian
SUBROUTINE JACOBIAN(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,POR,XPERM,YPERM,ZPERM,SAT,P,PORI,VP,VB,
> RATIO,W,NPH,ZF,PHI,DZF,RF,DDEN,DEN,VIS,DVIS,TMOLR,PVMOL,
> TRAPN,DTRAPN,RSAT,RIFT,DIFT,REL,DSAT,CP,DCP,DREL,AFK,AFW,DFV,
> AFNP,AVK,AVW,AVNP,ARV,DTRAN,ARM,ARW,AMK,AMK6,AMNP,AMNP6,AWW,
> AWW6,X,ZXY,DEPTH,KROCK,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,
> DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL)^M
-
-
-
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS(NX,NY,NZ),
> AWKLL(NX,NY,NZ,3),
> DRELKLL(NX,NY,NZ,3,NP),
> DVISKLL(NX,NY,NZ,3,NP),
> PVMOLS(NX,NY,NZ),
> AMKLL(NX,NY,NZ,NC,3),
> AMKLL6(NX,NY,NZ,NC,3,6),
> DSATKLL(NX,NY,NZ,3,NP),
> DZFKLL(NX,NY,NZ,3,NP),
> DXYDKLL(NX,NY,NZ,NC,3,NP),
> DVISKLL(NX,NY,NZ,3,NP)
-
-
-
CALL PREROW(NP,NC,NPH,TEMPR,P,VB,VP,TMOLR,PVMOL,ZXY,RATIO,ZF,DZF,
> TC,PC,VC,WM,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,AD,BD,
> PARA,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,RF,PHI,AFK,AFW,AFNP,DFV,AVK,
> AVW,AVNP,ARV,DTRAN,XPERM,YPERM,ZPERM,AMK,AMNP,AWW,AMK6,AMNP6,
> AWW6,NUMWEL,DELTIM,X,POR,PORI,DEPTH,W,IDIM,JDIM,KDIM,LDIM,IL1,
581
> IL2,JL1V,JL2V,KL1,KL2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,DTRANS,
> DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,VISCW,DPDZ,PERMZ,
c Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
c Marcondes 12/07/04
C WALEED 3/9/2006 added asphaltene variables to jacobian
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL)^M
-----------------------------------------------------------------------
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
SUBROUTINE PREROW(NP,NC,NPH,TEMP,P,VB,VP,TMOLR,PVMOL,ZXY,
> RATIO,ZF,DZF,
> TC,PC,VC,WT,DEN,VISPURE,SAT,VIS,DVIS,SQADP,BDP,BIN,SQA,B,
> AD,BD,PARACH,RIFT,DIFT,REL,DSAT,DREL,CP,DCP,
> ARF,PHI,AFK,AFW,AFNP,DFV,AVK,AVW,AVNP,ARV,DTRAN,
> XTRM,YTRM,ZTRM,AMK,AMNP,AWW,AMK6,AMNP6,AWW6,NWELL,
> TD,X,POR,PORI,DEPTH,W,NX,NY,NZ,LDIM,I1,
> I2,J1,J2,K1,K2,KEYOUT,NBLK,IOFF,JOFF,KOFF,KROCK,DDEN,
> TRAPN,DTRAPN,RSAT,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,AQZ,
> DTRANS,DRELS,DVISS,DDENS,DZXYS,AQCDEN,CIJ,OWIFT,CADS,
> VISCW,DPDZ,PERMZ,
c added by Marcondes 12/07/04
> txe,txg,tyk,tyg,tzk,tze,PERMX,PERMY,RKARY,fpk,fpe,fpg,
C WALEED 3/9/2006 added asphaltene variables to prerow
> RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6,
> DSATKLL,DZFKLL,DXYDKLL,DVISKLL)^M
-
-
-
c Marcondes 12/07/04 - transmissibilities for cross terms
> PERMX(NX,NY,NZ),PERMY(NX,NY,NZ),RKARY(NX,NY,NZ),^M
> fpk(nx,ny,nz),fpe(nx,ny,nz),fpg(nx,ny,nz),^M
CALL JSOURCE(NC,NP,NPH,P,PVMOL,ZXY,DEN,DZF,
> VIS,DVIS,REL,DREL,NWELL,TEMP,
> SQADP,BDP,BIN,SQA,B,AD,BD,VC,WT,DTRAN,AMK,AMNP,
> AWW,AMK6,AMNP6,AWW6,VB,POR,TD,X,
> NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,NBLK,NB,
> IOFF,JOFF,KOFF,DDEN,AMW,AWKN,AMNPA,AWWA,
> AMW6,AWKN6,AQCDEN,AQZ,DRELS,DVISS,DDENS,DTRANS,
C WALEED 3/9/2006 added asphaltene variables to jsource
> RKARY,RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6)
-----------------------------------------------------------------------
Filename: jsource.df
582
Location: GPAS\eoscomp\jacobian
SUBROUTINE JSOURCE(NC,NP,NPH,P,PVMOL,ZXY,DEN,
> DZF,VIS,DVIS,REL,DREL,NWELL,
> T,SQADP,BDP,BIN,SQA,B,AD,BD,VC,WM,DTRAN,AMK,AMNP,
> AWW,AMK6,AMNP6,AWW6,VB,POR,TD,X,
> NX,NY,NZ,LDIM,I1,I2,J1,J2,K1,K2,KEYOUT,NBLK,NB,
> IOFF,JOFF,KOFF,DDEN,AMW,AWKN,AMNPA,AWWA,AMW6,AWKN6,
> AQCDEN,AQZ,DRELS,DVISS,DDENS,DTRANS
C WALEED added asphaltene variables
> RKARY,RATIOS,AWKLL,DRELKLL,DVISKLL,PVMOLS,AMKLL,AMKLL6)
-----------------------------------------------------------------------
Filename: jmass.f
Location: GPAS\eoscomp\jacobian
-----------------------------------------------------------------------
Filename: jmass.f
583
Location: GPAS\eoscomp\jacobian
-----------------------------------------------------------------------
Filename: jmass.f
Location: GPAS\eoscomp\jacobian
SUBROUTINE JXMASS(NC,NP,NPH,P,ZXY,DEN,VIS,REL,DTRAN,AMK,AMNP,
> AWW,AMK6,AMNP6,AWW6,VB,POR,PORI,CP,X,XTRM,DZF,PVMOL,
> DREL,DEPTH,W,NX,NY,NZ,I1,I2,J1,J2,K1,K2,KEYOUT,AMW6,AWKN6,
> AMW,AWKN,AQZ,DTRANS,
C WALEED 2/27/2006 asphaltene variables
> RKARY,AMKLL,AMKLL6,DTRANKLL)
--------------------------------------------------------------------
Filename: jmass.f
Location: GPAS\eoscomp\jacobian
C WALEED 1/31/2006 the effect for x-direction conv terms (on/off)
IF (IASPR .EQ. TRUE) THEN
DKWDNW = RKARY(L,J,K)*DREL(L,J,K,NC2P2,1) /
DEN(L,J,K,1)
END IF
C WALEED ~END~
-----------------------------------------------------------------------
Filename: relderiv.f
Location: GPAS\eoscomp\jacobian
584
Lines: 266 to 270
AWW(LX,LY,LZ,1) = AWW(LX,LY,LZ,1)-
+ ZW(NCP1,IW)*UT1*( UD(1)*DREL(LX,LY,LZ,NC2P2,1)
+ / DEN(LX,LY,LZ,1) )
-----------------------------------------------------------------------
RK will do the same work.
Filename: xprop.df
Location: GPAS\eoscomp\prop
Filename: rowpw.df
Location: GPAS\eoscomp\jacobian
-----------------------------------------------------------------------
so at this point we are done with the residuals and will start the Jac.
Filename: xstep.df
Location: GPAS\eoscomp\drive
CALL RESIDUALS(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,KL2,
+ KEYOUT,NBLK,NPH,P,RATIO,ZF,DEN,PVMOL,VPOLD,XOLD,ZXY,PHI,RF,
+ ARV,ARW,ARM,X,AQCDEN,
C WALEED 2/27/6 added asphaltene variables to residuals in xstep
+ RATIOS,ARFS,FAS,ZXYS,ARER,ARFE,PHINCS)
-----------------------------------------------------------------------
Filename: xtrans.df
Location: GPAS\eoscomp\residual
SUBROUTINE RESIDUALS(IDIM,JDIM,KDIM,LDIM,IL1,IL2,JL1V,JL2V,KL1,
> KL2,KEYOUT,NBLK,NPH,P,RATIO,ZF,DEN,PVMOL,VPOLD,XOLD,ZXY,PHI,RF,
> ARV,ARW,ARM,X,AQCDEN,
C WALEED added asphaltene variables to residuals
> RATIOS,ARFS,FAS,ZXYS,PHINCS,ARER,ARFE)
REAL*8 P(IDIM,JDIM,KDIM),
> RATIO(IDIM,JDIM,KDIM,NP),
> ZF(IDIM,JDIM,KDIM,NP),
585
> DEN(IDIM,JDIM,KDIM,NP),
> PVMOL(IDIM,JDIM,KDIM,NP+2),
> VPOLD(IDIM,JDIM,KDIM),
> XOLD(IDIM,JDIM,KDIM,NC+NA+1),
> ZXY(IDIM,JDIM,KDIM,5*NC),
> PHI(IDIM,JDIM,KDIM,NC,NP),
> RF(IDIM,JDIM,KDIM,NC+NA),
> ARV(IDIM,JDIM,KDIM),
> ARW(IDIM,JDIM,KDIM),
> ARM(IDIM,JDIM,KDIM,NC+NA),
> X(IDIM,JDIM,KDIM,NC+NA+1),
> AQCDEN(IDIM,JDIM,KDIM,NA+1),
C WALEED 2/27/2006 added asphaltene variables
> RATIOS(IDIM,JDIM,KDIM),
> ARFS(IDIM,JDIM,KDIM),
> FAS(IDIM,JDIM,KDIM),
> ZXYS(IDIM,JDIM,KDIM,2),
> ARER(IDIM,JDIM,KDIM),
> ARFE(IDIM,JDIM,KDIM),
> PHINCS(IDIM,JDIM,KDIM)
-----------------------------------------------------------------------
Filename: xtrans.df
Location: GPAS\eoscomp\residual
-----------------------------------------------------------------------
Filename: xtrans.df
Location: GPAS\eoscomp\residual
586
ARV(I,J,K) = RC1/PRT*(RATIO(I,J,K,NP)*ZF(I,J,K,NP)+
> RATIO(I,J,K,NP-1)*ZF(I,J,K,NP-1))
ARV(I,J,K) = -ARV(I,J,K) -
> (PVMOL(I,J,K,1)/DEN(I,J,K,1)-
> RC1) / PVMOL(I,J,K,4)-VBS*RATIOS(I,J,K)
C WALEED ~END~
C WALEED 2/16/2006 modified ARV for single HC phase
IF (IASPR) THEN
DO 20 JP = 2 , NP
IF ( NPH(I,J,K,JP) .EQ. 0 ) GO TO 20
ARV(I,J,K) = RC1/PRT*ZF(I,J,K,JP)
ARV(I,J,K) = -ARV(I,J,K) -
> (PVMOL(I,J,K,1)/DEN(I,J,K,1)-
> RC1) / PVMOL(I,J,K,4)-
VBS*RATIOS(I,J,K)
RESIDT(2) = RESIDT(2) + ABS (ARV(I,J,K))
IF ( ABS(ARV(I,J,K)) .GT. RESIDM(2) )
> RESIDM(2) = ABS(ARV(I,J,K))
20 CONTINUE
END IF
C WALEED 2/16/2006 ~END~
-----------------------------------------------------------------------
This change was done only for the residuals in order to avoid changing
the material balance residuals, ARM and ARW.
Filename: xprop.df
Location: GPAS\eoscomp\prop
-----------------------------------------------------------------------
Filename: xisdat.df
Location: GPAS\eoscomp\init
C WALEED 1/23/06 Asphaltene flag is added which is off by default
IASPR = .FALSE.
CALL GETVAL('IASPR ',IASPR ,'FG',0,0,0,0,NDUM,NERR)
C WALEED ~END~
Similar to:
c trapping number option by default off
ITRAP = .FALSE.
587
RELP=1 ! table lookup by default
Filename: rock.dh
Location: GPAS\framework\input
C WALEED ~END~
-----------------------------------------------------------------------
Filename: xstep.df
Location: GPAS\eoscomp\drive
588
> AFEKNKLL(IDIM,JDIM,KDIM,2*NC+3),
> AVKLL(IDIM,JDIM,KDIM,3),
> AFSKLL(IDIM,JDIM,KDIM,3),
> AFSNP(IDIM,JDIM,KDIM,NC+1),
> AFSK(IDIM,JDIM,KDIM,NC),
> AFKLL(IDIM,JDIM,KDIM,NC,3),
> PHINCS(IDIM,JDIM,KDIM),
> FAS(IDIM,JDIM,KDIM),
> RATIOS(IDIM,JDIM,KDIM),
> PVMOLS(IDIM,JDIM,KDIM),
> WAS(IDIM,JDIM,KDIM),
> RFACT(IDIM,JDIM,KDIM),
> NPHS(IDIM,JDIM,KDIM),
> DZFKLL(IDIM,JDIM,KDIM,3,NP),
> DVISKLL(IDIM,JDIM,KDIM,3,NP),
> DXYDKLL(IDIM,JDIM,KDIM,NC,3,NP),
> DTRANKLL(IDIM,JDIM,KDIM,NC,3,NP),
> DSATKLL(IDIM,JDIM,KDIM,3,NP),
> DROKLL(IDIM,JDIM,KDIM,3,NP),
> DRELKLL(IDIM,JDIM,KDIM,3,NP),
> DIFTKLL(IDIM,JDIM,KDIM,3,3),
> DCPKLL(IDIM,JDIM,KDIM,3,3),
> ZXYS(IDIM,JDIM,KDIM,2),
> DENS(IDIM,JDIM,KDIM)
C WALEED ~END~
-----------------------------------------------------------------------
Filename: ipars.df
Location: GPAS\framework\drive
C WALEED 2/21/6 added 32 asphaltene related variables
INTEGER*4 IXSTEP(165)^M
IXSTEP(1)=164^M
589
IXSTEP(157)=N_DXYDKLL
IXSTEP(158)=N_DTRANKLL
IXSTEP(159)=N_DSATKLL
IXSTEP(160)=N_DROKLL
IXSTEP(161)=N_DRELKLL
IXSTEP(162)=N_DIFTKLL
IXSTEP(163)=N_DCPKLL
IXSTEP(164)=N_ZXYS
IXSTEP(165)=N_DENS
C WALEED ~END~
-----------------------------------------------------------------------
Filename: memman2.dc
Location: GPAS\framework\memman
590
-----------------------------------------------------------------------
Filename: xarray.df
Location: GPAS\eoscomp\init
591
IF (KERR.GT.0) GO TO 99
CALL ALCGEA ('DRELKLL ',2,3*3,N_DRELKLL,KERR)
IF (KERR.GT.0) GO TO 99
CALL ALCGEA ('DIFTKLL ',2,3*3,N_DIFTKLL,KERR)
IF (KERR.GT.0) GO TO 99
CALL ALCGEA ('DCPKLL ',2,3*3,N_DCPKLL,KERR)
IF (KERR.GT.0) GO TO 99
CALL ALCGEA ('ZXYS ',2,2,N_ZXYS,KERR)
IF (KERR.GT.0) GO TO 99
CALL ALCGEA ('DENS ',2,0,N_DENS,KERR)
IF (KERR.GT.0) GO TO 99
C WALEED ~END~
-----------------------------------------------------------------------
Filename: xarydat.h
Location: GPAS\eoscomp\include
C WALEED 01/19/2006
C WALEED ~END~
-----------------------------------------------------------------------
Filename: xgendat.dh
Location: GPAS\eoscomp\include
C WALEED 01/19/2006
C WALEED ~END~
C WALEED 01/19/2006
REAL*8 RFACTMAX,WASMAX,ROCKMDEN,FASS,PSTAR,VBS
C WALEED ~END~
592
Appendix O: Sample Input File with Asphaltene for CMG GEM
In this appendix, a sample CMG GEM input file, which was used for one of the
cases in Chapter 3, is given. The following input file was used for the oil core flood
simulation case. This input file can be run to study the effects of asphaltene precipitation,
flocculation and deposition models on the properties of rock.
593
*SG 3.5501348E-01 8.1800000E-01 4.5925843E-01 6.0331141E-01
7.6602581E-01 8.4445649E-01 9.1257161E-01 9.8894843E-01
9.8894843E-01
*TB -1.6690811E+02 -7.8476000E+01 -5.7398129E+01 1.3264147E+01
1.3386416E+02 2.8020018E+02 4.5893778E+02 7.0188060E+02
7.0188060E+02
*PCRIT 4.3600503E+01 7.2800000E+01 4.4075948E+01 3.5365704E+01
2.7600182E+01 1.8685735E+01 1.3007662E+01 8.7281817E+00
8.7281817E+00
*VCRIT 9.7481182E-02 9.4000000E-02 1.8370300E-01 2.7850658E-01
4.5747077E-01 7.6623642E-01 1.1736587E+00 1.7282959E+00
1.7282959E+00
*TCRIT 1.8002072E+02 3.0420000E+02 3.5021897E+02 4.4225586E+02
5.9291053E+02 7.3049476E+02 8.6541991E+02 1.0330349E+03
1.0330349E+03
*AC 1.3044585E-02 2.2500000E-01 1.3402370E-01 2.1288126E-01
3.3029816E-01 5.6896138E-01 8.8620979E-01 1.2553771E+00
1.2553771E+00
*MW 1.7929990E+01 4.4010000E+01 3.9447922E+01 6.4552350E+01
1.2449059E+02 2.1780834E+02 3.6417593E+02 6.2253772E+02
6.2253772E+02
*HCFLAG 0 0 0 0 0 0 0 0 0
*BIN
1.3000000E-01
7.7626974E-03 1.3500000E-01
2.1094499E-02 1.2500000E-01 3.3585930E-03
4.4931584E-02 1.0145797E-01 1.5995421E-02 4.7720063E-03
7.7883596E-02 1.0145797E-01 3.8529427E-02 1.9626948E-02
5.1530605E-03
1.1049057E-01 1.0145797E-01 6.3718053E-02 3.9069383E-02
1.7043088E-02
3.5259694E-03
1.4353897E-01 1.0145797E-01 9.1090493E-02 6.1824709E-02
3.3501399E-02
1.2743726E-02 2.9060764E-03
1.6228863E-01 1.8000000E-01 1.0340766E-01 7.0339110E-02
3.8194803E-02
1.4550953E-02 3.3205402E-03 0.0000000E+00
*VSHIFT
-1.5175000E-01 -1.5400000E-01 1.6664000E-01 1.5100000E-01
2.0097000E-01
4.8744281E-03 7.4820000E-02 1.4666000E-01 1.4666000E-01
*VISCOR *HZYT
*MIXVC 8.0000000E-01
*VISVC
7.8000000E-02 7.5200000E-02 2.2127000E-01 3.3462000E-01
5.5065000E-01
9.2398000E-01 1.3875964E+00 1.7286067E+00 1.9181226E+00
*VISCOEFF
1.0000000E-01 2.0000000E-03 5.0000000E-03 -2.6720000E-02
1.1200000E-02
*OMEGA
594
4.5723553E-01 3.6579000E-01 4.5723553E-01 4.5723553E-01
4.5723553E-01
4.5723553E-01 4.5723553E-01 4.5723553E-01 4.5723553E-01
*OMEGB
7.7796074E-02 6.2240000E-02 7.7796074E-02 7.7796074E-02
7.7796074E-02
7.7796074E-02 7.7796074E-02 7.7796074E-02 7.7796074E-02
*PCHOR
7.1324842E+01 7.8000000E+01 1.3604607E+02 2.0666813E+02
3.3739601E+02
6.0401815E+02 1.0222112E+03 1.7603878E+03 1.7603878E+03
*ENTHCOEF
-4.8099664E+00 5.1578014E-01 -2.4065776E-04 3.5357633E-07 -
1.2877792E-10
1.6487601E-14
4.7780500E+00 1.1443300E-01 1.0113200E-04 -2.6494000E-08
3.4706000E-12
-1.3140000E-16
-1.0679602E+00 2.1062857E-01 3.0119253E-05 2.6999919E-07 -
1.2875307E-10
1.9204208E-14
2.6299477E+01 -1.2123050E-03 3.2548260E-04 -7.5059391E-08
3.3624792E-12
5.2765926E-16
0.0000000E+00 -4.9287929E-02 4.3017465E-04 -6.5229320E-08
0.0000000E+00
0.0000000E+00
0.0000000E+00 -3.4383946E-02 4.1484790E-04 -6.1235316E-08
0.0000000E+00
0.0000000E+00
0.0000000E+00 -1.7552315E-02 4.0097771E-04 -5.7002975E-08
0.0000000E+00
0.0000000E+00
0.0000000E+00 -3.6723239E-03 3.9158777E-04 -5.3689530E-08
0.0000000E+00
0.0000000E+00
0.0000000E+00 -3.6723239E-03 3.9158777E-04 -5.3689530E-08
0.0000000E+00
0.0000000E+00
*SOLIDMODEL
-2.5205254E+01 9.0000000E-01 5.0000000E+04 9.0000000E-01
*PHASEID *OIL
*DERIVATIVEMETHOD *NUMERALL
*SOLID-CONV-RATE
50000.0 0.0
*SOLID_ALPHA 0.1
*SOLID_BETA 0.0
*SOLID_CRITVEL 0.0
*SOLID_GAMMA 0.3
*SOLID_SIGMA 150.0
*DENROCK 2650.0
*RFMAX 5.0
**WSLMAX 5.0E-04
595
*ADSCST 0.012
**--------------------------------ROCK FLUID DATA----------------------
*ROCKFLUID
*RPT 1
*SGT
0.0 0.0 1.00000 0.0
0.05000 0.0 0.88000 0.0
0.08890 0.00100 0.70230 0.0
0.17780 0.01000 0.47050 0.0
0.26670 0.03000 0.29630 0.0
0.35560 0.05000 0.17150 0.0
0.44440 0.10000 0.08780 0.0
0.53330 0.20000 0.03700 0.0
0.62220 0.35000 0.01100 0.0
0.65000 0.39000 0.0 0.0
0.71110 0.56000 0.0 0.0
0.80000 1.0 0.0 0.0
*SWT
0.2000 0.0 1.0 0.0
0.2899 0.00220 0.67690 0.0
0.3778 0.01800 0.41530 0.0
0.4667 0.06070 0.21780 0.0
0.5556 0.14380 0.08350 0.0
0.6444 0.28090 0.01230 0.0
0.7000 0.40890 0.0 0.0
0.7333 0.48550 0.0 0.0
0.8222 0.77090 0.0 0.0
0.9111 1.0 0.0 0.0
1.0 1.0 0.0 0.0
**---------------------INITIAL RESERVOIR CONDITION---------------------
*INITIAL
*VERTICAL *OFF
*PRES *CON 1000.0
*SW *CON 0.0
*ZGLOBAL *CON
0.00321 0.00409 1.75432 11.14261 36.27861 35.16170 11.54219
2.43375 1.67952
**---------------------------NUMERICAL METHOD--------------------------
*NUMERICAL
*AIM *OFF
**------------------------------WELL DATA------------------------------
*RUN
*TIME 0.0
*DTMIN 0.001
*DTMAX 0.025
*DTWELL 0.01
*WELLINIT *ITER
*AIMWELL *WELLN
*AIMSET *CON 1
*WELL 1 'INJ'
*WELL 2 'PROD'
596
*INJECTOR 1
*INCOMP *SOLVENT
0.00321 0.00409 1.75432 11.14261 36.27861 35.16170 11.54219
2.43375 1.67952
597
Appendix P: Sample Input File with Asphaltene for GPAS
In this appendix, a sample input file that was used in Chapter 6 for compositional
simulation of asphaltene precipitation in GPAS is given. This input file can be run to
study the effects of considering the precipitation of asphaltenes in porous media.
DESCRIPTION()=
"THICKNESS (FT) : 0.0668740814"
"LENGTH (FT) : 0.196850394"
"WIDTH (FT) : 0.0668740814"
"GRID BLOCKS : 30x1x1"
COMPOSITIONAL_MODEL
$DEBUGS
TIMEEND = 2.0
$ I/O OPTIONS
OUTLEVEL = 1
$SPLINEOUT
$GEOMOUT
PROCOUT
OUTPUT_PRE
$OUTPUT_NPH
OUTPUT_SAT
OUTPUT_OIL
OUTPUT_GAS
$OUTPUT_DEN
OUTPUT_WEL
OUTPUT_HIS
WELLFILE = "WEL"
HISDATA_NUM = 100
OUTPUT_TIME() = 0.01 0.1423004 0.2846008 0.4269012 0.5692017 0.7115021
0.8538025 0.9961029 1.1384033
$OUTPUT FREQUENCY
ISTEP(,,)=1
JSTEP(,,)=1
KSTEP(,,)=1
598
$ FAULT BLOCK AND MESH DATA
METHOD = 2
DOWN() = 0 0 1
MES = "cart"
NX(1) = 30 NY(1) = 1 NZ(1) = 1
DX() = 0.0065616798 DY() = 0.0668740814 DZ() = 0.0668740814
$ COMPOUND NAMES
COMPOUND(1) = "N2-C1" COMPOUND(2) = "CO2"
COMPOUND(3) = "C2-C3" COMPOUND(4) = "IC4-NC5"
COMPOUND(5) = "C6-C9" COMPOUND(6) = "C10-C19"
COMPOUND(7) = "C20-C29" COMPOUND(8) = "C30+"
$ COMPOUND ACEN
ACEN()= 1.3044585E-02 2.2500000E-01 1.3402370E-01 2.1288126E-01
3.3029816E-01 5.6896138E-01 8.8620979E-01 1.2553771E+00
$ COMPOUND PARA
PARA()= 7.1324842E+01 7.8000000E+01 1.3604607E+02 2.0666813E+02
3.3739601E+02 6.0401815E+02 1.0222112E+03 1.7603878E+03
599
1.5119478E-01 1.1335281E-01 9.6119808E-02 6.5301288E-02
3.5417798E-02 1.3481648E-02 3.0753090E-03 0.0000000E+00
$ TOLERANCE
CVGOPT = 2
TOL_FLASH = 0.0001
TOL_VOLUME = 0.0001
TOL_MASS = 0.0001
TOL_WATER = 0.0001
$ POROSITY
POROSITY1() = 0.247
$ PERMEABILITIES
XPERM1() = 29.0
YPERM1() = 29.0
ZPERM1() = 29.0
XYPERM1() = 0
XZPERM1() = 0
YZPERM1() = 0
$ INITIAL COMPOSITIONS
ZXY1(,,,1) = .0000321
600
ZXY1(,,,2) = .0000409
ZXY1(,,,3) = .0175432
ZXY1(,,,4) = .1114261
ZXY1(,,,5) = .3627861
ZXY1(,,,6) = .3516170
ZXY1(,,,7) = .1154219
ZXY1(,,,8) = .0411327
$ RELPERM DATA
RELP 1
MODREL(1) = 3
601
0.1778 0.4705
0.2667 0.2963
0.3556 0.1715
0.4444 0.0878
0.5333 0.0370
0.6222 0.0110
0.6500 0.0000
0.7111 0.0000
0.8000 0.0000
EndBlock
NUMWELL = 2
602
Extrapolation Constant
Data 0. 145.037738007
EndBlock
EndInitial
603
Nomenclature
604
k rj relative permeability of phase j
o
k rj relative permeability endpoint for phase j
k rjb relative permeability of phase j in the two-phase jb
kx absolute permeability in x direction, L2
ky absolute permeability in y direction, L2
kz absolute permeability in z direction, L2
Lj ratio of moles in jth phase to total number of moles in mixture
Lg mole fraction of gas phase
Ls mole fraction of solid phase
l length of gridblock, L
Mi molecular weight of ith component
Ms molecular weight of asphaltene component
Ni moles of i th component per gridblock volume, mol/L3
Ni moles of i th component per pore volume (GPAS), mol/L3
r
Ni flux vector of ith species in units of mass of i per surface area-time
N ij moles of component i in phase j per pore volume, mol/L3
No moles of oil phase per gridblock volume, mol/L3
N s2 moles of suspended solid phase, s 2 , per gridblock volume, mol/L3
N s1 moles of suspended solid phase, s1 , per gridblock volume, mol/L3
NT total number of moles in hydrocarbon phases per PV, mol/L3
N Tl trapping number for phase l
Nw moles of water per gridblock volume, mol/L3
nb total number of gridblocks
nc number of hydrocarbon components or index for asphaltene
nj relative permeability exponent of jth phase
np total number of phases
Pci critical pressure for a pure component i, m/Lt2
Po reference pressure, m/Lt2
P* pressure at which the asphaltene just starts to precipitate, m/Lt2
Pc capillary pressure, m/Lt2
Pcgo gas-oil capillary pressure, m/Lt2
Pj pressure of phase j, m/Lt2
Pwf flowing bottomhole pressure, m/Lt2
605
PI j productivity index for phase j
PI t total productivity index
p pressure, Lt2/m
Qj well volumetric flow rate for phase j, L3/t
Qt total well volumetric flow rate, L3/t
qi molar injection (+) or production rate (-) for component i, mol/t
R gas constant
r
R residual vector
r
Ri residual vector for ith gridblock
R er residual of solid-oil equilibrium ratio equation
R fe residual of multiphase flash equation
R fs residual of solid-oil fugacity equation for n c th component
R if residual of gas-oil fugacity equation for ith component
R im residual of mass conservation equation for i th component
Rv residual of volume constraint equation
Rw residual of water mass conservation equation
Rf permeability resistance factor
R f,max maximum permeability resistance factor
Ri mass rate of production in units of mass of i per bulk volume-time
r reaction rate for formation of solid s 2 , mol/L3t
r(v) residual of the Rachford-Rice equation
ro equivalent well gridblock radius, L
rw well radius, L
Sj saturation of jth phase
S jr residual saturation of phase j
Sj normalized phase saturation
s1 solid phase which is in equilibrium with oil and gas phases
s2 solid phase created from solid s1 via a chemical reaction
si dimensionless volume shift parameter for i th component
T reservoir temperature
Tci critical temperature for a pure component i
Tk transmissibility of phase k
Tri reduced temperature
606
Tw transmissibility of the water phase
t time, t
r
uj superficial velocity or flux of phase j, L/t
uo oil phase Darcy velocity, L/t
V gridblock volume, L3
Vb bulk volume of a cell, L3
Vp pore volume of a cell, L3
Vci critical volume of a pure component i, L3/mol
Vsd
2
volume of deposited solid s 2 per gridblock volume
v mole fraction of gas in absence of water
vj molar volume of phase j, L3/mol
vs1 solid molar volume, L3/mol
va molar volume of asphaltene, L3/mol
vj molar volume of phase j with volume shift, L3/mol
vcr,o critical oil phase interstitial velocity, L/t
vo oil phase interstitial velocity, L/t
Wi overall concentration of i th component, m/ L3
w as mass of adsorbed asphaltene per mass of rock
w as,max max. mass fraction of asphaltene that can precipitate from oil
r
x solution vector
r
xi solution vector for ith gridblock
xi mole fractions of i th component in oil phase
xij mole fraction of component i in phase j
x is mole fraction of component i in solid phase
x gridblock size in x direction, L
yi mole fractions of i th component in gas phase
yik mole fraction of i th component in phase k
yio mole fraction of i th component in oil phase
yig mole fraction of i th component in gas phase
yis1 mole fraction of i th component in suspended solid s1
yis2 mole fraction of i th component in suspended solid s 2
y gridblock size in y direction, L
Z compressibility factor
607
z elevation, L
zb bottom layer number
zi global mole fraction of i th component in feed
zt top layer number
z gridblock size in z direction, L
Greek Symbols
608
j molar density of phase j, mol/L3
jr reduced molar density of phase j, mol/L3
i parachor of component i
ur
divergence operator
ur
gradient operator
Superscripts
Subscripts
a asphaltene
b bulk
c critical
g gas
i index for component
j index for phase
k index for component or phase
o oil
p pore
R rock
s solid
t total
w water
x x direction
y y direction
x z direction
609
References
Ali, M.A. and Islam, M.R.: "The Effect of Asphaltene Precipitation on Carbonate Rock
Permeability: An Experimental and Numerical Approach," paper SPE 38856
presented at the 1997 SPE.
Al-Maamari, R.S.H. and Buckley, J.S.: "Asphaltene Precipitation and Alteration of
Wetting: Can Wettability Change during Oil Production?," paper SPE 59292
presented at the 2000 SPE/DOE Improved Oil Recovery Symposium, Tulsa,
Oklahoma, 3-5 April 2000.
Amroun, H. and Tiab, D.: "Alteration of Wettability Due to Asphaltene Deposition in
Rhourd-Npuss Sud Est Field, Algeria," paper SPE 71060 presented at the Rocky
Mountain Petroleum Technology Conference, Keystone, Colorado, 21-23 May 2001.
Avila, A., Russo, E., Flores, E., and Hidalgo, O.: "A Field Methodology to Estimate the
Zone of Maximum Probability of Asphaltene Precipitation Occurrence," paper SPE
69531 presented at the SPE Latin American and Caribbeen Petroleum Engineering
Conference, Buenos Aires, Argentina, 25-28 March 2001.
Buckley, J.S.: "Asphaltene Precipitation and Crude Oil Wetting," SPE Adv. Tech. Series,
Vol. 3, No. 1 (1995), 53-59.
Burke, N.E., Hobbs, R.E. and Kashou, S.F.: "Measurement and Modeling of Asphaltene
Precipitation," J. Pet. Tech. (Nov. 1990) 42, 1440-1446.
Chang, Y.B.: "Development and Application of an Equation of State Compositional
Simulator," Ph.D. dissertation, The University of Texas at Austin, 1990.
610
Chang, Y.B., Pope, G.A., and Sepehrnoori, K.: "A Higher-Order Finite-Difference
Compositional Simulator," Journal of Petroleum Science and Engineering, 5 (1990),
35-50.
Chung, T.: "Thermodynamic Modeling for Organic Solid Precipitation," paper SPE
24851 presented at the SPE Annual Technical Conference and Exhibition,
Washington, DC, 4-7 October 1992.
Cimino, R., Correra, S. and Sacomani, P.A.: "Thermodynamic Modelling for Prediction
of Asphaltene Deposition in Live Oil," paper SPE 28993, presented at 1995 SPE
International Symposium on Oilfield Chemistry, San Antonio, TX, 14-17 February
1995, 499-512.
Collins, D.A., Nghiem, L.X., Li. Y.K., and Grabenstetter, J.E.: "Implicit Compositional
Simulation With an Equation of State," SPE Res. Eng. J. (May 1992), 259-264.
Crocker, M.E. and Marchin, L.M.: "Wettability and Adsorption Characteristics of Crude
Oil Asphaltene and Polar Fractions," paper SPE/DOE 14885 presented at the
SPE/DOE Fifth Symposium on Enhanced Oil Recovery, Tulsa, OK, April 20-23
1986.
Danesh, A.: Text Book PVT and Phase Behaviour of Petroleum Reservoir Fluids,
611
Gharrouch, A.A. and Al-Ruhaimani, F.A.: "Modeling Permeability Reduction Caused by
Asphaltene Deposition," paper SPE 96697, presented at the 2005 SPE Annual
Technical Conference and Exhibition, Dallas, TX, U.S.A., 9-12 October 2005.
Gharrouch, A.A. and Al-Ruhaimani, F.A.: "Predicting Asphaltene Deposition and
Assessing Formation Damage," paper SPE 82258, presented at the SPE European
Formation Damage Conference, The Hague, The Netherlands, 13-14 May 2003.
Gholoum, E.F., Oskui, G.P., and Salman, M.: "Investigation of Asphaltene Precipitation
Onset Conditions for Kuwaiti Reservoirs," paper SPE 81571, presented at the SPE
13th Middle East Oil Show & Conference, Bahrain, 5-8 April 2003.
Han, C., Delshad, M., Pope, G.A., and Sepehrnoori, K.: "Coupling EOS Compositioanl
and Surfactant Models in a Fully Implicit Parallel Reservoir Simulator Using EACN
Concept," paper SPE 103194 presented at the 2006 SPE Annual Technical
Conference and Exhibition, San Antonio, TX, U.S.A., 24-27 September 2006.
Han, C., Delshad, M., Sepehrnoori, K., and Pope, G.A.: "A Fully Implicit, Parallel,
Compositional Chemical Flooding Simulator," paper SPE 97217 presented at the
2005 SPE Annual Technical Conference and Exhibition, Dallas, TX, U.S.A., 9-12
October 2005.
Hirschberg, A., deJong, L.N.J., Schipper, B.A. and Meijer, J.G.: "Influence of
Temperature and Pressure on Asphaltene Flocculation," paper SPE 11202, June 1984.
Hongqi, L. and Wan, W.K.: "Investigation of the Asphaltene Precipitation Process from
Cold Lake Bitumen by Confocal Scanning Laser Microscopy," paper SPE 30321,
presented at the International Heavy Oil Symposium, Calgary, Canada, 19-21 June,
1995, 709-712.
Iwere, F.O., Apaydin, O.G., Moreno, J.E., Ventura, R.L., and Garcia, J.L.: "Simulation of
Asphaltene Precipitation in Fractured Reservoirs: A Case Study," paper SPE 74373
612
presented at the SPE International Petroleum Conference and Exhibition,
Villahermosa, Mexico, 10-12 February 2002.
Jacobs, I.C. and Throne, M.A.: "Asphaltene Precipitation During Acid Stimulation
Treatments," paper SPE 14823, presented at the Seventh SPE Symposium on
Formation Damage Control, Lafayette, LA, February 26-27 1986.
Jamaluddin, A.K.M.: "A Proactive Approach to Address Solids (Wax and Asphaltene)
Precipitation During Hydrocarbon Production," paper SPE 49465 presented at the 8th
Abu Dhabi International Pet. Exhibition and Conf., Abu Dhabi, U.A.E., 11-14
October 1998.
Jamaluddin, A.K.M., Nighswander, J.N., Kohse, B.F., El Mahdi, A., Binbrek, M.A. and
Hogg, P.F.: "Experimental and Theoretical Assessment of the Asphaltene
Precipitation Characteristics of the Sahil Field Under a Proposed Miscible Gas
Injection Scheme," paper SPE 87292 presented at the 9th Abu Dhabi International Pet.
613
Kohse, B.F. and Nghiem, L.X.: Modelling Asphaltene Precipitation and Deposition in a
Compositional Reservoir Simulator," paper SPE 89437, presented at the 2004
SPE/DOE Fourteenth Symposium on Improved Oil Recovery, Tulsa, Oklahoma,
U.S.A., 17-21 April 2004.
Kohse, B.F., Nghiem, L.X., Maeda, H., and Ohno, K.: Modelling Phase Behaviour
Including the Effect of Pressure and Temperature on Asphaltene Precipitation," paper
SPE 64465, presented at the SPE Asia Pacific Oil and Gas Conf. and Exhibition,
Brisbane, Australia, 16-18 October 2000.
Kokal, S., Al-Dokhi, M., and Al-Zubail, M.: "Asphaltene Precipitation in a Saturated
Gas-Cap Reservoir," paper SPE 89967 presented at the SPE Annual Technical
Conference and Exhibition, Houston, USA, 26-29 September 2004.
Kokal, S., Al-Ghamdi, A., and Krinis, D.: "Asphaltene Precipitation in High Gas-Oil
Ratio Wells," paper SPE 81567 presented at the SPE 13th Middle East Oil Show and
Jersey (1989).
614
Leontaritis, K.J., Amaefule, J.O., and Charles, R.E.: "A Systematic Approach for the
Prevention and Treatment of Formation Damage Caused by Asphaltene Deposition,"
SPE Prod. & Facilities J. (August 1994), 157-164.
Leontaritis, K.J.: "Asphaltene Deposition: A Comprehensive Description of Problem
Manifestations and Modeling Approaches," paper SPE 18892 presented at the
Production Operations Symposium, Oklahoma City, Oklahoma, 13-14 March 1989.
Li, M., Guo, P. and Li, S.: "Modeling Technique of Asphaltene Precipitation," paper SPE
70048 presented at the SPE Permian Basin Oil and Gas Recovery Conference,
Midland, TX, 15-16 May 2001.
MacMillan, D.J., Tackett, J.E., Jessee, M.A., and Monger-McClure, T.G.: "A Unified
Approach to Asphaltene Precipitation: Laboratory Measurement and Modeling," JPT
(September 1995), 788-793.
Marques, L.C.C., Gonzalez, G., and Monteiro, J.B.: "A Chemical Approach to Prevent
Asphaltenes Flocculation in Light Crude Oils: State-of-the-art," paper SPE 91019
presented at the SPE Annual Technical Conference and Exhibition, Houston, TX,
U.S.A., 26-29 September 2004.
Minssieux, L.: "Core Damage From Asphaltene Deposition," paper SPE 37250 presented
at the International Symposium on Oilfield Chemistry, Houston, TX, 18-21 February
1997.
Naimi-Tajdar, R., Han, C., Sepehrnoori, K., Arbogast, T.J., and Miller, M.A.: "A Fully
Implicit, Compositional, Parallel Simulator for IOR Processes in Fractured
Reservoirs," paper SPE 100079 presented at the 2006 SPE/DOE Symposium on
Improved Oil Recovery, Tulsa, Oklahoma, U.S.A., 22-26 April 2006.
Nikookar, M., Pazuki, G.H., and Masoudi, R.: "A New Approach in Modeling
Asphaltene Precipitation in Heavy Oil," paper SPE/PS-CIM/CHOA 97939 presented
615
at the 2005 SPE International Thermal Operations and Heavy Oil Symposium,
Calgary, Alberta, Canada, 1-3 November 2005.
Nghiem, L.X.: "A New Approach to Quasi-Newton Methods With Application to
Compositional Modeling," paper SPE 12242 presented at the Reservoir Simulation
Symposium, San Francisco, CA, 15-18 November 1983.
Nghiem, L.X., Aziz, K. and Li, Y.K.: "A Robust Iterative Method for Flash Calculations
Using the Soave-Redlich-Kwong or the Peng-Robinson Equation of State," Soc. Pet.
Eng. J. (June 1983), 521-530.
Nghiem, L.X.: "An Integral Approach for Discretizing the Reservoir Flow Equations,"
SPE Res. Eng. J. (May 1988), 685-690.
Nghiem, L.X., Kohse, B.F., Farouq-Ali, S.M., and Doan, Q.: "Asphaltene Precipitation:
Phase Behaviour Modelling and Compositional Simulation," paper SPE 59432,
presented at the 2000 SPE Asia Pacific Conf. on Integrated Modelling for Asset
Management, Yokohama, Japan, 25-26 April 2000.
Nghiem, L.X., Hassam, M.S., and Nutakki, R.: "Efficient Modelling of Asphaltene
Precipitation," paper SPE 26642, presented at 1993 SPE Annual Tech. Conf. and
Exhibition, Houston, TX, October 3-6, 375-384.
Nghiem, L.X., Fong, D.K., and Aziz, K.: "Compositional Modeling With an Equation of
State," Soc. Pet. Eng. J. (December 1981), 687-698.
Nghiem, L.X.: "Compositional Simulation of Asphaltene Deposition and Plugging,"
paper SPE 48996, presented at the 1998 SPE Annual Technical Conference and
Exhibition, New Orleans, Louisiana, 27-30 September 1998.
Nghiem, L.X., Sammon, P.H., and Kohse, B.F.: "Modelling Asphaltene Precipitation and
Dispersive Mixing in the Vapex Process," paper SPE 66361, presented at the SPE
Reservoir Simulation Symposium, Houston, TX, 11-14 February 2001.
616
Nghiem, L.X., and Dennis, A.: "Modelling Asphaltene Precipitation During Primary
Depletion," paper SPE 36106, presented at IV Latin American/Caribbean Pet. Eng.
Conf., Trinidad and Tobago, 23-26 April 1996, 321-334.
Nor-Azlan, N. and Adewumi, M.A.: "Development of Asphaltene Phase Equilibrium
Predictive Model," paper SPE 26905, presented at the 1993 Eastern Regional
Conference and Exhibition, Pittsburgh, PA, 2-4 November 1993, 159-171.
Ohen, H.A., Moreno T., Marcano, D., Acosta, A., Mengual, R., Gil, J., Velasquez, A.,
Daneshjou, D., Leontaritis, K., and Holmgren, M.: "Systematic Formation Damage
Evaluation of El Furrial Field," paper SPE 54722 presented at the 1999 SPE
European Formation Damage Conference, The Hague, The Netherlands, 31 May - 1
June 1999.
Omidkhah, M.R., Nikookar M., Pazuki, G.R., Sahranavard, L., and Emadi, M.A.:
"Calculation of Phase Behavior of Asphaltene Precipitation by Using a New EOS,"
paper SPE 101920 presented at the 2006 Abu Dhabi International Petroleum
Exhibition and Conference, Abu Dhabi, U.A.E., 5-8 November 2006.
Pan, H. and Firoozabadi, A.: "Thermodynamic Micellization Model for Asphaltene
Aggregation and Precipitation in Petroleum Fluids," SPE Production & Facilities
(May 1998), 118-127.
Parashar, M., Wheeler, J.A., Pope, G., Wang, K., and Wang, P.: "A New Generation EOS
Compositional Reservoir Simulator: Part II Framework and Multiprocessing," paper
SPE 37977, presented at the 1997 SPE Reservoir Simulation Symposium., Dallas,
TX, 8-11 June 1997.
Perschke, D.R.: "Equation of State Phase Behavior Modeling for Compositional
Simulation," Ph.D. Dissertation, The University of Texas at Austin, December 1988.
617
Piro, G., Canonico, L.B., Galbariggi, G., Bertero, L., and Carniani, C.: "Experimental
Study on Asphaltene Adsorption onto Formation Rock: An Approach to Asphaltene
formation Damage Prevention," paper SPE 30109, presented at 1995 Proc. European
Formation Damage Conf., The Hague, The Netherlands, 13-15 May, 317-330.
Qin, X.: "Modeling Asphaltene Precipitation and Implementation of Group Contribution
Equation of State into UTCOMP," MS thesis, The University of Texas at Austin,
August 1998.
Qin, X., Wang, P., Sepehrnoori, K., and Pope, G.A.: "Modeling Asphaltene Precipitation
in Reservoir Simulation," Ind. Eng. Chem. Res. 2000, 39, 2644 - 2654.
Shedid, S.A.: "Influences of Asphaltene Deposition on Rock/Fluid Properties of Low
Permeability Carbonate Reservoirs," paper SPE 68229 presented at the Middle East
Oil Show, Bahrain, 17-20 March 2001.
Shrivatsava, V.K., Nghiem, L.X. and Moore, R.G.: "A Novel Approach for Incorporating
Physical Dispersion in Miscible Displacement," paper SPE 77724 presented at the
SPE Annual Technical Conference and Exhibition, San Antonio, TX, 29 September -
2 October 2002.
Takahashi, S., Yoshihisa, H., Takahashi, S., Yazawa, N., and Sarma, H.: "Characteristics
and Impact of Asphaltene Precipitation During CO2 Injection in Sandstone and
Carbonate Cores: An Investigative Analysis Through Laboratory Tests and
Compositional Simulation," paper SPE 84895 presented at the SPE International
Improved Oil Recovery Conference, Kuala Lumpur, Malaysia, 20-21 October 2003.
Takhar, S., Ravenscroft, D.C., and Nicoll, A.: "Prediction of Asphaltene Deposition
During Production Model Description and Experimental Details," paper SPE 30108
presented at the European Formation Damage Conference, The Hague, The
Netherlands, 15-16 May 1995, 311-316.
618
Tejeda, P., Lira-Galeana, C., and Rodriguez, F.: "Analysis of a Thermodynamic
Micellization Model for Asphaltene Precipitation," paper SPE 38968 presented at the
Fifth Latin American and Caribbean Pet. Eng. Conf. and Exhibition, Rio de Janeiro,
Brazil, 30 August - 3 September 1997.
Wang, P., Balay, S., Sepehrnoori, K., Wheeler, J.A., Smith, B., and Pope, G.P.: "A Fully
Implicit Parallel Compositional Simulator for Large Scale Reservoir Simulation,"
paper SPE 51885, presented at the 1999 SPE 15th Reservoir Simulation Symposium,
619