Roberge Pierre R Handbook of Corrosion Engineering




Roberge Pierre R  Handbook of Corrosion Engineering
Corrosion is the destructive attack of a material by reaction with its
environment. The serious consequences of the corrosion process have
become a problem of worldwide significance. In addition to our everyday
encounters with this form of degradation, corrosion causes plant
shutdowns, waste of valuable resources, loss or contamination of product,
reduction in efficiency, costly maintenance, and expensive overdesign;
it also jeopardizes safety and inhibits technological progress.
The multidisciplinary aspect of corrosion problems combined with the
distributed responsibilities associated with such problems only
increase the complexity of the subject. Corrosion control is achieved by
recognizing and understanding corrosion mechanisms, by using corrosion-
resistant materials and designs, and by using protective systems,
devices, and treatments. Major corporations, industries, and government
agencies have established groups and committees to look after
corrosion-related issues, but in many cases the responsibilities are
spread between the manufacturers or producers of systems and their
users. Such a situation can easily breed negligence and be quite costly
in terms of dollars and human lives.

Kermit Sigmon functions matlab free download


Kermit Sigmon functions matlab free download
 

Essential MATLAB for Engineers and Scientists free download





Essential MATLAB® for Engineers and Scientists
Third edition
Brian D. Hahn and daniel T. Valentine



PART I ESSENTIALS 1
1 Introduction 3
1.1 Using MATLAB 4
1.2 The MATLAB desktop 15
1.3 Sample program 16
1.3.1 Cut and paste 16
1.3.2 Saving a program: script files 19
1.3.3 How a program works 21
2 MATLAB fundamentals 24
2.1 Variables and the workspace 24
2.1.1 Variables 24
2.1.2 Case sensitivity 25
2.1.3 The workspace 25
2.1.4 Adding commonly used constants to the workspace 27
2.2 Arrays: vectors and matrices 27
2.2.1 Initializing vectors: explicit lists 28
2.2.2 Initializing vectors: the colon operator 29
2.2.3 linspace 30
2.2.4 Transposing vectors 30
2.2.5 Subscripts 31
2.2.6 Matrices 31
2.2.7 Capturing output 32
2.3 Vertical motion under gravity 33
2.4 Operators, expressions and statements 35
2.4.1 Numbers 35
2.4.2 Data types 36
2.4.3 Arithmetic operators 37
2.4.4 Precedence of operators 37
2.4.5 The colon operator 38
2.4.6 The transpose operator 39
2.4.7 Arithmetic operations on arrays 39
2.4.8 Expressions 41
2.4.9 Statements 41
2.4.10 Statements, commands and functions 43
2.4.11 Vectorization of formulae 43
2.5 Output 47
2.5.1 disp 47
2.5.2 format 49
2.5.3 Scale factors 50
2.6 Repeating with for 51
2.6.1 Square roots with Newton’s method 51
2.6.2 Factorials! 53
2.6.3 Limit of a sequence 53
2.6.4 The basic for construct 54
2.6.5 for in a single line 56
2.6.6 More general for 56
2.6.7 Avoid for loops by vectorizing! 56
2.6.8 A common mistake: for less loops! 59
2.7 Decisions 60
2.7.1 The one-line if statement 60
2.7.2 The if-else construct 62
2.7.3 The one-line if-else statement 63
2.7.4 elseif 64
2.7.5 Logical operators 65
2.7.6 Multiple ifs versus elseif 65
2.7.7 Nested ifs 67
2.7.8 Vectorizing ifs? 68
2.7.9 switch 68
2.8 Complex numbers 69
2.9 More on input and output 71
2.9.1 fprintf 71
2.9.2 Output to a disk file with fprintf 73
2.9.3 General file I/O 73
2.9.4 Saving and loading data 73
2.10 Odds ’n ends 73
2.10.1 Variables, functions and scripts with the same name 73
2.10.2 The input statement 74
2.10.3 Shelling out to the operating system 75
2.10.4 More Help functions 76
2.11 Programming style 76
3 Program design and algorithm development 86
3.1 Computer program design process 87
3.1.1 Projectile problem example 89
3.2 Other examples of structure plans 98
3.2.1 Quadratic equation 99
3.3 Structured programming with functions 100
4 MATLAB functions & *data import-export utilities 104
4.1 Some common functions 105
4.2 *Importing and exporting data 110
4.2.1 The load and save commands 110
4.2.2 Exporting text (ASCII) data 110
4.2.3 Importing text (ASCII) data 111
4.2.4 Exporting binary data 111
4.2.5 The Import Wizard 112
4.2.6 Low-level file I/O functions 113
4.2.7 Other import/export functions 118
5 Logical vectors 121
5.1 Examples 122
5.1.1 Discontinuous graphs 122
5.1.2 Avoiding division by zero 123
5.1.3 Avoiding infinity 125
5.1.4 Counting random numbers 126
5.1.5 Rolling dice 127
5.2 Logical operators 127
5.2.1 Operator precedence 129
5.2.2 Danger 130
5.2.3 Logical operators and vectors 130
5.3 Subscripting with logical vectors 131
5.4 Logical functions 133
5.4.1 Using any and all 134
5.5 Logical vectors instead of elseif ladders 135
6 Matrices of numbers & arrays of strings 141
6.1 Matrices 142
6.1.1 A concrete example 142
6.1.2 Creating matrices 143
6.1.3 Subscripts 144
6.1.4 Transpose 144
6.1.5 The colon operator 144
6.1.6 Duplicating rows and columns: tiling 148
6.1.7 Deleting rows and columns 148
6.1.8 Elementary matrices 149
6.1.9 *Specialized matrices 150
6.1.10 Using MATLAB functions with matrices 151
6.1.11 Manipulating matrices 152

6.1.12 Array (element-by-element) operations on matrices 153
6.1.13 Matrices and for 153
6.1.14 Visualization of matrices 154
6.1.15 Vectorizing nested fors: loan repayment tables 154
6.1.16 Multidimensional arrays 156
6.2 Matrix operations 157
6.2.1 Matrix multiplication 157
6.2.2 Matrix exponentiation 159
6.3 Other matrix functions 160
6.4 *Strings 160
6.4.1 Assignment 160
6.4.2 Input 160
6.4.3 Strings are arrays 161
6.4.4 Concatenation of strings 161
6.4.5 ASCII codes, double and char 162
6.4.6 fprintf of strings 163
6.4.7 Comparing strings 163
6.4.8 Other string functions 164
6.5 *Two-dimensional strings 164
6.6 *eval and text macros 165
6.6.1 Error trapping with eval and lasterr 166
6.6.2 eval with try...catch 167
7 Introduction to graphics 171
7.1 Basic 2-D graphs 171
7.1.1 Labels 173
7.1.2 Multiple plots on the same axes 173
7.1.3 Line styles, markers and color 174
7.1.4 Axis limits 175
7.1.5 Multiple plots in a figure: subplot 176
7.1.6 figure, clf and cla 178
7.1.7 Graphical input 178
7.1.8 Logarithmic plots 178
7.1.9 Polar plots 179
7.1.10 Plotting rapidly changing mathematical functions: fplot 180
7.1.11 The property editor 181
7.2 3-D plots 181
7.2.1 plot3 182
7.2.2 Animated 3-D plots with comet3 183
7.2.3 Mesh surfaces 183
7.2.4 Contour plots 186
7.2.5 Cropping a surface with NaNs 187
7.2.6 Visualizing vector fields 188
7.2.7 Visualization of matrices 189

7.2.8 Rotation of 3-D graphs 190
7.2.9 Other cool graphics functions 192
8 Loops 205
8.1 Determinate repetition with for 205
8.1.1 Binomial coefficient 205
8.1.2 Update processes 206
8.1.3 Nested fors 208
8.2 Indeterminate repetition with while 208
8.2.1 A guessing game 208
8.2.2 The while statement 209
8.2.3 Doubling time of an investment 210
8.2.4 Prime numbers 211
8.2.5 Projectile trajectory 212
8.2.6 break and continue 215
8.2.7 Menus 215
9 Errors and pitfalls 222
9.1 Syntax errors 222
9.1.1 lasterr 225
9.2 Pitfalls and surprises 225
9.2.1 Incompatible vector sizes 225
9.2.2 Name hiding 225
9.2.3 Other pitfalls for the unwary 226
9.3 Errors in logic 226
9.4 Rounding error 226
9.5 Trapping and generating errors 228
10 Function M-files 230
10.1 Some examples 230
10.1.1 Inline objects: harmonic oscillators 230
10.1.2 Function M-files: Newton’s method again 232
10.2 Basic rules 233
10.2.1 Subfunctions 239
10.2.2 Private functions 239
10.2.3 P-code files 239
10.2.4 Improving M-file performance with the profiler 240
10.3 Function handles 240
10.4 Command/function duality 242
10.5 Function name resolution 243
10.6 Debugging M-files 243
10.6.1 Debugging a script 244
10.6.2 Debugging a function 246
10.7 Recursion 246
7.2.8 Rotation of 3-D graphs 190
7.2.9 Other cool graphics functions 192
8 Loops 205
8.1 Determinate repetition with for 205
8.1.1 Binomial coefficient 205
8.1.2 Update processes 206
8.1.3 Nested fors 208
8.2 Indeterminate repetition with while 208
8.2.1 A guessing game 208
8.2.2 The while statement 209
8.2.3 Doubling time of an investment 210
8.2.4 Prime numbers 211
8.2.5 Projectile trajectory 212
8.2.6 break and continue 215
8.2.7 Menus 215
9 Errors and pitfalls 222
9.1 Syntax errors 222
9.1.1 lasterr 225
9.2 Pitfalls and surprises 225
9.2.1 Incompatible vector sizes 225
9.2.2 Name hiding 225
9.2.3 Other pitfalls for the unwary 226
9.3 Errors in logic 226
9.4 Rounding error 226
9.5 Trapping and generating errors 228
10 Function M-files 230
10.1 Some examples 230
10.1.1 Inline objects: harmonic oscillators 230
10.1.2 Function M-files: Newton’s method again 232
10.2 Basic rules 233
10.2.1 Subfunctions 239
10.2.2 Private functions 239
10.2.3 P-code files 239
10.2.4 Improving M-file performance with the profiler 240
10.3 Function handles 240
10.4 Command/function duality 242
10.5 Function name resolution 243
10.6 Debugging M-files 243
10.6.1 Debugging a script 244
10.6.2 Debugging a function 246
10.7 Recursion 246
13 *Graphical User Interfaces (GUIs) 292
13.1 Basic structure of a GUI 292
13.2 A first example: getting the time 293
13.2.1 Exercise 297
13.3 Newton again 297
13.4 Axes on a GUI 301
13.5 Adding color to a button 302
PART II APPLICATIONS 305
14 Dynamical systems 307
14.1 Cantilever beam 309
14.2 Electric current 311
14.3 Free fall 314
14.4 Projectile with friction 323
15 Simulation 328
15.1 Random number generation 328
15.1.1 Seeding rand 329
15.2 Spinning coins 329
15.3 Rolling dice 330
15.4 Bacteria division 331
15.5 A random walk 331
15.6 Traffic flow 333
15.7 Normal (Gaussian) random numbers 336
16 *More matrices 341
16.1 Leslie matrices: population growth 341
16.2 Markov processes 345
16.2.1 A random walk 345
16.3 Linear equations 348
16.3.1 MATLAB’s solution 349
16.3.2 The residual 350
16.3.3 Overdetermined systems 350
16.3.4 Underdetermined systems 351
16.3.5 Ill conditioning 351
16.3.6 Matrix division 352
16.4 Sparse matrices 354
17 *Introduction to numerical methods 359
17.1 Equations 359
17.1.1 Newton’s method 359
17.1.2 The Bisection method 362
17.1.3 fzero 364
17.1.4 roots 364
17.2 Integration 364
17.2.1 The Trapezoidal rule 365
17.2.2 Simpson’s rule 366
17.2.3 quad 367
17.3 Numerical differentiation 367
17.3.1 diff 368
17.4 First-order differential equations 369
17.4.1 Euler’s method 369
17.4.2 Example: bacteria growth 370
17.4.3 Alternative subscript notation 371
17.4.4 A predictor-corrector method 373
17.5 Linear ordinary differential equations (LODEs) 374
17.6 Runge-Kutta methods 375
17.6.1 A single differential equation 375
17.6.2 Systems of differential equations: chaos 376
17.6.3 Passing additional parameters to an ODE solver 379
17.7 A partial differential equation 381
17.7.1 Heat conduction 381
17.8 Other numerical methods 385
Appendix A: Syntax quick reference 390
A.1 Expressions 390
A.2 Function M-files 390
A.3 Graphics 390
A.4 if and switch 391
A.5 for and while 392
A.6 Input/output 393
A.7 load/save 393
A.8 Vectors and matrices 393
Appendix B: Operators 395
Appendix C: Command and functionquick reference 396
C.1 General purpose commands 397
C.1.1 Managing commands 397
C.1.2 Managing variables and the workspace 397
C.1.3 Files and the operating system 397
C.1.4 Controlling the Command Window 398
C.1.5 Starting and quitting MATLAB 398
C.2 Logical functions 398
C.3 Language constructs and debugging 398
C.3.1 MATLAB as a programming language 398
C.3.2 Interactive input 399
C.4 Matrices and matrix manipulation 399
C.4.1 Elementary matrices 399
C.4.2 Special variables and constants 399
C.4.3 Time and date 400
C.4.4 Matrix manipulation 400
C.4.5 Specialized matrices 400
C.5 Mathematical functions 400
C.6 Matrix functions 401
C.7 Data analysis 402
C.8 Polynomial functions 402
C.9 Function functions 402
C.10 Sparse matrix functions 402
C.11 Character string functions 403
C.12 File I/O functions 403
C.13 Graphics 403
C.13.1 2-D 403
C.13.2 3-D 404
C.13.3 General 404
Appendix D: ASCII character codes 405
Appendix E: Solutions to selected exercises 406
Index 421


Ekwere J. Peters petrophysics (free download)










INTRODUCTION


Petrophysics is the study of rock properties and their interactions
with fluids (gases, liquid hydrocarbons and aqueous solutions). Because
petroleum reservoir rocks must have porosity and permeability, we are
most interested in the properties of porous and permeable rocks. The
purpose of this text is to provide a basic understanding of the physical
properties of permeable geologic rocks and the interactions of the various
fluids with their interstitial surfaces. Particular emphasis is placed on
the transport properties of the rocks for single phase and multiphase
flow.
The petrophysical properties that are discussed in this text
include:
• Porosity
• Absolute permeability
• Effective and relative permeabilities
• Water saturation

• Irreducible water saturation
• Hydrocarbon saturation
• Residual oil saturation
• Capillary pressure
• Wettability
• Pore size
• Pore size distribution
• Pore structure
• Net pay thickness
• Isothermal coefficient of compressibility
• Mineralogy
• Specific pore surface area
• Dispersivity 






TABLE OF CONTENTS
Page
1 PETROLEUM RESERVOIR ROCKS ......................................... 1-1
1.1 PETROPHYSICS ............................................................................... 1-1
1.2 PETROLEUM RESERVOIR ROCKS ................................................1-2
1.3 MINERAL CONSTITUENTS OF ROCKS—A REVIEW ...................1-4
1.4 ROCKS............................................................................................... 1-5
1.4.1 Igneous Rocks.................................................................... 1-5
1.4.2 Metamorphic Rocks...........................................................1-6
1.4.3 Sedimentary Rocks ............................................................1-6
1.5 CLASSIFICATION OF SEDIMENTARY ROCKS ............................. 1-7
1.5.1 Clastic Sedimentary Rocks ................................................ 1-7
1.5.2 Chemical Sedimentary Rocks............................................ 1-7
1.5.3 Organic Sedimentary Rocks ..............................................1-8
1.6 DISTRIBUTION OF SEDIMENTARY ROCK TYPES .................... 1-10
1.7 SANDSTONE RESERVOIRS (CLASTIC SEDIMENTARY
ROCK) ............................................................................................. 1-10
1.7.1 Pore Space ....................................................................... 1-12
1.7.2 Compaction and Cementation......................................... 1-15
1.7.3 Classification ................................................................... 1-17
1.8 CARBONATE RESERVOIRS (LIMESTONES AND
DOLOMITES) .................................................................................1-20
1.8.1 Classification ................................................................... 1-21
1.8.2 Pore Space .......................................................................1-22
1.9 FRACTURED RESERVOIRS..........................................................1-28
1.10 RESEVOIR COLUMN.....................................................................1-29
REFRENCES...................................................................................1-32
2 POROSITY AND FLUID SATURATIONS..................................2-1
2.1 DEFINITION OF POROSITY ...........................................................2-1
2.2 FACTORS AFFECTING SANDSTONE POROSITY ........................ 2-2
2.3 FACTORS AFFECTING CARBONATE POROSITY ........................ 2-4
2.4 TYPICAL RESERVOIR POROSITY VALUES.................................. 2-5
2.5 LABORATORY MEASUREMENT OF POROSITY.......................... 2-6



2.5.1 Direct Porosity Measurement by Routine
Core Analysis .................................................................... 2-6
2.5.2 Indirect Porosity Measurement by CT Imaging.............. 2-11
2.6 FLUID SATURATIONS ..................................................................2-16
2.7 INDIRECT POROSITY MEASUREMENTS FROM
WELL LOGS................................................................................... 2-24
2.7.1 Introduction to Well Logging......................................... 2-24
2.7.2 Mud filtrate Invasion...................................................... 2-25
2.7.3 Porosity Logs .................................................................. 2-32
Density Log .................................................................. 2-32
Sonic Log (Acoustic Log) ............................................. 2-36
Neutron Log .................................................................2-41
Combination Porosity Logs ......................................... 2-45
2.7.4 Resistivity Log ................................................................ 2-46
Electric Log ................................................................. 2-54
Induction-Electric Log................................................ 2-56
Dual Induction Laterolog ........................................... 2-58
Focused Electric Log (Guard and Laterolog) ............. 2-62
Microresistivity Logs................................................... 2-65
2.7.5 Lithology Logs ................................................................ 2-68
Spontaneous Potential Log (SP) ................................. 2-68
The Gamma Ray Log (GR)...........................................2-73
2.7.6 Nuclear Magnetic Resonance (NMR) Logs.................... 2-76
Nuclear Spins in a Magnetic Field.............................. 2-76
The Effect of Radiofrequency Pulses -
Resonance Absorption ............................................... 2-79
Relaxation Processes...................................................2-80
Molecular Diffusion Effect.......................................... 2-84
NMR Signal and Corresponding T2 Spectrum ........... 2-84
Pore Size Distribution................................................. 2-89
Estimation of Permeability from
NMR Relaxation Times............................................... 2-95
2.7.7 NMR Imaging of Laboratory Cores................................ 2-97
The Effect of Magnetic Field Gradients...................... 2-98
Slice-Selective Excitation............................................ 2-99
Frequency Encoding ................................................. 2-100
Phase Encoding..........................................................2-101
Image Reconstruction............................................... 2-102
Three-Dimensional NMR Imaging............................2-103
Signal-to-Noise Ratio and Image Contrast............... 2-104
Example NMR Images of Laboratory Cores..............2-105
2.7.8 A Comparison of Various Porosity
Measurements for Shaly Sand....................................... 2-112
2.8 RESERVE ESTIMATION PROJECT ........................................... 2-113
2.8.1 Reserve Estimation........................................................ 2-114



2.8.2 Economic Evaluation..................................................... 2-115
2.8.3 Simulation Procedure.................................................... 2-116
2.8.4 Sampling Procedure ...................................................... 2-116
2.8.5 Simulation Output.........................................................2-124
2.9 PORE VOLUME COMPRESIBILITY............................................2-126
NOMENCLATURE .......................................................................2-135
REFRENCES AND SUGGESTED READINGS.............................2-138
3 PERMEABILITY .....................................................................3-1
3.1 DEFINITION ....................................................................................3-1
3.2 DIMENSIONS AND UNIT OF PERMEABILITY............................ 3-6
3.3 LABORATORY DETERMINATION OF PERMEABILITY...............3-7
3.4 FIELD DETERMINATION OF PERMEABILITY ..........................3-14
3.4.1 Diffusivity Equation for Slightly
Compressible Liquid........................................................3-15
3.4.2 Pressure Drawdown Equation ........................................3-19
3.4.3 Pressure Buildup Equation ............................................ 3-22
3.4.4 Diagnostic Plots.............................................................. 3-24
3.4.5 Skin Factor...................................................................... 3-30
3.4.6 Homogenous Reservoir Model with
Wellbore Storage and Skin............................................. 3-33
3.4.7 Type Curve Matching ......................................................3-37
3.4.8 Radius of Investigation of a Well Test ........................... 3-40
3.4.9 Field Example of Well Test Analysis .............................. 3-40
3.4.10 Welltest Model for Dry Gas Reservoir .......................... 3-52
3.5 FACTORS AFFECTING PERMEABILITY..................................... 3-56
3.5.1 Compaction..................................................................... 3-56
3.5.2 Pore Size (Grain Size) ..................................................... 3-56
3.5.3 Sorting ............................................................................ 3-60
3.5.4 Cementation ................................................................... 3-60
3.5.5 Layering .......................................................................... 3-60
3.5.6 Clay Swelling....................................................................3-61
3.6 TYPICAL RESERVOIR PERMEABILITY VALUES .......................3-61
3.7 PERMEABILITY-POROSITY CORRELATIONS............................3-61
3.8 CAPILLARY TUBE MODELS OF POROUS MEDIA..................... 3-69
3.8.1 Carman-Kozeny Equation .............................................. 3-69
3.8.2 Tortuosity ........................................................................3-75
3.8.3 Calculation of Permeability from Pore



Size Distribution............................................................. 3-79
3.9 STEADY STATE FLOW THROUGH FRACTURES....................... 3-84
3.10 AVERAGING PERMEABILITY DATA .......................................... 3-85
3.11 DARCY’S LAW FOR INCLINED FLOW........................................3-88
3.12 VALIDITY OF DARCY’S LAW....................................................... 3-99
3.13 NON-DARCY FLOW.....................................................................3-101
3.14 DARCY’S LAW FOR ANISOTROPIC POROUS MEDIA............. 3-106
3.14.1 Definition of Homogeneity and Anisotropy ................ 3-106
3.14.2 Darcy’s Law for Homogeneous
and Anisotropic Medium.............................................3-107
3.14.3 Transformation of Permeability Tensor
from One Coordinate system to Another .................... 3-114
3.14.4 Alternative Calculation of the Principal
Values and the Principal Axes of the
Permeability Anisotropy..............................................3-122
3.14.5 Directional Permeability...............................................3-124
3.14.6 Measurement of Transverse Permeability
of a Cylindrical Core ....................................................3-137
3.15 EXAMPLE APPLICATIONS OF PERMEABILITY.......................3-140
3.15.1 Productivity of Horizontal Well ....................................3-140
Introduction............................................................... 3-141
Homogeneous and Isotropic Reservoirs ................... 3-141
Homogeneous and Anisotropic Reservoirs ...............3-145
3.15.2 Productivity of a Vertically Fractured Well ..................3-152
NOMENCLATURE .......................................................................3-155
REFRENCES AND SUGGESTED READINGS.............................3-159
4 HETEROGENEITY ................................................................ 4-1
4.1 INTRODUCTION..............................................................................4-1
4.2 MEASURES OF CENTRAL TENDENCY AND
VARIABILITY (HETEROGENEITY)............................................... 4-3
4.2.1 Measures of Central Tendency......................................... 4-3
Mean.............................................................................. 4-3
Geometric Mean............................................................ 4-3
Median .......................................................................... 4-3
Mode.............................................................................. 4-4
4.2.1 Measures of Variability
(Heterogeneity or Spread) ............................................... 4-4
Variance ........................................................................ 4-4

Dykstra-Parsons Coefficient of Variation..................... 4-5
Lorenz Coefficient ......................................................... 4-8
4.3 MEASURES OF SPATIAL CONTINUITY ...................................... 4-11
4.3.1 Variogram........................................................................4-13
Definition .....................................................................4-13
How to Calculate the Variogram .................................4-16
Physical Meaning of the Variogram............................ 4-27
Variogram Models....................................................... 4-28
Fitting a Theoretical Variogram Model to
an Experimental Variogram ....................................... 4-35
Variogram Anisotropy .................................................4-41
Example Experimental Variograms............................ 4-44
4.3.2 Covariance (Autocovariance) Function...........................4-51
Definition .....................................................................4-51
Physical Meaning of Covariance Function ................. 4-54
4.3.3 Correlation Coefficient Function
(Autocorrelation Function) .............................................4-57
4.4 PROBABILITY DISTRIBUTIONS ................................................. 4-59
4.4.1 Normal (Gaussian) Distribution .................................... 4-60
4.4.2 Log Normal Distribution................................................ 4-72
4.5 ESTIMATION .................................................................................4-75
4.5.1 Introduction ....................................................................4-75
4.5.2 Ordinary Kriging Equations ........................................... 4-86
Derivation in Terms of the
Covariance Function................................................... 4-89
Derivation in Terms of the Variogram ....................... 4-94
Solution of the Kriging Equation in terms
of the Covariance Function......................................... 4-98
Solution of the Kriging Equation in terms
of Variogram..............................................................4-103
4.6 CONDITIONAL SIMULATION....................................................4-132
4.6.1 Introduction ..................................................................4-132
4.6.2 Sequential Gaussian Simulation ...................................4-132
4.6.3 A Practical Application of Sequential
Gaussian Simulation .....................................................4-136
NOMENCLATURE .......................................................................4-148
REFRENCES AND SUGGESTED READINGS.............................4-149
5 DISPERSION IN POROUS MEDIA ..........................................5-1
5.1 INTRODUCTION..............................................................................5-1



5.2 LABORATORY FIRST-CONTACT MISCIBLE
DISPLACEMENTS........................................................................... 5-3
5.3 ORIGIN OF DISPERSION IN POROUS MEDIA.......................... 5-20
5.3.1 Molecular Diffusion.........................................................5-21
5.3.2 Mechanical Dispersion ....................................................5-21
5.4 CONVECTION-DISPERSION EQUATION................................... 5-23
5.4.1 Generalized Equation in Vector Notation...................... 5-23
5.4.2 One Dimensional Convection-Dispersion
Equation ........................................................................ 5-25
5.4.2 Solution of the One-Dimensional
Convection-Dispersion Equation................................... 5-26
5.5 DISPERSION COEFFICENT AND DISPERSIVITY ..................... 5-42
5.6 MEASURMENT OF DISPERSION COEFFICENT
AND DISPERSIVITY ......................................................................5-53
5.6.1 Traditional Laboratory Method with
Breakthrough Curve .......................................................5-53
5.6.2 Laboratory Method of Peters et al. (1996) ..................... 5-56
5.6.3 Field Measurement of Dispersion
Coefficient and Dispersivity ............................................ 5-71
5.7 FACTORS THAT COULD AFFECT DISPERSION
COEFFICENT AND DISPERSIVITY ..............................................5-75
5.8 NUMERICAL MODELING OF FIRST-CONTACT
MISCIBLE DISPLACEMENT .........................................................5-79
5.8.1 Introduction ....................................................................5-79
5.8.2 Mathematical Model of First-Contact
Miscible Displacement ....................................................5-79
5.8.3 Numerical Modeling of Laboratory Experiments.......... 5-82
Experiment 1 ................................................................. 5-84
Experiment 2..................................................................5-91
Experiment 3................................................................. 5-99
Experiment 4................................................................5-106
Experiment 5................................................................ 5-116
Experiment 6................................................................ 5-121
NOMENCLATURE .......................................................................5-126
REFRENCES AND SUGGESTED READINGS.............................5-128
6 INTERFACIAL PHENOMENA AND WETTABILITY................ 6-1
6.1 INTRODUCTION..............................................................................6-1
6.2 SURFACE AND INTERFACIAL TENSIONS................................... 6-2
6.2.1 Surface Tension ................................................................ 6-2
6.2.2 Interfacial Tension .......................................................... 6-11

6.2.3 Measurement of Surface and
Interfacial Tension.........................................................6-20
Capillary Rise Experiment ............................................6-20
Sessile Drop Method..................................................... 6-24
Pendant Drop Method .................................................. 6-26
Ring Method.................................................................. 6-27
Spinning Drop Method ................................................. 6-30
6.3 WETTABILITY................................................................................6-31
6.3.1 Definition.........................................................................6-31
6.3.2 Determination of Wettability ......................................... 6-36
Contact Angle Method ................................................. 6-37
Amott Wettability Test..................................................6-40
United State Bureau of Mines (USBM)
Wettability Test ............................................................. 6-42
6.3.3 Wettability of Petroleum Reservoirs.............................. 6-45
6.3.4 Effect of Wettability on Rock-Fluid Interactions........... 6-46
Microscopic Fluid Distribution at the
Pore Scale ..................................................................... 6-47
Effect of Wettability on Irreducible
Water Saturation .......................................................... 6-47
Effect of Wettability on Electrical
Properties of Rocks ...................................................... 6-48
Effect of Wettability on the Efficiency of an
Immiscible Displacement .............................................6-51
6.3 THERMODYMAMICS OF INTERFACES ..................................... 6-64
6.4.1 Characterization of Interfacial Tension
as Specific Surface Energy.............................................. 6-64
6.4.2 Characterization of Microscopic Pore Level
Fluid Displacements....................................................... 6-66
Case 1. Displacement of a Nonwetting
Phase by a Wetting Phase ............................................ 6-67
Case 2. Displacement of a Wetting Phase
by a Nonwetting Phase ................................................. 6-69
NOMENCLATURE .........................................................................6-71
REFRENCES AND SUGGESTED READINGS .............................. 6-73
7 CAPILLARY PRESSURE .........................................................7-1
7.1 DEFINITION OF CAPILLARY PRESSURE ..................................... 7-1
7.2 CAPILLARY PRESSURE-SATURATION RELATIONSHIP
FOR A POROUS MEDIUM.............................................................. 7-8
7.3 DRAINAGE CAPILLARY PRESSURE CURVE .............................. 7-17



7.4 CONVERSION OF LABORATORY CAPILLARY PRESSURE
DATA TO RESERVOIR CONDITIONS ..........................................7-21
7.5 AVERAGING CAPILLARY PRESSURE DATA ..............................7-21
7.6 DETERMINATION OF INITIAL STATIC RESERVOIR
FLUID SATURATIONS BY USE OF DRAINAGE
CAPILLARY PRESSURE CURVE.................................................. 7-28
7.7 CAPILLARY PRESSURE HYSTERESIS.........................................7-45
7.8 CAPILLARY IMBIBITION..............................................................7-54
7.9 CAPILLARY END EFFECT IN A LABORATORY CORE ...............7-57
7.9.1 Capillary End Effect.........................................................7-57
7.9.2 Mathematical Analysis of Capillary End Effect ..............7-59
7.9.3 Mathematical Model of Capillary End Effect
During Steady State Relative Permeability
Measurement.................................................................. 7-68
7.9.4 Experimental Evidence of Capillary End Effect...............7-70
7.10 CAPILLARY PRESSURE MEASUREMENTS ................................7-76
7.10.1 Restored State Method (Porous Plate Method)..............7-76
7.10.2 Mercury Injection Method .............................................7-77
7.10.3 Centrifuge Method..........................................................7-81
7.11 PORE SIZE DISTRIBUTION......................................................... 7-96
7.11.1 Introduction.................................................................... 7-96
7.11.2 Pore Volume Distribution .............................................. 7-98
7.11.3 Pore Size Distribution Based on Bundle
of Capillary Tubes Model ............................................7-103
7.11.4 Mercury Injection Porosimeter..................................... 7-115
7.12 CALCULATION OF PERMEABILITY FROM DRAINAGE
CAPILLARY PRESSURE CURVE................................................. 7-118
7.12.1 Calculation of Absolute Permeability from
Drainage Capillary Pressure Curve............................. 7-118
7.12.2 Calculation of Relative Permeabilities from
Drainage Capillary Pressure Curve.............................7-132
7.13 EMPIRICAL CAPILLARY PRESSURE MODELS ........................7-133
7.13.1 Brooks-Corey Capillary Pressure Models .....................7-133
7.13.2 van Genuchten Capillary Pressure Model ....................7-143
7.14 CAPILLARY TRAPPING IN POROUS MEDIA........................... 7- 145
7.14.1 Pore Doublet Model of Capillary Trapping................... 7-145

7.14.2 Snap-Off Model of Capillary Trapping ......................... 7-152
7.14.3 Mobilization of Residual Non-Wetting Phase.............. 7-155
7.14.4 Oil Migration.................................................................7-159
7.15 EFFECTS OF WETTABILITY AND INTERFACIAL
TENSION ON CAPILLARY PRESSURE CURVES.......................7-162
NOMENCLATURE .......................................................................7-164
REFRENCES AND SUGGESTED READINGS ............................ 7-168
8 RELATIVE PERMEABILITY................................................... 8-1
8.1 DEFINITION OF RELATIVE PERMEABILITY...............................8-1
8.2 LABORATORY MEASUREMENT OF TWO-PHASE
RELATIVE PERMEABILITY BY THE STEADY STATE
METHOD......................................................................................... 8-6
8.3 THEORY OF ONE DIMENSIONAL IMMISCIBLE
DISPLACEMENT IN A POROUS MEDIUM..................................8-15
8.3.1 Mathematical Model of Two-Phase
Immiscible Displacement................................................8-15
8.3.2 Buckley-Leverett Approximate Solution of the
Immiscible Displacement Equation................................8-21
8.3.3 Waterflood Performance Calculations from
Buckley-Leverett Theory .................................................8-31
Oil Recovery at any Time ...............................................8-31
Oil Recovery Before Water Breakthrough.....................8-31
Oil Recovery at Water Breakthrough............................ 8-32
Oil Recovery After Water Breakthrough ...................... 8-36
Water Production...........................................................8-41
8.4 LABORATORY MEASUREMENT OF TWO-PHASE
RELATIVE PERMEABILITY BY THE UNSTEADY STATE
METHOD........................................................................................8-51
8.5 FACTORS AFFECTING RELATIVE PERMEABILITIES.............. 8-65
8.5.1 Fluid Saturation.............................................................. 8-65
8.5.2 Saturation History..........................................................8-66
8.5.3 Wettability ...................................................................... 8-67
8.5.4 Injection Rate ................................................................. 8-70
8.5.5 Viscosity Ratio ................................................................ 8-73
8.5.6 Interfacial Tension ......................................................... 8-74
8.5.7Pore Structure .................................................................. 8-75
8.5.8 Temperature ................................................................... 8-76
8.5.9 Heterogeneity ................................................................. 8-78



8.6 THREE-PHASE RELATIVE PERMEABILITIES .......................... 8-79
8.4 CALCULATION OF RELATIVE PERMEABILITIES FROM
DRAINAGE CAPILLARY PRESSURE CURVE .............................8-82
NOMENCLATURE .........................................................................8-91
REFERENCES AND SUGGESTED READINGS............................ 8-94
APPENDIX A: A Systematic Approach To Dimensional Analysis .. A-1
Summary.......................................................................................... A-1
Introduction..................................................................................... A-1
Algebraic Theory of Dimensional Analysis......................................A-2
Transformation of the Dimensionless p Groups .............................A-9
Example Problem.............................................................................A-9
Procedure ....................................................................................... A-10
Transformation of the Dimensionless p Groups for
Example Problem........................................................................... A-21
Some Practical Considerations ......................................................A-28
Concluding Remarks...................................................................... A-31
Nomenclature ................................................................................ A-31
References ......................................................................................A-32